Skip to content

Commit

Permalink
If available, use fpclassify for substituting zend_finite.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Schumann committed Aug 20, 2000
1 parent 6aada07 commit 9e6e649
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Zend/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ int zend_sprintf(char *buffer, const char *format, ...);

#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE)
#elif defined(HAVE_ISFINITE) || defined(isfinite)
#define zend_finite(a) isfinite(a)
#elif defined(fpclassify)
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
#else
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
#endif
Expand Down

0 comments on commit 9e6e649

Please sign in to comment.