Mercurial > hg > octave-lyh > gnulib-hg
changeset 9902:7b73920a2002
Fix link failure on Solaris 10/x86 with gcc.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 12 Apr 2008 19:53:25 +0200 |
parents | 31d7bf84aa9a |
children | 2b821dd1563a |
files | ChangeLog tests/test-strtod.c |
diffstat | 2 files changed, 17 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-12 Bruno Haible <bruno@clisp.org> + + * tests/test-strtod.c: Include isnand.h. + (main): Use isnand instead of isnan. + Reported by Jim Meyering. + 2008-04-12 Bruno Haible <bruno@clisp.org> * m4/isnanf.m4 (gl_ISNANF_WORKS): Add a test for a special NaN.
--- a/tests/test-strtod.c +++ b/tests/test-strtod.c @@ -25,6 +25,8 @@ #include <stdio.h> #include <string.h> +#include "isnand.h" + #define ASSERT(expr) \ do \ { \ @@ -602,8 +604,8 @@ result1 = strtod (input, &ptr1); result2 = strtod (input + 1, &ptr2); #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 */ + ASSERT (isnand (result1)); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */ + ASSERT (isnand (result2)); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */ # if 0 /* Sign bits of NaN is a portability sticking point, not worth worrying about. */ @@ -632,8 +634,8 @@ result1 = strtod (input, &ptr1); result2 = strtod (input + 1, &ptr2); #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 (isnand (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */ + ASSERT (isnand (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */ ASSERT (!!signbit (result1) == !!signbit (result2)); ASSERT (ptr1 == input + 4); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */ ASSERT (ptr2 == input + 4); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */ @@ -658,8 +660,8 @@ result1 = strtod (input, &ptr1); result2 = strtod (input + 1, &ptr2); #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 (isnand (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */ + ASSERT (isnand (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */ # if 0 /* Sign bits of NaN is a portability sticking point, not worth worrying about. */ @@ -685,7 +687,7 @@ errno = 0; result = strtod (input, &ptr); #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 (isnand (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); #else @@ -708,8 +710,8 @@ result1 = strtod (input, &ptr1); result2 = strtod (input + 1, &ptr2); #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 (isnand (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */ + ASSERT (isnand (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */ # if 0 /* Sign bits of NaN is a portability sticking point, not worth worrying about. */