summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-12-22 14:32:02 +0100
committerAnatol Belski <ab@php.net>2016-12-22 14:32:02 +0100
commitafb6ca2566691a673b7e638ffd7e3181e21d80a3 (patch)
tree43ec7c52c51ac2b3245c7d2c45466a220f6908eb
parentce97ead3997c238f1566ee472ebc9b77e62124a5 (diff)
downloadphp-git-afb6ca2566691a673b7e638ffd7e3181e21d80a3.tar.gz
Finish remaining replacement uint => uint32_t
Tthe core should be normalized now, no uints anymore
-rw-r--r--ext/mysqli/mysqli_nonapi.c2
-rw-r--r--ext/soap/soap.c2
-rw-r--r--ext/sockets/conversions.c2
-rw-r--r--main/streams/filter.c2
-rw-r--r--sapi/cli/php_cli_server.c6
-rw-r--r--sapi/fpm/fpm/fpm_main.c8
-rw-r--r--sapi/fpm/fpm/fpm_php_trace.c2
-rw-r--r--sapi/litespeed/lsapi_main.c4
-rw-r--r--sapi/phpdbg/phpdbg_bp.c4
-rw-r--r--sapi/phpdbg/phpdbg_bp.h2
-rw-r--r--sapi/phpdbg/phpdbg_list.c24
-rw-r--r--sapi/phpdbg/phpdbg_list.h6
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c6
-rw-r--r--win32/select.c12
14 files changed, 41 insertions, 41 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index e3efca25c6..645967fecf 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -969,7 +969,7 @@ PHP_FUNCTION(mysqli_get_charset)
MY_MYSQL *mysql;
zval *mysql_link;
const char *name = NULL, *collation = NULL, *dir = NULL, *comment = NULL;
- uint minlength, maxlength, number, state;
+ uint32_t minlength, maxlength, number, state;
#if !defined(MYSQLI_USE_MYSQLND)
MY_CHARSET_INFO cs;
#else
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 96f410f0e4..c1a357681a 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -165,7 +165,7 @@ zend_class_entry* soap_var_class_entry;
ZEND_DECLARE_MODULE_GLOBALS(soap)
-static void (*old_error_handler)(int, const char *, const uint, const char*, va_list);
+static void (*old_error_handler)(int, const char *, const uint32_t, const char*, va_list);
#ifdef va_copy
#define call_old_error_handler(error_num, error_filename, error_lineno, format, args) \
diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c
index 3162291b99..093b6c5d72 100644
--- a/ext/sockets/conversions.c
+++ b/ext/sockets/conversions.c
@@ -1188,7 +1188,7 @@ static void to_zval_read_iov(const char *msghdr_c, zval *zv, res_context *ctx)
size_t iovlen = msghdr->msg_iovlen;
ssize_t *recvmsg_ret,
bytes_left;
- uint i;
+ uint32_t i;
if (iovlen > UINT_MAX) {
do_to_zval_err(ctx, "unexpectedly large value for iov_len: %lu",
diff --git a/main/streams/filter.c b/main/streams/filter.c
index 71b06aa7c8..7123a680ae 100644
--- a/main/streams/filter.c
+++ b/main/streams/filter.c
@@ -358,7 +358,7 @@ PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_strea
php_stream_bucket_append(brig_inp, bucket);
status = filter->fops->filter(stream, filter, brig_inp, brig_outp, &consumed, PSFS_FLAG_NORMAL);
- if (stream->readpos + consumed > (uint)stream->writepos) {
+ if (stream->readpos + consumed > (uint32_t)stream->writepos) {
/* No behaving filter should cause this. */
status = PSFS_ERR_FATAL;
}
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 0853db99bb..ac4dcb8b9a 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -410,7 +410,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value) /* {{
do {
p++;
} while (*p == ' ' || *p == '\t');
- add_assoc_stringl_ex(return_value, s, (uint)len, p, h->header_len - (p - h->header));
+ add_assoc_stringl_ex(return_value, s, (uint32_t)len, p, h->header_len - (p - h->header));
free_alloca(s, use_heap);
}
}
@@ -604,7 +604,7 @@ static int sapi_cli_server_register_entry_cb(char **entry, int num_args, va_list
zval *track_vars_array = va_arg(args, zval *);
if (hash_key->key) {
char *real_key, *key;
- uint i;
+ uint32_t i;
key = estrndup(ZSTR_VAL(hash_key->key), ZSTR_LEN(hash_key->key));
for(i=0; i<ZSTR_LEN(hash_key->key); i++) {
if (key[i] == '-') {
@@ -1458,7 +1458,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
}
#ifdef PHP_WIN32
{
- uint i = 0;
+ uint32_t i = 0;
for (;i<request->vpath_len;i++) {
if (request->vpath[i] == '\\') {
request->vpath[i] = '/';
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 676811359c..2ed2d34f87 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -280,7 +280,7 @@ static void print_extensions(void) /* {{{ */
#define STDOUT_FILENO 1
#endif
-static inline size_t sapi_cgibin_single_write(const char *str, uint str_length) /* {{{ */
+static inline size_t sapi_cgibin_single_write(const char *str, uint32_t str_length) /* {{{ */
{
ssize_t ret;
@@ -310,7 +310,7 @@ static inline size_t sapi_cgibin_single_write(const char *str, uint str_length)
static size_t sapi_cgibin_ub_write(const char *str, size_t str_length) /* {{{ */
{
const char *ptr = str;
- uint remaining = str_length;
+ uint32_t remaining = str_length;
size_t ret;
while (remaining > 0) {
@@ -473,7 +473,7 @@ void fcgi_log(int type, const char *fmt, ...)
static size_t sapi_cgi_read_post(char *buffer, size_t count_bytes) /* {{{ */
{
- uint read_bytes = 0;
+ uint32_t read_bytes = 0;
int tmp_read_bytes;
size_t remaining = SG(request_info).content_length - SG(read_post_bytes);
@@ -745,7 +745,7 @@ static int sapi_cgi_activate(void) /* {{{ */
{
fcgi_request *request = (fcgi_request*) SG(server_context);
char *path, *doc_root, *server_name;
- uint path_len, doc_root_len, server_name_len;
+ uint32_t path_len, doc_root_len, server_name_len;
/* PATH_TRANSLATED should be defined at this stage but better safe than sorry :) */
if (!SG(request_info).path_translated) {
diff --git a/sapi/fpm/fpm/fpm_php_trace.c b/sapi/fpm/fpm/fpm_php_trace.c
index e6482b6380..b02d5277f4 100644
--- a/sapi/fpm/fpm/fpm_php_trace.c
+++ b/sapi/fpm/fpm/fpm_php_trace.c
@@ -80,7 +80,7 @@ static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog) /* {{{ *
long function_name;
long file_name;
long prev;
- uint lineno = 0;
+ uint32_t lineno = 0;
if (0 > fpm_trace_get_long(execute_data + offsetof(zend_execute_data, func), &l)) {
return -1;
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 730070fd38..588a14518a 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -687,7 +687,7 @@ static void walk_down_the_path(char* path_start,
typedef struct {
char *path;
- uint path_len;
+ uint32_t path_len;
char *doc_root;
user_config_cache_entry *entry;
} _lsapi_activate_user_ini_ctx;
@@ -816,7 +816,7 @@ static int lsapi_activate_user_ini_walk_down_the_path(_lsapi_activate_user_ini_c
void* next)
{
time_t request_time = sapi_get_request_time();
- uint path_len, docroot_len;
+ uint32_t path_len, docroot_len;
int rc = SUCCESS;
fn_activate_user_ini_chain_t *fn_next = next;
diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c
index c7e36d6da9..fd5589c0d1 100644
--- a/sapi/phpdbg/phpdbg_bp.c
+++ b/sapi/phpdbg/phpdbg_bp.c
@@ -324,7 +324,7 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, lo
zend_string_release(path_str);
} /* }}} */
-PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht) /* {{{ */
+PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint32_t filelen, zend_string *cur, HashTable *fileht) /* {{{ */
{
phpdbg_debug("file: %s, filelen: %u, cur: %s, curlen %u, pos: %c, memcmp: %d\n", file, filelen, ZSTR_VAL(cur), ZSTR_LEN(cur), filelen > ZSTR_LEN(cur) ? file[filelen - ZSTR_LEN(cur) - 1] : '?', filelen > ZSTR_LEN(cur) ? memcmp(file + filelen - ZSTR_LEN(cur), ZSTR_VAL(cur), ZSTR_LEN(cur)) : 0);
@@ -373,7 +373,7 @@ PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uin
PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file) /* {{{ */
{
HashTable *fileht;
- uint filelen = strlen(file);
+ uint32_t filelen = strlen(file);
zend_string *cur;
phpdbg_debug("was compiled: %s\n", file);
diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h
index 7daafe48c1..4a1f6434bc 100644
--- a/sapi/phpdbg/phpdbg_bp.h
+++ b/sapi/phpdbg/phpdbg_bp.h
@@ -121,7 +121,7 @@ typedef struct _phpdbg_breakcond_t {
PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array);
PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_op_array *op_array);
PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break);
-PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht);
+PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint32_t filelen, zend_string *cur, HashTable *fileht);
PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file); /* }}} */
/* {{{ Breakpoint Creation API */
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index a1138b4517..2219198cfe 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -129,9 +129,9 @@ PHPDBG_LIST(class) /* {{{ */
return SUCCESS;
} /* }}} */
-void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highlight) /* {{{ */
+void phpdbg_list_file(zend_string *filename, uint32_t count, int offset, uint32_t highlight) /* {{{ */
{
- uint line, lastline;
+ uint32_t line, lastline;
phpdbg_file_source *data;
if (!(data = zend_hash_find_ptr(&PHPDBG_G(file_sources), filename))) {
@@ -153,8 +153,8 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli
phpdbg_xml("<list %r file=\"%s\">", ZSTR_VAL(filename));
for (line = offset; line < lastline;) {
- uint linestart = data->line[line++];
- uint linelen = data->line[line] - linestart;
+ uint32_t linestart = data->line[line++];
+ uint32_t linelen = data->line[line] - linestart;
char *buffer = data->buf + linestart;
if (!highlight) {
@@ -237,7 +237,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
zend_file_handle fake;
zend_op_array *ret;
char *filename;
- uint line;
+ uint32_t line;
char *bufptr, *endptr;
if (zend_stream_fixup(file, &bufptr, &data.len) == FAILURE) {
@@ -261,11 +261,11 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
fake.filename = filename;
fake.opened_path = file->opened_path;
- *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data;
+ *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * data.len)) = data;
for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) {
if (*bufptr == '\n') {
- dataptr->line[++line] = (uint)(bufptr - data.buf) + 1;
+ dataptr->line[++line] = (uint32_t)(bufptr - data.buf) + 1;
}
}
dataptr->lines = ++line;
@@ -283,7 +283,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
return NULL;
}
- dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
+ dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line);
zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr);
phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename));
@@ -335,20 +335,20 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) {
zend_string *fake_name;
zend_op_array *op_array;
phpdbg_file_source *dataptr;
- uint line;
+ uint32_t line;
char *bufptr, *endptr;
if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) {
return PHPDBG_G(compile_string)(source_string, filename);
}
- dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * Z_STRLEN_P(source_string));
+ dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * Z_STRLEN_P(source_string));
dataptr->buf = estrndup(Z_STRVAL_P(source_string), Z_STRLEN_P(source_string));
dataptr->len = Z_STRLEN_P(source_string);
dataptr->line[0] = 0;
for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;) {
if (*bufptr == '\n') {
- dataptr->line[++line] = (uint)(bufptr - dataptr->buf) + 1;
+ dataptr->line[++line] = (uint32_t)(bufptr - dataptr->buf) + 1;
}
}
dataptr->lines = ++line;
@@ -364,7 +364,7 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) {
fake_name = strpprintf(0, "%s%c%p", filename, 0, op_array->opcodes);
- dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
+ dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line);
zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr);
zend_string_release(fake_name);
diff --git a/sapi/phpdbg/phpdbg_list.h b/sapi/phpdbg/phpdbg_list.h
index 9adb69b6c9..2768a42ddd 100644
--- a/sapi/phpdbg/phpdbg_list.h
+++ b/sapi/phpdbg/phpdbg_list.h
@@ -34,7 +34,7 @@ PHPDBG_LIST(func);
void phpdbg_list_function_byname(const char *, size_t);
void phpdbg_list_function(const zend_function *);
-void phpdbg_list_file(zend_string *, uint, int, uint);
+void phpdbg_list_file(zend_string *, uint32_t, int, uint32_t);
extern const phpdbg_command_t phpdbg_list_commands[];
@@ -48,8 +48,8 @@ typedef struct {
void *map;
#endif
zend_op_array op_array;
- uint lines;
- uint line[1];
+ uint32_t lines;
+ uint32_t line[1];
} phpdbg_file_source;
#endif /* PHPDBG_LIST_H */
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index ce8945ac6a..a96563352d 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -608,11 +608,11 @@ int phpdbg_compile(void) /* {{{ */
zend_hash_del(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename);
PHPDBG_G(file_sources).pDestructor = dtor;
- data = erealloc(data, sizeof(phpdbg_file_source) + sizeof(uint) * ++data->lines);
- memmove(data->line + 1, data->line, sizeof(uint) * data->lines);
+ data = erealloc(data, sizeof(phpdbg_file_source) + sizeof(uint32_t) * ++data->lines);
+ memmove(data->line + 1, data->line, sizeof(uint32_t) * data->lines);
data->line[0] = 0;
data->buf = erealloc(data->buf, data->len + start_line_len);
- memmove(data->buf + start_line_len, data->buf, data->len * sizeof(uint));
+ memmove(data->buf + start_line_len, data->buf, data->len * sizeof(uint32_t));
memcpy(data->buf, start_line, start_line_len);
efree(start_line);
data->len += start_line_len;
diff --git a/win32/select.c b/win32/select.c
index 8ab964fe03..28534caaf6 100644
--- a/win32/select.c
+++ b/win32/select.c
@@ -67,13 +67,13 @@ PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
if (handles[n_handles] == INVALID_HANDLE_VALUE) {
/* socket */
if (SAFE_FD_ISSET(i, rfds)) {
- FD_SET((uint)i, &sock_read);
+ FD_SET((uint32_t)i, &sock_read);
}
if (SAFE_FD_ISSET(i, wfds)) {
- FD_SET((uint)i, &sock_write);
+ FD_SET((uint32_t)i, &sock_write);
}
if (SAFE_FD_ISSET(i, efds)) {
- FD_SET((uint)i, &sock_except);
+ FD_SET((uint32_t)i, &sock_except);
}
if (i > sock_max_fd) {
sock_max_fd = i;
@@ -136,13 +136,13 @@ PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
for (i = 0; i < n_handles; i++) {
if (WAIT_OBJECT_0 == WaitForSingleObject(handles[i], 0)) {
if (SAFE_FD_ISSET(handle_slot_to_fd[i], rfds)) {
- FD_SET((uint)handle_slot_to_fd[i], &aread);
+ FD_SET((uint32_t)handle_slot_to_fd[i], &aread);
}
if (SAFE_FD_ISSET(handle_slot_to_fd[i], wfds)) {
- FD_SET((uint)handle_slot_to_fd[i], &awrite);
+ FD_SET((uint32_t)handle_slot_to_fd[i], &awrite);
}
if (SAFE_FD_ISSET(handle_slot_to_fd[i], efds)) {
- FD_SET((uint)handle_slot_to_fd[i], &aexcept);
+ FD_SET((uint32_t)handle_slot_to_fd[i], &aexcept);
}
retcode++;
}