6 AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
7 -AC_CHECK_DECLS([INFINITY], [], [], [[#include <math.h>]])
8 -AC_CHECK_DECLS([nan], [], [], [[#include <math.h>]])
9 -AC_CHECK_DECLS([isnan], [], [], [[#include <math.h>]])
10 -AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
11 -AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
12 -AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
14 #check if .section.gnu.warning accepts long strings (for __warn_references)
19 #ifndef __math_compat_h
20 #define __math_compat_h
22 -/* Define isnan and isinf on Windows/MSVC */
24 -#ifndef HAVE_DECL_ISNAN
25 -# ifdef HAVE_DECL__ISNAN
27 -#define isnan(x) _isnan(x)
31 -#ifndef HAVE_DECL_ISINF
32 -# ifdef HAVE_DECL__FINITE
34 -#define isinf(x) (!_finite(x))
38 -#ifndef HAVE_DECL_NAN
39 -#error This platform does not have nan()
42 -#ifndef HAVE_DECL_INFINITY
43 -#error This platform does not have INFINITY
46 +#define isnan(x) __builtin_isnan(x)
48 +#define isinf(x) __builtin_isinf(x)