summaryrefslogtreecommitdiffstats
path: root/lib/msun/src
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2002-10-31 23:05:20 +0000
committerarchie <archie@FreeBSD.org>2002-10-31 23:05:20 +0000
commitd93f84495b026a1b7c262a0bfe1b9c0b3175105b (patch)
tree8d7fa3106ac92267f105d9e4b9d8fad61d60e197 /lib/msun/src
parentc8c942c58702c5da3dfad5e12db60c6f57cbba51 (diff)
downloadFreeBSD-src-d93f84495b026a1b7c262a0bfe1b9c0b3175105b.zip
FreeBSD-src-d93f84495b026a1b7c262a0bfe1b9c0b3175105b.tar.gz
Re-apply the previously backed-out commit that fixes the problem where
HUGE_VAL is not properly aligned on some architectures. The previous fix now works because the two versions of 'math.h' (include/math.h and lib/msun/src/math.h) have since been merged into one. PR: bin/43544
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 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
OpenPOWER on IntegriCloud