]> granicus.if.org Git - php/commitdiff
- Fixed build and comment-style
authorFelipe Pena <felipe@php.net>
Fri, 9 Oct 2009 20:01:16 +0000 (20:01 +0000)
committerFelipe Pena <felipe@php.net>
Fri, 9 Oct 2009 20:01:16 +0000 (20:01 +0000)
main/php_ini.c
sapi/cgi/cgi_main.c

index 6c889f2ed46e9a1711801cfbb5bf0c17702a4f16..0b31ad5c42b0b9974e188f845e4d4cfb9d7552e5 100644 (file)
@@ -288,7 +288,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t
                                        is_special_section = 1;
                                        has_per_dir_config = 1;
 #ifdef PHP_WIN32
-                                       // make the path lowercase on Windows, for case insensitivty.
+                                       /* make the path lowercase on Windows, for case insensitivty. */
                                        strlwr(key);
 
                                        TRANSLATE_SLASHES(key);
@@ -301,7 +301,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t
                                        key_len = Z_STRLEN_P(arg1) - sizeof("HOST") + 1;
                                        is_special_section = 1;
                                        has_per_host_config = 1;
-                                       strlwr(key); // host names are case-insensitive.
+                                       zend_str_tolower(key, key_len); /* host names are case-insensitive. */
 
                                } else {
                                        is_special_section = 0;
index 7732f6c7d981ad789241382dd5cfa594c976e448..29eaf406a20c593e63b8d97a0992c8075aad94cc 100644 (file)
@@ -794,8 +794,8 @@ static int sapi_cgi_activate(TSRMLS_D)
                /* SERVER_NAME should also be defined at this stage..but better check it anyway */
                if (server_name) {
                        server_name_len = strlen(server_name);
-                       server_name = estrndup(server_name, strlen(server_name) );
-                       strlwr(server_name);
+                       server_name = estrndup(server_name, server_name_len);
+                       zend_str_tolower(server_name, server_name_len);
                        php_ini_activate_per_host_config(server_name, server_name_len + 1 TSRMLS_CC);
                        efree(server_name);
                }
@@ -819,7 +819,7 @@ static int sapi_cgi_activate(TSRMLS_D)
                }
                path[path_len] = 0;
 #ifdef PHP_WIN32
-               // paths on windows should be case-insensitive
+               /* paths on windows should be case-insensitive */
                strlwr(path);
 #endif
 
@@ -836,7 +836,7 @@ static int sapi_cgi_activate(TSRMLS_D)
                                        --doc_root_len;
                                }
 #ifdef PHP_WIN32
-                               // paths on windows should be case-insensitive
+                               /* paths on windows should be case-insensitive */
                                doc_root = estrndup(doc_root, doc_root_len);
                                strlwr(doc_root);
 #endif