diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2014-10-26 16:58:45 -0700 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2014-10-26 16:58:45 -0700 |
commit | 8d84b1f67adb71bdb2394b62faad04b22f6226f3 (patch) | |
tree | 0c1c1ed2aaef8eee971575eb5e336631295f4951 /ext/standard/basic_functions.c | |
parent | fb85d0322d39d49f37e32df6f68c9769f2cce0e4 (diff) | |
parent | 09da8952d0434b53e740ffaca66a8051cd39cf93 (diff) | |
download | php-git-8d84b1f67adb71bdb2394b62faad04b22f6226f3.tar.gz |
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (240 commits)
Do not execute anything after quit or clean command
Fix last commit, and do not output unnecessary information
Stabilize execution, always run destructors and extended file breakpoints
Fix nullptr dereference in clean without exec context
remove dodgy param parser, bring userland breakpoint api inline with PHP7
disable output buffering by default
Add question to reset execution in run/exec/clean
- Updated to version 2014.9 (2014i)
actually remove this
disable output buffering, better breakpoint api for userland, remove hand parsing of params
Fix phpdbg output when outputting via php with active output handlers
Fixed Closure::call() NEWS/UPGRADING
Set engine back to initial state after fatal-ed ev command
Fix eventual stack overflow after clean cmd
Fix listing of files with no absolute path
updated libmagic.patch in master
updated libmagic.patch in 5.6
updated libmagic.patch in 5.5
NEWS
NEWS
...
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r-- | ext/standard/basic_functions.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 5bcd3d3386..106bc54141 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3952,7 +3952,7 @@ PHP_FUNCTION(long2ip) /* "It's a long but it's not, PHP ints are signed */ char *ip; size_t ip_len; - zend_ulong n; + uint32_t n; struct in_addr myaddr; #ifdef HAVE_INET_PTON char str[40]; @@ -4076,7 +4076,7 @@ PHP_FUNCTION(putenv) #endif } - pe.key_len = strlen(pe.key); + pe.key_len = (int)strlen(pe.key); #ifdef PHP_WIN32 if (equals) { if (pe.key_len < setting_len - 1) { @@ -4289,7 +4289,7 @@ PHP_FUNCTION(getopt) opts->need_param = 0; opts->opt_name = estrdup(arg_str->val); - len = strlen(opts->opt_name); + len = (int)strlen(opts->opt_name); if ((len > 0) && (opts->opt_name[len - 1] == ':')) { opts->need_param++; opts->opt_name[len - 1] = '\0'; @@ -4345,7 +4345,7 @@ PHP_FUNCTION(getopt) } /* Add this option / argument pair to the result hash. */ - optname_len = strlen(optname); + optname_len = (int)strlen(optname); if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) { /* numeric string */ int optname_int = atoi(optname); @@ -4400,9 +4400,9 @@ PHP_FUNCTION(sleep) RETURN_FALSE; } #ifdef PHP_SLEEP_NON_VOID - RETURN_LONG(php_sleep(num)); + RETURN_LONG(php_sleep((unsigned int)num)); #else - php_sleep(num); + php_sleep((unsigned int)num); #endif } @@ -4422,7 +4422,7 @@ PHP_FUNCTION(usleep) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of microseconds must be greater than or equal to 0"); RETURN_FALSE; } - usleep(num); + usleep((unsigned int)num); #endif } /* }}} */ @@ -4449,7 +4449,7 @@ PHP_FUNCTION(time_nanosleep) } php_req.tv_sec = (time_t) tv_sec; - php_req.tv_nsec = tv_nsec; + php_req.tv_nsec = (long)tv_nsec; if (!nanosleep(&php_req, &php_rem)) { RETURN_TRUE; } else if (errno == EINTR) { @@ -4554,7 +4554,7 @@ PHP_FUNCTION(get_cfg_var) return; } - retval = cfg_get_entry(varname, varname_len); + retval = cfg_get_entry(varname, (uint)varname_len); if (retval) { if (Z_TYPE_P(retval) == IS_ARRAY) { @@ -4637,7 +4637,7 @@ PHP_FUNCTION(error_log) } if (argc > 1) { - opt_err = erropt; + opt_err = (int)erropt; } if (_php_error_log_ex(opt_err, message, message_len, opt, headers TSRMLS_CC) == FAILURE) { @@ -4655,7 +4655,7 @@ PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers T } /* }}} */ -PHPAPI int _php_error_log_ex(int opt_err, char *message, int message_len, char *opt, char *headers TSRMLS_DC) /* {{{ */ +PHPAPI int _php_error_log_ex(int opt_err, char *message, size_t message_len, char *opt, char *headers TSRMLS_DC) /* {{{ */ { php_stream *stream = NULL; @@ -5212,7 +5212,7 @@ PHP_FUNCTION(ini_get) return; } - str = zend_ini_string(varname, varname_len, 0); + str = zend_ini_string(varname, (uint)varname_len, 0); if (!str) { RETURN_FALSE; @@ -5322,7 +5322,7 @@ PHP_FUNCTION(ini_set) return; } - old_value = zend_ini_string(varname->val, varname->len, 0); + old_value = zend_ini_string(varname->val, (int)varname->len, 0); /* copy to return here, because alter might free it! */ if (old_value) { @@ -5331,7 +5331,7 @@ PHP_FUNCTION(ini_set) RETVAL_FALSE; } -#define _CHECK_PATH(var, var_len, ini) php_ini_check_path(var, var_len, ini, sizeof(ini)) +#define _CHECK_PATH(var, var_len, ini) php_ini_check_path(var, (int)var_len, ini, sizeof(ini)) /* open basedir check */ if (PG(open_basedir)) { if (_CHECK_PATH(varname->val, varname->len, "error_log") || @@ -5592,7 +5592,7 @@ PHP_FUNCTION(getprotobynumber) return; } - ent = getprotobynumber(proto); + ent = getprotobynumber((int)proto); if (ent == NULL) { RETURN_FALSE; @@ -5790,7 +5790,7 @@ static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int cal } if (!(Z_STRLEN_P(arg1) > 1 && Z_STRVAL_P(arg1)[0] == '0') && is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == IS_LONG) { - zend_ulong key = (zend_ulong) zend_atol(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)); + zend_ulong key = (zend_ulong) zend_atol(Z_STRVAL_P(arg1), (int)Z_STRLEN_P(arg1)); if ((find_hash = zend_hash_index_find(Z_ARRVAL_P(arr), key)) == NULL) { array_init(&hash); find_hash = zend_hash_index_update(Z_ARRVAL_P(arr), key, &hash); @@ -5878,7 +5878,7 @@ PHP_FUNCTION(parse_ini_file) fh.type = ZEND_HANDLE_FILENAME; array_init(return_value); - if (zend_parse_ini_file(&fh, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) { + if (zend_parse_ini_file(&fh, 0, (int)scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) { zval_dtor(return_value); RETURN_FALSE; } @@ -5917,7 +5917,7 @@ PHP_FUNCTION(parse_ini_string) memset(string + str_len, 0, ZEND_MMAP_AHEAD); array_init(return_value); - if (zend_parse_ini_string(string, 0, scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) { + if (zend_parse_ini_string(string, 0, (int)scanner_mode, ini_parser_cb, return_value TSRMLS_CC) == FAILURE) { zval_dtor(return_value); RETVAL_FALSE; } |