bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

isinf on AIX 5.1


From: Bruno Haible
Subject: isinf on AIX 5.1
Date: Sun, 9 Oct 2011 13:28:08 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

The isinf test fails to compile on AIX 5.1:

With xlc:
  "test-isinf.c", line 26.3: 1506-205 (S) #error missing declaration
With gcc:
  test-isinf.c:26:3: error: #error missing declaration

Apparently, on this platform, isinf is defined as a function but not declared
as a macro.

This fixes it.


2011-10-09  Bruno Haible  <address@hidden>

        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.

--- doc/posix-functions/isinf.texi.orig Sun Oct  9 13:25:28 2011
+++ doc/posix-functions/isinf.texi      Sun Oct  9 13:21:14 2011
@@ -10,7 +10,7 @@
 @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:
--- m4/isinf.m4.orig    Sun Oct  9 13:25:28 2011
+++ m4/isinf.m4 Sun Oct  9 13:19:02 2011
@@ -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_REQUIRE([gl_MATH_H_DEFAULTS])
   dnl Persuade glibc <math.h> to declare isinf.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_CHECK_DECLS([isinf], , , [[#include <math.h>]])
+  AC_CHECK_DECLS([isinf], , ,
+    [[#include <math.h>
+      #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
-- 
In memoriam Oskar Schindler <http://en.wikipedia.org/wiki/Oskar_Schindler>
<http://www.shoah.dk/Courage/Schindler.htm>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]