From 7635b30f9d62e33b057d830780a937c6c1d140f5 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 14 Dec 2005 02:33:36 +0000 Subject: Fixup byte order handling. Not all architectures define __BIG_ENDIAN__ so i.e. on big endian mips the code is compiled as little-endian and the wrong half of the 64-bit point value is examined to check for NaN, etc. This bug also broke fpclassify(), isfinite(), isnormal(), isinf(), finite(), and signbit(). --- libm/fp_private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libm/fp_private.h') diff --git a/libm/fp_private.h b/libm/fp_private.h index 505400e33..0ddb616c4 100644 --- a/libm/fp_private.h +++ b/libm/fp_private.h @@ -70,10 +70,11 @@ *******************************************************************************/ #include +#include typedef struct /* Hex representation of a double. */ { -#if defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __BIG_ENDIAN) uint32_t high; uint32_t low; #else -- cgit v1.2.3