summaryrefslogtreecommitdiff
path: root/lib/libc/arch
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-11-12 21:18:29 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-11-12 21:18:29 +0000
commite708e2d41d6752567736ba8a3c7718579cf76e3e (patch)
treed198a57a7b55315c3fc2f4d223aed41493b88e81 /lib/libc/arch
parent4f3e850c3eded7ab7783ce19745adb3c4e237b48 (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.c8
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