[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:e964817b244d091dc38f59f5d7f1735110b698af
Author:Nuno Lopes  Wed, 3 Jul 2013 18:02:28 -0400
Parents:   50ac53e1b109795e3abb92735a3a35cebcdd47a7
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e964817b244d091dc38f59f5d7f1735110b698af

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 02e84ee..e86b3e7 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2386,7 +2386,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1"
+   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1"
 : "=&a"(res), "=&d" (overflow)
 : "%0"(res),
   "rm"(size),
@@ -2406,7 +2406,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 size_t res = nmemb;
 unsigned long overflow = 0;
 
-__asm__ ("mulq %3\n\taddq %4,%0\n\tadcq %1,%1"
+__asm__ ("mulq %3\n\taddq %4,%0\n\tadcq $0,%1"
  : "=&a"(res), "=&d" (overflow)
  : "%0"(res),
"rm"(size),


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



[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:c652cc93ec5ce8f1833d023159804ebd56e1a94e
Author:Nuno Lopes  Wed, 3 Jul 2013 17:53:46 -0400
Parents:   7549beb1022c6821a279df03e0dfcbf0df5eef97
Branches:  PHP-5.4

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c652cc93ec5ce8f1833d023159804ebd56e1a94e

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 0bbd59a..596c249 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2461,7 +2461,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1"
+   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1"
 : "=&a"(res), "=&d" (overflow)
 : "%0"(res),
   "rm"(size),
@@ -2489,7 +2489,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 
 __asm__ ("mul" LP_SUFF  " %3\n\t"
  "add %4,%0\n\t"
- "adc %1,%1"
+ "adc $0,%1"
  : "=&a"(res), "=&d" (overflow)
  : "%0"(res),
"rm"(size),


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



[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:40cbceaf71f3431b43c245704d82f06c8bb4c2de
Author:Nuno Lopes  Wed, 3 Jul 2013 17:53:46 -0400
Parents:   332e46b3aa00c1d5a8cfb4e9a42f2d1dfbe3603d
Branches:  PHP-5.5

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=40cbceaf71f3431b43c245704d82f06c8bb4c2de

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index c6aee57..383a1df 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2465,7 +2465,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1"
+   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1"
 : "=&a"(res), "=&d" (overflow)
 : "%0"(res),
   "rm"(size),
@@ -2493,7 +2493,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 
 __asm__ ("mul" LP_SUFF  " %3\n\t"
  "add %4,%0\n\t"
- "adc %1,%1"
+ "adc $0,%1"
  : "=&a"(res), "=&d" (overflow)
  : "%0"(res),
"rm"(size),


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



[PHP-CVS] com php-src: fix assembly of safe_address() for x86 and x86_64: Zend/zend_alloc.c

2013-07-03 Thread Nuno Lopes
Commit:97e9d01dc78b6cec8eb014484935c2d1ab8293fc
Author:Nuno Lopes  Wed, 3 Jul 2013 17:53:46 -0400
Parents:   675beb06a6ed8040303f21f55e4ce6d350f75a1a
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=97e9d01dc78b6cec8eb014484935c2d1ab8293fc

Log:
fix assembly of safe_address() for x86 and x86_64

Changed paths:
  M  Zend/zend_alloc.c


Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index c6aee57..383a1df 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2465,7 +2465,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
size_t res = nmemb;
unsigned long overflow = 0;
 
-   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl %1,%1"
+   __asm__ ("mull %3\n\taddl %4,%0\n\tadcl $0,%1"
 : "=&a"(res), "=&d" (overflow)
 : "%0"(res),
   "rm"(size),
@@ -2493,7 +2493,7 @@ static inline size_t safe_address(size_t nmemb, size_t 
size, size_t offset)
 
 __asm__ ("mul" LP_SUFF  " %3\n\t"
  "add %4,%0\n\t"
- "adc %1,%1"
+ "adc $0,%1"
  : "=&a"(res), "=&d" (overflow)
  : "%0"(res),
"rm"(size),


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



[PHP-CVS] com php-src: Extended the test for bug #65184: ext/date/tests/bug65184.phpt

2013-07-03 Thread Anatol Belski
Commit:332e46b3aa00c1d5a8cfb4e9a42f2d1dfbe3603d
Author:Anatol Belski  Wed, 3 Jul 2013 22:52:51 +0200
Parents:   00293fec05fb5c7ab2591138e83d2aeb0cbeb3df
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=332e46b3aa00c1d5a8cfb4e9a42f2d1dfbe3603d

Log:
Extended the test for bug #65184

Bugs:
https://bugs.php.net/65184

Changed paths:
  M  ext/date/tests/bug65184.phpt


Diff:
diff --git a/ext/date/tests/bug65184.phpt b/ext/date/tests/bug65184.phpt
index ade020c..adfd8d8 100644
--- a/ext/date/tests/bug65184.phpt
+++ b/ext/date/tests/bug65184.phpt
@@ -9,14 +9,18 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 --FILE--
 
 ===DONE===
 --EXPECT--
 90 85 97 6a 93 fa 
+6
 ===DONE===


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



[PHP-CVS] com php-src: - Fixed build on FreeTDS 0.82: ext/pdo_dblib/dblib_driver.c

2013-07-03 Thread Felipe Pena
Commit:7549beb1022c6821a279df03e0dfcbf0df5eef97
Author:Felipe Pena  Wed, 3 Jul 2013 15:02:03 
-0300
Parents:   5bc7e597d990eb3c38d07c0189d27c246c7b4ae5
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7549beb1022c6821a279df03e0dfcbf0df5eef97

Log:
- Fixed build on FreeTDS 0.82

Changed paths:
  M  ext/pdo_dblib/dblib_driver.c


Diff:
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 9ed5087..c54cd73 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -274,9 +274,13 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
,{"5.0",DBVERSION_70} /* FIXME: This does not work with Sybase, 
but environ will */
,{"6.0",DBVERSION_70}
,{"7.0",DBVERSION_70}
+#ifdef DBVERSION_71
,{"7.1",DBVERSION_71}
+#endif
+#ifdef DBVERSION_72
,{"7.2",DBVERSION_72}
,{"8.0",DBVERSION_72}
+#endif
,{"10.0",DBVERSION_100}
,{"auto",0} /* Only works with FreeTDS. Other drivers will bork 
*/

@@ -361,9 +365,11 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval 
*driver_options TSRMLS_
/* allow double quoted indentifiers */
DBSETOPT(H->link, DBQUOTEDIDENT, "1");
 
+#ifdef DBSETLDBNAME
if (vars[3].optval) {
DBSETLDBNAME(H->login, vars[3].optval);
}
+#endif
 
ret = 1;
dbh->max_escaped_char_length = 2;


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



[PHP-CVS] com php-src: Make sure return value is initialised in case transaction startup fails: ext/mysqlnd/mysqlnd.c

2013-07-03 Thread Johannes Schlüter
Commit:5bc7e597d990eb3c38d07c0189d27c246c7b4ae5
Author:Johannes Schlüter  Wed, 3 Jul 2013 
17:08:14 +0200
Parents:   0265c2d961aa99e00361d6ab0f845dc1e8782558
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5bc7e597d990eb3c38d07c0189d27c246c7b4ae5

Log:
Make sure return value is initialised in case transaction startup fails

Changed paths:
  M  ext/mysqlnd/mysqlnd.c


Diff:
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index d70582b..8ed810d 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -1061,7 +1061,7 @@ static enum_func_status
 MYSQLND_METHOD(mysqlnd_conn_data, send_query)(MYSQLND_CONN_DATA * conn, const 
char * query, unsigned int query_len TSRMLS_DC)
 {
size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, 
send_query);
-   enum_func_status ret;
+   enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::send_query");
DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);
 
@@ -1468,7 +1468,7 @@ static ulong
 MYSQLND_METHOD(mysqlnd_conn_data, escape_string)(MYSQLND_CONN_DATA * const 
conn, char * newstr, const char * escapestr, size_t escapestr_len TSRMLS_DC)
 {
size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, 
escape_string);
-   ulong ret;
+   ulong ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::escape_string");
DBG_INF_FMT("conn=%llu", conn->thread_id);


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/mysqlnd/mysqlnd.c

2013-07-03 Thread Johannes Schlüter
Commit:9aa7343ae0828d881e8438a5a9146fd4a95a93d9
Author:Johannes Schlüter  Wed, 3 Jul 2013 
17:10:58 +0200
Parents:   631bb27dcacf625e35f6dacc5e8df0b45624531a 
5bc7e597d990eb3c38d07c0189d27c246c7b4ae5
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=9aa7343ae0828d881e8438a5a9146fd4a95a93d9

Log:
Merge branch 'PHP-5.4' into PHP-5.5

Changed paths:
  MM  ext/mysqlnd/mysqlnd.c


Diff:



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



Re: [PHP-CVS] com php-src: Add bison 2.6.4 to the list of supported versions: Zend/acinclude.m4

2013-07-03 Thread Johannes Schlüter
On Wed, 2013-07-03 at 13:07 +0200, Johannes Schlüter wrote:
> The 5.3 branch is closed. Do we really need this here?

Additionally I got merge conflicts due to this while merging 5.4 into
5.5, please verify the result there.

johannes


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



Re: [PHP-CVS] com php-src: Add bison 2.6.4 to the list of supported versions: Zend/acinclude.m4

2013-07-03 Thread Johannes Schlüter
The 5.3 branch is closed. Do we really need this here?

On Wed, 2013-07-03 at 04:36 +, Sebastian Bergmann wrote:
> Commit:50ac53e1b109795e3abb92735a3a35cebcdd47a7
> Author:Sebastian Bergmann  Wed, 3 Jul 
> 2013 06:36:54 +0200
> Parents:   e4ee921b7ea7f549b6cc2ed29797a7f7f17962c6
> Branches:  PHP-5.3
> 
> Link:   
> http://git.php.net/?p=php-src.git;a=commitdiff;h=50ac53e1b109795e3abb92735a3a35cebcdd47a7
> 
> Log:
> Add bison 2.6.4 to the list of supported versions
> 
> Changed paths:
>   M  Zend/acinclude.m4
> 
> 
> Diff:
> diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
> index 136d2d8..77430ab 100644
> --- a/Zend/acinclude.m4
> +++ b/Zend/acinclude.m4
> @@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
>  
>  AC_DEFUN([LIBZEND_BISON_CHECK],[
># we only support certain bison versions
> -  bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 
> 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2"
> +  bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 
> 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.4"
>  
># for standalone build of Zend Engine
>test -z "$SED" && SED=sed
> 
> 



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



[PHP-CVS] com php-src: Fixed bug #65184 strftime() returns insufficient-length: NEWS ext/date/php_date.c ext/date/tests/bug65184.phpt

2013-07-03 Thread Anatol Belski
Commit:5324416b6514b6de53e7de269bc18b5807701051
Author:Anatol Belski  Wed, 3 Jul 2013 11:12:46 +0200
Parents:   b52fea6f3595d630541253f675c16a5db55eb8d0
Branches:  PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5324416b6514b6de53e7de269bc18b5807701051

Log:
Fixed bug #65184 strftime() returns insufficient-length

string under multibyte locales

The msdn doc states 'strftime returns the number of characters', but prior
to VS2012 it seems to have returned the number of bytes. Locale independent.
The return is however \0-terminated, so strlen is just fine. The behaivor
seems to be persisting in the later VC++ versions as the corresponding
MSDN ticket is closed 'by design'.

See 
http://connect.microsoft.com/VisualStudio/feedback/details/766205/vs2012-strftime-has-incorrect-return-value-in-vc-11-with-multibyte-codepages#details

Bugs:
https://bugs.php.net/65184

Changed paths:
  M  NEWS
  M  ext/date/php_date.c
  A  ext/date/tests/bug65184.phpt


Diff:
diff --git a/NEWS b/NEWS
index d59945f..9a78409 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,10 @@ PHP  
  NEWS
   . Fixed bug #65066 (Cli server not responsive when responding with 422 http
 status code). (Adam)
 
+- DateTime
+  . Fixed fug #65184 (strftime() returns insufficient-length string under
+multibyte locales). (Anatol)
+
 - GD
   . Fixed #65070 (bgcolor does not use the same format as the input image with
 imagerotate). (Pierre)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 28ac86b..0f8822a 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1678,6 +1678,13 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, 
int gmt)
break;
}
}
+#if defined(PHP_WIN32) && _MSC_VER >= 1700
+   /* VS2012 strftime() returns number of characters, not bytes.
+   See VC++11 bug id 766205. */
+   if (real_len > 0) {
+   real_len = strlen(buf);
+   }
+#endif
 
timelib_time_dtor(ts);
if (!gmt) {
diff --git a/ext/date/tests/bug65184.phpt b/ext/date/tests/bug65184.phpt
new file mode 100644
index 000..ade020c
--- /dev/null
+++ b/ext/date/tests/bug65184.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test bug #65184 strftime() returns insufficient-length string under multibyte 
locales
+--SKIPIF--
+
+--FILE--
+
+===DONE===
+--EXPECT--
+90 85 97 6a 93 fa 
+===DONE===


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