summaryrefslogtreecommitdiff
path: root/geography/geos/patches/patch-include-geos-platform.h.in
blob: abfdab74d61b19565ad57b4034a2614e7d400945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-include-geos-platform.h.in,v 1.5 2013/08/18 11:06:25 gdt Exp $

Fix isnan definition on NetBSD, DragonFly and SunOS platforms.
--- include/geos/platform.h.in.orig	2013-08-11 04:23:47.000000000 +0000
+++ include/geos/platform.h.in
@@ -91,11 +91,13 @@ extern "C"
 # elif defined(__MINGW32__) || defined(__CYGWIN__)
 // sandro furieri: sanitizing MinGW32
 #  define ISNAN(x) (std::isnan(x))
-# elif defined(__OSX__) || defined(__APPLE__)
+# elif defined(__OSX__) || defined(__APPLE__) || \
+       defined(__NetBSD__) || defined(__DragonFly__) ||	\
+       (defined(__sun) && defined(__GNUC__))
    // Hack for OS/X <cmath> incorrectly re-defining isnan() into oblivion.
    // It does leave a version in std.
 #  define ISNAN(x) (std::isnan(x))
-# elif defined(__sun) || defined(__sun__)
+# elif (defined(__sun) || defined(__sun__)) && defined(__SUNPRO_CC)
 #  include <math.h>
 #  define ISNAN(x) (::isnan(x))
 # endif