diff options
author | Archie Cobbs <archie@FreeBSD.org> | 2002-09-19 19:47:27 +0000 |
---|---|---|
committer | Archie Cobbs <archie@FreeBSD.org> | 2002-09-19 19:47:27 +0000 |
commit | f5f1272284d95871371be4b797b3786d966c5d12 (patch) | |
tree | cfc65b2080b7272edf00045ee91c19c52dada324 /lib | |
parent | c5afa58784ceb6013f9511aebf904378c69b6556 (diff) | |
download | src-f5f1272284d95871371be4b797b3786d966c5d12.tar.gz src-f5f1272284d95871371be4b797b3786d966c5d12.zip |
Notes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/alpha/gen/infinity.c | 2 | ||||
-rw-r--r-- | lib/libc/amd64/gen/infinity.c | 2 | ||||
-rw-r--r-- | lib/libc/i386/gen/infinity.c | 2 | ||||
-rw-r--r-- | lib/libc/ia64/gen/infinity.c | 2 | ||||
-rw-r--r-- | lib/libc/sparc64/gen/infinity.c | 2 | ||||
-rw-r--r-- | lib/msun/src/math.h | 7 |
6 files changed, 10 insertions, 7 deletions
diff --git a/lib/libc/alpha/gen/infinity.c b/lib/libc/alpha/gen/infinity.c index 7cb5b8035827..15b129396085 100644 --- a/lib/libc/alpha/gen/infinity.c +++ b/lib/libc/alpha/gen/infinity.c @@ -33,4 +33,4 @@ __FBSDID("$FreeBSD$"); #include <math.h> /* bytes for +Infinity on an Alpha (IEEE double format) */ -char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; +const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; diff --git a/lib/libc/amd64/gen/infinity.c b/lib/libc/amd64/gen/infinity.c index 966a06eb26ec..547927b6fd66 100644 --- a/lib/libc/amd64/gen/infinity.c +++ b/lib/libc/amd64/gen/infinity.c @@ -8,4 +8,4 @@ __FBSDID("$FreeBSD$"); #include <math.h> /* bytes for +Infinity on a 387 */ -char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; +const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; diff --git a/lib/libc/i386/gen/infinity.c b/lib/libc/i386/gen/infinity.c index 966a06eb26ec..547927b6fd66 100644 --- a/lib/libc/i386/gen/infinity.c +++ b/lib/libc/i386/gen/infinity.c @@ -8,4 +8,4 @@ __FBSDID("$FreeBSD$"); #include <math.h> /* bytes for +Infinity on a 387 */ -char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; +const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; diff --git a/lib/libc/ia64/gen/infinity.c b/lib/libc/ia64/gen/infinity.c index a24cea8371b9..681d811cd1ed 100644 --- a/lib/libc/ia64/gen/infinity.c +++ b/lib/libc/ia64/gen/infinity.c @@ -33,4 +33,4 @@ __FBSDID("$FreeBSD$"); #include <math.h> /* bytes for +Infinity on an ia64 (IEEE double format) */ -char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; +const union __infinity_un __infinity = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }; diff --git a/lib/libc/sparc64/gen/infinity.c b/lib/libc/sparc64/gen/infinity.c index 3a5cd47e4c78..4a04c1c5471c 100644 --- a/lib/libc/sparc64/gen/infinity.c +++ b/lib/libc/sparc64/gen/infinity.c @@ -11,4 +11,4 @@ __FBSDID("$FreeBSD$"); #include <math.h> /* bytes for +Infinity on a sparc */ -char __infinity[] = { 0x7f, (char)0xf0, 0, 0, 0, 0, 0, 0 }; +const union __infinity_un __infinity = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 108b0864f1c5..5f7312b327db 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -20,8 +20,11 @@ /* * ANSI/POSIX */ -extern char __infinity[]; -#define HUGE_VAL (*(double *) __infinity) +extern const union __infinity_un { + unsigned char __uc[8]; + double __ud; +} __infinity; +#define HUGE_VAL (__infinity.__ud) /* * XOPEN/SVID |