com php-src: Move isinf, isnan, and isfinite to zend_portabil ity.h: Zend/zend_portability.h configure.ac
| From: | George Peter Banyard | Date: | Thu, 05 Dec 2019 13:27:51 +0000 |
| Subject: | com php-src: Move isinf, isnan, and isfinite to zend_portabil ity.h: Zend/zend_portability.h configure.ac | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-109400@lists.php.net to get a copy of this message | ||
Commit: 1c4ad17cc1e483201a36b027f20aab1f91d19628
Author: George Peter Banyard <girgias@php.net> Wed, 4 Dec 2019 16:37:42 +0100
Parents: f03d311f1ac1af5fc73bb97be58d276b6185a4c8
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1c4ad17cc1e483201a36b027f20aab1f91d19628
Log:
Move isinf, isnan, and isfinite to zend_portability.h
Closes GH-4966
Changed paths:
M Zend/zend_portability.h
M configure.ac
Diff:
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 546a66b9f56..2495273d1db 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -442,6 +442,20 @@ char *alloca();
#define ZEND_NAN NAN
+#if defined(__cplusplus) && __cplusplus >= 201103L
+extern "C++" {
+# include <cmath>
+}
+# define zend_isnan std::isnan
+# define zend_isinf std::isinf
+# define zend_finite std::isfinite
+#else
+# include <math.h>
+# define zend_isnan(a) isnan(a)
+# define zend_isinf(a) isinf(a)
+# define zend_finite(a) isfinite(a)
+#endif
+
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
diff --git a/configure..ac b/configure.ac
index f42e5112f97..4d6106581f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,21 +61,6 @@ AH_BOTTOM([
#include <string.h>
-#if defined(__cplusplus) && __cplusplus >= 201103L
-extern "C++" {
-#include <cmath>
-#define zend_isnan std::isnan
-#define zend_isinf std::isinf
-#define zend_finite std::isfinite
-}
-#else
-#include <math.h>
-
-#define zend_isnan(a) isnan(a)
-#define zend_isinf(a) isinf(a)
-#define zend_finite(a) isfinite(a)
-
-#endif
#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
#endif /* PHP_CONFIG_H */