about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/php/php73-darwin-isfinite.patch
blob: 7f784e0f5a95cf77681d72bf6d14d0fdc967185b (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff -ru a/configure.ac b/configure.ac
--- a/configure.ac      2018-12-04 19:12:20.000000000 +0300
+++ b/configure.ac      2018-12-10 12:30:37.798917520 +0300
@@ -68,7 +68,7 @@
 #include <math.h>

 #ifndef zend_isnan
-#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
 #define zend_isnan(a) isnan(a)
 #elif defined(HAVE_FPCLASS)
 #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
@@ -77,7 +77,7 @@
 #endif
 #endif

-#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
 #define zend_isinf(a) isinf(a)
 #elif defined(INFINITY)
 /* Might not work, but is required by ISO C99 */
@@ -88,7 +88,7 @@
 #define zend_isinf(a) 0
 #endif

-#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
 #define zend_finite(a) isfinite(a)
 #elif defined(HAVE_FINITE)
 #define zend_finite(a) finite(a)
diff -ru a/Zend/configure.ac b/Zend/configure.ac
--- a/Zend/configure.ac 2018-12-04 19:12:30.000000000 +0300
+++ b/Zend/configure.ac 2018-12-10 12:28:50.350929699 +0300
@@ -59,7 +59,7 @@
 #include <math.h>

 #ifndef zend_isnan
-#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
 #define zend_isnan(a) isnan(a)
 #elif defined(HAVE_FPCLASS)
 #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
@@ -68,7 +68,7 @@
 #endif
 #endif

-#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
 #define zend_isinf(a) isinf(a)
 #elif defined(INFINITY)
 /* Might not work, but is required by ISO C99 */
@@ -79,7 +79,7 @@
 #define zend_isinf(a) 0
 #endif

-#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
 #define zend_finite(a) isfinite(a)
 #elif defined(HAVE_FINITE)
 #define zend_finite(a) finite(a)