From 9217b678b305d7df7471ba476a81bf28961fdfa3 Mon Sep 17 00:00:00 2001 From: Michael Scott Date: Tue, 26 May 2015 10:09:45 -0400 Subject: [PATCH] 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. --- Utilities/cmjsoncpp/src/lib_json/json_writer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp index 15222d6c4..b64cdb0c4 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