summaryrefslogtreecommitdiffstats
path: root/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmjsoncpp/src/lib_json/json_writer.cpp')
-rw-r--r--Utilities/cmjsoncpp/src/lib_json/json_writer.cpp5
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