summaryrefslogtreecommitdiffstats
path: root/Utilities/cmjsoncpp/src/lib_json
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-13 16:54:06 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-15 16:39:04 (GMT)
commit4c49606598ab3089f0cec9be724ae2f3ab4c1ba3 (patch)
tree814c744ad6930f967c6302acae400301f96b5400 /Utilities/cmjsoncpp/src/lib_json
parent50032bc847a79dc209e6e1ae4dd77a2ec2d52be9 (diff)
downloadCMake-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.
Diffstat (limited to 'Utilities/cmjsoncpp/src/lib_json')
-rw-r--r--Utilities/cmjsoncpp/src/lib_json/json_writer.cpp7
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)