summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/strtod.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
index 3dba1c8..464f4e3 100644
--- a/lib/libc/stdlib/strtod.c
+++ b/lib/libc/stdlib/strtod.c
@@ -123,7 +123,10 @@ static char sccsid[] = "@(#)strtod.c 8.1 (Berkeley) 6/4/93";
* FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
*/
-#if defined(i386) || (defined(mips) && defined(MIPSEL)) || defined(__ia64__)
+#include <sys/types.h>
+
+#if defined(i386) || (defined(mips) && defined(MIPSEL)) || \
+ defined(__ia64__) || defined(__alpha__)
#define IEEE_LITTLE_ENDIAN
#else
#define IEEE_BIG_ENDIAN
@@ -219,17 +222,11 @@ Only one of IEEE_LITTLE_ENDIAN, IEEE_BIG_ENDIAN, VAX, or IBM should be defined.
#endif
#ifdef IEEE_LITTLE_ENDIAN
-#ifdef __i386__
-#define word0(x) ((unsigned long *)&x)[1]
-#define word1(x) ((unsigned long *)&x)[0]
-#endif
-#ifdef __ia64__
-#define word0(x) ((unsigned int *)&x)[1]
-#define word1(x) ((unsigned int *)&x)[0]
-#endif
+#define word0(x) ((u_int32_t *)&x)[1]
+#define word1(x) ((u_int32_t *)&x)[0]
#else
-#define word0(x) ((unsigned long *)&x)[0]
-#define word1(x) ((unsigned long *)&x)[1]
+#define word0(x) ((u_int32_t *)&x)[0]
+#define word1(x) ((u_int32_t *)&x)[1]
#endif
/* The following definition of Storeinc is appropriate for MIPS processors.
OpenPOWER on IntegriCloud