Skip to content

Commit dde50d6

Browse files
author
Andi Gutmans
committed
- Fix for Solaris.
1 parent 397c76d commit dde50d6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Zend/Zend.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ dnl Checks for library functions.
6262
AC_FUNC_VPRINTF
6363
AC_FUNC_MEMCMP
6464
AC_FUNC_ALLOCA
65-
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
65+
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
6666
AC_ZEND_BROKEN_SPRINTF
6767
6868
AC_CHECK_FUNCS(finite isfinite isinf isnan)

Zend/acconfig.h

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
# include <sys/types.h>
2020
#endif
2121

22+
#ifdef HAVE_IEEEFP_H
23+
# include <ieeefp.h>
24+
#endif
25+
2226
#ifdef HAVE_STRING_H
2327
# include <string.h>
2428
#else
@@ -37,6 +41,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
3741
#define zend_isnan(a) isnan(a)
3842
#elif defined(NAN)
3943
#define zend_isnan(a) (((a)==NAN)?1:0)
44+
#elif defined(HAVE_FPCLASS)
45+
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
4046
#else
4147
#define zend_isnan(a) 0
4248
#endif
@@ -46,6 +52,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
4652
#elif defined(INFINITY)
4753
/* Might not work, but is required by ISO C99 */
4854
#define zend_isinf(a) (((a)==INFINITY)?1:0)
55+
#elif defined(HAVE_FPCLASS)
56+
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
4957
#else
5058
#define zend_isinf(a) 0
5159
#endif

0 commit comments

Comments
 (0)