]> granicus.if.org Git - php/commitdiff
- #48779, improve fix, drop usage of _tolower and use zend_strtolower
authorPierre Joye <pajoye@php.net>
Mon, 12 Oct 2009 14:40:27 +0000 (14:40 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 12 Oct 2009 14:40:27 +0000 (14:40 +0000)
main/php_ini.c
sapi/cgi/cgi_main.c

index ee14feb2200b9057a75013a3228a9c88761e5418..f116692a0e6849ec7469fff9f40798055828c350 100644 (file)
@@ -47,7 +47,7 @@
                char *tmp = path; \
                while (*tmp) { \
                        if (*tmp == '\\') *tmp = '/'; \
-                       else *tmp = (__isascii(*tmp)) ? _tolower(*tmp) : tolower(*tmp); \
+                       else *tmp = tolower(*tmp); \
                                tmp++; \
                } \
        }
index 29eaf406a20c593e63b8d97a0992c8075aad94cc..eaf47ffbbe0daca2a68389d6a6743ebb6a17a02f 100644 (file)
@@ -820,7 +820,7 @@ static int sapi_cgi_activate(TSRMLS_D)
                path[path_len] = 0;
 #ifdef PHP_WIN32
                /* paths on windows should be case-insensitive */
-               strlwr(path);
+               zend_str_tolower(path, path_len);
 #endif
 
                /* Activate per-dir-system-configuration defined in php.ini and stored into configuration_hash during startup */
@@ -838,7 +838,7 @@ static int sapi_cgi_activate(TSRMLS_D)
 #ifdef PHP_WIN32
                                /* paths on windows should be case-insensitive */
                                doc_root = estrndup(doc_root, doc_root_len);
-                               strlwr(doc_root);
+                               zend_str_tolower(doc_root, doc_root_len);
 #endif
                                php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1 TSRMLS_CC);
                        }