summaryrefslogtreecommitdiff
path: root/tests
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
parent3c08dcc35ce66a98261584beea4c5006fa28ca9b (diff)
downloadgnulib-9d5d03ff00b8b11b51450ce107159b263efb1739.tar.gz
Avoid compilation error due to MacOS X 10.5 gcc cross-compilation bug.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-ceill.c8
-rw-r--r--tests/test-floorl.c8
-rw-r--r--tests/test-frexpl.c8
-rw-r--r--tests/test-isnan.c8
-rw-r--r--tests/test-isnanl.h8
-rw-r--r--tests/test-ldexpl.c8
-rw-r--r--tests/test-roundl.c8
-rw-r--r--tests/test-signbit.c8
-rw-r--r--tests/test-snprintf-posix.h8
-rw-r--r--tests/test-sprintf-posix.h8
-rw-r--r--tests/test-truncl.c8
-rw-r--r--tests/test-vasnprintf-posix.c8
-rw-r--r--tests/test-vasprintf-posix.c8
13 files changed, 91 insertions, 13 deletions
diff --git a/tests/test-ceill.c b/tests/test-ceill.c
index 2fa6ca12d7..49e0c6519e 100644
--- a/tests/test-ceill.c
+++ b/tests/test-ceill.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 ()
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 ()
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)
diff --git a/tests/test-isnan.c b/tests/test-isnan.c
index bb925cb146..b5fa11243a 100644
--- a/tests/test-isnan.c
+++ b/tests/test-isnan.c
@@ -49,8 +49,14 @@ float zerof = 0.0f;
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
static void
test_float (void)
diff --git a/tests/test-isnanl.h b/tests/test-isnanl.h
index 13154758bb..8567f39eca 100644
--- a/tests/test-isnanl.h
+++ b/tests/test-isnanl.h
@@ -34,8 +34,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 ()
diff --git a/tests/test-ldexpl.c b/tests/test-ldexpl.c
index 4b5ea32462..272fc4f0cf 100644
--- a/tests/test-ldexpl.c
+++ b/tests/test-ldexpl.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 ()
diff --git a/tests/test-roundl.c b/tests/test-roundl.c
index 88cb854e79..1da3f44166 100644
--- a/tests/test-roundl.c
+++ b/tests/test-roundl.c
@@ -42,8 +42,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 ()
diff --git a/tests/test-signbit.c b/tests/test-signbit.c
index 94cab37672..d6efe08b09 100644
--- a/tests/test-signbit.c
+++ b/tests/test-signbit.c
@@ -48,8 +48,14 @@ long double zerol = 0.0L;
So we use -zerod instead. */
/* 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
static void
test_signbitf ()
diff --git a/tests/test-snprintf-posix.h b/tests/test-snprintf-posix.h
index 58dfbe287b..09b1867826 100644
--- a/tests/test-snprintf-posix.h
+++ b/tests/test-snprintf-posix.h
@@ -32,8 +32,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. */
diff --git a/tests/test-sprintf-posix.h b/tests/test-sprintf-posix.h
index 3caf49fe05..5fb9250c10 100644
--- a/tests/test-sprintf-posix.h
+++ b/tests/test-sprintf-posix.h
@@ -32,8 +32,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. */
diff --git a/tests/test-truncl.c b/tests/test-truncl.c
index 384300fc6d..4b00e350ac 100644
--- a/tests/test-truncl.c
+++ b/tests/test-truncl.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 ()
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. */
diff --git a/tests/test-vasprintf-posix.c b/tests/test-vasprintf-posix.c
index 703b24f188..f8314f46ba 100644
--- a/tests/test-vasprintf-posix.c
+++ b/tests/test-vasprintf-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. */