From d93f84495b026a1b7c262a0bfe1b9c0b3175105b Mon Sep 17 00:00:00 2001 From: archie Date: Thu, 31 Oct 2002 23:05:20 +0000 Subject: 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 --- lib/msun/src/math.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/msun/src') 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 -- cgit v1.1