helly Sun Mar 28 16:46:44 2004 EDT
Modified files:
/php-src/ext/standard basic_functions.c
Log:
Improve portability (idea by Ard)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.659&r2=1.660&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.659
php-src/ext/standard/basic_functions.c:1.660
--- php-src/ext/standard/basic_functions.c:1.659 Fri Mar 26 19:50:39 2004
+++ php-src/ext/standard/basic_functions.c Sun Mar 28 16:46:43 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.659 2004/03/27 00:50:39 helly Exp $ */
+/* $Id: basic_functions.c,v 1.660 2004/03/28 21:46:43 helly Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -957,9 +957,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
}
@@ -970,9 +971,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