summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--tests/test-strtod.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f4fa700e9..a2b357ff26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-31 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-strtod.c (main): Don't test NAN macro. Needed for Solaris.
+ Reported by Eric Blake.
+
2008-03-31 Jim Meyering <meyering@redhat.com>
Don't compare actual signbit return values.
diff --git a/tests/test-strtod.c b/tests/test-strtod.c
index f412b1ba66..f0744e809f 100644
--- a/tests/test-strtod.c
+++ b/tests/test-strtod.c
@@ -542,7 +542,7 @@ main ()
char *ptr2;
double result1 = strtod (input, &ptr1);
double result2 = strtod (input + 1, &ptr2);
-#ifdef NAN
+#if 1 /* All known CPUs support NaNs. */
ASSERT (isnan (result1)); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (isnan (result2)); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
# if 0
@@ -570,7 +570,7 @@ main ()
char *ptr2;
double result1 = strtod (input, &ptr1);
double result2 = strtod (input + 1, &ptr2);
-#ifdef NAN
+#if 1 /* All known CPUs support NaNs. */
ASSERT (isnan (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (isnan (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (!!signbit (result1) == !!signbit (result2));
@@ -594,7 +594,7 @@ main ()
char *ptr2;
double result1 = strtod (input, &ptr1);
double result2 = strtod (input + 1, &ptr2);
-#ifdef NAN
+#if 1 /* All known CPUs support NaNs. */
ASSERT (isnan (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (isnan (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
# if 0
@@ -620,7 +620,7 @@ main ()
const char input[] = " nan().";
char *ptr;
double result = strtod (input, &ptr);
-#ifdef NAN
+#if 1 /* All known CPUs support NaNs. */
ASSERT (isnan (result)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (ptr == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (errno == 0);
@@ -641,7 +641,7 @@ main ()
char *ptr2;
double result1 = strtod (input, &ptr1);
double result2 = strtod (input + 1, &ptr2);
-#ifdef NAN
+#if 1 /* All known CPUs support NaNs. */
ASSERT (isnan (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (isnan (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
# if 0