diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-11-12 21:18:29 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-11-12 21:18:29 +0000 |
commit | e708e2d41d6752567736ba8a3c7718579cf76e3e (patch) | |
tree | d198a57a7b55315c3fc2f4d223aed41493b88e81 /lib/libc/arch | |
parent | 4f3e850c3eded7ab7783ce19745adb3c4e237b48 (diff) |
fix infinity, taking into account endianess. ok drahn@ miod@
Diffstat (limited to 'lib/libc/arch')
-rw-r--r-- | lib/libc/arch/sh/gen/infinity.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/arch/sh/gen/infinity.c b/lib/libc/arch/sh/gen/infinity.c index a8006550db2..82de0736c11 100644 --- a/lib/libc/arch/sh/gen/infinity.c +++ b/lib/libc/arch/sh/gen/infinity.c @@ -1,4 +1,4 @@ -/* $OpenBSD: infinity.c,v 1.1 2006/10/10 22:07:10 miod Exp $ */ +/* $OpenBSD: infinity.c,v 1.2 2006/11/12 21:18:28 otto Exp $ */ /* infinity.c */ @@ -6,4 +6,8 @@ /* bytes for +Infinity on a SH4 FPU (double precision) */ char __infinity[] __attribute__((__aligned__(sizeof(double)))) = - { 0x7f, (char)0xf0, 0, 0, 0, 0, 0, 0 }; +#if _BYTE_ORDER == _LITTLE_ENDIAN + { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f }; +#else + { 0x7f, (char)0xf0, 0, 0, 0, 0, 0, 0 } +#endif |