diff options
| author | Anatol Belski <ab@php.net> | 2014-08-25 20:22:49 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-08-25 20:22:49 +0200 |
| commit | 4d997f63d98c663b2d9acccd3655572652f61c7d (patch) | |
| tree | bce31fa83a23d3ad58d640d581d498f3bdd0cbf4 /sapi | |
| parent | 6f9f0bf2056f0dc17d9bcc6dd3b7d28ac878c6fc (diff) | |
| download | php-git-4d997f63d98c663b2d9acccd3655572652f61c7d.tar.gz | |
master renames phase 3
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/apache2handler/php_apache.h | 2 | ||||
| -rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 14 | ||||
| -rw-r--r-- | sapi/cgi/cgi_main.c | 24 | ||||
| -rw-r--r-- | sapi/cli/cli.h | 6 | ||||
| -rw-r--r-- | sapi/cli/php_cli.c | 14 | ||||
| -rw-r--r-- | sapi/cli/php_cli_server.c | 12 | ||||
| -rw-r--r-- | sapi/embed/php_embed.c | 6 |
7 files changed, 39 insertions, 39 deletions
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h index 10b4186306..f1033c9539 100644 --- a/sapi/apache2handler/php_apache.h +++ b/sapi/apache2handler/php_apache.h @@ -43,7 +43,7 @@ typedef struct php_struct { #if defined(NETWARE) && defined(CLIB_STAT_PATCH) struct stat_libc finfo; #else - php_stat_t finfo; + zend_stat_t finfo; #endif /* Whether or not we've processed PHP in the output filters yet. */ int request_processed; diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 669f25f786..d39a25a74e 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -72,8 +72,8 @@ /* A way to specify the location of the php.ini dir in an apache directive */ char *apache2_php_ini_path_override = NULL; -static php_size_t -php_apache_sapi_ub_write(const char *str, php_size_t str_length TSRMLS_DC) +static size_t +php_apache_sapi_ub_write(const char *str, size_t str_length TSRMLS_DC) { request_rec *r; php_struct *ctx; @@ -181,7 +181,7 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) } static apr_size_t -php_apache_sapi_read_post(char *buf, php_size_t count_bytes TSRMLS_DC) +php_apache_sapi_read_post(char *buf, size_t count_bytes TSRMLS_DC) { apr_size_t len, tlen=0; php_struct *ctx = SG(server_context); @@ -212,7 +212,7 @@ php_apache_sapi_read_post(char *buf, php_size_t count_bytes TSRMLS_DC) return tlen; } -static php_stat_t* +static zend_stat_t* php_apache_sapi_get_stat(TSRMLS_D) { php_struct *ctx = SG(server_context); @@ -270,18 +270,18 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC) php_struct *ctx = SG(server_context); const apr_array_header_t *arr = apr_table_elts(ctx->r->subprocess_env); char *key, *val; - php_size_t new_val_len; + size_t new_val_len; APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { val = ""; } - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (php_size_t *)&new_val_len TSRMLS_CC)) { + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (size_t *)&new_val_len TSRMLS_CC)) { php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC); } APR_ARRAY_FOREACH_CLOSE() - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (php_size_t *)&new_val_len TSRMLS_CC)) { + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (size_t *)&new_val_len TSRMLS_CC)) { php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC); } } diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index ca2c99263a..d02e0c6171 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -287,10 +287,10 @@ static inline size_t sapi_cgi_single_write(const char *str, uint str_length TSRM #endif } -static php_size_t sapi_cgi_ub_write(const char *str, php_size_t str_length TSRMLS_DC) +static size_t sapi_cgi_ub_write(const char *str, size_t str_length TSRMLS_DC) { const char *ptr = str; - php_size_t remaining = str_length; + size_t remaining = str_length; size_t ret; while (remaining > 0) { @@ -306,10 +306,10 @@ static php_size_t sapi_cgi_ub_write(const char *str, php_size_t str_length TSRML return str_length; } -static php_size_t sapi_fcgi_ub_write(const char *str, php_size_t str_length TSRMLS_DC) +static size_t sapi_fcgi_ub_write(const char *str, size_t str_length TSRMLS_DC) { const char *ptr = str; - php_size_t remaining = str_length; + size_t remaining = str_length; fcgi_request *request = (fcgi_request*) SG(server_context); while (remaining > 0) { @@ -505,9 +505,9 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) # define STDIN_FILENO 0 #endif -static php_size_t sapi_cgi_read_post(char *buffer, php_size_t count_bytes TSRMLS_DC) +static size_t sapi_cgi_read_post(char *buffer, size_t count_bytes TSRMLS_DC) { - php_size_t read_bytes = 0; + size_t read_bytes = 0; int tmp_read_bytes; count_bytes = MIN(count_bytes, SG(request_info).content_length - SG(read_post_bytes)); @@ -521,9 +521,9 @@ static php_size_t sapi_cgi_read_post(char *buffer, php_size_t count_bytes TSRMLS return read_bytes; } -static php_size_t sapi_fcgi_read_post(char *buffer, php_size_t count_bytes TSRMLS_DC) +static size_t sapi_fcgi_read_post(char *buffer, size_t count_bytes TSRMLS_DC) { - php_size_t read_bytes = 0; + size_t read_bytes = 0; int tmp_read_bytes; fcgi_request *request = (fcgi_request*) SG(server_context); size_t remaining = SG(request_info).content_length - SG(read_post_bytes); @@ -622,7 +622,7 @@ static void cgi_php_load_env_var(char *var, unsigned int var_len, char *val, uns { zval *array_ptr = (zval*)arg; int filter_arg = (Z_ARR_P(array_ptr) == Z_ARR(PG(http_globals)[TRACK_VARS_ENV]))?PARSE_ENV:PARSE_SERVER; - php_size_t new_val_len; + size_t new_val_len; if (sapi_module.input_filter(filter_arg, var, &val, strlen(val), &new_val_len TSRMLS_CC)) { php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); @@ -658,7 +658,7 @@ static void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) { - php_size_t php_self_len; + size_t php_self_len; char *php_self; /* In CGI mode, we consider the environment to be a part of the server @@ -1184,7 +1184,7 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) #endif if (CGIG(fix_pathinfo)) { - php_stat_t st; + zend_stat_t st; char *real_path = NULL; char *env_redirect_url = CGI_GETENV("REDIRECT_URL"); char *env_document_root = CGI_GETENV("DOCUMENT_ROOT"); @@ -2416,7 +2416,7 @@ consult the installation file that came with this distribution, or visit \n\ /* handle situations where line is terminated by \r\n */ if (c == '\r') { if (php_stream_getc((php_stream*)file_handle.handle.stream.handle) != '\n') { - php_off_t pos = php_stream_tell((php_stream*)file_handle.handle.stream.handle); + zend_off_t pos = php_stream_tell((php_stream*)file_handle.handle.stream.handle); php_stream_seek((php_stream*)file_handle.handle.stream.handle, pos - 1, SEEK_SET); } } diff --git a/sapi/cli/cli.h b/sapi/cli/cli.h index 8840ac01cc..b04f6c91f0 100644 --- a/sapi/cli/cli.h +++ b/sapi/cli/cli.h @@ -30,11 +30,11 @@ #endif -extern PHP_CLI_API size_t sapi_cli_single_write(const char *str, php_size_t str_length TSRMLS_DC); +extern PHP_CLI_API size_t sapi_cli_single_write(const char *str, size_t str_length TSRMLS_DC); typedef struct { - php_size_t (*cli_shell_write)(const char *str, php_size_t str_length TSRMLS_DC); - php_size_t (*cli_shell_ub_write)(const char *str, php_size_t str_length TSRMLS_DC); + size_t (*cli_shell_write)(const char *str, size_t str_length TSRMLS_DC); + size_t (*cli_shell_ub_write)(const char *str, size_t str_length TSRMLS_DC); int (*cli_shell_run)(TSRMLS_D); } cli_shell_callbacks_t; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index c51e5a8ce2..5847849e89 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -252,16 +252,16 @@ static inline int sapi_cli_select(int fd TSRMLS_DC) return ret != -1; } -PHP_CLI_API size_t sapi_cli_single_write(const char *str, php_size_t str_length TSRMLS_DC) /* {{{ */ +PHP_CLI_API size_t sapi_cli_single_write(const char *str, size_t str_length TSRMLS_DC) /* {{{ */ { #ifdef PHP_WRITE_STDOUT zend_long ret; #else - php_size_t ret; + size_t ret; #endif if (cli_shell_callbacks.cli_shell_write) { - php_size_t shell_wrote; + size_t shell_wrote; shell_wrote = cli_shell_callbacks.cli_shell_write(str, str_length TSRMLS_CC); if (shell_wrote > -1) { return shell_wrote; @@ -285,10 +285,10 @@ PHP_CLI_API size_t sapi_cli_single_write(const char *str, php_size_t str_length } /* }}} */ -static php_size_t sapi_cli_ub_write(const char *str, php_size_t str_length TSRMLS_DC) /* {{{ */ +static size_t sapi_cli_ub_write(const char *str, size_t str_length TSRMLS_DC) /* {{{ */ { const char *ptr = str; - php_size_t remaining = str_length; + size_t remaining = str_length; size_t ret; if (!str_length) { @@ -296,7 +296,7 @@ static php_size_t sapi_cli_ub_write(const char *str, php_size_t str_length TSRML } if (cli_shell_callbacks.cli_shell_ub_write) { - php_size_t ub_wrote; + size_t ub_wrote; ub_wrote = cli_shell_callbacks.cli_shell_ub_write(str, str_length TSRMLS_CC); if (ub_wrote > -1) { return ub_wrote; @@ -338,7 +338,7 @@ static char *script_filename = ""; static void sapi_cli_register_variables(zval *track_vars_array TSRMLS_DC) /* {{{ */ { - php_size_t len; + size_t len; char *docroot = ""; /* In CGI mode, we consider the environment to be a part of the server diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 889b4f2fd4..6f7f34e7ba 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -139,7 +139,7 @@ typedef struct php_cli_server_request { size_t content_len; const char *ext; size_t ext_len; - php_stat_t sb; + zend_stat_t sb; } php_cli_server_request; typedef struct php_cli_server_chunk { @@ -539,7 +539,7 @@ static int sapi_cli_server_startup(sapi_module_struct *sapi_module) /* {{{ */ return SUCCESS; } /* }}} */ -static php_size_t sapi_cli_server_ub_write(const char *str, php_size_t str_length TSRMLS_DC) /* {{{ */ +static size_t sapi_cli_server_ub_write(const char *str, size_t str_length TSRMLS_DC) /* {{{ */ { php_cli_server_client *client = SG(server_context); if (!client) { @@ -619,7 +619,7 @@ static char *sapi_cli_server_read_cookies(TSRMLS_D) /* {{{ */ return val; } /* }}} */ -static php_size_t sapi_cli_server_read_post(char *buf, php_size_t count_bytes TSRMLS_DC) /* {{{ */ +static size_t sapi_cli_server_read_post(char *buf, size_t count_bytes TSRMLS_DC) /* {{{ */ { php_cli_server_client *client = SG(server_context); if (client->request.content) { @@ -635,7 +635,7 @@ static php_size_t sapi_cli_server_read_post(char *buf, php_size_t count_bytes TS static void sapi_cli_server_register_variable(zval *track_vars_array, const char *key, const char *val TSRMLS_DC) /* {{{ */ { char *new_val = (char *)val; - php_size_t new_val_len; + size_t new_val_len; if (sapi_module.input_filter(PARSE_SERVER, (char*)key, &new_val, strlen(val), &new_val_len TSRMLS_CC)) { php_register_variable_safe((char *)key, new_val, new_val_len, track_vars_array TSRMLS_CC); } @@ -1377,7 +1377,7 @@ static void php_cli_server_request_dtor(php_cli_server_request *req) /* {{{ */ static void php_cli_server_request_translate_vpath(php_cli_server_request *request, const char *document_root, size_t document_root_len) /* {{{ */ { - php_stat_t sb; + zend_stat_t sb; static const char *index_files[] = { "index.php", "index.html", NULL }; char *buf = safe_pemalloc(1, request->vpath_len, 1 + document_root_len + 1 + sizeof("index.html"), 1); char *p = buf, *prev_path = NULL, *q, *vpath; @@ -2487,7 +2487,7 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */ } if (document_root) { - php_stat_t sb; + zend_stat_t sb; if (php_stat_fn(document_root, &sb)) { fprintf(stderr, "Directory %s does not exist.\n", document_root); diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index 8f2e9be312..230b3a649d 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -44,7 +44,7 @@ static int php_embed_deactivate(TSRMLS_D) return SUCCESS; } -static inline size_t php_embed_single_write(const char *str, php_size_t str_length) +static inline size_t php_embed_single_write(const char *str, size_t str_length) { #ifdef PHP_WRITE_STDOUT zend_long ret; @@ -61,10 +61,10 @@ static inline size_t php_embed_single_write(const char *str, php_size_t str_leng } -static php_size_t php_embed_ub_write(const char *str, php_size_t str_length TSRMLS_DC) +static size_t php_embed_ub_write(const char *str, size_t str_length TSRMLS_DC) { const char *ptr = str; - php_size_t remaining = str_length; + size_t remaining = str_length; size_t ret; while (remaining > 0) { |
