diff options
author | Earle Lowe <elowe@elowe.com> | 2019-07-02 22:20:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-20 14:30:01 (GMT) |
commit | 1059f9a96da377af771fe643abc1d060db6d64bb (patch) | |
tree | b81f7f6fde0092e65f77bb31abbc6fd024575b8b | |
parent | df0586d8d5c99d870369f1f60f63431deb98a6ba (diff) | |
download | CMake-1059f9a96da377af771fe643abc1d060db6d64bb.zip CMake-1059f9a96da377af771fe643abc1d060db6d64bb.tar.gz CMake-1059f9a96da377af771fe643abc1d060db6d64bb.tar.bz2 |
jsoncpp: Fix compilation on HP-UX 11.31 ia64 with GCC 4.9.3
In particular, fix the `isfinite` definition.
-rw-r--r-- | Utilities/cmjsoncpp/src/lib_json/json_writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp index 6e6e57e..fc86505 100644 --- a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp +++ b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp @@ -30,7 +30,7 @@ #define isfinite finite #endif #elif defined(__hpux) -#if !defined(isfinite) +#if !defined(isfinite) && !defined(__GNUC__) #if defined(__ia64) && !defined(finite) #define isfinite(x) ((sizeof(x) == sizeof(float) ? \ _Isfinitef(x) : _IsFinite(x))) @@ -86,10 +86,11 @@ // HP-UX #if defined(__hpux) # if !defined(isfinite) -# if defined(__ia64) && !defined(finite) +# if defined(__ia64) && !defined(finite) && !defined(__GNUC__) # define isfinite(x) ((sizeof(x) == sizeof(float) ? \ _Isfinitef(x) : _Isfinite(x))) # else +# include <math.h> # define isfinite finite # endif # endif |