diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2002-08-13 14:17:39 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2002-08-13 14:17:39 +0000 |
| commit | ea33013bc4102e508de8a66e47886672c6b4a479 (patch) | |
| tree | 4a967a0ecd2e80104cb3a22940c9b307cbe7b8ff /lib/libc | |
| parent | 76e0d061312bb1652873fec8c417cc5dbbff45fb (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdlib/strtod.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index eaa7ad0e2124..929558319527 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -222,12 +222,16 @@ extern "C" { Only one of IEEE_LITTLE_ENDIAN, IEEE_BIG_ENDIAN, VAX, or IBM should be defined. #endif +union doubleasulongs { + double x; + ULong w[2]; +}; #ifdef IEEE_LITTLE_ENDIAN -#define word0(x) ((ULong *)&x)[1] -#define word1(x) ((ULong *)&x)[0] +#define word0(x) (((union doubleasulongs *)&x)->w)[1] +#define word1(x) (((union doubleasulongs *)&x)->w)[0] #else -#define word0(x) ((ULong *)&x)[0] -#define word1(x) ((ULong *)&x)[1] +#define word0(x) (((union doubleasulongs *)&x)->w)[0] +#define word1(x) (((union doubleasulongs *)&x)->w)[1] #endif /* The following definition of Storeinc is appropriate for MIPS processors. |
