diff options
author | peter <peter@FreeBSD.org> | 2001-11-04 21:30:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-11-04 21:30:12 +0000 |
commit | 46661c1f9e827e0e1134bf8c36674fadf337543d (patch) | |
tree | aac5cce1f041978335d0bbe0c74394a4f137818f /lib | |
parent | 2650f9ea1495350c4d4c119e172b59ab1af10ad4 (diff) | |
download | FreeBSD-src-46661c1f9e827e0e1134bf8c36674fadf337543d.zip FreeBSD-src-46661c1f9e827e0e1134bf8c36674fadf337543d.tar.gz |
Make strtod.c work on Alpha as well. strtod.c has got locale support,
the netbsd_strtod.c file we have does not. More still should be done
here, but this works happily on my Alpha. I have not (yet?) changed
the Makefile.inc to use this.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/strtod.c | 19 |
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. |