summaryrefslogtreecommitdiff
path: root/tests/test-frexpl.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-10-18 03:15:17 +0200
committerBruno Haible <bruno@clisp.org>2008-10-18 03:15:17 +0200
commit9d5d03ff00b8b11b51450ce107159b263efb1739 (patch)
tree53eeb4d45a35bbb5d1500c5e2b27a191337df405 /tests/test-frexpl.c
parent3c08dcc35ce66a98261584beea4c5006fa28ca9b (diff)
downloadgnulib-9d5d03ff00b8b11b51450ce107159b263efb1739.tar.gz
Avoid compilation error due to MacOS X 10.5 gcc cross-compilation bug.
Diffstat (limited to 'tests/test-frexpl.c')
-rw-r--r--tests/test-frexpl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c
index f98bf51313..91f2d6723b 100644
--- a/tests/test-frexpl.c
+++ b/tests/test-frexpl.c
@@ -58,8 +58,14 @@
#endif
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
- So we use minus_zero instead. */
+ So we use minus_zero instead.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
long double minus_zero = -LDBL_MIN * LDBL_MIN;
+#else
+long double minus_zero = -0.0L;
+#endif
static long double
my_ldexp (long double x, int d)