Mercurial > hg > octave-lojdl > gnulib-hg
changeset 9847:bb111aa32127
Assume NaNs exist; don't test the NAN macro.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 01 Apr 2008 00:04:49 +0200 |
parents | 25b01b718f02 |
children | 3dbacd929304 |
files | ChangeLog tests/test-strtod.c |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- a/tests/test-strtod.c +++ b/tests/test-strtod.c @@ -542,7 +542,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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