From dde50d6afdae7ef5eca8c37f885b4dc9e913c99d Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sun, 11 Mar 2001 19:35:26 +0000 Subject: [PATCH] - Fix for Solaris. --- Zend/Zend.m4 | 2 +- Zend/acconfig.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 03cd4e1840..4e7b7f2d87 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -62,7 +62,7 @@ dnl Checks for library functions. AC_FUNC_VPRINTF AC_FUNC_MEMCMP AC_FUNC_ALLOCA -AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite) +AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass) AC_ZEND_BROKEN_SPRINTF AC_CHECK_FUNCS(finite isfinite isinf isnan) diff --git a/Zend/acconfig.h b/Zend/acconfig.h index d88fefb1b7..d5cfefee44 100644 --- a/Zend/acconfig.h +++ b/Zend/acconfig.h @@ -19,6 +19,10 @@ # include #endif +#ifdef HAVE_IEEEFP_H +# include +#endif + #ifdef HAVE_STRING_H # include #else @@ -37,6 +41,8 @@ int zend_sprintf(char *buffer, const char *format, ...); #define zend_isnan(a) isnan(a) #elif defined(NAN) #define zend_isnan(a) (((a)==NAN)?1:0) +#elif defined(HAVE_FPCLASS) +#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) #else #define zend_isnan(a) 0 #endif @@ -46,6 +52,8 @@ int zend_sprintf(char *buffer, const char *format, ...); #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ #define zend_isinf(a) (((a)==INFINITY)?1:0) +#elif defined(HAVE_FPCLASS) +#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)) #else #define zend_isinf(a) 0 #endif -- 2.50.1