summaryrefslogtreecommitdiffstats
path: root/Utilities/cmjsoncpp
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2015-09-12 14:34:12 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-14 13:40:38 (GMT)
commit75644dafe54c21902f14cfe58cb8338b553b69d8 (patch)
tree579fd67c47881b28f4e769cada53f308795705b0 /Utilities/cmjsoncpp
parent6dad4c25b06ae232c766d76747b080373fb2499d (diff)
downloadCMake-75644dafe54c21902f14cfe58cb8338b553b69d8.zip
CMake-75644dafe54c21902f14cfe58cb8338b553b69d8.tar.gz
CMake-75644dafe54c21902f14cfe58cb8338b553b69d8.tar.bz2
jsoncpp: Fix compilation as C99 on Solaris
In C99 mode, Solaris variants may already define isfinite, so check for the existence first.
Diffstat (limited to 'Utilities/cmjsoncpp')
-rw-r--r--Utilities/cmjsoncpp/src/lib_json/json_writer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
index b64cdb0..e3f4e53 100644
--- a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
+++ b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
@@ -24,7 +24,9 @@
// Solaris
#if defined(__sun)
# include <ieeefp.h>
-# define isfinite finite
+# if !defined(isfinite)
+# define isfinite finite
+# endif
#endif
// AIX