Przeglądaj źródła

jsoncpp: Provide 'isfinite' implementation on older AIX and HP-UX

Newer AIX and HP-UX platforms provide 'isfinite' as a <math.h> macro.
Older versions do not, so add the definition if it is not provided.
Ådne Hovda 10 lat temu
rodzic
commit
7b1cdb0027
1 zmienionych plików z 14 dodań i 0 usunięć
  1. 14 0
      Utilities/cmjsoncpp/src/lib_json/json_writer.cpp

+ 14 - 0
Utilities/cmjsoncpp/src/lib_json/json_writer.cpp

@@ -27,6 +27,20 @@
 # define isfinite finite
 #endif
 
+// AIX
+#if defined(_AIX)
+# if !defined(isfinite)
+#  define isfinite finite
+# endif
+#endif
+
+// HP-UX
+#if defined(__hpux)
+# if !defined(isfinite)
+#  define isfinite finite
+# endif
+#endif
+
 // Ancient glibc
 #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
 # if !defined(isfinite)