Hi

Applying the attached patch fixes compilation with GCC on AIX 5.1 and HP-UX for me.

Ådne
From 4ab1acefaf065d0b647b0530ffcabc51ea177a5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=85dne=20Hovda?= <aho...@openit.com>
Date: Mon, 30 Mar 2015 21:32:25 +0200
Subject: [PATCH] Use finite() for AIX and HP-UX in case we have no isfinite()

---
 Utilities/cmjsoncpp/src/lib_json/json_writer.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp 
b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
index 7f8e6f1..82e1319 100644
--- a/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
+++ b/Utilities/cmjsoncpp/src/lib_json/json_writer.cpp
@@ -27,6 +27,11 @@
 # define isfinite finite
 #endif
 
+// AIX / HP-UX
+#if ( defined(_AIX) || defined(__hpux) ) && !defined(isfinite)
+# define isfinite finite
+#endif
+
 // Ancient glibc
 #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
 # if !defined(isfinite)
-- 
2.0.0

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to