aboutsummaryrefslogtreecommitdiff
path: root/lib/msun
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>2002-09-19 19:47:27 +0000
committerArchie Cobbs <archie@FreeBSD.org>2002-09-19 19:47:27 +0000
commitf5f1272284d95871371be4b797b3786d966c5d12 (patch)
treecfc65b2080b7272edf00045ee91c19c52dada324 /lib/msun
parentc5afa58784ceb6013f9511aebf904378c69b6556 (diff)
downloadsrc-f5f1272284d95871371be4b797b3786d966c5d12.tar.gz
src-f5f1272284d95871371be4b797b3786d966c5d12.zip
Fix a problem with the definition of HUGE_VAL causing the gcc warning
"cast increases required alignment of target type" on some platforms. Reviewed by: bde
Notes
Notes: svn path=/head/; revision=103653
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/src/math.h7
1 files changed, 5 insertions, 2 deletions
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