jorton Tue Nov 9 10:58:17 2004 EDT Modified files: /php-src/ext/standard config.m4 Log: Make the "rounding fuzz" check work again with gcc 3.3 and later, fixing the bug24142 test. http://cvs.php.net/diff.php/php-src/ext/standard/config.m4?r1=1.76&r2=1.77&ty=u Index: php-src/ext/standard/config.m4 diff -u php-src/ext/standard/config.m4:1.76 php-src/ext/standard/config.m4:1.77 --- php-src/ext/standard/config.m4:1.76 Tue Sep 28 16:42:56 2004 +++ php-src/ext/standard/config.m4 Tue Nov 9 10:58:16 2004 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.76 2004/09/28 20:42:56 sniper Exp $ -*- sh -*- +dnl $Id: config.m4,v 1.77 2004/11/09 15:58:16 jorton Exp $ -*- autoconf -*- divert(3)dnl @@ -275,8 +275,12 @@ AC_MSG_CHECKING([whether rounding works as expected]) AC_TRY_RUN([ #include <math.h> + /* keep this out-of-line to prevent use of gcc inline floor() */ + double somefn(double n) { + return floor(n*pow(10,2) + 0.5); + } int main() { - return floor(0.045*pow(10,2) + 0.5)/10.0 != 0.5; + return somefn(0.045)/10.0 != 0.5; } ],[ PHP_ROUND_FUZZ=0.5
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php