jsoncpp: Provide 'isfinite' implementation on ancient glibc

The glibc 2.1 headers provide isfinite only in C99 mode.
Add its definition ourselves.
This commit is contained in:
Brad King 2015-01-13 11:54:06 -05:00
parent 50032bc847
commit 4c49606598
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,13 @@
#define snprintf _snprintf
#endif
// Ancient glibc
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# if !defined(isfinite)
# define isfinite __finite
# endif
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
// Disable warning about strdup being deprecated.
#pragma warning(disable : 4996)