summaryrefslogtreecommitdiff
path: root/Utilities/cmjsoncpp/src/lib_json
diff options
context:
space:
mode:
authorÅdne Hovda <ahovda@openit.com>2015-03-30 21:32:25 +0200
committerBrad King <brad.king@kitware.com>2015-03-31 14:55:00 -0400
commit7b1cdb00279908cacabada92f8a53e4986465423 (patch)
treedf9c868e7d757892be8f9102f6fae603d9895fd4 /Utilities/cmjsoncpp/src/lib_json
parent00214357ba6166d829da68a65c0d50a61c663bd5 (diff)
downloadcmake-7b1cdb00279908cacabada92f8a53e4986465423.tar.gz
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/src/lib_json')
-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 7f8e6f11d5..15222d6c46 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)