Merge branch 'PHP-7.2'

* PHP-7.2:
  Fix C++11 and up compatibility for zend_finite and more
This commit is contained in:
Anatol Belski 2018-07-08 20:34:58 +02:00
commit d664d1e959
2 changed files with 6 additions and 6 deletions

View file

@ -60,7 +60,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
#include <math.h> #include <math.h>
#ifndef zend_isnan #ifndef zend_isnan
#if HAVE_DECL_ISNAN #if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
#define zend_isnan(a) isnan(a) #define zend_isnan(a) isnan(a)
#elif defined(HAVE_FPCLASS) #elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
@ -69,7 +69,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
#endif #endif
#endif #endif
#if HAVE_DECL_ISINF #if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
#define zend_isinf(a) isinf(a) #define zend_isinf(a) isinf(a)
#elif defined(INFINITY) #elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */ /* Might not work, but is required by ISO C99 */
@ -80,7 +80,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
#define zend_isinf(a) 0 #define zend_isinf(a) 0
#endif #endif
#if HAVE_DECL_ISFINITE #if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
#define zend_finite(a) isfinite(a) #define zend_finite(a) isfinite(a)
#elif defined(HAVE_FINITE) #elif defined(HAVE_FINITE)
#define zend_finite(a) finite(a) #define zend_finite(a) finite(a)

View file

@ -68,7 +68,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
#include <math.h> #include <math.h>
#ifndef zend_isnan #ifndef zend_isnan
#if HAVE_DECL_ISNAN #if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
#define zend_isnan(a) isnan(a) #define zend_isnan(a) isnan(a)
#elif defined(HAVE_FPCLASS) #elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
@ -77,7 +77,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
#endif #endif
#endif #endif
#if HAVE_DECL_ISINF #if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
#define zend_isinf(a) isinf(a) #define zend_isinf(a) isinf(a)
#elif defined(INFINITY) #elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */ /* Might not work, but is required by ISO C99 */
@ -88,7 +88,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
#define zend_isinf(a) 0 #define zend_isinf(a) 0
#endif #endif
#if HAVE_DECL_ISFINITE #if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
#define zend_finite(a) isfinite(a) #define zend_finite(a) isfinite(a)
#elif defined(HAVE_FINITE) #elif defined(HAVE_FINITE)
#define zend_finite(a) finite(a) #define zend_finite(a) finite(a)