]> Pileus Git - ~andy/gtk/commitdiff
Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
authorNatanael Copa <ncopa@alpinelinux.org>
Tue, 15 May 2012 11:09:24 +0000 (13:09 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 17 May 2012 03:55:40 +0000 (23:55 -0400)
The isnan() and isinf() are C99 macros not functions so use
AC_CHECK_DECL instead of AC_CHECK_FUNCS for those.

configure.ac
gdk/fallback-c89.c

index 857d0158f8d8c125ffae7d20267fe9fcee0d809d..c801dd2aa42ace174937f499e5f3ef23a8ce445b 100644 (file)
@@ -751,7 +751,8 @@ AC_TYPE_UID_T
 
 # Check for round(), rint(), isnan(), isinf() and nearbyint()
 AC_CHECK_LIB(m,round,,)
-AC_CHECK_FUNCS(round rint isnan isinf nearbyint)
+AC_CHECK_FUNCS(round rint nearbyint)
+AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
 
 # Checks for gdkspawn
 AC_CHECK_HEADERS(crt_externs.h)
index 35dea777ed39920ccab1c04660ad23a04ab8ab7e..b150044bd309f85ca7df673e12e6936b75275c72 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <float.h>
 
-#ifndef HAVE_ISNAN
+#ifndef HAVE_DECL_ISNAN
 /* it seems of the supported compilers only
  * MSVC does not have isnan(), but it does
  * have _isnan() which does the same as isnan()
@@ -31,7 +31,7 @@ isnan (double x)
 }
 #endif
 
-#ifndef HAVE_ISINF
+#ifndef HAVE_DECL_ISINF
 /* Unfortunately MSVC does not have finite()
  * but it does have _finite() which is the same
  * as finite() except when x is a NaN