Bug#464594: glibc: ieee754.h uses BIG_ENDIAN instead of __BIG_ENDIAN causing doubles to be mixed up on arm
I've attached a patch.
Index: sysdeps/ieee754/ieee754.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/ieee754/ieee754.h,v
retrieving revision 1.12
diff -u -p -r1.12 ieee754.h
--- sysdeps/ieee754/ieee754.h 6 Jul 2001 04:55:54 -0000 1.12
+++ sysdeps/ieee754/ieee754.h 7 Feb 2008 22:45:02 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1999, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -80,7 +80,7 @@ union ieee754_double
unsigned int mantissa1:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int mantissa0:20;
unsigned int exponent:11;
unsigned int negative:1;
@@ -106,7 +106,7 @@ union ieee754_double
unsigned int mantissa0:19;
unsigned int mantissa1:32;
#else
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int mantissa0:19;
unsigned int quiet_nan:1;
unsigned int exponent:11;
@@ -142,7 +142,7 @@ union ieee854_long_double
unsigned int mantissa1:32;
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int exponent:15;
unsigned int negative:1;
unsigned int empty:16;
@@ -171,7 +171,7 @@ union ieee854_long_double
unsigned int mantissa1:32;
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int exponent:15;
unsigned int negative:1;
unsigned int empty:16;
Reply to: