[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/standard/info.c trunk/ext/standard/info.c

2011-08-08 Thread Xinchen Hui
laruence Mon, 08 Aug 2011 06:49:17 +

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

Log:
Make codes more clearly, and make the static analyzer silent..

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/standard/info.c
U   php/php-src/trunk/ext/standard/info.c

Modified: php/php-src/branches/PHP_5_4/ext/standard/info.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/info.c2011-08-08 06:42:43 UTC 
(rev 314466)
+++ php/php-src/branches/PHP_5_4/ext/standard/info.c2011-08-08 06:49:17 UTC 
(rev 314467)
@@ -245,22 +245,22 @@
}
} else {
tmp2 = **tmp;
-   switch (Z_TYPE_PP(tmp)) {
-   default:
-   tmp = NULL;
-   zval_copy_ctor(tmp2);
-   convert_to_string(tmp2);
-   case IS_STRING:
-   if 
(!sapi_module.phpinfo_as_text) {
-   if (Z_STRLEN(tmp2) == 
0) {
-   
php_info_print(ino value/i);
-   } else {
-   
php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
-   }
-   } else {
-   
php_info_print(Z_STRVAL(tmp2));
-   }
+   if (Z_TYPE_PP(tmp) != IS_STRING) {
+   tmp = NULL;
+   zval_copy_ctor(tmp2);
+   convert_to_string(tmp2);
}
+
+   if (!sapi_module.phpinfo_as_text) {
+   if (Z_STRLEN(tmp2) == 0) {
+   php_info_print(ino 
value/i);
+   } else {
+   
php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
+   }
+   } else {
+   php_info_print(Z_STRVAL(tmp2));
+   }
+
if (!tmp) {
zval_dtor(tmp2);
}

Modified: php/php-src/trunk/ext/standard/info.c
===
--- php/php-src/trunk/ext/standard/info.c   2011-08-08 06:42:43 UTC (rev 
314466)
+++ php/php-src/trunk/ext/standard/info.c   2011-08-08 06:49:17 UTC (rev 
314467)
@@ -245,22 +245,22 @@
}
} else {
tmp2 = **tmp;
-   switch (Z_TYPE_PP(tmp)) {
-   default:
-   tmp = NULL;
-   zval_copy_ctor(tmp2);
-   convert_to_string(tmp2);
-   case IS_STRING:
-   if 
(!sapi_module.phpinfo_as_text) {
-   if (Z_STRLEN(tmp2) == 
0) {
-   
php_info_print(ino value/i);
-   } else {
-   
php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
-   }
-   } else {
-   
php_info_print(Z_STRVAL(tmp2));
-   }
+   if (Z_TYPE_PP(tmp) != IS_STRING) {
+   tmp = NULL;
+   zval_copy_ctor(tmp2);
+   convert_to_string(tmp2);
}
+
+   if (!sapi_module.phpinfo_as_text) {
+   if (Z_STRLEN(tmp2) == 0) {
+   php_info_print(ino 
value/i);
+   } else {
+   
php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
+  

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_API.c trunk/Zend/zend_API.c

2011-08-08 Thread Johannes Schlüter
Hi,

might be good to document in Zend/README.ZEND_MM or some similar place?

johannes

On Thu, 2011-07-14 at 12:21 +, Derick Rethans wrote:
 derick   Thu, 14 Jul 2011 12:21:15 +
 
 Revision: http://svn.php.net/viewvc?view=revisionrevision=313243
 
 Log:
 - Added a check for an enviroment variable (ZEND_DONT_UNLOAD_MODULES) that, if
   set, prevents PHP from dl_closing() modules on shutdown.
 - This makes it possible to spot memory leaks with valgrind in shared modules.
 
 Changed paths:
 U   php/php-src/branches/PHP_5_4/Zend/zend_API.c
 U   php/php-src/trunk/Zend/zend_API.c
 
 Modified: php/php-src/branches/PHP_5_4/Zend/zend_API.c
 ===
 --- php/php-src/branches/PHP_5_4/Zend/zend_API.c  2011-07-14 12:05:51 UTC 
 (rev 313242)
 +++ php/php-src/branches/PHP_5_4/Zend/zend_API.c  2011-07-14 12:21:15 UTC 
 (rev 313243)
 @@ -2266,7 +2266,7 @@
 
  #if HAVE_LIBDL
  #if !(defined(NETWARE)  defined(APACHE_1_BUILD))
 - if (module-handle) {
 + if (module-handle  !getenv(ZEND_DONT_UNLOAD_MODULES)) {
   DL_UNLOAD(module-handle);
   }
  #endif
 
 Modified: php/php-src/trunk/Zend/zend_API.c
 ===
 --- php/php-src/trunk/Zend/zend_API.c 2011-07-14 12:05:51 UTC (rev 313242)
 +++ php/php-src/trunk/Zend/zend_API.c 2011-07-14 12:21:15 UTC (rev 313243)
 @@ -2266,7 +2266,7 @@
 
  #if HAVE_LIBDL
  #if !(defined(NETWARE)  defined(APACHE_1_BUILD))
 - if (module-handle) {
 + if (module-handle  !getenv(ZEND_DONT_UNLOAD_MODULES)) {
   DL_UNLOAD(module-handle);
   }
  #endif
 
 -- 
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
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/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli.c trunk/sapi/cli/php_cli.c

2011-08-08 Thread Xinchen Hui
laruence Mon, 08 Aug 2011 07:12:12 +

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

Log:
Prevented the warning about truncate int to char

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c
U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
U   php/php-src/trunk/sapi/cli/php_cli.c

Modified: php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c
===
--- php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2011-08-08 06:49:17 UTC 
(rev 314467)
+++ php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2011-08-08 07:12:12 UTC 
(rev 314468)
@@ -596,7 +596,7 @@
  */
 static int cli_seek_file_begin(zend_file_handle *file_handle, char 
*script_file, int *lineno TSRMLS_DC)
 {
-   char c;
+   int c;

*lineno = 1;


Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
===
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-08-08 06:49:17 UTC 
(rev 314467)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-08-08 07:12:12 UTC 
(rev 314468)
@@ -615,7 +615,7 @@
  */
 static int cli_seek_file_begin(zend_file_handle *file_handle, char 
*script_file, int *lineno TSRMLS_DC)
 {
-   char c;
+   int c;

*lineno = 1;


Modified: php/php-src/trunk/sapi/cli/php_cli.c
===
--- php/php-src/trunk/sapi/cli/php_cli.c2011-08-08 06:49:17 UTC (rev 
314467)
+++ php/php-src/trunk/sapi/cli/php_cli.c2011-08-08 07:12:12 UTC (rev 
314468)
@@ -615,7 +615,7 @@
  */
 static int cli_seek_file_begin(zend_file_handle *file_handle, char 
*script_file, int *lineno TSRMLS_DC)
 {
-   char c;
+   int c;

*lineno = 1;


-- 
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_4/Zend/README.ZEND_MM trunk/Zend/README.ZEND_MM

2011-08-08 Thread Derick Rethans
derick   Mon, 08 Aug 2011 07:42:58 +

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

Log:
- Document the new ZEND_DONT_UNLOAD_MODULES environment variable.

Changed paths:
U   php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM
U   php/php-src/trunk/Zend/README.ZEND_MM

Modified: php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM
===
--- php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM2011-08-08 07:12:12 UTC 
(rev 314468)
+++ php/php-src/branches/PHP_5_4/Zend/README.ZEND_MM2011-08-08 07:42:58 UTC 
(rev 314469)
@@ -9,7 +9,7 @@

 The new manager's configure has no --disable-zend-memory-manager option,
 but it has --enable-malloc-mm instead.  It is enabled by default in DEBUG
-build and disabled by default in RELEASE build.  when enabled it allows 
selecting
+build and disabled by default in RELEASE build. When enabled it allows 
selecting
 between malloc and emalloc at runtime so you can use internal and external 
memory
 debuggers without recompilation.

@@ -24,6 +24,15 @@

 $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'

+Shared extensions:
+--
+
+Since PHP 5.4 it is possible to prevent shared extensions from unloading so
+that valgrind can correctly track the memory leaks in shared extensions. For
+this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
+DL_UNLOAD() is skipped during the shutdown of shared extensions.
+
+
 Tweaking:
 -


Modified: php/php-src/trunk/Zend/README.ZEND_MM
===
--- php/php-src/trunk/Zend/README.ZEND_MM   2011-08-08 07:12:12 UTC (rev 
314468)
+++ php/php-src/trunk/Zend/README.ZEND_MM   2011-08-08 07:42:58 UTC (rev 
314469)
@@ -9,7 +9,7 @@

 The new manager's configure has no --disable-zend-memory-manager option,
 but it has --enable-malloc-mm instead.  It is enabled by default in DEBUG
-build and disabled by default in RELEASE build.  when enabled it allows 
selecting
+build and disabled by default in RELEASE build. When enabled it allows 
selecting
 between malloc and emalloc at runtime so you can use internal and external 
memory
 debuggers without recompilation.

@@ -24,6 +24,15 @@

 $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'

+Shared extensions:
+--
+
+Since PHP 5.4 it is possible to prevent shared extensions from unloading so
+that valgrind can correctly track the memory leaks in shared extensions. For
+this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
+DL_UNLOAD() is skipped during the shutdown of shared extensions.
+
+
 Tweaking:
 -


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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_API.c trunk/Zend/zend_API.c

2011-08-08 Thread Derick Rethans
On Mon, 8 Aug 2011, Johannes Schlüter wrote:

 might be good to document in Zend/README.ZEND_MM or some similar 
 place?

Indeed. And done.

Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
-- 
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_4/ext/spl/spl_observer.c trunk/ext/spl/spl_observer.c

2011-08-08 Thread Xinchen Hui
laruence Mon, 08 Aug 2011 08:49:55 +

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

Log:
Sizeof mismatch

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/spl/spl_observer.c
U   php/php-src/trunk/ext/spl/spl_observer.c

Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_observer.c
===
--- php/php-src/branches/PHP_5_4/ext/spl/spl_observer.c 2011-08-08 08:28:16 UTC 
(rev 314472)
+++ php/php-src/branches/PHP_5_4/ext/spl/spl_observer.c 2011-08-08 08:49:55 UTC 
(rev 314473)
@@ -117,7 +117,7 @@
if (rv) {
if (Z_TYPE_P(rv) == IS_STRING) {
int hash_len = Z_STRLEN_P(rv);
-   char *hash = emalloc((hash_len+1)*sizeof(char 
*));
+   char *hash = emalloc((hash_len+1)*sizeof(char));
strncpy(hash, Z_STRVAL_P(rv), hash_len);
hash[hash_len] = 0;


Modified: php/php-src/trunk/ext/spl/spl_observer.c
===
--- php/php-src/trunk/ext/spl/spl_observer.c2011-08-08 08:28:16 UTC (rev 
314472)
+++ php/php-src/trunk/ext/spl/spl_observer.c2011-08-08 08:49:55 UTC (rev 
314473)
@@ -117,7 +117,7 @@
if (rv) {
if (Z_TYPE_P(rv) == IS_STRING) {
int hash_len = Z_STRLEN_P(rv);
-   char *hash = emalloc((hash_len+1)*sizeof(char 
*));
+   char *hash = emalloc((hash_len+1)*sizeof(char));
strncpy(hash, Z_STRVAL_P(rv), hash_len);
hash[hash_len] = 0;


-- 
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/Zend/zend_builtin_functions.c branches/PHP_5_4/Zend/zend_builtin_functions.c trunk/Zend/zend_builtin_functions.c

2011-08-08 Thread Pierrick Charron
pierrick Mon, 08 Aug 2011 11:19:49 +

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

Log:
Use snprintf to make the static analyzers happy

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c
U   php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c
U   php/php-src/trunk/Zend/zend_builtin_functions.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c  2011-08-08 
10:10:36 UTC (rev 314479)
+++ php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c  2011-08-08 
11:19:49 UTC (rev 314480)
@@ -1713,7 +1713,7 @@
function_name[0] = '\0';

do {
-   function_name_length = 1 + sprintf(function_name + 1, 
lambda_%d, ++EG(lambda_count));
+   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(0lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
} while (zend_hash_add(EG(function_table), function_name, 
function_name_length+1, new_function, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, 
sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);

Modified: php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c  2011-08-08 
10:10:36 UTC (rev 314479)
+++ php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c  2011-08-08 
11:19:49 UTC (rev 314480)
@@ -1821,7 +1821,7 @@
function_name[0] = '\0';

do {
-   function_name_length = 1 + sprintf(function_name + 1, 
lambda_%d, ++EG(lambda_count));
+   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(0lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
} while (zend_hash_add(EG(function_table), function_name, 
function_name_length+1, new_function, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, 
sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);

Modified: php/php-src/trunk/Zend/zend_builtin_functions.c
===
--- php/php-src/trunk/Zend/zend_builtin_functions.c 2011-08-08 10:10:36 UTC 
(rev 314479)
+++ php/php-src/trunk/Zend/zend_builtin_functions.c 2011-08-08 11:19:49 UTC 
(rev 314480)
@@ -1821,7 +1821,7 @@
function_name[0] = '\0';

do {
-   function_name_length = 1 + sprintf(function_name + 1, 
lambda_%d, ++EG(lambda_count));
+   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(0lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
} while (zend_hash_add(EG(function_table), function_name, 
function_name_length+1, new_function, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, 
sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);

-- 
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/Zend/zend_hash.c branches/PHP_5_4/Zend/zend_hash.c trunk/Zend/zend_hash.c

2011-08-08 Thread Pierrick Charron
pierrick Mon, 08 Aug 2011 11:30:56 +

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

Log:
Fix typo

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_hash.c
U   php/php-src/branches/PHP_5_4/Zend/zend_hash.c
U   php/php-src/trunk/Zend/zend_hash.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_hash.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_hash.c   2011-08-08 11:26:32 UTC 
(rev 314481)
+++ php/php-src/branches/PHP_5_3/Zend/zend_hash.c   2011-08-08 11:30:56 UTC 
(rev 314482)
@@ -1169,7 +1169,7 @@
}
 }

-/* This function changes key of currevt element without changing elements'
+/* This function changes key of current element without changing elements'
  * order. If element with target key already exists, it will be deleted first.
  */
 ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, 
const char *str_index, uint str_length, ulong num_index, int mode, HashPosition 
*pos)

Modified: php/php-src/branches/PHP_5_4/Zend/zend_hash.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_hash.c   2011-08-08 11:26:32 UTC 
(rev 314481)
+++ php/php-src/branches/PHP_5_4/Zend/zend_hash.c   2011-08-08 11:30:56 UTC 
(rev 314482)
@@ -1207,7 +1207,7 @@
}
 }

-/* This function changes key of currevt element without changing elements'
+/* This function changes key of current element without changing elements'
  * order. If element with target key already exists, it will be deleted first.
  */
 ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, 
const char *str_index, uint str_length, ulong num_index, int mode, HashPosition 
*pos)

Modified: php/php-src/trunk/Zend/zend_hash.c
===
--- php/php-src/trunk/Zend/zend_hash.c  2011-08-08 11:26:32 UTC (rev 314481)
+++ php/php-src/trunk/Zend/zend_hash.c  2011-08-08 11:30:56 UTC (rev 314482)
@@ -1207,7 +1207,7 @@
}
 }

-/* This function changes key of currevt element without changing elements'
+/* This function changes key of current element without changing elements'
  * order. If element with target key already exists, it will be deleted first.
  */
 ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, 
const char *str_index, uint str_length, ulong num_index, int mode, HashPosition 
*pos)

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

[PHP-CVS] svn: /php/php-src/trunk/ext/spl/ spl_directory.c

2011-08-08 Thread Etienne Kneuss
colder   Mon, 08 Aug 2011 12:05:34 +

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

Log:
Fix validator for SplFileInfo constructor

Changed paths:
U   php/php-src/trunk/ext/spl/spl_directory.c

Modified: php/php-src/trunk/ext/spl/spl_directory.c
===
--- php/php-src/trunk/ext/spl/spl_directory.c   2011-08-08 11:57:18 UTC (rev 
314484)
+++ php/php-src/trunk/ext/spl/spl_directory.c   2011-08-08 12:05:34 UTC (rev 
314485)
@@ -633,6 +633,7 @@
 * constructor or cleared its exception */

return (fsobj-u.dir.entry.d_name[0] != '\0' /* GlobIterator */ ||
+   fsobj-_path != NULL /* SplFileInfo */ ||
fsobj-orig_path != NULL /* Spl[Temp]FileObject */);
 }
 /* }}} */
@@ -2431,7 +2432,9 @@
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

-   zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, intern-flags);
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, 
intern-flags) == FAILURE) {
+   return;
+   }
 } /* }}} */

 /* {{{ proto int SplFileObject::getFlags()

-- 
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/standard/head.c branches/PHP_5_4/ext/standard/head.c trunk/ext/standard/head.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 12:10:27 +

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

Log:
Make static analyzers happy

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/head.c
U   php/php-src/branches/PHP_5_4/ext/standard/head.c
U   php/php-src/trunk/ext/standard/head.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/head.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/head.c2011-08-08 12:05:34 UTC 
(rev 314485)
+++ php/php-src/branches/PHP_5_3/ext/standard/head.c2011-08-08 12:10:27 UTC 
(rev 314486)
@@ -128,7 +128,7 @@
dt = php_format_date(D, d-M-Y H:i:s T, sizeof(D, 
d-M-Y H:i:s T)-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 
digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
-   if (*(p + 5) != ' ') {
+   if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);

Modified: php/php-src/branches/PHP_5_4/ext/standard/head.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/head.c2011-08-08 12:05:34 UTC 
(rev 314485)
+++ php/php-src/branches/PHP_5_4/ext/standard/head.c2011-08-08 12:10:27 UTC 
(rev 314486)
@@ -127,7 +127,7 @@
dt = php_format_date(D, d-M-Y H:i:s T, sizeof(D, 
d-M-Y H:i:s T)-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 
digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
-   if (*(p + 5) != ' ') {
+   if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);

Modified: php/php-src/trunk/ext/standard/head.c
===
--- php/php-src/trunk/ext/standard/head.c   2011-08-08 12:05:34 UTC (rev 
314485)
+++ php/php-src/trunk/ext/standard/head.c   2011-08-08 12:10:27 UTC (rev 
314486)
@@ -127,7 +127,7 @@
dt = php_format_date(D, d-M-Y H:i:s T, sizeof(D, 
d-M-Y H:i:s T)-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 
digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
-   if (*(p + 5) != ' ') {
+   if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);

-- 
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_4/sapi/cgi/cgi_main.c trunk/sapi/cgi/cgi_main.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 12:14:58 +

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

Log:
Removed deadcode

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c
U   php/php-src/trunk/sapi/cgi/cgi_main.c

Modified: php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c
===
--- php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-08-08 12:13:14 UTC 
(rev 314488)
+++ php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-08-08 12:14:58 UTC 
(rev 314489)
@@ -1534,9 +1534,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   return;
-   }
p = var + 5;
var = str = do_alloca(var_len + 1, use_heap);
*str++ = *p++;
@@ -1605,9 +1602,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   continue;
-   }

if (var_len = alloc_size) {
alloc_size = var_len + 64;

Modified: php/php-src/trunk/sapi/cgi/cgi_main.c
===
--- php/php-src/trunk/sapi/cgi/cgi_main.c   2011-08-08 12:13:14 UTC (rev 
314488)
+++ php/php-src/trunk/sapi/cgi/cgi_main.c   2011-08-08 12:14:58 UTC (rev 
314489)
@@ -1533,9 +1533,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   return;
-   }
p = var + 5;
var = str = do_alloca(var_len + 1, use_heap);
*str++ = *p++;
@@ -1604,9 +1601,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   continue;
-   }

if (var_len = alloc_size) {
alloc_size = var_len + 64;

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

[PHP-CVS] svn: /SVNROOT/ global_avail

2011-08-08 Thread Hannes Magnusson
bjoriMon, 08 Aug 2011 12:17:36 +

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

Log:
translation karma for boris

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-08-08 12:14:58 UTC (rev 314489)
+++ SVNROOT/global_avail2011-08-08 12:17:36 UTC (rev 314490)
@@ -92,7 +92,7 @@
 avail|aferreira,thiago|phpdoc/pt
 avail|machado,scar,davis,dnfeitosa,thiago,amandavale,rafa|phpdoc/pt_BR
 avail|radical,shoty|phpdoc/ro
-avail|freespace,shafff,sveta,wanderer,kozloffsky,santiago,seprize,irker,mch,aur|phpdoc/ru
+avail|freespace,shafff,sveta,wanderer,kozloffsky,santiago,seprize,irker,mch,aur,das|phpdoc/ru
 
avail|cumhuronat,gulenzek,xhandros,neoprobe,faruk,infralite,flarecaster,antimon,yelekin,ecamalan|phpdoc/tr
 avail|pfischer|phpdoc/es
 avail|grossolini|web/php-wiki

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

[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_builtin_functions.c

2011-08-08 Thread Etienne Kneuss
colder   Mon, 08 Aug 2011 14:52:34 +

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

Log:
Fix typo

Changed paths:
U   php/php-src/trunk/Zend/zend_builtin_functions.c

Modified: php/php-src/trunk/Zend/zend_builtin_functions.c
===
--- php/php-src/trunk/Zend/zend_builtin_functions.c 2011-08-08 14:50:35 UTC 
(rev 314525)
+++ php/php-src/trunk/Zend/zend_builtin_functions.c 2011-08-08 14:52:34 UTC 
(rev 314526)
@@ -1821,7 +1821,7 @@
function_name[0] = '\0';

do {
-   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(0lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
+   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
} while (zend_hash_add(EG(function_table), function_name, 
function_name_length+1, new_function, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, 
sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);

-- 
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/Zend/zend_builtin_functions.c PHP_5_4/Zend/zend_builtin_functions.c

2011-08-08 Thread Etienne Kneuss
colder   Mon, 08 Aug 2011 14:54:50 +

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

Log:
Fix typo

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c
U   php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c  2011-08-08 
14:52:34 UTC (rev 314526)
+++ php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c  2011-08-08 
14:54:50 UTC (rev 314527)
@@ -1713,7 +1713,7 @@
function_name[0] = '\0';

do {
-   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(0lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
+   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
} while (zend_hash_add(EG(function_table), function_name, 
function_name_length+1, new_function, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, 
sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);

Modified: php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c  2011-08-08 
14:52:34 UTC (rev 314526)
+++ php/php-src/branches/PHP_5_4/Zend/zend_builtin_functions.c  2011-08-08 
14:54:50 UTC (rev 314527)
@@ -1821,7 +1821,7 @@
function_name[0] = '\0';

do {
-   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(0lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
+   function_name_length = 1 + snprintf(function_name + 1, 
sizeof(lambda_)+MAX_LENGTH_OF_LONG, lambda_%d, ++EG(lambda_count));
} while (zend_hash_add(EG(function_table), function_name, 
function_name_length+1, new_function, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, 
sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);

-- 
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_4/ext/xsl/xsltprocessor.c trunk/ext/xsl/xsltprocessor.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 16:06:40 +

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

Log:
Fixed build

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
U   php/php-src/trunk/ext/xsl/xsltprocessor.c

Modified: php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
===
--- php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
15:55:18 UTC (rev 314540)
+++ php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
16:06:40 UTC (rev 314541)
@@ -620,7 +620,7 @@
 */
 PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
 {
-   zval *id, *rv = NULL, *docp = NULL;
+   zval *id, *docp = NULL;
xmlDoc *newdocp;
xsltStylesheetPtr sheetp;
int ret, ret_class_len=0;
@@ -664,7 +664,7 @@
php_libxml_increment_doc_ref(interndoc, newdocp 
TSRMLS_CC);
php_libxml_increment_node_ptr(interndoc, 
(xmlNodePtr)newdocp, (void *)interndoc TSRMLS_CC);
} else {
-   DOM_RET_OBJ(rv, (xmlNodePtr) newdocp, ret, NULL);
+   DOM_RET_OBJ((xmlNodePtr) newdocp, ret, NULL);
}
} else {
RETURN_FALSE;

Modified: php/php-src/trunk/ext/xsl/xsltprocessor.c
===
--- php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 15:55:18 UTC (rev 
314540)
+++ php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 16:06:40 UTC (rev 
314541)
@@ -620,7 +620,7 @@
 */
 PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
 {
-   zval *id, *rv = NULL, *docp = NULL;
+   zval *id, *docp = NULL;
xmlDoc *newdocp;
xsltStylesheetPtr sheetp;
int ret, ret_class_len=0;
@@ -664,7 +664,7 @@
php_libxml_increment_doc_ref(interndoc, newdocp 
TSRMLS_CC);
php_libxml_increment_node_ptr(interndoc, 
(xmlNodePtr)newdocp, (void *)interndoc TSRMLS_CC);
} else {
-   DOM_RET_OBJ(rv, (xmlNodePtr) newdocp, ret, NULL);
+   DOM_RET_OBJ((xmlNodePtr) newdocp, ret, NULL);
}
} else {
RETURN_FALSE;

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

[PHP-CVS] svn: /php/php-src/trunk/ext/mbstring/libmbfl/filters/ mbfilter_hz.c mbfilter_sjis.c mbfilter_uhc.c unicode_table_cp932_ext.h unicode_table_cp936.h unicode_table_jis.h unicode_table_uhc.h

2011-08-08 Thread Rui Hirokawa
hirokawa Mon, 08 Aug 2011 16:14:30 +

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

Log:
reduced memory footprint for codepages.

Changed paths:
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp936.h
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_jis.h
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_uhc.h

Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c
===
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c	2011-08-08 16:14:15 UTC (rev 314545)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c	2011-08-08 16:14:30 UTC (rev 314546)
@@ -34,6 +34,7 @@
 #include mbfilter.h
 #include mbfilter_hz.h

+#define UNICODE_TABLE_CP936_DEF
 #include unicode_table_cp936.h

 static int mbfl_filt_ident_hz(int c, mbfl_identify_filter *filter);

Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c
===
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c	2011-08-08 16:14:15 UTC (rev 314545)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c	2011-08-08 16:14:30 UTC (rev 314546)
@@ -34,6 +34,9 @@
 #include mbfilter.h
 #include mbfilter_sjis.h

+#define UNICODE_TABLE_CP932_DEF
+#define UNICODE_TABLE_JIS_DEF
+
 #include unicode_table_cp932_ext.h
 #include unicode_table_jis.h


Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c
===
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c	2011-08-08 16:14:15 UTC (rev 314545)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c	2011-08-08 16:14:30 UTC (rev 314546)
@@ -33,6 +33,7 @@

 #include mbfilter.h
 #include mbfilter_uhc.h
+#define UNICODE_TABLE_UHC_DEF
 #include unicode_table_uhc.h

 static int mbfl_filt_ident_uhc(int c, mbfl_identify_filter *filter);

Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h
===
--- php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h	2011-08-08 16:14:15 UTC (rev 314545)
+++ php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h	2011-08-08 16:14:30 UTC (rev 314546)
@@ -25,7 +25,9 @@
 #ifndef UNICODE_TABLE_CP932_EXT_H
 #define UNICODE_TABLE_CP932_EXT_H

-static const unsigned short cp932ext1_ucs_table[] = {
+#ifdef UNICODE_TABLE_CP932_DEF
+
+const unsigned short cp932ext1_ucs_table[] = {
  /* ku 13 */
  0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,
  0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,
@@ -40,10 +42,10 @@
  0x2261,0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F,
  0x22BF,0x2235,0x2229,0x222A,0x,0x
 };
-static const int cp932ext1_ucs_table_min = (13 - 1)*94;
-static const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short));
+const int cp932ext1_ucs_table_min = (13 - 1)*94;
+const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short));

-static const unsigned short cp932ext2_ucs_table[] = {
+const unsigned short cp932ext2_ucs_table[] = {
  /* ku 89 */
  0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631,
  0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00,
@@ -100,10 +102,10 @@
  0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,
  0x2178,0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02
 };
-static const int cp932ext2_ucs_table_min = (89 - 1)*94;
-static const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short));
+const int cp932ext2_ucs_table_min = (89 - 1)*94;
+const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short));

-static const unsigned short cp932ext3_ucs_table[] = {
+const unsigned short cp932ext3_ucs_table[] = {
  /* ku 115 */
  0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,
  0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,
@@ -164,7 +166,22 @@
  0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00,0x9D70,
  0x9D6B,0xFA2D,0x9E19,0x9ED1
 };
-static const int cp932ext3_ucs_table_min = (115 - 1)*94;
-static const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short));
+const int cp932ext3_ucs_table_min = (115 - 1)*94;
+const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short));

+#else
+
+extern const unsigned short cp932ext1_ucs_table[];

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/ mbfilter_hz.c mbfilter_sjis.c mbfilter_uhc.c unicode_table_cp932_ext.h unicode_table_cp936.h unicode_table_jis.h unicode_tabl

2011-08-08 Thread Rui Hirokawa
hirokawa Mon, 08 Aug 2011 16:15:39 +

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

Log:
MFH: reduced memory footprint for codepages.

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_hz.c
U   
php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_sjis.c
U   php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_uhc.c
U   
php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h
U   
php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_cp936.h
U   
php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_jis.h
U   
php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_uhc.h

Modified: php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_hz.c
===
--- php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_hz.c	2011-08-08 16:14:30 UTC (rev 314546)
+++ php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_hz.c	2011-08-08 16:15:39 UTC (rev 314547)
@@ -34,6 +34,7 @@
 #include mbfilter.h
 #include mbfilter_hz.h

+#define UNICODE_TABLE_CP936_DEF
 #include unicode_table_cp936.h

 static int mbfl_filt_ident_hz(int c, mbfl_identify_filter *filter);

Modified: php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_sjis.c
===
--- php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_sjis.c	2011-08-08 16:14:30 UTC (rev 314546)
+++ php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_sjis.c	2011-08-08 16:15:39 UTC (rev 314547)
@@ -34,6 +34,9 @@
 #include mbfilter.h
 #include mbfilter_sjis.h

+#define UNICODE_TABLE_CP932_DEF
+#define UNICODE_TABLE_JIS_DEF
+
 #include unicode_table_cp932_ext.h
 #include unicode_table_jis.h


Modified: php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_uhc.c
===
--- php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_uhc.c	2011-08-08 16:14:30 UTC (rev 314546)
+++ php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/mbfilter_uhc.c	2011-08-08 16:15:39 UTC (rev 314547)
@@ -33,6 +33,7 @@

 #include mbfilter.h
 #include mbfilter_uhc.h
+#define UNICODE_TABLE_UHC_DEF
 #include unicode_table_uhc.h

 static int mbfl_filt_ident_uhc(int c, mbfl_identify_filter *filter);

Modified: php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h
===
--- php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h	2011-08-08 16:14:30 UTC (rev 314546)
+++ php/php-src/branches/PHP_5_4/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h	2011-08-08 16:15:39 UTC (rev 314547)
@@ -25,7 +25,9 @@
 #ifndef UNICODE_TABLE_CP932_EXT_H
 #define UNICODE_TABLE_CP932_EXT_H

-static const unsigned short cp932ext1_ucs_table[] = {
+#ifdef UNICODE_TABLE_CP932_DEF
+
+const unsigned short cp932ext1_ucs_table[] = {
  /* ku 13 */
  0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,
  0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,
@@ -40,10 +42,10 @@
  0x2261,0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F,
  0x22BF,0x2235,0x2229,0x222A,0x,0x
 };
-static const int cp932ext1_ucs_table_min = (13 - 1)*94;
-static const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short));
+const int cp932ext1_ucs_table_min = (13 - 1)*94;
+const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short));

-static const unsigned short cp932ext2_ucs_table[] = {
+const unsigned short cp932ext2_ucs_table[] = {
  /* ku 89 */
  0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631,
  0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00,
@@ -100,10 +102,10 @@
  0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,
  0x2178,0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02
 };
-static const int cp932ext2_ucs_table_min = (89 - 1)*94;
-static const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short));
+const int cp932ext2_ucs_table_min = (89 - 1)*94;
+const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short));

-static const unsigned short cp932ext3_ucs_table[] = {
+const unsigned short cp932ext3_ucs_table[] = {
  /* ku 115 */
  0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,
  0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,
@@ -164,7 +166,22 @@
  0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00,0x9D70,
  0x9D6B,0xFA2D,0x9E19,0x9ED1
 };
-static const int cp932ext3_ucs_table_min = (115 - 1)*94;
-static const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short));

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/xsl/xsltprocessor.c trunk/ext/xsl/xsltprocessor.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 16:49:43 +

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

Log:
Another build fix relating to previous DOM commit

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
U   php/php-src/trunk/ext/xsl/xsltprocessor.c

Modified: php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
===
--- php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
16:45:45 UTC (rev 314563)
+++ php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
16:49:43 UTC (rev 314564)
@@ -280,7 +280,7 @@
node-parent = 
nsparent;
node-ns = 
curns;
}
-   child = 
php_dom_create_object(node, ret, NULL, child, domintern TSRMLS_CC);
+   child = 
php_dom_create_object(node, ret, child, domintern TSRMLS_CC);

add_next_index_zval(args[i], child);
}
}

Modified: php/php-src/trunk/ext/xsl/xsltprocessor.c
===
--- php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 16:45:45 UTC (rev 
314563)
+++ php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 16:49:43 UTC (rev 
314564)
@@ -280,7 +280,7 @@
node-parent = 
nsparent;
node-ns = 
curns;
}
-   child = 
php_dom_create_object(node, ret, NULL, child, domintern TSRMLS_CC);
+   child = 
php_dom_create_object(node, ret, child, domintern TSRMLS_CC);

add_next_index_zval(args[i], child);
}
}

-- 
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/fileinfo/libmagic/softmagic.c branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c trunk/ext/fileinfo/libmagic/softmagic.c

2011-08-08 Thread Xinchen Hui
laruence Mon, 08 Aug 2011 16:57:46 +

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

Log:
Remove unnecessary(no sense) memset and making the static analyzer silent

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
U   php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c

Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c  
2011-08-08 16:49:43 UTC (rev 314564)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c  
2011-08-08 16:57:46 UTC (rev 314565)
@@ -1652,7 +1652,6 @@
char *t;

t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
-   memset(t, '\0', sizeof(t));

t[j++] = '~';


Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
===
--- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c  
2011-08-08 16:49:43 UTC (rev 314564)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c  
2011-08-08 16:57:46 UTC (rev 314565)
@@ -1652,7 +1652,6 @@
char *t;

t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
-   memset(t, '\0', sizeof(t));

t[j++] = '~';


Modified: php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c
===
--- php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c 2011-08-08 16:49:43 UTC 
(rev 314564)
+++ php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c 2011-08-08 16:57:46 UTC 
(rev 314565)
@@ -1652,7 +1652,6 @@
char *t;

t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
-   memset(t, '\0', sizeof(t));

t[j++] = '~';


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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c trunk/ext/fileinfo/libmagic/softmagic.c

2011-08-08 Thread Laruence
Hi all:

trunk/ext/fileinfo/libmagic/softmagic.c seems to be a third-party
source, I was wondering can I directly modify it?

it can't be compiled with -Wall -Werror, with a lots of warnings..

thanks

2011/8/9 larue...@baidu.com



  Original Message   Subject: [PHP-CVS] svn: /php/php-src/
 branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
 branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
 trunk/ext/fileinfo/libmagic/softmagic.c  Date: Tue, 9 Aug 2011 00:57:46
 +0800  From: Xinchen Hui larue...@php.net larue...@php.net  To:
 php-cvs@lists.php.net php-cvs@lists.php.net php-cvs@lists.php.net

 laruence Mon, 08 Aug 2011 16:57:46 +

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

 Log:
 Remove unnecessary(no sense) memset and making the static analyzer silent

 Changed paths:
 U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
 U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
 U   php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c

 Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:49:43 UTC (rev 314564)
 +++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:57:46 UTC (rev 314565)
 @@ -1652,7 +1652,6 @@
 char *t;

 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
 -   memset(t, '\0', sizeof(t));

 t[j++] = '~';


 Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:49:43 UTC (rev 314564)
 +++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c  
 2011-08-08 16:57:46 UTC (rev 314565)
 @@ -1652,7 +1652,6 @@
 char *t;

 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
 -   memset(t, '\0', sizeof(t));

 t[j++] = '~';


 Modified: php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c
 ===
 --- php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c 2011-08-08 16:49:43 
 UTC (rev 314564)
 +++ php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c 2011-08-08 16:57:46 
 UTC (rev 314565)
 @@ -1652,7 +1652,6 @@
 char *t;

 t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5);
 -   memset(t, '\0', sizeof(t));

 t[j++] = '~';






-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c branches/PHP_5_4/ext/fileinfo/libmagic/softmagic.c trunk/ext/fileinfo/libmagic/softmagic.c

2011-08-08 Thread Kalle Sommer Nielsen
Hi Xinchen

2011/8/8 Laruence larue...@php.net:
 Hi all:

    trunk/ext/fileinfo/libmagic/softmagic.c seems to be a third-party
 source, I was wondering can I directly modify it?

    it can't be compiled with -Wall -Werror, with a lots of warnings..

Yes you can alter the original source thats distributed in php-src,
just remember to update the .patch file in the ext/fileinfo folder so
that when the lib is updated, so is the fix and report upstream if
needed.

-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

--
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_4/ext/standard/html.c trunk/ext/standard/html.c

2011-08-08 Thread Gustavo André dos Santos Lopes
cataphract   Tue, 09 Aug 2011 00:40:45 +

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

Log:
- Elided unused argument in internal linkage function.

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/standard/html.c
U   php/php-src/trunk/ext/standard/html.c

Modified: php/php-src/branches/PHP_5_4/ext/standard/html.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/html.c2011-08-08 22:30:24 UTC 
(rev 314579)
+++ php/php-src/branches/PHP_5_4/ext/standard/html.c2011-08-09 00:40:45 UTC 
(rev 314580)
@@ -1520,7 +1520,6 @@
 static inline void write_s3row_data(
const entity_stage3_row *r,
unsigned orig_cp,
-   unsigned uni_cp,
enum entity_charset charset,
zval *arr)
 {
@@ -1636,7 +1635,7 @@
if (((code == '\''  !(flags  
ENT_HTML_QUOTE_SINGLE)) ||
(code == ''  
!(flags  ENT_HTML_QUOTE_DOUBLE
continue;
-   write_s3row_data(r, code, code, 
charset, return_value);
+   write_s3row_data(r, code, 
charset, return_value);
}
}
}
@@ -1658,7 +1657,7 @@
if (r-data.ent.entity == NULL)
continue;

-   write_s3row_data(r, i, uni_cp, charset, 
return_value);
+   write_s3row_data(r, i, charset, return_value);
}
}
} else {
@@ -1677,7 +1676,7 @@
continue;

/* charset is indifferent, used cs_8859_1 for 
efficiency */
-   write_s3row_data(r, j, j, cs_8859_1, return_value);
+   write_s3row_data(r, j, cs_8859_1, return_value);
}
}
 }

Modified: php/php-src/trunk/ext/standard/html.c
===
--- php/php-src/trunk/ext/standard/html.c   2011-08-08 22:30:24 UTC (rev 
314579)
+++ php/php-src/trunk/ext/standard/html.c   2011-08-09 00:40:45 UTC (rev 
314580)
@@ -1520,7 +1520,6 @@
 static inline void write_s3row_data(
const entity_stage3_row *r,
unsigned orig_cp,
-   unsigned uni_cp,
enum entity_charset charset,
zval *arr)
 {
@@ -1636,7 +1635,7 @@
if (((code == '\''  !(flags  
ENT_HTML_QUOTE_SINGLE)) ||
(code == ''  
!(flags  ENT_HTML_QUOTE_DOUBLE
continue;
-   write_s3row_data(r, code, code, 
charset, return_value);
+   write_s3row_data(r, code, 
charset, return_value);
}
}
}
@@ -1658,7 +1657,7 @@
if (r-data.ent.entity == NULL)
continue;

-   write_s3row_data(r, i, uni_cp, charset, 
return_value);
+   write_s3row_data(r, i, charset, return_value);
}
}
} else {
@@ -1677,7 +1676,7 @@
continue;

/* charset is indifferent, used cs_8859_1 for 
efficiency */
-   write_s3row_data(r, j, j, cs_8859_1, return_value);
+   write_s3row_data(r, j, cs_8859_1, return_value);
}
}
 }

-- 
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/main/spprintf.c branches/PHP_5_4/main/spprintf.c trunk/main/spprintf.c

2011-08-08 Thread Pierrick Charron
pierrick Tue, 09 Aug 2011 02:37:02 +

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

Log:
Remove unused variable

Changed paths:
U   php/php-src/branches/PHP_5_3/main/spprintf.c
U   php/php-src/branches/PHP_5_4/main/spprintf.c
U   php/php-src/trunk/main/spprintf.c

Modified: php/php-src/branches/PHP_5_3/main/spprintf.c
===
--- php/php-src/branches/PHP_5_3/main/spprintf.c2011-08-09 00:40:45 UTC 
(rev 314580)
+++ php/php-src/branches/PHP_5_3/main/spprintf.c2011-08-09 02:37:02 UTC 
(rev 314581)
@@ -198,7 +198,6 @@
 static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list 
ap) /* {{{ */
 {
char *s = NULL;
-   char *q;
int s_len, free_zcopy;
zval *zvp, zcopy;

@@ -679,7 +678,7 @@

s_len = strlen(s);

-   if (alternate_form  (q = strchr(s, 
'.')) == NULL)
+   if (alternate_form  (strchr(s, '.')) 
== NULL)
s[s_len++] = '.';
break;


Modified: php/php-src/branches/PHP_5_4/main/spprintf.c
===
--- php/php-src/branches/PHP_5_4/main/spprintf.c2011-08-09 00:40:45 UTC 
(rev 314580)
+++ php/php-src/branches/PHP_5_4/main/spprintf.c2011-08-09 02:37:02 UTC 
(rev 314581)
@@ -198,7 +198,6 @@
 static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list 
ap) /* {{{ */
 {
char *s = NULL;
-   char *q;
int s_len, free_zcopy;
zval *zvp, zcopy;

@@ -679,7 +678,7 @@

s_len = strlen(s);

-   if (alternate_form  (q = strchr(s, 
'.')) == NULL)
+   if (alternate_form  (strchr(s, '.')) 
== NULL)
s[s_len++] = '.';
break;


Modified: php/php-src/trunk/main/spprintf.c
===
--- php/php-src/trunk/main/spprintf.c   2011-08-09 00:40:45 UTC (rev 314580)
+++ php/php-src/trunk/main/spprintf.c   2011-08-09 02:37:02 UTC (rev 314581)
@@ -198,7 +198,6 @@
 static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list 
ap) /* {{{ */
 {
char *s = NULL;
-   char *q;
int s_len, free_zcopy;
zval *zvp, zcopy;

@@ -679,7 +678,7 @@

s_len = strlen(s);

-   if (alternate_form  (q = strchr(s, 
'.')) == NULL)
+   if (alternate_form  (strchr(s, '.')) 
== NULL)
s[s_len++] = '.';
break;


-- 
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/main/snprintf.c branches/PHP_5_4/main/snprintf.c trunk/main/snprintf.c

2011-08-08 Thread Pierrick Charron
pierrick Tue, 09 Aug 2011 02:42:25 +

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

Log:
Remove unused variable

Changed paths:
U   php/php-src/branches/PHP_5_3/main/snprintf.c
U   php/php-src/branches/PHP_5_4/main/snprintf.c
U   php/php-src/trunk/main/snprintf.c

Modified: php/php-src/branches/PHP_5_3/main/snprintf.c
===
--- php/php-src/branches/PHP_5_3/main/snprintf.c2011-08-09 02:37:02 UTC 
(rev 314581)
+++ php/php-src/branches/PHP_5_3/main/snprintf.c2011-08-09 02:42:25 UTC 
(rev 314582)
@@ -587,7 +587,6 @@
int i;

char *s = NULL;
-   char *q;
int s_len, free_zcopy;
zval *zvp, zcopy;

@@ -1071,7 +1070,7 @@

s_len = strlen(s);

-   if (alternate_form  (q = strchr(s, 
'.')) == NULL) {
+   if (alternate_form  (strchr(s, '.')) 
== NULL) {
s[s_len++] = '.';
}
break;

Modified: php/php-src/branches/PHP_5_4/main/snprintf.c
===
--- php/php-src/branches/PHP_5_4/main/snprintf.c2011-08-09 02:37:02 UTC 
(rev 314581)
+++ php/php-src/branches/PHP_5_4/main/snprintf.c2011-08-09 02:42:25 UTC 
(rev 314582)
@@ -587,7 +587,6 @@
int i;

char *s = NULL;
-   char *q;
int s_len, free_zcopy;
zval *zvp, zcopy;

@@ -1071,7 +1070,7 @@

s_len = strlen(s);

-   if (alternate_form  (q = strchr(s, 
'.')) == NULL) {
+   if (alternate_form  (strchr(s, '.')) 
== NULL) {
s[s_len++] = '.';
}
break;

Modified: php/php-src/trunk/main/snprintf.c
===
--- php/php-src/trunk/main/snprintf.c   2011-08-09 02:37:02 UTC (rev 314581)
+++ php/php-src/trunk/main/snprintf.c   2011-08-09 02:42:25 UTC (rev 314582)
@@ -587,7 +587,6 @@
int i;

char *s = NULL;
-   char *q;
int s_len, free_zcopy;
zval *zvp, zcopy;

@@ -1071,7 +1070,7 @@

s_len = strlen(s);

-   if (alternate_form  (q = strchr(s, 
'.')) == NULL) {
+   if (alternate_form  (strchr(s, '.')) 
== NULL) {
s[s_len++] = '.';
}
break;

-- 
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/fileinfo/fileinfo.c branches/PHP_5_3/ext/fileinfo/libmagic/magic.c branches/PHP_5_3/ext/fileinfo/libmagic.patch branches/PHP_5_4/ext/fileinfo/fileinfo

2011-08-08 Thread Xinchen Hui
laruence Tue, 09 Aug 2011 05:11:19 +

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

Log:
Eliminated compiler's warnings and make static analyzer silent

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c
U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c
U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch
U   php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c
U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c
U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch
U   php/php-src/trunk/ext/fileinfo/fileinfo.c
U   php/php-src/trunk/ext/fileinfo/libmagic/magic.c
U   php/php-src/trunk/ext/fileinfo/libmagic.patch

Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c2011-08-09 
03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c2011-08-09 
05:11:19 UTC (rev 314584)
@@ -392,7 +392,7 @@
long options = 0;
char *ret_val = NULL, *buffer = NULL;
int buffer_len;
-   struct php_fileinfo *finfo;
+   struct php_fileinfo *finfo = NULL;
zval *zfinfo, *zcontext = NULL;
zval *what;
char mime_directory[] = directory;

Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c  2011-08-09 
03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c  2011-08-09 
05:11:19 UTC (rev 314584)
@@ -291,9 +291,9 @@
if (!stream  inname) {
no_in_stream = 1;
 #if PHP_API_VERSION  20100412
-   stream = php_stream_open_wrapper(inname, rb, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+   stream = php_stream_open_wrapper((char *)inname, rb, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
 #else
-   stream = php_stream_open_wrapper(inname, rb, REPORT_ERRORS, 
NULL);
+   stream = php_stream_open_wrapper((char *)inname, rb, 
REPORT_ERRORS, NULL);
 #endif
}


Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch2011-08-09 
03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch2011-08-09 
05:11:19 UTC (rev 314584)
@@ -2020,9 +2020,9 @@
 +  if (!stream  inname) {
 +  no_in_stream = 1;
 +#if PHP_API_VERSION  20100412
-+  stream = php_stream_open_wrapper(inname, rb, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
++  stream = php_stream_open_wrapper((char *)inname, rb, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
 +#else
-+  stream = php_stream_open_wrapper(inname, rb, REPORT_ERRORS, 
NULL);
++  stream = php_stream_open_wrapper((char *)inname, rb, 
REPORT_ERRORS, NULL);
 +#endif
 +  }
 +

Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c
===
--- php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c2011-08-09 
03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c2011-08-09 
05:11:19 UTC (rev 314584)
@@ -388,7 +388,7 @@
long options = 0;
char *ret_val = NULL, *buffer = NULL;
int buffer_len;
-   struct php_fileinfo *finfo;
+   struct php_fileinfo *finfo = NULL;
zval *zfinfo, *zcontext = NULL;
zval *what;
char mime_directory[] = directory;

Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c
===
--- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c  2011-08-09 
03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c  2011-08-09 
05:11:19 UTC (rev 314584)
@@ -291,9 +291,9 @@
if (!stream  inname) {
no_in_stream = 1;
 #if PHP_API_VERSION  20100412
-   stream = php_stream_open_wrapper(inname, rb, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+   stream = php_stream_open_wrapper((char *)inname, rb, 
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
 #else
-   stream = php_stream_open_wrapper(inname, rb, REPORT_ERRORS, 
NULL);
+   stream = php_stream_open_wrapper((char *)inname, rb, 
REPORT_ERRORS, NULL);
 #endif
}


Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch
===
--- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch2011-08-09 
03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch2011-08-09 
05:11:19 UTC (rev 314584)