From: George Peter Banyard Date: Wed, 4 Dec 2019 15:37:42 +0000 (+0100) Subject: Move isinf, isnan, and isfinite to zend_portability.h X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c4ad17cc1e483201a36b027f20aab1f91d19628;p=php Move isinf, isnan, and isfinite to zend_portability.h Closes GH-4966 --- 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 +} +# define zend_isnan std::isnan +# define zend_isinf std::isinf +# define zend_finite std::isfinite +#else +# include +# 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 -#if defined(__cplusplus) && __cplusplus >= 201103L -extern "C++" { -#include -#define zend_isnan std::isnan -#define zend_isinf std::isinf -#define zend_finite std::isfinite -} -#else -#include - -#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 */