[PHP-CVS] svn: /php/php-src/trunk/Zend/tests/ declare_001.phpt ns_086.phpt

2011-01-04 Thread Felipe Pena
felipe   Tue, 04 Jan 2011 22:01:09 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307094

Log:
- Fixed tests

Changed paths:
U   php/php-src/trunk/Zend/tests/declare_001.phpt
U   php/php-src/trunk/Zend/tests/ns_086.phpt

Modified: php/php-src/trunk/Zend/tests/declare_001.phpt
===
--- php/php-src/trunk/Zend/tests/declare_001.phpt   2011-01-04 19:18:50 UTC 
(rev 307093)
+++ php/php-src/trunk/Zend/tests/declare_001.phpt   2011-01-04 22:01:09 UTC 
(rev 307094)
@@ -1,11 +1,7 @@
 --TEST--
 Testing declare statement with several type values
---SKIPIF--
-?php
-if (ini_get(zend.multibyte)) {
-  die(skip Requires zend.multibyte=0);
-}
-?
+--INI--
+zend.multibyte=1
 --FILE--
 ?php

@@ -19,4 +15,10 @@

 ?
 --EXPECTF--
-Fatal error: Cannot use constants as encoding in %sdeclare_001.php on line 7
+Warning: Unsupported encoding [1] in %sdeclare_001.php on line %d
+
+Warning: Unsupported encoding [1.1231312321313E+18] in %sdeclare_001.php on 
line %d
+
+Warning: Unsupported encoding [] in %sdeclare_001.php on line %d
+
+Fatal error: Cannot use constants as encoding in %sdeclare_001.php on line %d
\ No newline at end of file

Modified: php/php-src/trunk/Zend/tests/ns_086.phpt
===
--- php/php-src/trunk/Zend/tests/ns_086.phpt2011-01-04 19:18:50 UTC (rev 
307093)
+++ php/php-src/trunk/Zend/tests/ns_086.phpt2011-01-04 22:01:09 UTC (rev 
307094)
@@ -1,5 +1,13 @@
 --TEST--
 086: bracketed namespace with encoding
+--SKIPIF--
+?php
+if (!extension_loaded(mbstring)) {
+  die(skip Requires mbstring extension);
+}
+?
+--INI--
+zend.multibyte=1
 --FILE--
 ?php
 declare(encoding='utf-8');

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/Zend/zend_strtod.c branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_strtod.c trunk/Zend/zend_strtod.c

2011-01-04 Thread Scott MacVicar
scottmac Tue, 04 Jan 2011 22:36:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307095

Log:
Fix bug #53632 with x87 fpu

Bug: http://bugs.php.net/53632 (Assigned) PHP hangs on numeric value 
2.2250738585072011e-308
  
Changed paths:
U   php/php-src/branches/PHP_5_2/Zend/zend_strtod.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_strtod.c
U   php/php-src/trunk/Zend/zend_strtod.c

Modified: php/php-src/branches/PHP_5_2/Zend/zend_strtod.c
===
--- php/php-src/branches/PHP_5_2/Zend/zend_strtod.c 2011-01-04 22:01:09 UTC 
(rev 307094)
+++ php/php-src/branches/PHP_5_2/Zend/zend_strtod.c 2011-01-04 22:36:23 UTC 
(rev 307095)
@@ -2035,7 +2035,7 @@
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
CONST char *s, *s0, *s1;
-   double aadj, aadj1, adj;
+   volatile double aadj, aadj1, adj;
volatile _double rv, rv0;
Long L;
ULong y, z;

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-01-04 22:01:09 UTC (rev 307094)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-01-04 22:36:23 UTC (rev 307095)
@@ -8,6 +8,7 @@
   . Indirect reference to $this fails to resolve if direct $this is never used
 in method. (Scott)
   . Fixed Bug #53629 (memory leak inside highlight_string()). (Hannes, Ilia)
+  . Fixed Bug #53632 (infinite loop with x87 fpu). (Scott, Rasmus)

 - Core:
   . Fixed bug #48484 (array_product() always returns 0 for an empty array).

Modified: php/php-src/branches/PHP_5_3/Zend/zend_strtod.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_strtod.c 2011-01-04 22:01:09 UTC 
(rev 307094)
+++ php/php-src/branches/PHP_5_3/Zend/zend_strtod.c 2011-01-04 22:36:23 UTC 
(rev 307095)
@@ -2035,7 +2035,7 @@
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
CONST char *s, *s0, *s1;
-   double aadj, aadj1, adj;
+   volatile double aadj, aadj1, adj;
volatile _double rv, rv0;
Long L;
ULong y, z;

Modified: php/php-src/trunk/Zend/zend_strtod.c
===
--- php/php-src/trunk/Zend/zend_strtod.c2011-01-04 22:01:09 UTC (rev 
307094)
+++ php/php-src/trunk/Zend/zend_strtod.c2011-01-04 22:36:23 UTC (rev 
307095)
@@ -2035,7 +2035,7 @@
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
CONST char *s, *s0, *s1;
-   double aadj, aadj1, adj;
+   volatile double aadj, aadj1, adj;
volatile _double rv, rv0;
Long L;
ULong y, z;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/Zend/tests/bug53632.phpt branches/PHP_5_3/Zend/tests/bug53632.phpt trunk/Zend/tests/bug53632.phpt

2011-01-04 Thread Scott MacVicar
scottmac Tue, 04 Jan 2011 23:36:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307097

Log:
Add test for bug #53632

Bug: http://bugs.php.net/53632 (Assigned) PHP hangs on numeric value 
2.2250738585072011e-308
  
Changed paths:
A   php/php-src/branches/PHP_5_2/Zend/tests/bug53632.phpt
A   php/php-src/branches/PHP_5_3/Zend/tests/bug53632.phpt
A   php/php-src/trunk/Zend/tests/bug53632.phpt

Added: php/php-src/branches/PHP_5_2/Zend/tests/bug53632.phpt
===
--- php/php-src/branches/PHP_5_2/Zend/tests/bug53632.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_2/Zend/tests/bug53632.phpt   2011-01-04 
23:36:56 UTC (rev 307097)
@@ -0,0 +1,10 @@
+--TEST--
+zend_strtod() hangs with 2.2250738585072011e-308
+--FILE--
+?php
+$d = 2.2250738585072011e-308;
+
+echo Done\n;
+?
+--EXPECTF--
+Done

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug53632.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug53632.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug53632.phpt   2011-01-04 
23:36:56 UTC (rev 307097)
@@ -0,0 +1,10 @@
+--TEST--
+zend_strtod() hangs with 2.2250738585072011e-308
+--FILE--
+?php
+$d = 2.2250738585072011e-308;
+
+echo Done\n;
+?
+--EXPECTF--
+Done

Added: php/php-src/trunk/Zend/tests/bug53632.phpt
===
--- php/php-src/trunk/Zend/tests/bug53632.phpt  (rev 0)
+++ php/php-src/trunk/Zend/tests/bug53632.phpt  2011-01-04 23:36:56 UTC (rev 
307097)
@@ -0,0 +1,10 @@
+--TEST--
+zend_strtod() hangs with 2.2250738585072011e-308
+--FILE--
+?php
+$d = 2.2250738585072011e-308;
+
+echo Done\n;
+?
+--EXPECTF--
+Done

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/build/confutils.js trunk/win32/build/confutils.js

2011-01-04 Thread Pierre Joye
pajoye   Wed, 05 Jan 2011 00:59:31 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307100

Log:
- revert rev. 307044

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/build/confutils.js
U   php/php-src/trunk/win32/build/confutils.js

Modified: php/php-src/branches/PHP_5_3/win32/build/confutils.js
===
--- php/php-src/branches/PHP_5_3/win32/build/confutils.js   2011-01-05 
00:35:39 UTC (rev 307099)
+++ php/php-src/branches/PHP_5_3/win32/build/confutils.js   2011-01-05 
00:59:31 UTC (rev 307100)
@@ -648,9 +648,6 @@
// Expand path to include general dirs
path_to_check += ; + php_usual_lib_suspects;

-   // For static libs
-   eval('var static_lib = !PHP_' + common_name.toUpperCase() + '_SHARED;');
-
// It is common practice to put libs under one of these dir names
var subdirs = new Array(PHP_DEBUG == yes ? Debug : (PHP_DEBUG_PACK 
== yes?Release_Dbg:Release), lib, libs, libexec);

@@ -666,14 +663,6 @@
name = name.replace(rExp,_debug.lib);
libnames.unshift(name);
}
-   } else if (!static_lib) {
-   var length = libnames.length;
-   for (var i = 0; i  length; i++) {
-   var name = new String(libnames[i]);
-   rExp = /_a.lib$/i;
-   name = name.replace(rExp,.lib);
-   libnames.unshift(name);
-   }
}

var i, j, k, libname;

Modified: php/php-src/trunk/win32/build/confutils.js
===
--- php/php-src/trunk/win32/build/confutils.js  2011-01-05 00:35:39 UTC (rev 
307099)
+++ php/php-src/trunk/win32/build/confutils.js  2011-01-05 00:59:31 UTC (rev 
307100)
@@ -648,9 +648,6 @@
// Expand path to include general dirs
path_to_check += ; + php_usual_lib_suspects;

-   // For static libs
-   eval('var static_lib = !PHP_' + common_name.toUpperCase() + '_SHARED;');
-
// It is common practice to put libs under one of these dir names
var subdirs = new Array(PHP_DEBUG == yes ? Debug : (PHP_DEBUG_PACK 
== yes?Release_Dbg:Release), lib, libs, libexec);

@@ -666,14 +663,6 @@
name = name.replace(rExp,_debug.lib);
libnames.unshift(name);
}
-   } else if (!static_lib) {
-   var length = libnames.length;
-   for (var i = 0; i  length; i++) {
-   var name = new String(libnames[i]);
-   rExp = /_a.lib$/i;
-   name = name.replace(rExp,.lib);
-   libnames.unshift(name);
-   }
}

var i, j, k, libname;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/lib/unixtime2tm.c trunk/ext/date/lib/unixtime2tm.c

2011-01-04 Thread Ilia Alshanetsky
iliaaWed, 05 Jan 2011 04:13:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307103

Log:
Optimize unix timestamp to date-string conversion for very high year values

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c
U   php/php-src/trunk/ext/date/lib/unixtime2tm.c

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c 2011-01-05 
04:04:02 UTC (rev 307102)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c 2011-01-05 
04:13:23 UTC (rev 307103)
@@ -55,6 +55,12 @@

if (ts = 0) {
tmp_days = days + 1;
+
+   if (tmp_days = DAYS_PER_LYEAR_PERIOD || tmp_days = 
-DAYS_PER_LYEAR_PERIOD) {
+   cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / 
DAYS_PER_LYEAR_PERIOD);
+   tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / 
DAYS_PER_LYEAR_PERIOD);
+   }
+
while (tmp_days = DAYS_PER_LYEAR) {
cur_year++;
if (timelib_is_leap(cur_year)) {

Modified: php/php-src/trunk/ext/date/lib/unixtime2tm.c
===
--- php/php-src/trunk/ext/date/lib/unixtime2tm.c2011-01-05 04:04:02 UTC 
(rev 307102)
+++ php/php-src/trunk/ext/date/lib/unixtime2tm.c2011-01-05 04:13:23 UTC 
(rev 307103)
@@ -55,6 +55,12 @@

if (ts = 0) {
tmp_days = days + 1;
+
+   if (tmp_days = DAYS_PER_LYEAR_PERIOD || tmp_days = 
-DAYS_PER_LYEAR_PERIOD) {
+   cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / 
DAYS_PER_LYEAR_PERIOD);
+   tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / 
DAYS_PER_LYEAR_PERIOD);
+   }
+
while (tmp_days = DAYS_PER_LYEAR) {
cur_year++;
if (timelib_is_leap(cur_year)) {

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