Files
haikuports/sci-libs/geos/patches/geos-3.6.2.patchset
2017-10-20 18:23:38 +02:00

37 lines
1.2 KiB
Plaintext

From af2cdb5de71a84339b89d835b223eb0e8274fa69 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 22 Aug 2014 14:30:31 +0000
Subject: haiku patch
diff --git a/configure.ac b/configure.ac
index 7158394..ea17b55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,7 +196,8 @@ dnl of isnan().
AC_LANG_PUSH([C++])
AC_CACHE_CHECK([for isnan], ac_cv_isnan,
- [AC_TRY_LINK([#include <cmath>],
+ [AC_TRY_LINK([#include <cmath>
+#include <math.h>],
[double x; int y; y = std::isnan(x);],
ac_cv_isnan=yes,
ac_cv_isnan=no
diff --git a/include/geos/platform.h.in b/include/geos/platform.h.in
index c3bc9c8..1c8db14 100644
--- a/include/geos/platform.h.in
+++ b/include/geos/platform.h.in
@@ -93,7 +93,7 @@ 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(__HAIKU__) || \
defined(__NetBSD__) || defined(__DragonFly__) || defined (__OpenBSD__) || \
(defined(__sun) && defined(__GNUC__))
// Hack for OS/X <cmath> incorrectly re-defining isnan() into oblivion.
--
2.14.2