helly           Sun Mar 28 16:50:01 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/standard       basic_functions.c 
  Log:
  MFH: Improve portability (idea by Ard)
  
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.543.2.33&r2=1.543.2.34&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.543.2.33 
php-src/ext/standard/basic_functions.c:1.543.2.34
--- php-src/ext/standard/basic_functions.c:1.543.2.33   Fri Mar 26 20:17:06 2004
+++ php-src/ext/standard/basic_functions.c      Sun Mar 28 16:50:01 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.543.2.33 2004/03/27 01:17:06 helly Exp $ */
+/* $Id: basic_functions.c,v 1.543.2.34 2004/03/28 21:50:01 helly Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1006,9 +1006,10 @@
        ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
        ((php_uint32*)&val)[0] = 0;
        return val;
-#else
-       /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
        return atof("NAN");
+#else
+       return 0.0/0.0;
 #endif
 }
 
@@ -1019,9 +1020,10 @@
        ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
        ((php_uint32*)&val)[0] = 0;
        return val;
-#else
-       /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_INF)
        return atof("INF");
+#else
+       return 1.0/0.0;
 #endif
 }
 

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

Reply via email to