summaryrefslogtreecommitdiffstats
path: root/Utilities/cmjsoncpp
diff options
context:
space:
mode:
authorÅdne Hovda <ahovda@openit.com>2015-03-30 19:32:25 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-31 18:55:00 (GMT)
commit7b1cdb00279908cacabada92f8a53e4986465423 (patch)
treedf9c868e7d757892be8f9102f6fae603d9895fd4 /Utilities/cmjsoncpp
parent00214357ba6166d829da68a65c0d50a61c663bd5 (diff)
downloadCMake-7b1cdb00279908cacabada92f8a53e4986465423.zip
CMake-7b1cdb00279908cacabada92f8a53e4986465423.tar.gz
CMake-7b1cdb00279908cacabada92f8a53e4986465423.tar.bz2
jsoncpp: Provide 'isfinite' implementation on older AIX and HP-UX
Newer AIX and HP-UX platforms provide 'isfinite' as a <math.h> macro. Older versions do not, so add the definition if it is not provided.
Diffstat (limited to 'Utilities/cmjsoncpp')
-rw-r--r--Utilities/cmjsoncpp/src/lib_json/json_writer.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
index 7f8e6f1..15222d6 100644
--- a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
+++ b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
@@ -27,6 +27,20 @@
# define isfinite finite
#endif
+// AIX
+#if defined(_AIX)
+# if !defined(isfinite)
+# define isfinite finite
+# endif
+#endif
+
+// HP-UX
+#if defined(__hpux)
+# if !defined(isfinite)
+# define isfinite finite
+# endif
+#endif
+
// Ancient glibc
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# if !defined(isfinite)