summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/strtod.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-11-04 21:30:12 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-11-04 21:30:12 +0000
commitb1f214cf5f28fc0eb91ebe56c3f4a4d68114b0d7 (patch)
treeaac5cce1f041978335d0bbe0c74394a4f137818f /lib/libc/stdlib/strtod.c
parent3d08935d6a9c40cef5059bf6f4f2f0539714a6ec (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/strtod.c')
-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 3dba1c84aff5..464f4e318dbf 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.