diff options
author | Sascha Schumann <sas@php.net> | 2000-06-18 16:33:15 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-06-18 16:33:15 +0000 |
commit | 0404a0243012a7fdf201cdf83a37e43c9455e9b6 (patch) | |
tree | 2bd247ca55f67413566a462d36dccf7c3a98ee49 /Zend/zend_operators.h | |
parent | 6e815b76eabaddd4a8e91e2577d6a8d83f7143b4 (diff) | |
download | php-git-0404a0243012a7fdf201cdf83a37e43c9455e9b6.tar.gz |
Welcome zend_finite(n).
This chooses the best combination of what is available:
finite, isfinite, isinf, isnan
Diffstat (limited to 'Zend/zend_operators.h')
-rw-r--r-- | Zend/zend_operators.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 404209660c..5b95f6f454 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -24,15 +24,9 @@ #include <errno.h> #include <math.h> -#ifndef HAVE_FINITE -#ifndef finite /* in case it's already a macro */ -#define finite(a) isfinite(a) /* HPUX 11 only has isfinite() */ -#endif -#else -#if HAVE_IEEEFP_H +#ifdef HAVE_IEEEFP_H #include <ieeefp.h> #endif -#endif #if WITH_BCMATH #include "ext/bcmath/number.h" @@ -87,7 +81,7 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double errno=0; local_dval = strtod(str, &end_ptr); if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */ - if (! finite(local_dval)) { + if (! zend_finite(local_dval)) { /* "inf","nan" and maybe other weird ones */ return 0; } |