abies           Sat Apr  3 04:46:24 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/standard       config.m4 
  Log:
  Changed test to include returning HUGE_VAL as well (intended to resolve #27830)
  
http://cvs.php.net/diff.php/php-src/ext/standard/config.m4?r1=1.47.2.9&r2=1.47.2.10&ty=u
Index: php-src/ext/standard/config.m4
diff -u php-src/ext/standard/config.m4:1.47.2.9 
php-src/ext/standard/config.m4:1.47.2.10
--- php-src/ext/standard/config.m4:1.47.2.9     Mon Mar 29 18:26:31 2004
+++ php-src/ext/standard/config.m4      Sat Apr  3 04:46:20 2004
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.47.2.9 2004/03/29 23:26:31 helly Exp $ -*- sh -*-
+dnl $Id: config.m4,v 1.47.2.10 2004/04/03 09:46:20 abies Exp $ -*- sh -*-
 
 divert(3)dnl
 
@@ -326,7 +326,7 @@
   AC_DEFINE([HAVE_ATOF_ACCEPTS_INF], 1, [whether atof() accepts INF])
 fi
 
-AC_CACHE_CHECK(whether HUGE_VAL + -HUGEVAL = NAN, ac_cv_huge_val_nan,[
+AC_CACHE_CHECK(whether HUGE_VAL + -HUGEVAL == NAN, ac_cv_huge_val_nan,[
   AC_TRY_RUN([
 #include <math.h>
 #include <stdlib.h>
@@ -350,9 +350,16 @@
 #define zend_isnan(a) 0
 #endif
 
+double hv(int i)
+{
+       /* avoid inlining */
+       if (i) return hv(i-1);
+       else return HUGE_VAL;
+}
+
 int main(int argc, char** argv)
 {
-       return zend_isinf(HUGE_VAL) && zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
+       return zend_isinf(hv(3)) && zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
 }
   ],[
       ac_cv_huge_val_nan=yes
@@ -364,7 +371,7 @@
 ])
 dnl This is the most probable fallback so we assume yes in case of cross compile.
 if test "$ac_cv_huge_val_nan" = "yes"; then
-  AC_DEFINE([HAVE_HUGE_VAL_NAN], 1, [whether HUGE_VAL + -HUGEVAL = NAN])
+  AC_DEFINE([HAVE_HUGE_VAL_NAN], 1, [whether HUGE_VAL + -HUGEVAL == NAN])
 fi
 
 PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c 
crypt.c \

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to