3 @@ -76,12 +76,6 @@ AC_FUNC_VPRINTF
5 AC_CHECK_FUNCS([realloc])
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>]])
13 AC_MSG_CHECKING(for GCC atomic builtins)
19 * @brief Do not use, json-c internal, may be changed or removed at any time.
22 -/* Define isnan, isinf, infinity and nan 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_INFINITY
40 -#define INFINITY (DBL_MAX + DBL_MAX)
41 -#define HAVE_DECL_INFINITY
44 -#ifndef HAVE_DECL_NAN
45 -#define NAN (INFINITY - INFINITY)
46 -#define HAVE_DECL_NAN
49 +#define isnan(x) __builtin_isnan(x)
51 +#define isinf(x) __builtin_isinf(x)