Blame math_compat.h

Packit ea8578
#ifndef __math_compat_h
Packit ea8578
#define __math_compat_h
Packit ea8578
Packit ea8578
/**
Packit ea8578
 * @file
Packit ea8578
 * @brief Do not use, json-c internal, may be changed or removed at any time.
Packit ea8578
 */
Packit ea8578
Packit ea8578
/* Define isnan, isinf, infinity and nan on Windows/MSVC */
Packit ea8578
Packit ea8578
#ifndef HAVE_DECL_ISNAN
Packit ea8578
# ifdef HAVE_DECL__ISNAN
Packit ea8578
#include <float.h>
Packit ea8578
#define isnan(x) _isnan(x)
Packit ea8578
# endif
Packit ea8578
#endif
Packit ea8578
Packit ea8578
#ifndef HAVE_DECL_ISINF
Packit ea8578
# ifdef HAVE_DECL__FINITE
Packit ea8578
#include <float.h>
Packit ea8578
#define isinf(x) (!_finite(x))
Packit ea8578
# endif
Packit ea8578
#endif
Packit ea8578
Packit ea8578
#ifndef HAVE_DECL_INFINITY
Packit ea8578
#include <float.h>
Packit ea8578
#define INFINITY (DBL_MAX + DBL_MAX)
Packit ea8578
#define HAVE_DECL_INFINITY
Packit ea8578
#endif
Packit ea8578
Packit ea8578
#ifndef HAVE_DECL_NAN
Packit ea8578
#define NAN (INFINITY - INFINITY)
Packit ea8578
#define HAVE_DECL_NAN
Packit ea8578
#endif
Packit ea8578
Packit ea8578
#endif