|
|
@@ -1,6 +1,6 @@
|
|
|
--- a/math_compat.h
|
|
|
+++ b/math_compat.h
|
|
|
-@@ -6,31 +6,9 @@
|
|
|
+@@ -6,38 +6,9 @@
|
|
|
* @brief Do not use, json-c internal, may be changed or removed at any time.
|
|
|
*/
|
|
|
|
|
|
@@ -10,6 +10,9 @@
|
|
|
-#ifdef HAVE_DECL__ISNAN
|
|
|
-#include <float.h>
|
|
|
-#define isnan(x) _isnan(x)
|
|
|
+-#else
|
|
|
+-/* On platforms like AIX and "IBM i" we need to provide our own isnan */
|
|
|
+-#define isnan(x) ((x) != (x))
|
|
|
-#endif
|
|
|
-#endif
|
|
|
-
|
|
|
@@ -17,6 +20,10 @@
|
|
|
-#ifdef HAVE_DECL__FINITE
|
|
|
-#include <float.h>
|
|
|
-#define isinf(x) (!_finite(x))
|
|
|
+-#else
|
|
|
+-#include <float.h>
|
|
|
+-/* On platforms like AIX and "IBM i" we need to provide our own isinf */
|
|
|
+-#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX)
|
|
|
-#endif
|
|
|
-#endif
|
|
|
-
|