[gtk+] Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
- Date: Thu, 17 May 2012 03:55:10 +0000 (UTC)
commit d6aee922bb5da8254fafdf605951cf5b0150537d
Author: Natanael Copa <ncopa alpinelinux org>
Date: Tue May 15 13:09:24 2012 +0200
Bug 676087-configure.ac: isnan() and isinf() are macros, not functions
The isnan() and isinf() are C99 macros not functions so use
AC_CHECK_DECL instead of AC_CHECK_FUNCS for those.
configure.ac | 3 ++-
gdk/fallback-c89.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 857d015..c801dd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/gdk/fallback-c89.c b/gdk/fallback-c89.c
index 35dea77..b150044 100644
--- a/gdk/fallback-c89.c
+++ b/gdk/fallback-c89.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]