From: Moriyoshi Koizumi Date: Sat, 13 Dec 2003 19:28:30 +0000 (+0000) Subject: Fixes for POSIX compliancy. X-Git-Tag: php-5.0.0b3RC1~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=033bc12d8658a2b839416734fd6831c6bf64a07d;p=php Fixes for POSIX compliancy. --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index b58eb7eb29..46d7d068f0 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1691,8 +1691,8 @@ ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2) len = MIN(len1, len2); while (len--) { - c1 = tolower(*s1++); - c2 = tolower(*s2++); + c1 = tolower((int)*(unsigned char *)s1++); + c2 = tolower((int)*(unsigned char *)s2++); if (c1 != c2) { return c1 - c2; } @@ -1710,8 +1710,8 @@ ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, u len = MIN(length, MIN(len1, len2)); while (len--) { - c1 = tolower(*s1++); - c2 = tolower(*s2++); + c1 = tolower((int)*(unsigned char *)s1++); + c2 = tolower((int)*(unsigned char *)s2++); if (c1 != c2) { return c1 - c2; }