cvs: ZendEngine2(PHP_5_2) / zend_strtod.c

"Dmitry Stogov" <[email protected]>
Newsgroups gmane.comp.php.cvs.zend
Message-ID <cvsdmitry1217158133@cvsserver>
dmitry		Sun Jul 27 11:28:53 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /ZendEngine2	zend_strtod.c 
  Log:
  Fix for bug #43487 (Wrong conversion of float to string)
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_strtod.c?r1=1.17.2.2.2.13&r2=1.17.2.2.2.14&diff_format=u
Index: ZendEngine2/zend_strtod.c
diff -u ZendEngine2/zend_strtod.c:1.17.2.2.2.13 ZendEngine2/zend_strtod.c:1.17.2.2.2.14
--- ZendEngine2/zend_strtod.c:1.17.2.2.2.13	Tue Sep  4 18:46:21 2007
+++ ZendEngine2/zend_strtod.c	Sun Jul 27 11:28:53 2008
@@ -89,7 +89,7 @@
  *	directly -- and assumed always to succeed.
  */
 
-/* $Id: zend_strtod.c,v 1.17.2.2.2.13 2007/09/04 18:46:21 tony2001 Exp $ */
+/* $Id: zend_strtod.c,v 1.17.2.2.2.14 2008/07/27 11:28:53 dmitry Exp $ */
 
 #include <zend_operators.h>
 #include <zend_strtod.h>
@@ -984,9 +984,9 @@
 
 static double ulp (double _x)
 {
-	_double x;
+	volatile _double x;
 	register Long L;
-	_double a;
+	volatile _double a;
 
 	value(x) = _x;
 	L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
@@ -1026,7 +1026,7 @@
 {
 	ULong *xa, *xa0, w, y, z;
 	int k;
-	_double d;
+	volatile _double d;
 #ifdef VAX
 	ULong d0, d1;
 #else
@@ -1092,7 +1092,7 @@
 	Bigint *b;
 	int de, i, k;
 	ULong *x, y, z;
-	_double d;
+	volatile _double d;
 #ifdef VAX
 	ULong d0, d1;
 #endif
@@ -1213,7 +1213,7 @@
 
 static double ratio (Bigint *a, Bigint *b)
 {
-	_double da, db;
+	volatile _double da, db;
 	int k, ka, kb;
 
 	value(da) = b2d(a, &ka);
@@ -1480,7 +1480,7 @@
 	Bigint *b, *b1, *delta, *mlo, *mhi, *S, *tmp;
 	double ds;
 	char *s, *s0;
-	_double d, d2, eps;
+	volatile _double d, d2, eps;
 
 	value(d) = _d;
 
@@ -2043,7 +2043,7 @@
 		e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
 	CONST char *s, *s0, *s1;
 	double aadj, aadj1, adj;
-	_double rv, rv0;
+	volatile _double rv, rv0;
 	Long L;
 	ULong y, z;
 	Bigint *bb, *bb1, *bd, *bd0, *bs, *delta, *tmp;



-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.