Commit:    f9000fde98195844b4d1c1d6209f9796da3ebee8
Author:    Adam Harvey <ahar...@php.net>         Tue, 23 Jul 2013 11:15:43 -0700
Parents:   f00d796b7ef290b4fa515ae09afc34f17201528f
Branches:  PHP-5.5 master

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

Log:
Expand the ZEND_STRL macro to handle platforms where strncmp() is a macro.

On most platforms, this works fine, but on Linux armhf, strncmp() is a macro
rather than a real function, ergo the macro expansion of ZEND_STRL doesn't
occur until after the compiler knows it needs three parameters for strncmp()
and we get a compile error.

Fixes the fix for bug #61697.

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

Changed paths:
  M  ext/spl/php_spl.c


Diff:
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index c3a774e..a5ffdb7 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -744,7 +744,7 @@ PHP_FUNCTION(spl_autoload_functions)
                                add_next_index_string(tmp, 
alfi->func_ptr->common.function_name, 1);
                                add_next_index_zval(return_value, tmp);
                        } else {
-                               if 
(strncmp(alfi->func_ptr->common.function_name, ZEND_STRL("__lambda_func"))) {
+                               if 
(strncmp(alfi->func_ptr->common.function_name, "__lambda_func", 
sizeof("__lambda_func") - 1)) {
                                        add_next_index_string(return_value, 
alfi->func_ptr->common.function_name, 1);
                                } else {
                                   char *key;


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

Reply via email to