diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2002-08-31 22:26:35 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2002-08-31 22:26:35 +0000 |
| commit | c0aa8f3a9803acf341dff06b5a9ed807eae83ce9 (patch) | |
| tree | 0212c466902d741d37d0ecd9a6760111b919e529 /lib/libc | |
| parent | e8db7200038a62f4d45af223f9baf24fac04d59b (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 f8ed1c3df610..5065dac7d6e1 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -217,12 +217,16 @@ extern "C" { Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined. #endif +union doubleasulongs { + double x; + unsigned long w[2]; +}; #ifdef IEEE_8087 -#define word0(x) ((unsigned long *)&x)[1] -#define word1(x) ((unsigned long *)&x)[0] +#define word0(x) (((union doubleasulongs *)&x)->w)[1] +#define word1(x) (((union doubleasulongs *)&x)->w)[0] #else -#define word0(x) ((unsigned long *)&x)[0] -#define word1(x) ((unsigned long *)&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. |
