diff options
-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 7cb5b80..15b1293 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 966a06e..547927b 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 966a06e..547927b 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 a24cea8..681d811 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 3a5cd47..4a04c1c 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 e9f5aaf..655b182 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 |