Skip to content

Commit

Permalink
- Fix for Solaris.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Gutmans committed Mar 11, 2001
1 parent 397c76d commit dde50d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Zend/Zend.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions Zend/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
# include <sys/types.h>
#endif

#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif

#ifdef HAVE_STRING_H
# include <string.h>
#else
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit dde50d6

Please sign in to comment.