summaryrefslogtreecommitdiff
path: root/tests/test-floorl.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-floorl.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-floorl.c')
-rw-r--r--tests/test-floorl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-floorl.c b/tests/test-floorl.c
index f090c9cb2f..9a8e5a8007 100644
--- a/tests/test-floorl.c
+++ b/tests/test-floorl.c
@@ -40,8 +40,14 @@
while (0)
/* 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
int
main ()