]> granicus.if.org Git - php/commitdiff
- Backported a fix in the configure tests to detect the "rounding fuzz".
authorDerick Rethans <derick@php.net>
Mon, 22 Jan 2007 19:59:21 +0000 (19:59 +0000)
committerDerick Rethans <derick@php.net>
Mon, 22 Jan 2007 19:59:21 +0000 (19:59 +0000)
NEWS
ext/standard/config.m4

diff --git a/NEWS b/NEWS
index e013c9bf5d5f1f9eae2638b4ce6cd649d4b796af..d7cd96a4028674fc49ec5ad95830a077f60756bc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ PHP 4                                                                      NEWS
   (Dmitry)
 - Fixed bug #36248 (CURLOPT_HEADERFUNCTION, couldn't set the function in the
   class). (Ilia)
+- Backported a fix in the configure tests to detect the "rounding fuzz".
+  (Derick, Joe Orton)
 
 - Moved extensions to PECL:
   . ext/ovrimos (Derick)
index afc8201f2398c2ee1af1a0bdeaaa39161e9ec5e6..c964f31d8a5f1a4ccee5614388499e08037f26c8 100644 (file)
@@ -250,8 +250,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