diff options
author | Anatol Belski <ab@php.net> | 2014-11-18 21:18:52 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-11-18 21:18:52 +0100 |
commit | c6bad96f306df8e8b656472e618283ced5083cdb (patch) | |
tree | 7e5b52aa07777f0336b0944a228bf66f8f56b31f /main/php_ini.c | |
parent | 4262663e4caa82ba17666781a95bdcb872b4e109 (diff) | |
parent | 64a39dc7b07d4b54d050a3a5c15045fe91c0b651 (diff) | |
download | php-git-c6bad96f306df8e8b656472e618283ced5083cdb.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
NEWS
add test for bug #68381
Fixed bug #68381 Set FPM log level earlier during init
proper dllexport
move to size_t where zend_string is used internally
fix some datatype mismatches
return after the warning, to fix uninitialized salt usage
fix datatype mismatches
add missing type specifier
fix datatype mismatches
fix unsigned check
"extern" shouldn't be used for definitions
joined identical conditional blocks
simplify fpm tests
SEND_VAR_NO_REF optimization
Add test for bug #68442
Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
Add new FPM test for IPv4/IPv6
...
Conflicts:
win32/build/config.w32
Diffstat (limited to 'main/php_ini.c')
-rw-r--r-- | main/php_ini.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index c90dc9f29f..a6c325b0fb 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -80,7 +80,8 @@ static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type TSRMLS_DC) ini_entry->displayer(ini_entry, type); } else { char *display_string; - uint display_string_length, esc_html=0; + size_t display_string_length; + int esc_html=0; if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) { if (ini_entry->orig_value && ini_entry->orig_value->val[0]) { @@ -281,7 +282,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t /* fprintf(stdout, "ZEND_INI_PARSER_SECTION: %s\n",Z_STRVAL_P(arg1)); */ char *key = NULL; - uint key_len; + size_t key_len; /* PATH sections */ if (!strncasecmp(Z_STRVAL_P(arg1), "PATH", sizeof("PATH") - 1)) { @@ -355,14 +356,14 @@ static void php_load_php_extension_cb(void *arg TSRMLS_DC) static void php_load_zend_extension_cb(void *arg TSRMLS_DC) { char *filename = *((char **) arg); - const int length = strlen(filename); + const int length = (int)strlen(filename); if (IS_ABSOLUTE_PATH(filename, length)) { zend_load_extension(filename TSRMLS_CC); } else { char *libpath; char *extension_dir = INI_STR("extension_dir"); - int extension_dir_len = strlen(extension_dir); + int extension_dir_len = (int)strlen(extension_dir); if (IS_SLASH(extension_dir[extension_dir_len-1])) { spprintf(&libpath, 0, "%s%s", extension_dir, filename); @@ -449,7 +450,7 @@ int php_init_config(TSRMLS_D) * Prepare search path */ - search_path_size = MAXPATHLEN * 4 + strlen(env_location) + 3 + 1; + search_path_size = MAXPATHLEN * 4 + (int)strlen(env_location) + 3 + 1; php_ini_search_path = (char *) emalloc(search_path_size); free_ini_search_path = 1; php_ini_search_path[0] = 0; @@ -608,7 +609,7 @@ int php_init_config(TSRMLS_D) /* Or fall back using possible --with-config-file-scan-dir setting (defaults to empty string!) */ php_ini_scanned_path = PHP_CONFIG_FILE_SCAN_DIR; } - php_ini_scanned_path_len = strlen(php_ini_scanned_path); + php_ini_scanned_path_len = (int)strlen(php_ini_scanned_path); /* Scan and parse any .ini files found in scan path if path not empty. */ if (!sapi_module.php_ini_ignore && php_ini_scanned_path_len) { @@ -638,7 +639,7 @@ int php_init_config(TSRMLS_D) to allow "/foo/phd.d:" or ":/foo/php.d" */ debpath = PHP_CONFIG_FILE_SCAN_DIR; } - lenpath = strlen(debpath); + lenpath = (int)strlen(debpath); if (lenpath > 0 && (ndir = php_scandir(debpath, &namelist, 0, php_alphasort)) > 0) { @@ -665,7 +666,7 @@ int php_init_config(TSRMLS_D) if (zend_parse_ini_file(&fh2, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) { /* Here, add it to the list of ini files read */ - l = strlen(ini_file); + l = (int)strlen(ini_file); total_l += l + 2; p = estrndup(ini_file, l); zend_llist_add_element(&scanned_ini_list, &p); @@ -681,7 +682,7 @@ int php_init_config(TSRMLS_D) efree(bufpath); if (total_l) { - int php_ini_scanned_files_len = (php_ini_scanned_files) ? strlen(php_ini_scanned_files) + 1 : 0; + int php_ini_scanned_files_len = (php_ini_scanned_files) ? (int)strlen(php_ini_scanned_files) + 1 : 0; php_ini_scanned_files = (char *) realloc(php_ini_scanned_files, php_ini_scanned_files_len + total_l + 1); if (!php_ini_scanned_files_len) { *php_ini_scanned_files = '\0'; |