Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/sh3/gen Adjust for little endian environments ...



details:   https://anonhg.NetBSD.org/src/rev/df964cdc28e7
branches:  trunk
changeset: 480673:df964cdc28e7
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Jan 17 16:21:36 2000 +0000

description:
Adjust for little endian environments (confirmed by msaitoh).

diffstat:

 lib/libc/arch/sh3/gen/infinity.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r b8b640a2b1e3 -r df964cdc28e7 lib/libc/arch/sh3/gen/infinity.c
--- a/lib/libc/arch/sh3/gen/infinity.c  Mon Jan 17 16:17:32 2000 +0000
+++ b/lib/libc/arch/sh3/gen/infinity.c  Mon Jan 17 16:21:36 2000 +0000
@@ -1,13 +1,18 @@
-/*     $NetBSD: infinity.c,v 1.1 2000/01/05 14:07:33 msaitoh Exp $     */
+/*     $NetBSD: infinity.c,v 1.2 2000/01/17 16:21:36 kleink Exp $      */
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: infinity.c,v 1.1 2000/01/05 14:07:33 msaitoh Exp $");
+__RCSID("$NetBSD: infinity.c,v 1.2 2000/01/17 16:21:36 kleink Exp $");
 #endif /* not lint */
 
 /* infinity.c */
 
 #include <math.h>
+#include <machine/endian.h>
 
 /* bytes for +Infinity on a SH3 */
+#if BYTE_ORDER == LITTLE_ENDIAN
+const char __infinity[] = { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f };
+#else
 const char __infinity[] = { 0x7f, (char)0xf0, 0, 0, 0, 0, 0, 0 };
+#endif



Home | Main Index | Thread Index | Old Index