summaryrefslogtreecommitdiff
path: root/tests/test-vasnprintf-posix.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-vasnprintf-posix.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-vasnprintf-posix.c')
-rw-r--r--tests/test-vasnprintf-posix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-vasnprintf-posix.c b/tests/test-vasnprintf-posix.c
index aa537fbd74..bf125480ae 100644
--- a/tests/test-vasnprintf-posix.c
+++ b/tests/test-vasnprintf-posix.c
@@ -57,8 +57,14 @@ have_minus_zero ()
double zerod = 0.0;
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
- So we use minus_zerol instead. */
+ So we use minus_zerol 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_zerol = -LDBL_MIN * LDBL_MIN;
+#else
+long double minus_zerol = -0.0L;
+#endif
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */