com php-src: ZEND_INT_FMT again: main/SAPI.c main /SAPI.h main/main.c main/php_variables.c main/rfc 1867.c main/streams/cast.c main/streams/userspa
ce.c

From: Date: Sun, 24 Nov 2013 21:28:58 +0000
Subject: com php-src: ZEND_INT_FMT again: main/SAPI.c main /SAPI.h main/main.c main/php_variables.c main/rfc 1867.c main/streams/cast.c main/streams/userspa
ce.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74033@lists.php.net to get a copy of this message
Commit: 3198533e92cbd860addddf325ea7ddf8886f30cb Author: Anatol Belski <ab@php.net> Sun, 24 Nov 2013 22:28:58 +0100 Parents: d8c7d69543c8cc0609facb2d35e636cb59c38385 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3198533e92cbd860addddf325ea7ddf8886f30cb Log: ZEND_INT_FMT again Changed paths: M main/SAPI.c M main/SAPI.h M main/main.c M main/php_variables.c M main/rfc1867.c M main/streams/cast.c M main/streams/userspace.c Diff: diff --git a/main/SAPI.c b/main/SAPI..c index b8a6d97..f97d8ed 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -266,7 +266,7 @@ SAPI_API zend_str_size_int sapi_read_post_block(char *buffer, size_t buflen TSRM SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data) { if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of " ZEND_INT_FMT " bytes exceeds the limit of " ZEND_INT_FMT " bytes", SG(request_info).content_length, SG(post_max_size)); return; } @@ -287,7 +287,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data) } if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %ld bytes", SG(post_max_size)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds " ZEND_INT_FMT " bytes", SG(post_max_size)); break; } diff --git a/main/SAPI.h b/main/SAPI.h index 7d27b65..1862618 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -80,7 +80,7 @@ typedef struct { const char *request_method; char *query_string; char *cookie_data; - long content_length; + php_int_t content_length; char *path_translated; char *request_uri; @@ -127,7 +127,7 @@ typedef struct _sapi_globals_struct { char *default_mimetype; char *default_charset; HashTable *rfc1867_uploaded_files; - long post_max_size; + php_int_t post_max_size; int options; zend_bool sapi_started; double global_request_time; diff --git a/main/main.c b/main/main.c index 4f7928d..189f5a4 100644 --- a/main/main.c +++ b/main/main.c @@ -1278,7 +1278,7 @@ PHP_FUNCTION(set_time_limit) return; } - new_timeout_strlen = zend_spprintf(&new_timeout_str, 0, "%ld", new_timeout); + new_timeout_strlen = zend_spprintf(&new_timeout_str, 0, ZEND_INT_FMT, new_timeout); if (zend_alter_ini_entry_ex("max_execution_time", sizeof("max_execution_time"), new_timeout_str, new_timeout_strlen, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == SUCCESS) { RETVAL_TRUE; diff --git a/main/php_variables.c b/main/php_variables.c index 22eae39..8d460b4 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -144,7 +144,7 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars /* do not output the error message to the screen, this helps us to to avoid "information disclosure" */ if (!PG(display_errors)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variable nesting level exceeded %ld. To increase the limit change max_input_nesting_level in php.ini.", PG(max_input_nesting_level)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variable nesting level exceeded " ZEND_INT_FMT ". To increase the limit change max_input_nesting_level in php.ini.", PG(max_input_nesting_level)); } free_alloca(var_orig, use_heap); return; @@ -448,7 +448,7 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) } if (++count > PG(max_input_vars)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded " ZEND_INT_FMT ". To increase the limit change max_input_vars in php.ini.", PG(max_input_vars)); break; } diff --git a/main/rfc1867.c b/main/rfc1867.c index a86a706..f3b0ce7 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -710,7 +710,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ } if (SG(post_max_size) > 0 && SG(request_info).content_length > SG(post_max_size)) { - sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); + sapi_module.sapi_error(E_WARNING, "POST Content-Length of " ZEND_INT_FMT " bytes exceeds the limit of " ZEND_INT_FMT " bytes", SG(request_info).content_length, SG(post_max_size)); return; } @@ -888,7 +888,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ safe_php_register_variable(param, value, new_val_len, array_ptr, 0 TSRMLS_CC); } else { if (count == PG(max_input_vars) + 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded " ZEND_INT_FMT ". To increase the limit change max_input_vars in php.ini.", PG(max_input_vars)); } if (php_rfc1867_callback != NULL) { diff --git a/main/streams/cast.c b/main/streams/cast.c index 1cf721d..251dd02 100644 --- a/main/streams/cast.c +++ b/main/streams/cast.c @@ -334,7 +334,7 @@ exit_success: * will be accessing the stream. Emit a warning so that the end-user will * know that they should try something else */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld bytes of buffered data lost during stream conversion!", (long)(stream->writepos - stream->readpos)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, ZEND_INT_FMT " bytes of buffered data lost during stream conversion!", (stream->writepos - stream->readpos)); } if (castas == PHP_STREAM_AS_STDIO && ret) { diff --git a/main/streams/userspace.c b/main/streams/userspace.c index ff24c3a..6befeda 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -656,9 +656,9 @@ static zend_str_size_size_t php_userstreamop_write(php_stream *stream, const cha /* don't allow strange buffer overruns due to bogus return */ if (didwrite > count) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " wrote %ld bytes more data than requested (%ld written, %ld max)", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " wrote " ZEND_INT_FMT " bytes more data than requested (" ZEND_INT_FMT " written, " ZEND_INT_FMT " max)", us->wrapper->classname, - (long)(didwrite - count), (long)didwrite, (long)count); + (php_int_t)(didwrite - count), (php_int_t)didwrite, (php_int_t)count); didwrite = count; } @@ -697,8 +697,8 @@ static zend_str_size_size_t php_userstreamop_read(php_stream *stream, char *buf, convert_to_string(retval); didread = Z_STRSIZE_P(retval); if (didread > count) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " - read %ld bytes more data than requested (%ld read, %ld max) - excess data will be lost", - us->wrapper->classname, (long)(didread - count), (long)didread, (long)count); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " - read " ZEND_INT_FMT " bytes more data than requested (" ZEND_INT_FMT " read, " ZEND_INT_FMT " max) - excess data will be lost", + us->wrapper->classname, (php_int_t)(didread - count), (php_int_t)didread, (php_int_t)count); didread = count; } if (didread > 0)

« previous php.cvs (#74033) next »