diff options
| author | Joe Orton <jorton@php.net> | 2004-11-09 15:58:16 +0000 |
|---|---|---|
| committer | Joe Orton <jorton@php.net> | 2004-11-09 15:58:16 +0000 |
| commit | 0f858fc744bb3f1ea2d3ae545ebdfa4dd62aba3c (patch) | |
| tree | 0d63b197a8cddb2e8548b787696815534f1aa24d | |
| parent | 1d04952b1dd8810d43ef497a5b6e4508bde453af (diff) | |
| download | php-git-0f858fc744bb3f1ea2d3ae545ebdfa4dd62aba3c.tar.gz | |
Make the "rounding fuzz" check work again with gcc 3.3 and later,
fixing the bug24142 test.
| -rw-r--r-- | ext/standard/config.m4 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 9775470781..40f35532a5 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -1,4 +1,4 @@ -dnl $Id$ -*- sh -*- +dnl $Id$ -*- autoconf -*- divert(3)dnl @@ -275,8 +275,12 @@ dnl 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 |
