mirror of
https://github.com/json-c/json-c.git
synced 2026-03-27 08:59:07 +08:00
Revert part of PR#606 and use isnan/isinf again, but provide macro implementations of those in math_compat.h is needed, as it seems to be on AIX and IBM i systems.
This commit is contained in:
@@ -12,6 +12,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
|
||||
|
||||
@@ -19,6 +22,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user