From: Bruno Haible Date: Mon, 20 Dec 2010 02:28:45 +0000 (+0100) Subject: isnan: Ensure it is a macro. X-Git-Tag: v0.1~3527 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=1b5bc6ed268e3f86e5fab50eb42794400e29ea2f;p=gnulib.git isnan: Ensure it is a macro. * lib/math.in.h (isnan): Define as a macro if not already a macro. * doc/posix-functions/isnan.texi: Mention problem on IRIX, OSF/1, Solaris. --- diff --git a/ChangeLog b/ChangeLog index 3024bec71..308b4509d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-12-19 Bruno Haible + isnan: Ensure it is a macro. + * lib/math.in.h (isnan): Define as a macro if not already a macro. + * doc/posix-functions/isnan.texi: Mention problem on IRIX, OSF/1, + Solaris. + +2010-12-19 Bruno Haible + ldexpl test: Fix link error on OSF/1 5.1. * modules/ldexpl-tests (Makefile.am): Define test_ldexpl_LDADD. diff --git a/doc/posix-functions/isnan.texi b/doc/posix-functions/isnan.texi index 222d2f51d..202399554 100644 --- a/doc/posix-functions/isnan.texi +++ b/doc/posix-functions/isnan.texi @@ -12,6 +12,9 @@ Portability problems fixed by Gnulib: @code{isnan} was introduced with C99 and is thus commonly not present on pre-C99 systems. @item +@code{isnan} is not a macro on some platforms: +IRIX 6.5, OSF/1 5.1 with gcc, Solaris 11 2010-11. +@item On IRIX 6.5 with @code{cc}, @code{isnan} does not recognize some NaNs. @item On NetBSD/i386 and glibc/ia64, @code{isnan} does not recognize some diff --git a/lib/math.in.h b/lib/math.in.h index 4fbed08d6..0f7826455 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -680,6 +680,10 @@ _GL_EXTERN_C int rpl_isnanl (long double x); sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) # endif +/* Ensure isnan is a macro. */ +# ifndef isnan +# define isnan isnan +# endif #elif defined GNULIB_POSIXCHECK # if defined isnan _GL_WARN_REAL_FLOATING_DECL (isnan);