From 04c528609a1849d19bed744f9f2bfcc0b7eab0ae Mon Sep 17 00:00:00 2001 From: Christian Seiler Date: Tue, 2 Dec 2008 16:19:10 +0000 Subject: - MFH: Changed floating point behaviour to consistently use double precision on all platforms and with all compilers. --- Zend/zend_strtod.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Zend/zend_strtod.c') diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index bc2ca97b19..4a3e976d25 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -93,6 +93,7 @@ #include #include +#include #ifdef ZTS #include @@ -2032,6 +2033,7 @@ ret1: ZEND_API double zend_strtod (CONST char *s00, char **se) { + ZEND_FLOAT_DECLARE int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; CONST char *s, *s0, *s1; @@ -2044,6 +2046,8 @@ ZEND_API double zend_strtod (CONST char *s00, char **se) CONST char decimal_point = '.'; + ZEND_FLOAT_ENSURE(); + sign = nz0 = nz = 0; value(rv) = 0.; @@ -2574,7 +2578,7 @@ ret: } _THREAD_PRIVATE_MUTEX_UNLOCK(pow5mult_mutex); - return result; + ZEND_FLOAT_RETURN(result); } ZEND_API double zend_hex_strtod(const char *str, char **endptr) -- cgit v1.2.1