]> granicus.if.org Git - php/commitdiff
Fixed bug #62357 (compile failure: (S) Arguments missing for built-in function __memcmp).
authorXinchen Hui <laruence@php.net>
Tue, 26 Jun 2012 10:42:33 +0000 (18:42 +0800)
committerXinchen Hui <laruence@php.net>
Tue, 26 Jun 2012 10:42:33 +0000 (18:42 +0800)
Any C library function may be a macro, We should avoid using ZEND_STRS(L) as their arguments

NEWS
Zend/zend_language_parser.y

diff --git a/NEWS b/NEWS
index e93d717c9e14f060bae599d17eeaa0845b512e67..f8a98c73d299a688a3c74e4c7eb80b0cfdd42086 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP                                                                        NEWS
 ?? ??? 2012, PHP 5.4.5
 
 - Core:
+  . Fixed bug #62357 (compile failure: (S) Arguments missing for built-in
+    function __memcmp). (Laruence)
   . Fixed bug #61998 (Using traits with method aliases appears to result in
     crash during execution). (Dmitry)
   . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that
index d0730b75d6d4533422630df7aa68afff5e53d6d3..9a0b3209e5b4b214ee73de5c7aae8b5b48de46ad 100644 (file)
@@ -1191,7 +1191,7 @@ static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
 
                        if (LANG_SCNG(yy_text)[0] == 0 &&
                                LANG_SCNG(yy_leng) == 1 &&
-                               memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) {
+                               memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
                                yystpcpy(yyres, "end of file");
                                return sizeof("end of file")-1;
                        }