summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorMichael Scott <michael.scott@gbgplc.com>2015-05-26 14:09:45 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-26 14:12:25 (GMT)
commit9217b678b305d7df7471ba476a81bf28961fdfa3 (patch)
treefd60bef509e6ff3dc1f111c5cd6a96eea5c8d8b9 /Utilities
parent12b9005d7c015b1f8cece5a9d8cf5f1a9f4a18fa (diff)
downloadCMake-9217b678b305d7df7471ba476a81bf28961fdfa3.zip
CMake-9217b678b305d7df7471ba476a81bf28961fdfa3.tar.gz
CMake-9217b678b305d7df7471ba476a81bf28961fdfa3.tar.bz2
jsoncpp: Provide 'isfinite' impl on more HP-UX versions (#15576)
Some versions of HP-UX do not define 'isfinite' or 'finite' in math.h for Itanium when preprocessing with C++, so we have to add the definition ourselves instead to map to the internal version.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmjsoncpp/src/lib_json/json_writer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
index 15222d6..b64cdb0 100644
--- a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
+++ b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
@@ -37,7 +37,12 @@
// HP-UX
#if defined(__hpux)
# if !defined(isfinite)
-# define isfinite finite
+# if defined(__ia64) && !defined(finite)
+# define isfinite(x) ((sizeof(x) == sizeof(float) ? \
+ _Isfinitef(x) : _Isfinite(x)))
+# else
+# define isfinite finite
+# endif
# endif
#endif