summaryrefslogtreecommitdiffstats
path: root/external/redland/rasqal/rasqal-aix.patch.1
blob: d755aa2e568e153dd3f5bcc8f435d6f7170321a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/src/rasqal_literal.c	2013-03-29 21:22:57.413852072 +0100
+++ b/src/rasqal_literal.c	2013-03-29 21:23:34.092851757 +0100
@@ -46,10 +46,22 @@
 #include <stddef.h>
 #endif
 #include <stdarg.h>
+#ifdef _AIX
+#  ifndef isnan
+#   define isnan(x) \
+      (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
+       : sizeof (x) == sizeof (double) ? isnan_d (x) \
+       : isnan_f (x))
+  static inline int isnan_f  (float       x) { return x != x; }
+  static inline int isnan_d  (double      x) { return x != x; }
+  static inline int isnan_ld (long double x) { return x != x; }
+#  endif
+#else
 /* for isnan() */
 #ifdef HAVE_MATH_H
 #include <math.h>
 #endif
+#endif
 /* for INT_MIN and INT_MAX */
 #ifdef HAVE_LIMITS_H
 #include <limits.h>