diff options
author | George Peter Banyard <girgias@php.net> | 2019-12-04 16:37:42 +0100 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2019-12-05 14:27:51 +0100 |
commit | 1c4ad17cc1e483201a36b027f20aab1f91d19628 (patch) | |
tree | e75b41593537d8901e6643b068ca865885c8cd02 | |
parent | f03d311f1ac1af5fc73bb97be58d276b6185a4c8 (diff) | |
download | php-git-1c4ad17cc1e483201a36b027f20aab1f91d19628.tar.gz |
Move isinf, isnan, and isfinite to zend_portability.h
Closes GH-4966
-rw-r--r-- | Zend/zend_portability.h | 14 | ||||
-rw-r--r-- | configure.ac | 15 |
2 files changed, 14 insertions, 15 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 546a66b9f5..2495273d1d 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 f42e5112f9..4d6106581f 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 */ |