1 diff --git a/math_private.h b/math_private.h
8 #ifndef _MATH_PRIVATE_H_
9 #define _MATH_PRIVATE_H_
12 #include <sys/types.h>
13 -#include <machine/endian.h>
15 +#include "mozilla/EndianUtils.h"
20 * The original fdlibm code used statements like:
21 * n0 = ((*(int*)&one)>>29)^1; * index of high word *
22 * ix0 = *(n0+(int*)&x); * high word of x *
23 * ix1 = *((1-n0)+(int*)&x); * low word of x *
24 * to dig two 32 bit words out of the 64 bit IEEE floating point
25 * value. That is non-ANSI, and, moreover, the gcc instruction
26 * scheduler gets it wrong. We instead use the following macros.
27 * Unlike the original code, we determine the endianness at compile
28 * time, not at run time; I don't see much benefit to selecting
29 * endianness at run time.
33 - * A union which permits us to convert between a double and two 32 bit
38 -#if defined(__VFP_FP__) || defined(__ARM_EABI__)
39 -#define IEEE_WORD_ORDER BYTE_ORDER
41 -#define IEEE_WORD_ORDER BIG_ENDIAN
44 -#define IEEE_WORD_ORDER BYTE_ORDER
47 /* A union which permits us to convert between a long double and
50 -#if IEEE_WORD_ORDER == BIG_ENDIAN
60 @@ -68,17 +54,17 @@ typedef union
65 } ieee_quad_shape_type;
69 -#if IEEE_WORD_ORDER == LITTLE_ENDIAN
70 +#if MOZ_LITTLE_ENDIAN()
79 @@ -87,17 +73,17 @@ typedef union
84 } ieee_quad_shape_type;
88 -#if IEEE_WORD_ORDER == BIG_ENDIAN
98 @@ -105,17 +91,17 @@ typedef union
103 } ieee_double_shape_type;
107 -#if IEEE_WORD_ORDER == LITTLE_ENDIAN
108 +#if MOZ_LITTLE_ENDIAN()