diff options
author | Brad King <brad.king@kitware.com> | 2015-01-13 16:54:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-15 16:39:04 (GMT) |
commit | 4c49606598ab3089f0cec9be724ae2f3ab4c1ba3 (patch) | |
tree | 814c744ad6930f967c6302acae400301f96b5400 | |
parent | 50032bc847a79dc209e6e1ae4dd77a2ec2d52be9 (diff) | |
download | CMake-4c49606598ab3089f0cec9be724ae2f3ab4c1ba3.zip CMake-4c49606598ab3089f0cec9be724ae2f3ab4c1ba3.tar.gz CMake-4c49606598ab3089f0cec9be724ae2f3ab4c1ba3.tar.bz2 |
jsoncpp: Provide 'isfinite' implementation on ancient glibc
The glibc 2.1 headers provide isfinite only in C99 mode.
Add its definition ourselves.
-rw-r--r-- | Utilities/cmjsoncpp/src/lib_json/json_writer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp index 89964ea..0a42cc4 100644 --- a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp +++ b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp @@ -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) |