From 3ee187a6d4ba1005dc146e593b07e3fc8a4a4671 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 9 Oct 2011 13:27:29 +0200 Subject: [PATCH] isinf: Ensure macro on AIX 5.1. * m4/isinf.m4 (gl_ISINF): Also test whether isinf is defined as a macro. * doc/posix-functions/isinf.texi: Mention also AIX 5.1 as deficient. --- ChangeLog | 7 +++++++ doc/posix-functions/isinf.texi | 2 +- m4/isinf.m4 | 9 +++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef3cb5338..362fdf434 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-10-09 Bruno Haible + isinf: Ensure macro on AIX 5.1. + * m4/isinf.m4 (gl_ISINF): Also test whether isinf is defined as a + macro. + * doc/posix-functions/isinf.texi: Mention also AIX 5.1 as deficient. + +2011-10-09 Bruno Haible + *printf-posix tests: Fix for platforms where 'long double' == 'double'. * modules/snprintf-posix-tests (configure.ac): Require gl_LONG_DOUBLE_VS_DOUBLE. diff --git a/doc/posix-functions/isinf.texi b/doc/posix-functions/isinf.texi index 8ef4b4db0..eea723bae 100644 --- a/doc/posix-functions/isinf.texi +++ b/doc/posix-functions/isinf.texi @@ -10,7 +10,7 @@ Portability problems fixed by Gnulib: @itemize @item This macro is missing on some platforms: -AIX 4.3.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11. +AIX 5.1, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11. @item This macro incorrectly yields true for some @samp{long double} arguments, on some platforms: diff --git a/m4/isinf.m4 b/m4/isinf.m4 index 570dd23f5..3e4b90055 100644 --- a/m4/isinf.m4 +++ b/m4/isinf.m4 @@ -1,4 +1,4 @@ -# isinf.m4 serial 8 +# isinf.m4 serial 9 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,12 @@ AC_DEFUN([gl_ISINF], AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Persuade glibc to declare isinf. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_DECLS([isinf], , , [[#include ]]) + AC_CHECK_DECLS([isinf], , , + [[#include + #ifndef isinf + #error "isinf must be a macro, not a function" + #endif + ]]) if test "$ac_cv_have_decl_isinf" = yes; then gl_CHECK_MATH_LIB([ISINF_LIBM], [x = isinf (x) + isinf ((float) x);]) if test "$ISINF_LIBM" != missing; then -- 2.11.0