From 7bdb2e9e6010a7fb2c5da5635cd246818c8e6e9f Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Fri, 9 Oct 2009 20:01:16 +0000 Subject: [PATCH] - Fixed build and comment-style --- main/php_ini.c | 4 ++-- sapi/cgi/cgi_main.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/php_ini.c b/main/php_ini.c index 836b1b7042..83a1b801d4 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -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; diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b046d2d286..2cd30d1bdb 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -791,8 +791,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); } @@ -816,7 +816,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 @@ -833,7 +833,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 -- 2.40.0