From: Dmitry Stogov Date: Mon, 29 Aug 2005 06:51:14 +0000 (+0000) Subject: Fixed gcc 4 compatibility X-Git-Tag: PRE_NEW_OCI8_EXTENSION~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3b7eb2284427373aad3259383dd4f96b8120ed2;p=php Fixed gcc 4 compatibility --- diff --git a/ext/standard/string.c b/ext/standard/string.c index fabaa2d145..1cea8c204a 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -5272,7 +5272,8 @@ PHP_FUNCTION(substr_count) if (haystack_type == IS_UNICODE) { while ((p = zend_u_memnstr((UChar *)p, (UChar *)needle, needle_len, (UChar *)endp)) != NULL) { - (UChar *)p += needle_len; + /*(UChar *)p += needle_len; // GCC 4.0.0 cannot compile this */ + p += UBYTES(needle_len); count++; } } else { @@ -5284,7 +5285,8 @@ PHP_FUNCTION(substr_count) } } else { while ((p = php_memnstr((char *)p, (char *)needle, needle_len, (char *)endp))) { - (char *)p += needle_len; + /*(char *)p += needle_len; // GCC 4.0.0 cannot compile this */ + p += needle_len; count++; } }