summaryrefslogtreecommitdiffstats
path: root/lib/msun/src
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2002-09-19 19:47:27 +0000
committerarchie <archie@FreeBSD.org>2002-09-19 19:47:27 +0000
commit59b24d359e79c9c56ef1a3581b648326358c36f4 (patch)
treecfc65b2080b7272edf00045ee91c19c52dada324 /lib/msun/src
parent0c5a203325d0f285b38bbb4332f66e3a52916648 (diff)
downloadFreeBSD-src-59b24d359e79c9c56ef1a3581b648326358c36f4.zip
FreeBSD-src-59b24d359e79c9c56ef1a3581b648326358c36f4.tar.gz
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
Diffstat (limited to 'lib/msun/src')
-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 108b086..5f7312b 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
OpenPOWER on IntegriCloud