diff options
101 files changed, 821 insertions, 809 deletions
diff --git a/include/ap_config.h b/include/ap_config.h index d531c41742..757be99fa2 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -1151,6 +1151,8 @@ int setrlimit(int, struct rlimit *); #define INADDR_NONE ((unsigned long) -1) #endif +#if 0 +/* This stuff taken care of in APR XXXXX */ /* * Replace signal function with sigaction equivalent */ @@ -1170,7 +1172,7 @@ typedef void Sigfunc(int); #define signal(s,f) ap_signal(s,f) Sigfunc *signal(int signo, Sigfunc * func); #endif - +#endif #include <setjmp.h> #if defined(USE_LONGJMP) diff --git a/include/ap_listen.h b/include/ap_listen.h index 600f6fca28..1d8433335f 100644 --- a/include/ap_listen.h +++ b/include/ap_listen.h @@ -70,7 +70,7 @@ struct ap_listen_rec { ap_listen_rec *ap_listeners; void ap_listen_pre_config(void); -int ap_listen_open(pool *pconf, unsigned port); +int ap_listen_open(ap_context_t *pconf, unsigned port); const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, char *arg); const char *ap_set_listener(cmd_parms *cmd, void *dummy, char *ips); const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, char *arg); diff --git a/include/ap_mpm.h b/include/ap_mpm.h index bd3b7a655f..c2bfdbb49f 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -90,7 +90,7 @@ However the MPM may choose to terminate processes when the user requests a non-graceful restart/stop. When this occurs, the MPM kills all threads with extreme prejudice, and destroys the pchild pool. - User cleanups registered in the pchild pool will be invoked at + User cleanups registered in the pchild ap_context_t will be invoked at this point. (This can pose some complications, the user cleanups are asynchronous behaviour not unlike longjmp/signal... but if the admin is asking for a non-graceful shutdown, how much effort should @@ -108,7 +108,7 @@ /* run until a restart/shutdown is indicated, return 1 for shutdown 0 otherwise */ -API_EXPORT(int) ap_mpm_run(pool *pconf, pool *plog, server_rec *server_conf); +API_EXPORT(int) ap_mpm_run(ap_context_t *pconf, ap_context_t *plog, server_rec *server_conf); /* predicate indicating if a graceful stop has been requested ... used by the connection loop */ diff --git a/include/http_config.h b/include/http_config.h index 417fff7694..ba2c0c37b0 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -155,8 +155,8 @@ typedef struct { configfile_t *config_file; /* Config file structure from pcfg_openfile() */ - ap_pool *pool; /* Pool to allocate new storage in */ - struct pool *temp_pool; /* Pool for scratch memory; persists during + ap_context_t *pool; /* Pool to allocate new storage in */ + ap_context_t *temp_pool; /* Pool for scratch memory; persists during * configuration, but wiped before the first * request is served... */ @@ -211,10 +211,10 @@ typedef struct module_struct { * (see also mod_so). */ - void *(*create_dir_config) (pool *p, char *dir); - void *(*merge_dir_config) (pool *p, void *base_conf, void *new_conf); - void *(*create_server_config) (pool *p, server_rec *s); - void *(*merge_server_config) (pool *p, void *base_conf, void *new_conf); + void *(*create_dir_config) (ap_context_t *p, char *dir); + void *(*merge_dir_config) (ap_context_t *p, void *base_conf, void *new_conf); + void *(*create_server_config) (ap_context_t *p, server_rec *s); + void *(*merge_server_config) (ap_context_t *p, void *base_conf, void *new_conf); const command_rec *cmds; const handler_rec *handlers; @@ -280,7 +280,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, char *); * it relativizes it wrt server_root. */ -API_EXPORT(const char *) ap_server_root_relative(pool *p, const char *fname); +API_EXPORT(const char *) ap_server_root_relative(ap_context_t *p, const char *fname); /* Finally, the hook for dynamically loading modules in... */ @@ -319,35 +319,35 @@ extern API_VAR_EXPORT module **ap_loaded_modules; /* For mod_so.c... */ -void ap_single_module_configure(pool *p, server_rec *s, module *m); +void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m); /* For http_main.c... */ void ap_setup_prelinked_modules(void); void ap_show_directives(void); void ap_show_modules(void); -server_rec *ap_read_config(pool *conf_pool, pool *temp_pool, const char *config_name); -void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s); -void ap_child_init_hook(pool *pchild, server_rec *s); +server_rec *ap_read_config(ap_context_t *conf_pool, ap_context_t *temp_pool, const char *config_name); +void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s); +void ap_child_init_hook(ap_context_t *pchild, server_rec *s); /* For http_request.c... */ -void *ap_create_request_config(pool *p); -CORE_EXPORT(void *) ap_create_per_dir_config(pool *p); -void *ap_merge_per_dir_configs(pool *p, void *base, void *new); +void *ap_create_request_config(ap_context_t *p); +CORE_EXPORT(void *) ap_create_per_dir_config(ap_context_t *p); +void *ap_merge_per_dir_configs(ap_context_t *p, void *base, void *new); /* For http_connection.c... */ -void *ap_create_conn_config(pool *p); +void *ap_create_conn_config(ap_context_t *p); /* For http_core.c... (<Directory> command and virtual hosts) */ int ap_parse_htaccess(void **result, request_rec *r, int override, const char *path, const char *access_name); -CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname, +CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *hostname, server_rec *main_server, server_rec **); -void ap_process_resource_config(server_rec *s, const char *fname, pool *p, pool *ptemp); +void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t *p, ap_context_t *ptemp); /* Module-method dispatchers, also for http_request.c */ @@ -366,12 +366,12 @@ CORE_EXPORT(const char *) ap_handle_command(cmd_parms *parms, void *config, cons /* Hooks */ DECLARE_HOOK(int,header_parser,(request_rec *)) -DECLARE_HOOK(void,pre_config,(pool *pconf,pool *plog,pool *ptemp)) +DECLARE_HOOK(void,pre_config,(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp)) DECLARE_HOOK(void,post_config, - (pool *pconf,pool *plog,pool *ptemp,server_rec *s)) + (ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s)) DECLARE_HOOK(void,open_logs, - (pool *pconf,pool *plog,pool *ptemp,server_rec *s)) -DECLARE_HOOK(void,child_init,(pool *pchild, server_rec *s)) + (ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s)) +DECLARE_HOOK(void,child_init,(ap_context_t *pchild, server_rec *s)) #ifdef __cplusplus } diff --git a/include/http_connection.h b/include/http_connection.h index 7faf1080cb..30be9e9dce 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -64,7 +64,7 @@ extern "C" { #endif -conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout, +conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout, const struct sockaddr_in *remaddr, const struct sockaddr_in *saddr, long id); CORE_EXPORT(void) ap_process_connection(conn_rec *); diff --git a/include/http_core.h b/include/http_core.h index bd895a3728..ef096b84ca 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -62,6 +62,8 @@ extern "C" { #endif +#include "apr_lib.h" + /***************************************************************** * * The most basic server code is encapsulated in a single module @@ -128,7 +130,7 @@ API_EXPORT(const char *) ap_get_remote_logname(request_rec *r); /* Used for constructing self-referencing URLs, and things like SERVER_PORT, * and SERVER_NAME. */ -API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, request_rec *r); +API_EXPORT(char *) ap_construct_url(ap_context_t *p, const char *uri, request_rec *r); API_EXPORT(const char *) ap_get_server_name(request_rec *r); API_EXPORT(unsigned) ap_get_server_port(const request_rec *r); API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r); @@ -150,7 +152,7 @@ typedef struct { API_EXPORT(const char *) ap_auth_type (request_rec *); API_EXPORT(const char *) ap_auth_name (request_rec *); API_EXPORT(int) ap_satisfies (request_rec *r); -API_EXPORT(const array_header *) ap_requires (request_rec *); +API_EXPORT(const ap_array_header_t *) ap_requires (request_rec *); #ifdef WIN32 /* @@ -210,7 +212,7 @@ typedef struct { int satisfy; char *ap_auth_type; char *ap_auth_name; - array_header *ap_requires; + ap_array_header_t *ap_requires; /* Custom response config. These can contain text or a URL to redirect to. * if response_code_strings is NULL then there are none in the config, @@ -251,7 +253,7 @@ typedef struct { int loglevel; /* Access control */ - array_header *sec; + ap_array_header_t *sec; regex_t *r; #ifdef WIN32 @@ -278,12 +280,12 @@ typedef struct { /* Access control */ char *access_name; - array_header *sec; - array_header *sec_url; + ap_array_header_t *sec; + ap_array_header_t *sec_url; } core_server_config; /* for http_config.c */ -void ap_core_reorder_directories(pool *, server_rec *); +void ap_core_reorder_directories(ap_context_t *, server_rec *); /* for mod_perl */ CORE_EXPORT(void) ap_add_per_dir_conf (server_rec *s, void *dir_config); diff --git a/include/http_log.h b/include/http_log.h index 5cd8498425..2044463eff 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -104,7 +104,7 @@ extern "C" { #define APLOG_MARK __FILE__,__LINE__ -void ap_open_logs (server_rec *, pool *p); +void ap_open_logs (server_rec *, ap_context_t *p); /* The two primary logging functions, ap_log_error and ap_log_rerror, * use a printf style format string to build the log message. It is @@ -122,7 +122,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, __attribute__((format(printf,5,6))); API_EXPORT(void) ap_error_log2stderr (server_rec *); -void ap_log_pid (pool *p, const char *fname); +void ap_log_pid (ap_context_t *p, const char *fname); /* These are for legacy code, new code should use ap_log_error, * or ap_log_rerror. */ @@ -135,7 +135,7 @@ API_EXPORT(void) ap_log_reason(const char *reason, const char *fname, request_rec *r); typedef struct piped_log { - pool *p; + ap_context_t *p; #ifndef NO_RELIABLE_PIPED_LOGS char *program; int pid; @@ -145,7 +145,7 @@ typedef struct piped_log { #endif } piped_log; -API_EXPORT(piped_log *) ap_open_piped_log (pool *p, const char *program); +API_EXPORT(piped_log *) ap_open_piped_log (ap_context_t *p, const char *program); API_EXPORT(void) ap_close_piped_log (piped_log *); #ifndef NO_RELIABLE_PIPED_LOGS #define ap_piped_log_read_fd(pl) ((pl)->fds[0]) diff --git a/include/http_main.h b/include/http_main.h index 2b69b1030e..1a4acad3be 100644 --- a/include/http_main.h +++ b/include/http_main.h @@ -67,9 +67,9 @@ extern MODULE_VAR_EXPORT char *ap_server_argv0; extern API_VAR_EXPORT const char *ap_server_root; /* for -C, -c and -D switches */ -extern array_header *ap_server_pre_read_config; -extern array_header *ap_server_post_read_config; -extern array_header *ap_server_config_defines; +extern ap_array_header_t *ap_server_pre_read_config; +extern ap_array_header_t *ap_server_post_read_config; +extern ap_array_header_t *ap_server_config_defines; #ifdef __cplusplus } diff --git a/include/http_request.h b/include/http_request.h index 117f9592f7..bf66f868b2 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -81,7 +81,7 @@ extern "C" { * (e.g., for includes), a module may call for the request to be run * by calling run_sub_req. The space allocated to create sub_reqs can be * reclaimed by calling destroy_sub_req --- be sure to copy anything you care - * about which was allocated in its pool elsewhere before doing this. + * about which was allocated in its ap_context_t elsewhere before doing this. */ API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file, diff --git a/include/http_vhost.h b/include/http_vhost.h index acdb6e2f42..a1a4fcada8 100644 --- a/include/http_vhost.h +++ b/include/http_vhost.h @@ -63,13 +63,13 @@ extern "C" { #endif /* called before any config is read */ -void ap_init_vhost_config(pool *p); +void ap_init_vhost_config(ap_context_t *p); /* called after the config has been read */ -void ap_fini_vhost_config(pool *p, server_rec *main_server); +void ap_fini_vhost_config(ap_context_t *p, server_rec *main_server); /* handle addresses in <VirtualHost> statement */ -const char *ap_parse_vhost_addrs(pool *p, const char *hostname, server_rec *s); +const char *ap_parse_vhost_addrs(ap_context_t *p, const char *hostname, server_rec *s); /* handle NameVirtualHost directive */ const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, char *arg); diff --git a/include/httpd.h b/include/httpd.h index c2af2e7610..2440913691 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -69,7 +69,8 @@ extern "C" { /* Headers in which EVERYONE has an interest... */ #include "ap_config.h" -#include "alloc.h" +#include "apr_general.h" +#include "apr_lib.h" #include "buff.h" #include "ap.h" #include "apr.h" @@ -381,7 +382,7 @@ extern "C" { #define SERVER_BASEVERSION "Apache/2.0-dev" /* SEE COMMENTS ABOVE */ #define SERVER_VERSION SERVER_BASEVERSION -/* TODO: re-implement the server token/version stuff -- it's part of http_core +/* TODO: re ap_context_t mplement the server token/version stuff -- it's part of http_core * it should be possible to do without touching http_main at all. (or else * we haven't got enough module hooks) */ @@ -423,7 +424,7 @@ API_EXPORT(const char *) ap_get_server_built(void); /* The size of the static array in http_protocol.c for storing * all of the potential response status-lines (a sparse table). - * A future version should dynamically generate the table at startup. + * A future version should dynamically generate the ap_table_t at startup. */ #define RESPONSE_CODES 55 @@ -542,7 +543,7 @@ API_EXPORT(const char *) ap_get_server_built(void); #define ASCIITEXT_MAGIC_TYPE_PREFIX "text/x-ascii-" /* Text files whose content-type starts with this are passed thru unconverted */ #endif /*CHARSET_EBCDIC*/ #define MAP_FILE_MAGIC_TYPE "application/x-type-map" -#define ASIS_MAGIC_TYPE "httpd/send-as-is" +#define ASIS_MAGIC_TYPE "httpd/send-as ap_context_t s" #define DIR_MAGIC_TYPE "httpd/unix-directory" #define STATUS_MAGIC_TYPE "application/x-httpd-status" @@ -623,7 +624,7 @@ typedef struct request_rec request_rec; struct request_rec { - ap_pool *pool; + ap_context_t *pool; conn_rec *connection; server_rec *server; @@ -711,15 +712,15 @@ struct request_rec { * latter are printed even on error, and persist across internal redirects * (so the headers printed for ErrorDocument handlers will have them). * - * The 'notes' table is for notes from one module to another, with no + * The 'notes' ap_table_t is for notes from one module to another, with no * other set purpose in mind... */ - table *headers_in; - table *headers_out; - table *err_headers_out; - table *subprocess_env; - table *notes; + ap_table_t *headers_in; + ap_table_t *headers_out; + ap_table_t *err_headers_out; + ap_table_t *subprocess_env; + ap_table_t *notes; /* content_type, handler, content_encoding, content_language, and all * content_languages MUST be lowercased strings. They may be pointers @@ -730,7 +731,7 @@ struct request_rec { const char *content_encoding; const char *content_language; /* for back-compat. only -- do not use */ - array_header *content_languages; /* array of (char*) */ + ap_array_header_t *content_languages; /* array of (char*) */ char *vlist_validator; /* variant list validator (if negotiated) */ @@ -783,7 +784,7 @@ struct request_rec { struct conn_rec { - ap_pool *pool; + ap_context_t *pool; server_rec *base_server; /* Physical vhost this conn come in on */ void *vhost_lookup_data; /* used by http_vhost.c */ @@ -881,8 +882,8 @@ struct server_rec { char *path; /* Pathname for ServerPath */ int pathlen; /* Length of path */ - array_header *names; /* Normal names for ServerAlias servers */ - array_header *wild_names; /* Wildcarded names for ServerAlias servers */ + ap_array_header_t *names; /* Normal names for ServerAlias servers */ + ap_array_header_t *wild_names; /* Wildcarded names for ServerAlias servers */ uid_t server_uid; /* effective user id when calling exec wrapper */ gid_t server_gid; /* effective group id when calling exec wrapper */ @@ -904,68 +905,68 @@ extern API_VAR_EXPORT const char ap_day_snames[7][4]; API_EXPORT(struct tm *) ap_get_gmtoff(int *tz); API_EXPORT(char *) ap_get_time(void); -API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype); -API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt); -API_EXPORT(char *) ap_gm_timestr_822(pool *p, time_t t); +API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype); +API_EXPORT(char *) ap_ht_time(ap_context_t *p, time_t t, const char *fmt, int gmt); +API_EXPORT(char *) ap_gm_timestr_822(ap_context_t *p, time_t t); /* String handling. The *_nc variants allow you to use non-const char **s as arguments (unfortunately C won't automatically convert a char ** to a const char **) */ -API_EXPORT(char *) ap_getword(pool *p, const char **line, char stop); -API_EXPORT(char *) ap_getword_nc(pool *p, char **line, char stop); -API_EXPORT(char *) ap_getword_white(pool *p, const char **line); -API_EXPORT(char *) ap_getword_white_nc(pool *p, char **line); -API_EXPORT(char *) ap_getword_nulls(pool *p, const char **line, char stop); -API_EXPORT(char *) ap_getword_nulls_nc(pool *p, char **line, char stop); -API_EXPORT(char *) ap_getword_conf(pool *p, const char **line); -API_EXPORT(char *) ap_getword_conf_nc(pool *p, char **line); +API_EXPORT(char *) ap_getword(ap_context_t *p, const char **line, char stop); +API_EXPORT(char *) ap_getword_nc(ap_context_t *p, char **line, char stop); +API_EXPORT(char *) ap_getword_white(ap_context_t *p, const char **line); +API_EXPORT(char *) ap_getword_white_nc(ap_context_t *p, char **line); +API_EXPORT(char *) ap_getword_nulls(ap_context_t *p, const char **line, char stop); +API_EXPORT(char *) ap_getword_nulls_nc(ap_context_t *p, char **line, char stop); +API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line); +API_EXPORT(char *) ap_getword_conf_nc(ap_context_t *p, char **line); API_EXPORT(const char *) ap_size_list_item(const char **field, int *len); -API_EXPORT(char *) ap_get_list_item(pool *p, const char **field); -API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok); +API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field); +API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char *tok); -API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_white); -API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok); -API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok); +API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int accept_white); +API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok); +API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char *tok); API_EXPORT(int) ap_is_url(const char *u); API_EXPORT(int) ap_unescape_url(char *url); API_EXPORT(void) ap_no2slash(char *name); API_EXPORT(void) ap_getparents(char *name); -API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *s); -API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial); +API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *s); +API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int partial); #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1) -API_EXPORT(char *) ap_escape_html(pool *p, const char *s); -API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname, +API_EXPORT(char *) ap_escape_html(ap_context_t *p, const char *s); +API_EXPORT(char *) ap_construct_server(ap_context_t *p, const char *hostname, unsigned port, const request_rec *r); -API_EXPORT(char *) ap_escape_shell_cmd(pool *p, const char *s); +API_EXPORT(char *) ap_escape_shell_cmd(ap_context_t *p, const char *s); API_EXPORT(int) ap_count_dirs(const char *path); API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n); -API_EXPORT(char *) ap_make_dirstr_parent(pool *p, const char *s); +API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s); /* deprecated. The previous two routines are preferred. */ -API_EXPORT(char *) ap_make_dirstr(pool *a, const char *s, int n); -API_EXPORT(char *) ap_make_full_path(pool *a, const char *dir, const char *f); +API_EXPORT(char *) ap_make_dirstr(ap_context_t *a, const char *s, int n); +API_EXPORT(char *) ap_make_full_path(ap_context_t *a, const char *dir, const char *f); API_EXPORT(int) ap_is_matchexp(const char *str); API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp); API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp); -API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded); -API_EXPORT(char *) ap_pbase64encode(pool *p, char *string); -API_EXPORT(char *) ap_uudecode(pool *p, const char *bufcoded); -API_EXPORT(char *) ap_uuencode(pool *p, char *string); +API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded); +API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string); +API_EXPORT(char *) ap_uudecode(ap_context_t *p, const char *bufcoded); +API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string); #ifdef OS2 void os2pathname(char *path); -char *ap_double_quotes(pool *p, char *str); +char *ap_double_quotes(ap_context_t *p, char *str); #endif API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size); -API_EXPORT(char *) ap_pregsub(pool *p, const char *input, const char *source, +API_EXPORT(char *) ap_pregsub(ap_context_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[]); API_EXPORT(void) ap_content_type_tolower(char *); @@ -973,7 +974,7 @@ API_EXPORT(void) ap_str_tolower(char *); API_EXPORT(int) ap_ind(const char *, char); /* Sigh... */ API_EXPORT(int) ap_rind(const char *, char); -API_EXPORT(char *) ap_escape_quotes (pool *p, const char *instring); +API_EXPORT(char *) ap_escape_quotes (ap_context_t *p, const char *instring); /* Common structure for reading of config files / passwd files etc. */ typedef struct { @@ -986,10 +987,10 @@ typedef struct { } configfile_t; /* Open a configfile_t as FILE, return open configfile_t struct pointer */ -API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name); +API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char *name); /* Allocate a configfile_t handle with user defined functions and params */ -API_EXPORT(configfile_t *) ap_pcfg_open_custom(pool *p, const char *descr, +API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char *descr, void *param, int(*getc_func)(void*), void *(*gets_func) (void *buf, size_t bufsiz, void *param), @@ -1019,16 +1020,16 @@ API_EXPORT(const server_rec *) ap_get_server_conf(void); #ifndef HAVE_CANONICAL_FILENAME /* - * We can't define these in os.h because of dependence on pool pointer. + * We can't define these in os.h because of dependence on ap_context_t pointer. */ #define ap_os_canonical_filename(p,f) (f) #define ap_os_case_canonical_filename(p,f) (f) #define ap_os_systemcase_filename(p,f) (f) #else -API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file); +API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char *file); #ifdef WIN32 -API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile); -API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile); +API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile); +API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, const char *szFile); #else #define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f) #define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f) @@ -1036,11 +1037,11 @@ API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile); #endif #ifdef _OSD_POSIX -extern const char *os_set_account(pool *p, const char *account); +extern const char *os_set_account(ap_context_t *p, const char *account); extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process); #endif /* _OSD_POSIX */ -char *ap_get_local_host(pool *); +char *ap_get_local_host(ap_context_t *); unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port); extern API_VAR_EXPORT time_t ap_restart_time; @@ -1077,7 +1078,7 @@ APRFile ap_slack(APRFile fd, int line); #define AP_SLACK_HIGH 2 #endif -API_EXPORT(char *) ap_escape_quotes(pool *p, const char *instr); +API_EXPORT(char *) ap_escape_quotes(ap_context_t *p, const char *instr); /* * Redefine assert() to something more useful for an Apache... diff --git a/include/util_md5.h b/include/util_md5.h index 58cfefd680..14e960522a 100644 --- a/include/util_md5.h +++ b/include/util_md5.h @@ -64,13 +64,13 @@ extern "C" { #include "ap_md5.h" -API_EXPORT(char *) ap_md5(pool *a, const unsigned char *string); -API_EXPORT(char *) ap_md5_binary(pool *a, const unsigned char *buf, int len); -API_EXPORT(char *) ap_md5contextTo64(pool *p, AP_MD5_CTX * context); +API_EXPORT(char *) ap_md5(ap_context_t *a, const unsigned char *string); +API_EXPORT(char *) ap_md5_binary(ap_context_t *a, const unsigned char *buf, int len); +API_EXPORT(char *) ap_md5contextTo64(ap_context_t *p, AP_MD5_CTX * context); #ifdef CHARSET_EBCDIC -API_EXPORT(char *) ap_md5digest(pool *p, FILE *infile, int convert); +API_EXPORT(char *) ap_md5digest(ap_context_t *p, FILE *infile, int convert); #else -API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile); +API_EXPORT(char *) ap_md5digest(ap_context_t *p, APRFile infile); #endif /* CHARSET_EBCDIC */ #ifdef __cplusplus diff --git a/include/util_script.h b/include/util_script.h index 416d72942d..5fc64ccd38 100644 --- a/include/util_script.h +++ b/include/util_script.h @@ -70,7 +70,7 @@ extern "C" { #endif #endif -API_EXPORT(char **) ap_create_environment(pool *p, table *t); +API_EXPORT(char **) ap_create_environment(ap_context_t *p, ap_table_t *t); API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info); API_EXPORT(void) ap_add_cgi_vars(request_rec *r); API_EXPORT(void) ap_add_common_vars(request_rec *r); @@ -81,7 +81,7 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, int (*getsfunc) (char *, int, void *), void *getsfunc_data); API_EXPORT(void) ap_send_size(size_t size, request_rec *r); -API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0, char **env, +API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char *argv0, char **env, int shellcmd); #ifdef __cplusplus diff --git a/include/util_uri.h b/include/util_uri.h index d5a67593fc..6210c813cd 100644 --- a/include/util_uri.h +++ b/include/util_uri.h @@ -112,12 +112,12 @@ typedef struct { /* util_uri.c */ API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str); API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r); -API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp); -API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname); -API_EXPORT(char *) ap_unparse_uri_components(pool *p, const uri_components *uptr, +API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hostent *hp); +API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *hostname); +API_EXPORT(char *) ap_unparse_uri_components(ap_context_t *p, const uri_components *uptr, unsigned flags); -API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components *uptr); -API_EXPORT(int) ap_parse_hostinfo_components(pool *p, const char *hostinfo, uri_components *uptr); +API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr); +API_EXPORT(int) ap_parse_hostinfo_components(ap_context_t *p, const char *hostinfo, uri_components *uptr); /* called by the core in main() */ extern void ap_util_uri_init(void); diff --git a/modules/aaa/mod_access.c b/modules/aaa/mod_access.c index 3e372387d1..e1b17f3022 100644 --- a/modules/aaa/mod_access.c +++ b/modules/aaa/mod_access.c @@ -95,13 +95,13 @@ typedef struct { typedef struct { int order[METHODS]; - array_header *allows; - array_header *denys; + ap_array_header_t *allows; + ap_array_header_t *denys; } access_dir_conf; module MODULE_VAR_EXPORT access_module; -static void *create_access_dir_config(pool *p, char *dummy) +static void *create_access_dir_config(ap_context_t *p, char *dummy) { access_dir_conf *conf = (access_dir_conf *) ap_pcalloc(p, sizeof(access_dir_conf)); @@ -291,7 +291,7 @@ static int in_domain(const char *domain, const char *what) return 0; } -static int find_allowdeny(request_rec *r, array_header *a, int method) +static int find_allowdeny(request_rec *r, ap_array_header_t *a, int method) { allowdeny *ap = (allowdeny *) a->elts; int mmask = (1 << method); diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index e8d24a3cfc..163d4a226f 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -63,7 +63,7 @@ * Adapted to Apache by rst. * * dirkx - Added Authoritative control to allow passing on to lower - * modules if and only if the user-id is not known to this + * modules if and only if the user ap_context_t d is not known to this * module. A known user with a faulty or absent password still * causes an AuthRequired. The default is 'Authoritative', i.e. * no control is passed along. @@ -82,7 +82,7 @@ typedef struct auth_config_struct { int auth_authoritative; } auth_config_rec; -static void *create_auth_dir_config(pool *p, char *d) +static void *create_auth_dir_config(ap_context_t *p, char *d) { auth_config_rec *sec = (auth_config_rec *) ap_pcalloc(p, sizeof(auth_config_rec)); @@ -143,11 +143,11 @@ static char *get_pw(request_rec *r, char *user, char *auth_pwfile) return NULL; } -static table *groups_for_user(pool *p, char *user, char *grpfile) +static ap_table_t *groups_for_user(ap_context_t *p, char *user, char *grpfile) { configfile_t *f; - table *grps = ap_make_table(p, 15); - pool *sp; + ap_table_t *grps = ap_make_table(p, 15); + ap_context_t *sp; char l[MAX_STRING_LEN]; const char *group_name, *ll, *w; @@ -157,7 +157,7 @@ static table *groups_for_user(pool *p, char *user, char *grpfile) return NULL; } - sp = ap_make_sub_pool(p); + ap_create_context(p, NULL, &sp); while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) { if ((l[0] == '#') || (!l[0])) @@ -239,8 +239,8 @@ static int check_user_access(request_rec *r) int method_restricted = 0; register int x; const char *t, *w; - table *grpstatus; - const array_header *reqs_arr = ap_requires(r); + ap_table_t *grpstatus; + const ap_array_header_t *reqs_arr = ap_requires(r); require_line *reqs; /* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive, @@ -322,7 +322,7 @@ module MODULE_VAR_EXPORT auth_module = NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - auth_cmds, /* command table */ + auth_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/aaa/mod_auth_anon.c b/modules/aaa/mod_auth_anon.c index 191fd9e541..e03c7e1d1c 100644 --- a/modules/aaa/mod_auth_anon.c +++ b/modules/aaa/mod_auth_anon.c @@ -72,7 +72,7 @@ * * Just add the following tokes to your <directory> setup: * - * Anonymous magic-user-id [magic-user-id]... + * Anonymous magic-user ap_context_t d [magic-user ap_context_t d]... * * Anonymous_MustGiveEmail [ on | off ] default = off * Anonymous_LogEmail [ on | off ] default = on @@ -116,7 +116,7 @@ typedef struct { } anon_auth_config_rec; -static void *create_anon_auth_dir_config(pool *p, char *d) +static void *create_anon_auth_dir_config(ap_context_t *p, char *d) { anon_auth_config_rec *sec = (anon_auth_config_rec *) ap_pcalloc(p, sizeof(anon_auth_config_rec)); @@ -301,7 +301,7 @@ module MODULE_VAR_EXPORT anon_auth_module = NULL, /* dir merger ensure strictness */ NULL, /* server config */ NULL, /* merge server config */ - anon_auth_cmds, /* command table */ + anon_auth_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/aaa/mod_auth_db.c b/modules/aaa/mod_auth_db.c index a33f9df28a..18bf14e7d9 100644 --- a/modules/aaa/mod_auth_db.c +++ b/modules/aaa/mod_auth_db.c @@ -84,7 +84,7 @@ * can also be used when compatibility mode is enabled. * * dirkx - Added Authoritative control to allow passing on to lower - * modules if and only if the user-id is not known to this + * modules if and only if the user ap_context_t d is not known to this * module. A known user with a faulty or absent password still * causes an AuthRequired. The default is 'Authoritative', i.e. * no control is passed along. @@ -108,7 +108,7 @@ typedef struct { int auth_dbauthoritative; } db_auth_config_rec; -static void *create_db_auth_dir_config(pool *p, char *d) +static void *create_db_auth_dir_config(ap_context_t *p, char *d) { db_auth_config_rec *sec = (db_auth_config_rec *) ap_pcalloc(p, sizeof(db_auth_config_rec)); @@ -268,7 +268,7 @@ static int db_check_auth(request_rec *r) char *user = r->user; int m = r->method_number; - const array_header *reqs_arr = ap_requires(r); + const ap_array_header_t *reqs_arr = ap_requires(r); require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL; register int x; @@ -330,7 +330,7 @@ module db_auth_module = NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - db_auth_cmds, /* command table */ + db_auth_cmds, /* command ap_table_t */ NULL, /* handlers */ NULL, /* filename translation */ db_authenticate_basic_user, /* check_user_id */ diff --git a/modules/aaa/mod_auth_dbm.c b/modules/aaa/mod_auth_dbm.c index ed3036efc6..7f31f6b811 100644 --- a/modules/aaa/mod_auth_dbm.c +++ b/modules/aaa/mod_auth_dbm.c @@ -63,7 +63,7 @@ * Adapted to Apache by rst. * * dirkx - Added Authoritative control to allow passing on to lower - * modules if and only if the user-id is not known to this + * modules if and only if the user ap_context_t d is not known to this * module. A known user with a faulty or absent password still * causes an AuthRequired. The default is 'Authoritative', i.e. * no control is passed along. @@ -102,7 +102,7 @@ typedef struct { } dbm_auth_config_rec; -static void *create_dbm_auth_dir_config(pool *p, char *d) +static void *create_dbm_auth_dir_config(ap_context_t *p, char *d) { dbm_auth_config_rec *sec = (dbm_auth_config_rec *) ap_pcalloc(p, sizeof(dbm_auth_config_rec)); @@ -255,7 +255,7 @@ static int dbm_check_auth(request_rec *r) char *user = r->user; int m = r->method_number; - const array_header *reqs_arr = ap_requires(r); + const ap_array_header_t *reqs_arr = ap_requires(r); require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL; register int x; @@ -318,7 +318,7 @@ module dbm_auth_module = NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - dbm_auth_cmds, /* command table */ + dbm_auth_cmds, /* command ap_table_t */ NULL, /* handlers */ NULL, /* filename translation */ dbm_authenticate_basic_user, /* check_user_id */ diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index fa002708ba..1b874a87e8 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -68,7 +68,7 @@ * function as well). * * To load, simply place the ISA in a location in the document tree. - * Then add an "AddHandler isapi-isa dll" into your config file. + * Then add an "AddHandler isapi ap_context_t sa dll" into your config file. * You should now be able to load ISAPI DLLs just be reffering to their * URLs. Make sure the ExecCGI option is active in the directory * the ISA is in. @@ -129,7 +129,7 @@ int isapi_handler (request_rec *r) { BOOL (*isapi_term)(DWORD); /* optional entry point 3 */ isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid)); - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; int retval; /* Use similar restrictions as CGIs */ @@ -296,7 +296,7 @@ int isapi_handler (request_rec *r) { BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName, LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) { request_rec *r = ((isapi_cid *)hConn)->r; - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; const char *result; /* Mostly, we just grab it from the environment, but there are @@ -546,7 +546,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest, } handler_rec isapi_handlers[] = { -{ "isapi-isa", isapi_handler }, +{ "isapi ap_context_t sa", isapi_handler }, { NULL} }; @@ -557,7 +557,7 @@ module isapi_module = { NULL, /* merge per-dir config */ NULL, /* server config */ NULL, /* merge server config */ - NULL, /* command table */ + NULL, /* command ap_table_t */ isapi_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index 0b7ad2d44a..dc4c23fa80 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -9,7 +9,7 @@ typedef struct int bEnabled; } EchoConfig; -static void *create_echo_server_config(pool *p,server_rec *s) +static void *create_echo_server_config(ap_context_t *p,server_rec *s) { EchoConfig *pConfig=ap_pcalloc(p,sizeof *pConfig); @@ -67,7 +67,7 @@ API_VAR_EXPORT module echo_module = { NULL, /* merge per-directory config structures */ create_echo_server_config, /* create per-server config structure */ NULL, /* merge per-server config structures */ - echo_cmds, /* command table */ + echo_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/experimental/mod_example.c b/modules/experimental/mod_example.c index 5252c6212c..2d68d62f70 100644 --- a/modules/experimental/mod_example.c +++ b/modules/experimental/mod_example.c @@ -117,7 +117,7 @@ typedef struct excfg { * the same routine/environment. */ static const char *trace = NULL; -static table *static_calls_made = NULL; +static ap_table_t *static_calls_made = NULL; /* * To avoid leaking memory from pools other than the per-request one, we @@ -125,8 +125,8 @@ static table *static_calls_made = NULL; * freed each time we modify the trace. That way previous layers of trace * data don't get lost. */ -static pool *example_pool = NULL; -static pool *example_subpool = NULL; +static ap_context_t *example_pool = NULL; +static ap_context_t *example_subpool = NULL; /* * Declare ourselves so the configuration routines can find and know us. @@ -297,7 +297,7 @@ static void setup_module_cells() example_pool = ap_make_sub_pool(NULL); }; /* - * Likewise for the table of routine/environment pairs we visit outside of + * Likewise for the ap_table_t of routine/environment pairs we visit outside of * request context. */ if (static_calls_made == NULL) { @@ -314,11 +314,11 @@ static void setup_module_cells() * The list can be displayed by the example_handler() routine. * * If the call occurs within a request context (i.e., we're passed a request - * record), we put the trace into the request pool and attach it to the + * record), we put the trace into the request ap_context_t and attach it to the * request via the notes mechanism. Otherwise, the trace gets added * to the static (non-request-specific) list. * - * Note that the r->notes table is only for storing strings; if you need to + * Note that the r->notes ap_table_t is only for storing strings; if you need to * maintain per-request data of any other type, you need to use another * mechanism. */ @@ -332,7 +332,7 @@ static void trace_add(server_rec *s, request_rec *r, excfg *mconfig, const char *sofar; char *addon; char *where; - pool *p; + ap_context_t *p; const char *trace_copy; /* @@ -384,7 +384,7 @@ static void trace_add(server_rec *s, request_rec *r, excfg *mconfig, where = (where != NULL) ? where : ""; /* * Now, if we're not in request context, see if we've been called with - * this particular combination before. The table is allocated in the + * this particular combination before. The ap_table_t is allocated in the * module's private pool, which doesn't get destroyed. */ if (r == NULL) { @@ -624,9 +624,9 @@ static int example_handler(request_rec *r) */ /* - * All our module-initialiser does is add its trace to the log. + * All our module ap_context_t nitialiser does is add its trace to the log. */ -static void example_init(server_rec *s, pool *p) +static void example_init(server_rec *s, ap_context_t *p) { char *note; @@ -648,16 +648,16 @@ static void example_init(server_rec *s, pool *p) /* * This function is called during server initialisation when an heavy-weight * process (such as a child) is being initialised. As with the - * module-initialisation function, any information that needs to be recorded + * module ap_context_t nitialisation function, any information that needs to be recorded * must be in static cells, since there's no configuration record. * * There is no return value. */ /* - * All our process-initialiser does is add its trace to the log. + * All our process ap_context_t nitialiser does is add its trace to the log. */ -static void example_child_init(server_rec *s, pool *p) +static void example_child_init(server_rec *s, ap_context_t *p) { char *note; @@ -678,7 +678,7 @@ static void example_child_init(server_rec *s, pool *p) /* * This function is called when an heavy-weight process (such as a child) is - * being run down or destroyed. As with the child-initialisation function, + * being run down or destroyed. As with the child ap_context_t nitialisation function, * any information that needs to be recorded must be in static cells, since * there's no configuration record. * @@ -688,7 +688,7 @@ static void example_child_init(server_rec *s, pool *p) /* * All our process-death routine does is add its trace to the log. */ -static void example_child_exit(server_rec *s, pool *p) +static void example_child_exit(server_rec *s, ap_context_t *p) { char *note; @@ -715,14 +715,14 @@ static void example_child_exit(server_rec *s, pool *p) * The return value is a pointer to the created module-specific * structure. */ -static void *example_create_dir_config(pool *p, char *dirspec) +static void *example_create_dir_config(ap_context_t *p, char *dirspec) { excfg *cfg; char *dname = dirspec; /* - * Allocate the space for our record from the pool supplied. + * Allocate the space for our record from the ap_context_t supplied. */ cfg = (excfg *) ap_pcalloc(p, sizeof(excfg)); /* @@ -756,7 +756,7 @@ static void *example_create_dir_config(pool *p, char *dirspec) * The return value is a pointer to the created module-specific structure * containing the merged values. */ -static void *example_merge_dir_config(pool *p, void *parent_conf, +static void *example_merge_dir_config(ap_context_t *p, void *parent_conf, void *newloc_conf) { @@ -801,7 +801,7 @@ static void *example_merge_dir_config(pool *p, void *parent_conf, * The return value is a pointer to the created module-specific * structure. */ -static void *example_create_server_config(pool *p, server_rec *s) +static void *example_create_server_config(ap_context_t *p, server_rec *s) { excfg *cfg; @@ -837,7 +837,7 @@ static void *example_create_server_config(pool *p, server_rec *s) * The return value is a pointer to the created module-specific structure * containing the merged values. */ -static void *example_merge_server_config(pool *p, void *server1_conf, +static void *example_merge_server_config(ap_context_t *p, void *server1_conf, void *server2_conf) { @@ -1122,7 +1122,7 @@ module example_module = example_merge_dir_config, /* dir config merger */ example_create_server_config, /* server config creator */ example_merge_server_config, /* server config merger */ - example_cmds, /* command table */ + example_cmds, /* command ap_table_t */ example_handlers, /* [7] list of handlers */ example_translate_handler, /* [2] filename-to-URI translation */ example_check_user_id, /* [5] check/validate user_id */ diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index b4fc443008..754c43858e 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -122,7 +122,7 @@ static void add_include_vars(request_rec *r, char *timefmt) #ifndef WIN32 struct passwd *pw; #endif /* ndef WIN32 */ - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; char *t; time_t date = r->request_time; @@ -357,7 +357,7 @@ otilde\365oslash\370ugrave\371uacute\372yacute\375" /* 6 */ * the tag value is html decoded if dodecode is non-zero */ -static char *get_tag(pool *p, FILE *in, char *tag, int tagbuf_len, int dodecode) +static char *get_tag(ap_context_t *p, FILE *in, char *tag, int tagbuf_len, int dodecode) { char *t = tag, *tag_val, c, term; @@ -443,7 +443,7 @@ static char *get_tag(pool *p, FILE *in, char *tag, int tagbuf_len, int dodecode) return ap_pstrdup(p, tag_val); } -static int get_directive(FILE *in, char *dest, size_t len, pool *p) +static int get_directive(FILE *in, char *dest, size_t len, ap_context_t *p) { char *d = dest; char c; @@ -775,7 +775,7 @@ static int include_cmd_child(void *arg, child_info *pinfo) { request_rec *r = ((include_cmd_arg *) arg)->r; char *s = ((include_cmd_arg *) arg)->s; - table *env = r->subprocess_env; + ap_table_t *env = r->subprocess_env; int child_pid = 0; #ifdef DEBUG_INCLUDE_CMD #ifdef OS2 @@ -995,7 +995,7 @@ static int handle_config(FILE *in, request_rec *r, char *error, char *tf, char tag[MAX_STRING_LEN]; char *tag_val; char parsed_string[MAX_STRING_LEN]; - table *env = r->subprocess_env; + ap_table_t *env = r->subprocess_env; while (1) { if (!(tag_val = get_tag(r->pool, in, tag, sizeof(tag), 0))) { @@ -1367,7 +1367,7 @@ static int parse_expr(request_rec *r, const char *expr, const char *error) } *root, *current, *new; const char *parse; char buffer[MAX_STRING_LEN]; - pool *expr_pool; + ap_context_t *expr_pool; int retval = 0; if ((parse = expr) == (char *) NULL) { @@ -2107,7 +2107,7 @@ static int handle_printenv(FILE *in, request_rec *r, const char *error) { char tag[MAX_STRING_LEN]; char *tag_val; - array_header *arr = ap_table_elts(r->subprocess_env); + ap_array_header_t *arr = ap_table_elts(r->subprocess_env); table_entry *elts = (table_entry *) arr->elts; int i; @@ -2290,7 +2290,7 @@ enum xbithack { #define DEFAULT_XBITHACK xbithack_off #endif -static void *create_includes_dir_config(pool *p, char *dummy) +static void *create_includes_dir_config(ap_context_t *p, char *dummy) { enum xbithack *result = (enum xbithack *) ap_palloc(p, sizeof(enum xbithack)); *result = DEFAULT_XBITHACK; @@ -2462,7 +2462,7 @@ module MODULE_VAR_EXPORT includes_module = NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - includes_cmds, /* command table */ + includes_cmds, /* command ap_table_t */ includes_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c index 98a40543f3..bd23d1720d 100644 --- a/modules/generators/mod_asis.c +++ b/modules/generators/mod_asis.c @@ -119,7 +119,7 @@ static int asis_handler(request_rec *r) static const handler_rec asis_handlers[] = { {ASIS_MAGIC_TYPE, asis_handler}, - {"send-as-is", asis_handler}, + {"send-as ap_context_t s", asis_handler}, {NULL} }; @@ -130,7 +130,7 @@ module MODULE_VAR_EXPORT asis_module = NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - NULL, /* command table */ + NULL, /* command ap_table_t */ asis_handlers, /* handlers */ NULL /* register hooks */ }; diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index af25717972..a874079c31 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -151,12 +151,12 @@ typedef struct autoindex_config_struct { int icon_height; char *default_order; - array_header *icon_list; - array_header *alt_list; - array_header *desc_list; - array_header *ign_list; - array_header *hdr_list; - array_header *rdme_list; + ap_array_header_t *icon_list; + ap_array_header_t *alt_list; + ap_array_header_t *desc_list; + ap_array_header_t *ign_list; + ap_array_header_t *hdr_list; + ap_array_header_t *rdme_list; } autoindex_config_rec; @@ -197,7 +197,7 @@ static void emit_preamble(request_rec *r, char *title) "</TITLE>\n </HEAD>\n <BODY>\n", NULL); } -static void push_item(array_header *arr, char *type, char *to, char *path, +static void push_item(ap_array_header_t *arr, char *type, char *to, char *path, char *data) { struct item *p = (struct item *) ap_push_array(arr); @@ -210,14 +210,14 @@ static void push_item(array_header *arr, char *type, char *to, char *path, } p->type = type; - p->data = data ? ap_pstrdup(arr->pool, data) : NULL; - p->apply_path = ap_pstrcat(arr->pool, path, "*", NULL); + p->data = data ? ap_pstrdup(arr->cont, data) : NULL; + p->apply_path = ap_pstrcat(arr->cont, path, "*", NULL); if ((type == BY_PATH) && (!ap_is_matchexp(to))) { - p->apply_to = ap_pstrcat(arr->pool, "*", to, NULL); + p->apply_to = ap_pstrcat(arr->cont, "*", to, NULL); } else if (to) { - p->apply_to = ap_pstrdup(arr->pool, to); + p->apply_to = ap_pstrdup(arr->cont, to); } else { p->apply_to = NULL; @@ -304,13 +304,13 @@ static const char *add_desc(cmd_parms *cmd, void *d, char *desc, char *to) || ap_is_fnmatch(to)); if (desc_entry->wildcards) { prefix = desc_entry->full_path ? "*/" : "*"; - desc_entry->pattern = ap_pstrcat(dcfg->desc_list->pool, + desc_entry->pattern = ap_pstrcat(dcfg->desc_list->cont, prefix, to, "*", NULL); } else { - desc_entry->pattern = ap_pstrdup(dcfg->desc_list->pool, to); + desc_entry->pattern = ap_pstrdup(dcfg->desc_list->cont, to); } - desc_entry->description = ap_pstrdup(dcfg->desc_list->pool, desc); + desc_entry->description = ap_pstrdup(dcfg->desc_list->cont, desc); return NULL; } @@ -563,7 +563,7 @@ static const command_rec autoindex_cmds[] = {NULL} }; -static void *create_autoindex_config(pool *p, char *dummy) +static void *create_autoindex_config(ap_context_t *p, char *dummy) { autoindex_config_rec *new = (autoindex_config_rec *) ap_pcalloc(p, sizeof(autoindex_config_rec)); @@ -586,7 +586,7 @@ static void *create_autoindex_config(pool *p, char *dummy) return (void *) new; } -static void *merge_autoindex_configs(pool *p, void *basev, void *addv) +static void *merge_autoindex_configs(ap_context_t *p, void *basev, void *addv) { autoindex_config_rec *new; autoindex_config_rec *base = (autoindex_config_rec *) basev; @@ -615,7 +615,7 @@ static void *merge_autoindex_configs(pool *p, void *basev, void *addv) } else { /* - * If there were any non-incremental options selected for + * If there were any non ap_context_t ncremental options selected for * this directory, they dominate and we don't inherit *anything.* * Contrariwise, we *do* inherit if the only settings here are * incremental ones. @@ -634,7 +634,7 @@ static void *merge_autoindex_configs(pool *p, void *basev, void *addv) } else { /* - * There are local non-incremental settings, which clear + * There are local non ap_context_t ncremental settings, which clear * all inheritance from above. They *are* the new base settings. */ new->opts = add->opts;; @@ -684,7 +684,7 @@ struct ent { char key; }; -static char *find_item(request_rec *r, array_header *list, int path_only) +static char *find_item(request_rec *r, ap_array_header_t *list, int path_only) { const char *content_type = r->content_type; const char *content_encoding = r->content_encoding; @@ -809,7 +809,7 @@ static char *find_desc(autoindex_config_rec *dcfg, request_rec *r) static int ignore_entry(autoindex_config_rec *d, char *path) { - array_header *list = d->ign_list; + ap_array_header_t *list = d->ign_list; struct item *items = (struct item *) list->elts; char *tt; int i; @@ -1269,11 +1269,12 @@ static void output_directories(struct ent **ar, int n, char *name = r->uri; char *tp; int static_columns = (autoindex_opts & SUPPRESS_COLSORT); - pool *scratch = ap_make_sub_pool(r->pool); + ap_context_t *scratch; int name_width; char *name_scratch; char *pad_scratch; + ap_create_context(r->pool, NULL, &scratch); if (name[0] == '\0') { name = "/"; } @@ -1654,7 +1655,7 @@ module MODULE_VAR_EXPORT autoindex_module = merge_autoindex_configs, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - autoindex_cmds, /* command table */ + autoindex_cmds, /* command ap_table_t */ autoindex_handlers, /* handlers */ NULL /* register hooks */ }; diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index d0998b9c40..0bc4c3b933 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -103,7 +103,7 @@ typedef struct { int bufbytes; } cgi_server_conf; -static void *create_cgi_config(pool *p, server_rec *s) +static void *create_cgi_config(ap_context_t *p, server_rec *s) { cgi_server_conf *c = (cgi_server_conf *) ap_pcalloc(p, sizeof(cgi_server_conf)); @@ -115,7 +115,7 @@ static void *create_cgi_config(pool *p, server_rec *s) return c; } -static void *merge_cgi_config(pool *p, void *basev, void *overridesv) +static void *merge_cgi_config(ap_context_t *p, void *basev, void *overridesv) { cgi_server_conf *base = (cgi_server_conf *) basev, *overrides = (cgi_server_conf *) overridesv; @@ -195,7 +195,7 @@ static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret, static int log_script(request_rec *r, cgi_server_conf * conf, int ret, char *dbuf, const char *sbuf, BUFF *script_in, BUFF *script_err) { - array_header *hdrs_arr = ap_table_elts(r->headers_in); + ap_array_header_t *hdrs_arr = ap_table_elts(r->headers_in); table_entry *hdrs = (table_entry *) hdrs_arr->elts; char argsbuffer[HUGE_STRING_LEN]; FILE *f; @@ -581,7 +581,7 @@ module MODULE_VAR_EXPORT cgi_module = NULL, /* dir merger --- default is to override */ create_cgi_config, /* server config */ merge_cgi_config, /* merge server config */ - cgi_cmds, /* command table */ + cgi_cmds, /* command ap_table_t */ cgi_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c index b6fa3c775a..f683af1ca8 100644 --- a/modules/generators/mod_info.c +++ b/modules/generators/mod_info.c @@ -59,14 +59,14 @@ * Info Module. Display configuration information for the server and * all included modules. * - * <Location /server-info> - * SetHandler server-info + * <Location /server ap_context_t nfo> + * SetHandler server ap_context_t nfo * </Location> * - * GET /server-info - Returns full configuration page for server and all modules - * GET /server-info?server - Returns server configuration only - * GET /server-info?module_name - Returns configuration for a single module - * GET /server-info?list - Returns quick list of included modules + * GET /server ap_context_t nfo - Returns full configuration page for server and all modules + * GET /server ap_context_t nfo?server - Returns server configuration only + * GET /server ap_context_t nfo?module_name - Returns configuration for a single module + * GET /server ap_context_t nfo?list - Returns quick list of included modules * * Rasmus Lerdorf <rasmus@vex.net>, May 1996 * @@ -93,7 +93,7 @@ typedef struct { } info_entry; typedef struct { - array_header *more_info; + ap_array_header_t *more_info; } info_svr_conf; typedef struct info_cfg_lines { @@ -105,7 +105,7 @@ typedef struct info_cfg_lines { module MODULE_VAR_EXPORT info_module; extern module *top_module; -static void *create_info_config(pool *p, server_rec *s) +static void *create_info_config(ap_context_t *p, server_rec *s) { info_svr_conf *conf = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf)); @@ -113,7 +113,7 @@ static void *create_info_config(pool *p, server_rec *s) return conf; } -static void *merge_info_config(pool *p, void *basev, void *overridesv) +static void *merge_info_config(ap_context_t *p, void *basev, void *overridesv) { info_svr_conf *new = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf)); info_svr_conf *base = (info_svr_conf *) basev; @@ -161,7 +161,7 @@ static char *mod_info_html_cmd_string(const char *string, char *buf, size_t buf_ return (buf); } -static info_cfg_lines *mod_info_load_config(pool *p, const char *filename, +static info_cfg_lines *mod_info_load_config(ap_context_t *p, const char *filename, request_rec *r) { char s[MAX_STRING_LEN]; @@ -660,7 +660,7 @@ static const command_rec info_cmds[] = static const handler_rec info_handlers[] = { - {"server-info", display_info}, + {"server ap_context_t nfo", display_info}, {NULL} }; @@ -672,7 +672,7 @@ module MODULE_VAR_EXPORT info_module = NULL, /* dir merger --- default is to override */ create_info_config, /* server config */ merge_info_config, /* merge server config */ - info_cmds, /* command table */ + info_cmds, /* command ap_table_t */ info_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 53d7770913..226db988e7 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -70,7 +70,7 @@ * http://your_server_name/server-status * * /server-status - Returns page using tables - * /server-status?notable - Returns page for browsers without table support + * /server-status?notable - Returns page for browsers without ap_table_t support * /server-status?refresh - Returns page with 1 second refresh * /server-status?refresh=6 - Returns page with refresh every 6 seconds * /server-status?auto - Returns page with data for automatic parsing @@ -202,7 +202,7 @@ static void show_time(request_rec *r, time_t tsecs) /* Main handler for x-httpd-status requests */ -/* ID values for command table */ +/* ID values for command ap_table_t */ #define STAT_OPT_END -1 #define STAT_OPT_REFRESH 0 @@ -750,7 +750,7 @@ static int status_handler(request_rec *r) } -static void status_init(server_rec *s, pool *p) +static void status_init(server_rec *s, ap_context_t *p) { int i; for (i = 0; i < SERVER_NUM_STATUS; i++) @@ -784,7 +784,7 @@ module MODULE_VAR_EXPORT status_module = NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - status_module_cmds, /* command table */ + status_module_cmds, /* command ap_table_t */ status_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 330bacf562..96b437e8de 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -56,6 +56,7 @@ */ #define CORE_PRIVATE +#include "apr_lib.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" @@ -106,7 +107,7 @@ * the http_conf_globals. */ -static void *create_core_dir_config(pool *a, char *dir) +static void *create_core_dir_config(ap_context_t *a, char *dir) { core_dir_config *conf; @@ -146,7 +147,7 @@ static void *create_core_dir_config(pool *a, char *dir) return (void *)conf; } -static void *merge_core_dir_configs(pool *a, void *basev, void *newv) +static void *merge_core_dir_configs(ap_context_t *a, void *basev, void *newv) { core_dir_config *base = (core_dir_config *)basev; core_dir_config *new = (core_dir_config *)newv; @@ -257,7 +258,7 @@ static void *merge_core_dir_configs(pool *a, void *basev, void *newv) return (void*)conf; } -static void *create_core_server_config(pool *a, server_rec *s) +static void *create_core_server_config(ap_context_t *a, server_rec *s) { core_server_config *conf; int is_virtual = s->is_virtual; @@ -274,7 +275,7 @@ static void *create_core_server_config(pool *a, server_rec *s) return (void *)conf; } -static void *merge_core_server_configs(pool *p, void *basev, void *virtv) +static void *merge_core_server_configs(ap_context_t *p, void *basev, void *virtv) { core_server_config *base = (core_server_config *)basev; core_server_config *virt = (core_server_config *)virtv; @@ -382,15 +383,15 @@ static int reorder_sorter(const void *va, const void *vb) return a->orig_index - b->orig_index; } -void ap_core_reorder_directories(pool *p, server_rec *s) +void ap_core_reorder_directories(ap_context_t *p, server_rec *s) { core_server_config *sconf; - array_header *sec; + ap_array_header_t *sec; struct reorder_sort_rec *sortbin; int nelts; void **elts; int i; - pool *tmp; + ap_context_t *tmp; sconf = ap_get_module_config(s->module_config, &core_module); sec = sconf->sec; @@ -398,7 +399,7 @@ void ap_core_reorder_directories(pool *p, server_rec *s) elts = (void **)sec->elts; /* we have to allocate tmp space to do a stable sort */ - tmp = ap_make_sub_pool(p); + ap_create_context(p, NULL, &tmp); sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin)); for (i = 0; i < nelts; ++i) { sortbin[i].orig_index = i; @@ -478,7 +479,7 @@ API_EXPORT(const char *) ap_document_root(request_rec *r) /* Don't use this! */ return conf->ap_document_root; } -API_EXPORT(const array_header *) ap_requires(request_rec *r) +API_EXPORT(const ap_array_header_t *) ap_requires(request_rec *r) { core_dir_config *conf; @@ -700,7 +701,7 @@ API_EXPORT(unsigned) ap_get_server_port(const request_rec *r) return port; } -API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, +API_EXPORT(char *) ap_construct_url(ap_context_t *p, const char *uri, request_rec *r) { unsigned port = ap_get_server_port(r); @@ -721,7 +722,7 @@ API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r) } #ifdef WIN32 -static char* get_interpreter_from_win32_registry(pool *p, const char* ext) +static char* get_interpreter_from_win32_registry(ap_context_t *p, const char* ext) { char extension_path[] = "SOFTWARE\\Classes\\"; char executable_path[] = "\\SHELL\\OPEN\\COMMAND"; @@ -739,7 +740,7 @@ static char* get_interpreter_from_win32_registry(pool *p, const char* ext) /* * Future optimization: * When the registry is successfully searched, store the interpreter - * string in a table to make subsequent look-ups faster + * string in a ap_table_t to make subsequent look-ups faster */ /* Open the key associated with the script extension */ @@ -1677,7 +1678,7 @@ static const char *virtualhost_section(cmd_parms *cmd, void *dummy, char *arg) server_rec *main_server = cmd->server, *s; const char *errmsg; char *endp = strrchr(arg, '>'); - pool *p = cmd->pool, *ptemp = cmd->temp_pool; + ap_context_t *p = cmd->pool, *ptemp = cmd->temp_pool; const char *old_end_token; const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); @@ -2109,7 +2110,7 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy, char *arg) return err; } - /* TODO: re-implement the server token stuff. */ + /* TODO: re ap_context_t mplement the server token stuff. */ #if 0 if (!strcasecmp(arg, "OS")) { ap_server_tokens = SrvTk_OS; @@ -2447,7 +2448,7 @@ struct mmap_rec { size_t length; }; -static void mmap_cleanup(void *mmv) +static ap_status_t mmap_cleanup(void *mmv) { struct mmap_rec *mmd = mmv; @@ -2456,6 +2457,7 @@ static void mmap_cleanup(void *mmv) "Failed to munmap memory of length %ld at 0x%lx", (long) mmd->length, (long) mmd->mm); } + return APR_SUCCESS; } #endif @@ -2644,7 +2646,7 @@ static const handler_rec core_handlers[] = { { NULL, NULL } }; -static void core_open_logs(pool *pconf, pool *plog, pool *ptemp, server_rec *s) +static void core_open_logs(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s) { ap_open_logs(s, pconf); } @@ -2674,7 +2676,7 @@ API_VAR_EXPORT module core_module = { merge_core_dir_configs, /* merge per-directory config structures */ create_core_server_config, /* create per-server config structure */ merge_core_server_configs, /* merge per-server config structures */ - core_cmds, /* command table */ + core_cmds, /* command ap_table_t */ core_handlers, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 43cefb8dbc..d2036a0c16 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -793,7 +793,7 @@ static int read_request_line(request_rec *r) * read(). B_SAFEREAD ensures that the BUFF layer flushes if it will * have to block during a read. */ - /* TODO: re-implement SAFEREAD external to BUFF using a layer */ + /* TODO: re ap_context_t mplement SAFEREAD external to BUFF using a layer */ /* //ap_bsetflag(conn->client, B_SAFEREAD, 1); */ ap_bflush(conn->client); while ((len = getline(l, sizeof(l), conn->client, 0)) <= 0) { @@ -866,7 +866,7 @@ static void get_mime_headers(request_rec *r) char *copy; int len; unsigned int fields_read = 0; - table *tmp_headers; + ap_table_t *tmp_headers; /* We'll use ap_overlap_tables later to merge these into r->headers_in. */ tmp_headers = ap_make_table(r->pool, 50); @@ -921,11 +921,11 @@ static void get_mime_headers(request_rec *r) request_rec *ap_read_request(conn_rec *conn) { request_rec *r; - pool *p; + ap_context_t *p; const char *expect; int access_status; - p = ap_make_sub_pool(conn->pool); + ap_create_context(conn->pool, NULL, &p); r = ap_pcalloc(p, sizeof(request_rec)); r->pool = p; r->connection = conn; @@ -1469,15 +1469,15 @@ static int use_range_x(request_rec *r) */ static int uniq_field_values(void *d, const char *key, const char *val) { - array_header *values; + ap_array_header_t *values; char *start; char *e; char **strpp; int i; - values = (array_header *)d; + values = (ap_array_header_t *)d; - e = ap_pstrdup(values->pool, val); + e = ap_pstrdup(values->cont, val); do { /* Find a non-empty fieldname */ @@ -1520,7 +1520,7 @@ static int uniq_field_values(void *d, const char *key, const char *val) */ static void fixup_vary(request_rec *r) { - array_header *varies; + ap_array_header_t *varies; varies = ap_make_array(r->pool, 5, sizeof(char *)); @@ -1531,7 +1531,7 @@ static void fixup_vary(request_rec *r) ap_table_do((int (*)(void *, const char *, const char *))uniq_field_values, (void *) varies, r->headers_out, "Vary", NULL); - /* If we found any, replace old Vary fields with unique-ified value */ + /* If we found any, replace old Vary fields with unique ap_context_t fied value */ if (varies->nelts > 0) { ap_table_setn(r->headers_out, "Vary", @@ -1619,7 +1619,7 @@ API_EXPORT(void) ap_send_http_header(request_rec *r) ap_table_addn(r->headers_out, "Expires", ap_gm_timestr_822(r->pool, r->request_time)); - /* Send the entire table of header fields, terminated by an empty line. */ + /* Send the entire ap_table_t of header fields, terminated by an empty line. */ ap_table_do((int (*) (void *, const char *, const char *)) ap_send_header_field, (void *) r, r->headers_out, NULL); @@ -2051,7 +2051,7 @@ API_EXPORT(long) ap_send_fd_length(APRFile fd, request_rec *r, long length) } -/* TODO: re-implement ap_send_fb */ +/* TODO: re ap_context_t mplement ap_send_fb */ #if 0 /* * Send the body of a response to the client. @@ -2441,7 +2441,7 @@ void ap_send_error_response(request_rec *r, int recursive_error) } if (!r->assbackwards) { - table *tmp = r->headers_out; + ap_table_t *tmp = r->headers_out; /* For all HTTP/1.x responses for which we generate the message, * we need to avoid inheriting the "normal status" header fields diff --git a/modules/http/http_request.c b/modules/http/http_request.c index f018f876b7..8e8b455225 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -737,9 +737,11 @@ static int file_walk(request_rec *r) static request_rec *make_sub_request(const request_rec *r) { - pool *rrp = ap_make_sub_pool(r->pool); - request_rec *rr = ap_pcalloc(rrp, sizeof(request_rec)); - + ap_context_t *rrp; + request_rec *rr; + + ap_create_context(r->pool, NULL, &rrp); + rr = ap_pcalloc(rrp, sizeof(request_rec)); rr->pool = rrp; return rr; } @@ -1094,7 +1096,7 @@ API_EXPORT(int) ap_some_auth_required(request_rec *r) { /* Is there a require line configured for the type of *this* req? */ - const array_header *reqs_arr = ap_requires(r); + const ap_array_header_t *reqs_arr = ap_requires(r); require_line *reqs; int i; @@ -1258,16 +1260,16 @@ void ap_process_request(request_rec *r) * this packet, then it'll appear like the link is stalled when really * it's the application that's stalled. */ - /* TODO: re-implement ap_bhalfduplex... not sure how yet */ + /* TODO: re ap_context_t mplement ap_bhalfduplex... not sure how yet */ /* //ap_bhalfduplex(r->connection->client); */ ap_run_log_transaction(r); } -static table *rename_original_env(pool *p, table *t) +static ap_table_t *rename_original_env(ap_context_t *p, ap_table_t *t) { - array_header *env_arr = ap_table_elts(t); - table_entry *elts = (table_entry *) env_arr->elts; - table *new = ap_make_table(p, env_arr->nalloc); + ap_array_header_t *env_arr = ap_table_elts(t); + ap_table_entry_t *elts = (ap_table_entry_t *) env_arr->elts; + ap_table_t *new = ap_make_table(p, env_arr->nalloc); int i; for (i = 0; i < env_arr->nelts; ++i) { diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 2311dbafbd..19ac20703a 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -74,11 +74,11 @@ typedef struct handlers_info { } handlers_info; typedef struct { - table *forced_types; /* Additional AddTyped stuff */ - table *encoding_types; /* Added with AddEncoding... */ - table *language_types; /* Added with AddLanguage... */ - table *handlers; /* Added with AddHandler... */ - array_header *handlers_remove; /* List of handlers to remove */ + ap_table_t *forced_types; /* Additional AddTyped stuff */ + ap_table_t *encoding_types; /* Added with AddEncoding... */ + ap_table_t *language_types; /* Added with AddLanguage... */ + ap_table_t *handlers; /* Added with AddHandler... */ + ap_array_header_t *handlers_remove; /* List of handlers to remove */ char *type; /* Type forced with ForceType */ char *handler; /* Handler forced with SetHandler */ @@ -87,7 +87,7 @@ typedef struct { module MODULE_VAR_EXPORT mime_module; -static void *create_mime_dir_config(pool *p, char *dummy) +static void *create_mime_dir_config(ap_context_t *p, char *dummy) { mime_dir_config *new = (mime_dir_config *) ap_palloc(p, sizeof(mime_dir_config)); @@ -105,7 +105,7 @@ static void *create_mime_dir_config(pool *p, char *dummy) return new; } -static void *merge_mime_dir_configs(pool *p, void *basev, void *addv) +static void *merge_mime_dir_configs(ap_context_t *p, void *basev, void *addv) { mime_dir_config *base = (mime_dir_config *) basev; mime_dir_config *add = (mime_dir_config *) addv; @@ -230,16 +230,16 @@ static const command_rec mime_cmds[] = {NULL} }; -/* Hash table --- only one of these per daemon; virtual hosts can +/* Hash ap_table_t --- only one of these per daemon; virtual hosts can * get private versions through AddType... */ #define MIME_HASHSIZE (32) #define hash(i) (ap_tolower(i) % MIME_HASHSIZE) -static table *hash_buckets[MIME_HASHSIZE]; +static ap_table_t *hash_buckets[MIME_HASHSIZE]; -static void mime_post_config(pool *p, pool *plog, pool *ptemp, server_rec *s) +static void mime_post_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *s) { configfile_t *f; char l[MAX_STRING_LEN]; @@ -391,7 +391,7 @@ module MODULE_VAR_EXPORT mime_module = { merge_mime_dir_configs, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - mime_cmds, /* command table */ + mime_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 9a00f01de4..2f1acb0a94 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -218,10 +218,10 @@ static mode_t xfer_mode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); typedef struct { char *default_format_string; - array_header *default_format; - array_header *config_logs; - array_header *server_config_logs; - table *formats; + ap_array_header_t *default_format; + ap_array_header_t *config_logs; + ap_array_header_t *server_config_logs; + ap_table_t *formats; } multi_log_state; /* @@ -236,7 +236,7 @@ typedef struct { typedef struct { char *fname; char *format_string; - array_header *format; + ap_array_header_t *format; int log_fd; char *condition_var; #ifdef BUFFERED_LOGS @@ -257,15 +257,15 @@ typedef struct { char *arg; int condition_sense; int want_orig; - array_header *conditions; + ap_array_header_t *conditions; } log_format_item; -static char *format_integer(pool *p, int i) +static char *format_integer(ap_context_t *p, int i) { return ap_psprintf(p, "%d", i); } -static char *pfmt(pool *p, int i) +static char *pfmt(ap_context_t *p, int i) { if (i <= 0) { return "-"; @@ -524,7 +524,7 @@ static struct log_item_list *find_log_func(char k) return NULL; } -static char *parse_log_misc_string(pool *p, log_format_item *it, +static char *parse_log_misc_string(ap_context_t *p, log_format_item *it, const char **sa) { const char *s; @@ -582,7 +582,7 @@ static char *parse_log_misc_string(pool *p, log_format_item *it, return NULL; } -static char *parse_log_item(pool *p, log_format_item *it, const char **sa) +static char *parse_log_item(ap_context_t *p, log_format_item *it, const char **sa) { const char *s = *sa; @@ -667,9 +667,9 @@ static char *parse_log_item(pool *p, log_format_item *it, const char **sa) return "Ran off end of LogFormat parsing args to some directive"; } -static array_header *parse_log_string(pool *p, const char *s, const char **err) +static ap_array_header_t *parse_log_string(ap_context_t *p, const char *s, const char **err) { - array_header *a = ap_make_array(p, 30, sizeof(log_format_item)); + ap_array_header_t *a = ap_make_array(p, 30, sizeof(log_format_item)); char *res; while (*s) { @@ -731,7 +731,7 @@ static void flush_log(config_log_state *cls) #endif static int config_log_transaction(request_rec *r, config_log_state *cls, - array_header *default_format) + ap_array_header_t *default_format) { log_format_item *items; char *str, *s; @@ -740,7 +740,7 @@ static int config_log_transaction(request_rec *r, config_log_state *cls, request_rec *orig; int i; int len = 0; - array_header *format; + ap_array_header_t *format; char *envar; if (cls->fname == NULL) { @@ -855,7 +855,7 @@ static int multi_log_transaction(request_rec *r) * Module glue... */ -static void *make_config_log_state(pool *p, server_rec *s) +static void *make_config_log_state(ap_context_t *p, server_rec *s) { multi_log_state *mls; @@ -876,7 +876,7 @@ static void *make_config_log_state(pool *p, server_rec *s) * vhosts inherit any globally-defined format names. */ -static void *merge_config_log_state(pool *p, void *basev, void *addv) +static void *merge_config_log_state(ap_context_t *p, void *basev, void *addv) { multi_log_state *base = (multi_log_state *) basev; multi_log_state *add = (multi_log_state *) addv; @@ -978,9 +978,9 @@ static const command_rec config_log_cmds[] = {NULL} }; -static config_log_state *open_config_log(server_rec *s, pool *p, +static config_log_state *open_config_log(server_rec *s, ap_context_t *p, config_log_state *cls, - array_header *default_format) + ap_array_header_t *default_format) { if (cls->log_fd > 0) { return cls; /* virtual config shared w/main server */ @@ -1014,7 +1014,7 @@ static config_log_state *open_config_log(server_rec *s, pool *p, return cls; } -static config_log_state *open_multi_logs(server_rec *s, pool *p) +static config_log_state *open_multi_logs(server_rec *s, ap_context_t *p) { int i; multi_log_state *mls = ap_get_module_config(s->module_config, @@ -1068,7 +1068,7 @@ static config_log_state *open_multi_logs(server_rec *s, pool *p) return NULL; } -static void init_config_log(pool *pc, pool *p, pool *pt, server_rec *s) +static void init_config_log(ap_context_t *pc, ap_context_t *p, ap_context_t *pt, server_rec *s) { /* First, do "physical" server, which gets default log fd and format * for the virtual servers, if they don't override... @@ -1091,7 +1091,7 @@ static void init_config_log(pool *pc, pool *p, pool *pt, server_rec *s) static void flush_all_logs(server_rec *s) { multi_log_state *mls; - array_header *log_list; + ap_array_header_t *log_list; config_log_state *clsarray; int i; @@ -1127,7 +1127,7 @@ module MODULE_VAR_EXPORT config_log_module = NULL, /* merge per-dir config */ make_config_log_state, /* server config */ merge_config_log_state, /* merge server config */ - config_log_cmds, /* command table */ + config_log_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c index f2f2dc8b13..c3b2dfbe0b 100644 --- a/modules/mappers/mod_actions.c +++ b/modules/mappers/mod_actions.c @@ -87,13 +87,13 @@ #include "util_script.h" typedef struct { - table *action_types; /* Added with Action... */ + ap_table_t *action_types; /* Added with Action... */ char *scripted[METHODS]; /* Added with Script... */ } action_dir_config; module action_module; -static void *create_action_dir_config(pool *p, char *dummy) +static void *create_action_dir_config(ap_context_t *p, char *dummy) { action_dir_config *new = (action_dir_config *) ap_palloc(p, sizeof(action_dir_config)); @@ -104,7 +104,7 @@ static void *create_action_dir_config(pool *p, char *dummy) return new; } -static void *merge_action_dir_configs(pool *p, void *basev, void *addv) +static void *merge_action_dir_configs(ap_context_t *p, void *basev, void *addv) { action_dir_config *base = (action_dir_config *) basev; action_dir_config *add = (action_dir_config *) addv; @@ -215,7 +215,7 @@ module action_module = merge_action_dir_configs, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - action_cmds, /* command table */ + action_cmds, /* command ap_table_t */ action_handlers, /* handlers */ NULL /* register hooks */ }; diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index d6d5d0ac7c..825f5cc0ce 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -76,17 +76,17 @@ typedef struct { } alias_entry; typedef struct { - array_header *aliases; - array_header *redirects; + ap_array_header_t *aliases; + ap_array_header_t *redirects; } alias_server_conf; typedef struct { - array_header *redirects; + ap_array_header_t *redirects; } alias_dir_conf; module MODULE_VAR_EXPORT alias_module; -static void *create_alias_config(pool *p, server_rec *s) +static void *create_alias_config(ap_context_t *p, server_rec *s) { alias_server_conf *a = (alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf)); @@ -96,7 +96,7 @@ static void *create_alias_config(pool *p, server_rec *s) return a; } -static void *create_alias_dir_config(pool *p, char *d) +static void *create_alias_dir_config(ap_context_t *p, char *d) { alias_dir_conf *a = (alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf)); @@ -104,7 +104,7 @@ static void *create_alias_dir_config(pool *p, char *d) return a; } -static void *merge_alias_config(pool *p, void *basev, void *overridesv) +static void *merge_alias_config(ap_context_t *p, void *basev, void *overridesv) { alias_server_conf *a = (alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf)); @@ -115,7 +115,7 @@ static void *merge_alias_config(pool *p, void *basev, void *overridesv) return a; } -static void *merge_alias_dir_config(pool *p, void *basev, void *overridesv) +static void *merge_alias_dir_config(ap_context_t *p, void *basev, void *overridesv) { alias_dir_conf *a = (alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf)); @@ -289,7 +289,7 @@ static int alias_matches(const char *uri, const char *alias_fakename) return urip - uri; } -static char *try_alias_list(request_rec *r, array_header *aliases, int doesc, int *status) +static char *try_alias_list(request_rec *r, ap_array_header_t *aliases, int doesc, int *status) { alias_entry *entries = (alias_entry *) aliases->elts; regmatch_t regm[10]; @@ -410,7 +410,7 @@ module MODULE_VAR_EXPORT alias_module = merge_alias_dir_config, /* dir merger --- default is to override */ create_alias_config, /* server config */ merge_alias_config, /* merge server configs */ - alias_cmds, /* command table */ + alias_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 9ead891d85..515d2fab5c 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -71,7 +71,7 @@ module MODULE_VAR_EXPORT dir_module; typedef struct dir_config_struct { - array_header *index_names; + ap_array_header_t *index_names; } dir_config_rec; #define DIR_CMD_PERMS OR_INDEXES @@ -95,7 +95,7 @@ static const command_rec dir_cmds[] = {NULL} }; -static void *create_dir_config(pool *p, char *dummy) +static void *create_dir_config(ap_context_t *p, char *dummy) { dir_config_rec *new = (dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec)); @@ -104,7 +104,7 @@ static void *create_dir_config(pool *p, char *dummy) return (void *) new; } -static void *merge_dir_configs(pool *p, void *basev, void *addv) +static void *merge_dir_configs(ap_context_t *p, void *basev, void *addv) { dir_config_rec *new = (dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *base = (dir_config_rec *) basev; @@ -228,7 +228,7 @@ module MODULE_VAR_EXPORT dir_module = { merge_dir_configs, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - dir_cmds, /* command table */ + dir_cmds, /* command ap_table_t */ dir_handlers, /* handlers */ NULL /* register hooks */ }; diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index 1839d93264..f2bb73af9d 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -100,7 +100,7 @@ #include "http_log.h" #include "util_script.h" -#define IMAP_MAGIC_TYPE "application/x-httpd-imap" +#define IMAP_MAGIC_TYPE "application/x-httpd ap_context_t map" #define MAXVERTS 100 #define X 0 #define Y 1 @@ -121,7 +121,7 @@ typedef struct { char *imap_base; } imap_conf_rec; -static void *create_imap_dir_config(pool *p, char *dummy) +static void *create_imap_dir_config(ap_context_t *p, char *dummy) { imap_conf_rec *icr = (imap_conf_rec *) ap_palloc(p, sizeof(imap_conf_rec)); @@ -133,7 +133,7 @@ static void *create_imap_dir_config(pool *p, char *dummy) return icr; } -static void *merge_imap_dir_configs(pool *p, void *basev, void *addv) +static void *merge_imap_dir_configs(ap_context_t *p, void *basev, void *addv) { imap_conf_rec *new = (imap_conf_rec *) ap_pcalloc(p, sizeof(imap_conf_rec)); imap_conf_rec *base = (imap_conf_rec *) basev; @@ -901,7 +901,7 @@ module MODULE_VAR_EXPORT imap_module = merge_imap_dir_configs, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - imap_cmds, /* command table */ + imap_cmds, /* command ap_table_t */ imap_handlers, /* handlers */ NULL /* register hooks */ }; diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 2cfefc153f..71737c9b97 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -75,12 +75,12 @@ */ typedef struct { - array_header *language_priority; + ap_array_header_t *language_priority; } neg_dir_config; module MODULE_VAR_EXPORT negotiation_module; -static void *create_neg_dir_config(pool *p, char *dummy) +static void *create_neg_dir_config(ap_context_t *p, char *dummy) { neg_dir_config *new = (neg_dir_config *) ap_palloc(p, sizeof(neg_dir_config)); @@ -88,7 +88,7 @@ static void *create_neg_dir_config(pool *p, char *dummy) return new; } -static void *merge_neg_dir_configs(pool *p, void *basev, void *addv) +static void *merge_neg_dir_configs(ap_context_t *p, void *basev, void *addv) { neg_dir_config *base = (neg_dir_config *) basev; neg_dir_config *add = (neg_dir_config *) addv; @@ -102,7 +102,7 @@ static void *merge_neg_dir_configs(pool *p, void *basev, void *addv) static const char *set_language_priority(cmd_parms *cmd, void *n, char *lang) { - array_header *arr = ((neg_dir_config *) n)->language_priority; + ap_array_header_t *arr = ((neg_dir_config *) n)->language_priority; char **langp = (char **) ap_push_array(arr); *langp = lang; @@ -169,7 +169,7 @@ typedef struct var_rec { char *mime_type; /* MUST be lowercase */ char *file_name; const char *content_encoding; - array_header *content_languages; /* list of languages for this variant */ + ap_array_header_t *content_languages; /* list of languages for this variant */ char *content_charset; char *description; @@ -208,7 +208,7 @@ typedef struct var_rec { */ typedef struct { - pool *pool; + ap_context_t *pool; request_rec *r; char *dir_name; int accept_q; /* 1 if an Accept item has a q= param */ @@ -217,12 +217,12 @@ typedef struct { /* the array pointers below are NULL if the corresponding accept * headers are not present */ - array_header *accepts; /* accept_recs */ - array_header *accept_encodings; /* accept_recs */ - array_header *accept_charsets; /* accept_recs */ - array_header *accept_langs; /* accept_recs */ + ap_array_header_t *accepts; /* accept_recs */ + ap_array_header_t *accept_encodings; /* accept_recs */ + ap_array_header_t *accept_charsets; /* accept_recs */ + ap_array_header_t *accept_langs; /* accept_recs */ - array_header *avail_vars; /* available variants */ + ap_array_header_t *avail_vars; /* available variants */ int count_multiviews_variants; /* number of variants found on disk */ @@ -310,7 +310,7 @@ static void set_vlist_validator(request_rec *r, request_rec *vlistr) * enter the values we recognize into the argument accept_rec */ -static const char *get_entry(pool *p, accept_rec *result, +static const char *get_entry(ap_context_t *p, accept_rec *result, const char *accept_line) { result->quality = 1.0f; @@ -329,8 +329,8 @@ static const char *get_entry(pool *p, accept_rec *result, */ result->name = ap_get_token(p, &accept_line, 0); - ap_str_tolower(result->name); /* You want case-insensitive, - * you'll *get* case-insensitive. + ap_str_tolower(result->name); /* You want case ap_context_t nsensitive, + * you'll *get* case ap_context_t nsensitive. */ /* KLUDGE!!! Default HTML to level 2.0 unless the browser @@ -417,9 +417,9 @@ static const char *get_entry(pool *p, accept_rec *result, * where charset is only valid in Accept. */ -static array_header *do_header_line(pool *p, const char *accept_line) +static ap_array_header_t *do_header_line(ap_context_t *p, const char *accept_line) { - array_header *accept_recs; + ap_array_header_t *accept_recs; if (!accept_line) { return NULL; @@ -439,9 +439,9 @@ static array_header *do_header_line(pool *p, const char *accept_line) * return an array containing the languages of this variant */ -static array_header *do_languages_line(pool *p, const char **lang_line) +static ap_array_header_t *do_languages_line(ap_context_t *p, const char **lang_line) { - array_header *lang_recs = ap_make_array(p, 2, sizeof(char *)); + ap_array_header_t *lang_recs = ap_make_array(p, 2, sizeof(char *)); if (!lang_line) { return lang_recs; @@ -469,7 +469,7 @@ static negotiation_state *parse_accept_headers(request_rec *r) negotiation_state *new = (negotiation_state *) ap_pcalloc(r->pool, sizeof(negotiation_state)); accept_rec *elts; - table *hdrs = r->headers_in; + ap_table_t *hdrs = r->headers_in; int i; new->pool = r->pool; @@ -1139,7 +1139,7 @@ static int level_cmp(var_rec *var1, var_rec *var2) * to set lang_index. */ -static int find_lang_index(array_header *accept_langs, char *lang) +static int find_lang_index(ap_array_header_t *accept_langs, char *lang) { accept_rec *accs; int i; @@ -1166,7 +1166,7 @@ static int find_lang_index(array_header *accept_langs, char *lang) static int find_default_index(neg_dir_config *conf, char *lang) { - array_header *arr; + ap_array_header_t *arr; int nelts; char **elts; int i; @@ -2030,7 +2030,7 @@ static int best_match(negotiation_state *neg, var_rec **pbest) static void set_neg_headers(request_rec *r, negotiation_state *neg, int alg_result) { - table *hdrs; + ap_table_t *hdrs; var_rec *avail_recs = (var_rec *) neg->avail_vars->elts; const char *sample_type = NULL; const char *sample_language = NULL; @@ -2040,7 +2040,7 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg, char *qstr; char *lenstr; long len; - array_header *arr; + ap_array_header_t *arr; int max_vlist_array = (neg->avail_vars->nelts * 21); int first_variant = 1; int vary_by_type = 0; @@ -2050,7 +2050,7 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg, int j; /* In order to avoid O(n^2) memory copies in building Alternates, - * we preallocate a table with the maximum substrings possible, + * we preallocate a ap_table_t with the maximum substrings possible, * fill it with the variant list, and then concatenate the entire array. * Note that if you change the number of substrings pushed, you also * need to change the calculation of max_vlist_array above. @@ -2216,12 +2216,12 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg, static char *make_variant_list(request_rec *r, negotiation_state *neg) { - array_header *arr; + ap_array_header_t *arr; int i; int max_vlist_array = (neg->avail_vars->nelts * 15) + 2; /* In order to avoid O(n^2) memory copies in building the list, - * we preallocate a table with the maximum substrings possible, + * we preallocate a ap_table_t with the maximum substrings possible, * fill it with the variant list, and then concatenate the entire array. */ arr = ap_make_array(r->pool, max_vlist_array, sizeof(char *)); @@ -2231,7 +2231,7 @@ static char *make_variant_list(request_rec *r, negotiation_state *neg) for (i = 0; i < neg->avail_vars->nelts; ++i) { var_rec *variant = &((var_rec *) neg->avail_vars->elts)[i]; char *filename = variant->file_name ? variant->file_name : ""; - array_header *languages = variant->content_languages; + ap_array_header_t *languages = variant->content_languages; char *description = variant->description ? variant->description : ""; /* The format isn't very neat, and it would be nice to make @@ -2677,7 +2677,7 @@ static int fix_encoding(request_rec *r) { const char *enc = r->content_encoding; char *x_enc = NULL; - array_header *accept_encodings; + ap_array_header_t *accept_encodings; accept_rec *accept_recs; int i; @@ -2737,7 +2737,7 @@ module MODULE_VAR_EXPORT negotiation_module = merge_neg_dir_configs, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - negotiation_cmds, /* command table */ + negotiation_cmds, /* command ap_table_t */ negotiation_handlers, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 4a036ddf3c..48839993cd 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -153,7 +153,7 @@ * MODULE-DEFINITION-END */ - /* the table of commands we provide */ + /* the ap_table_t of commands we provide */ static const command_rec command_table[] = { { "RewriteEngine", cmd_rewriteengine, NULL, OR_FILEINFO, FLAG, "On or Off to enable or disable (default) the whole rewriting engine" }, @@ -177,7 +177,7 @@ static const command_rec command_table[] = { { NULL } }; - /* the table of content handlers we provide */ + /* the ap_table_t of content handlers we provide */ static const handler_rec handler_table[] = { { "redirect-handler", handler_redirect }, { NULL } @@ -191,7 +191,7 @@ module MODULE_VAR_EXPORT rewrite_module = { config_perdir_merge, /* merge per-dir config structures */ config_server_create, /* create per-server config structures */ config_server_merge, /* merge per-server config structures */ - command_table, /* table of config file commands */ + command_table, /* ap_table_t of config file commands */ handler_table, /* [#8] MIME-typed-dispatched handlers */ hook_uri2file, /* [#1] URI to filename translation */ NULL, /* [#4] validate user id from request */ @@ -229,7 +229,7 @@ static int lockfd = -1; ** */ -static void *config_server_create(pool *p, server_rec *s) +static void *config_server_create(ap_context_t *p, server_rec *s) { rewrite_server_conf *a; @@ -248,7 +248,7 @@ static void *config_server_create(pool *p, server_rec *s) return (void *)a; } -static void *config_server_merge(pool *p, void *basev, void *overridesv) +static void *config_server_merge(ap_context_t *p, void *basev, void *overridesv) { rewrite_server_conf *a, *base, *overrides; @@ -304,7 +304,7 @@ static void *config_server_merge(pool *p, void *basev, void *overridesv) ** */ -static void *config_perdir_create(pool *p, char *path) +static void *config_perdir_create(ap_context_t *p, char *path) { rewrite_perdir_conf *a; @@ -332,7 +332,7 @@ static void *config_perdir_create(pool *p, char *path) return (void *)a; } -static void *config_perdir_merge(pool *p, void *basev, void *overridesv) +static void *config_perdir_merge(ap_context_t *p, void *basev, void *overridesv) { rewrite_perdir_conf *a, *base, *overrides; @@ -407,7 +407,7 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd, return err; } -static const char *cmd_rewriteoptions_setoption(pool *p, int *options, +static const char *cmd_rewriteoptions_setoption(ap_context_t *p, int *options, char *name) { if (strcasecmp(name, "inherit") == 0) { @@ -605,7 +605,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf, } /* now be careful: Under the POSIX regex library - we can compile the pattern for case-insensitive matching, + we can compile the pattern for case ap_context_t nsensitive matching, under the old V8 library we have to do it self via a hack */ if (new->flags & CONDFLAG_NOCASE) { rc = ((regexp = ap_pregcomp(cmd->pool, cp, REG_EXTENDED|REG_ICASE)) @@ -626,7 +626,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf, return NULL; } -static const char *cmd_rewritecond_parseflagfield(pool *p, +static const char *cmd_rewritecond_parseflagfield(ap_context_t *p, rewritecond_entry *cfg, char *str) { @@ -678,7 +678,7 @@ static const char *cmd_rewritecond_parseflagfield(pool *p, return NULL; } -static const char *cmd_rewritecond_setflag(pool *p, rewritecond_entry *cfg, +static const char *cmd_rewritecond_setflag(ap_context_t *p, rewritecond_entry *cfg, char *key, char *val) { if ( strcasecmp(key, "nocase") == 0 @@ -782,7 +782,7 @@ static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf, return NULL; } -static const char *cmd_rewriterule_parseflagfield(pool *p, +static const char *cmd_rewriterule_parseflagfield(ap_context_t *p, rewriterule_entry *cfg, char *str) { @@ -834,7 +834,7 @@ static const char *cmd_rewriterule_parseflagfield(pool *p, return NULL; } -static const char *cmd_rewriterule_setflag(pool *p, rewriterule_entry *cfg, +static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *cfg, char *key, char *val) { int status = 0; @@ -939,7 +939,7 @@ static const char *cmd_rewriterule_setflag(pool *p, rewriterule_entry *cfg, ** */ -static void init_module(server_rec *s, pool *p) +static void init_module(server_rec *s, ap_context_t *p) { /* check if proxy module is available */ proxy_available = (ap_find_linked_module("mod_proxy.c") != NULL); @@ -966,7 +966,7 @@ static void init_module(server_rec *s, pool *p) ** */ -static void init_child(server_rec *s, pool *p) +static void init_child(server_rec *s, ap_context_t *p) { /* open the rewriting lockfile */ rewritelock_open(s, p); @@ -1595,7 +1595,7 @@ static int handler_redirect(request_rec *r) * Apply a complete rule set, * i.e. a list of rewrite rules */ -static int apply_rewrite_list(request_rec *r, array_header *rewriterules, +static int apply_rewrite_list(request_rec *r, ap_array_header_t *rewriterules, char *perdir) { rewriterule_entry *entries; @@ -1740,7 +1740,7 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p, backrefinfo *briRC = NULL; int prefixstrip; int failed; - array_header *rewriteconds; + ap_array_header_t *rewriteconds; rewritecond_entry *conds; rewritecond_entry *c; int i; @@ -1758,7 +1758,7 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p, * make sure we really match against the complete URL. */ if (perdir != NULL && r->path_info != NULL && r->path_info[0] != '\0') { - rewritelog(r, 3, "[per-dir %s] add path-info postfix: %s -> %s%s", + rewritelog(r, 3, "[per-dir %s] add path ap_context_t nfo postfix: %s -> %s%s", perdir, uri, uri, r->path_info); uri = ap_pstrcat(r->pool, uri, r->path_info, NULL); } @@ -2467,7 +2467,7 @@ static void fully_qualify_uri(request_rec *r) ** */ -static void expand_backref_inbuffer(pool *p, char *buf, int nbuf, +static void expand_backref_inbuffer(ap_context_t *p, char *buf, int nbuf, backrefinfo *bri, char c) { int i; @@ -2675,7 +2675,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) { void *sconf; rewrite_server_conf *conf; - array_header *rewritemaps; + ap_array_header_t *rewritemaps; rewritemap_entry *entries; rewritemap_entry *s; char *value; @@ -3081,7 +3081,7 @@ static char *select_random_value_part(request_rec *r, char *value) */ -static void open_rewritelog(server_rec *s, pool *p) +static void open_rewritelog(server_rec *s, ap_context_t *p) { rewrite_server_conf *conf; char *fname; @@ -3251,7 +3251,7 @@ static char *current_logtime(request_rec *r) #define REWRITELOCK_MODE ( S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH ) #endif -static void rewritelock_create(server_rec *s, pool *p) +static void rewritelock_create(server_rec *s, ap_context_t *p) { rewrite_server_conf *conf; @@ -3283,7 +3283,7 @@ static void rewritelock_create(server_rec *s, pool *p) return; } -static void rewritelock_open(server_rec *s, pool *p) +static void rewritelock_open(server_rec *s, ap_context_t *p) { rewrite_server_conf *conf; @@ -3343,13 +3343,13 @@ static void rewritelock_free(request_rec *r) ** +-------------------------------------------------------+ */ -static void run_rewritemap_programs(server_rec *s, pool *p) +static void run_rewritemap_programs(server_rec *s, ap_context_t *p) { rewrite_server_conf *conf; FILE *fpin; FILE *fpout; FILE *fperr; - array_header *rewritemaps; + ap_array_header_t *rewritemaps; rewritemap_entry *entries; rewritemap_entry *map; int i; @@ -3689,7 +3689,7 @@ static char *lookup_variable(request_rec *r, char *var) rsub = subrecfunc(r->filename, r); \ /* now recursively lookup the variable in the sub_req */ \ result = lookup_variable(rsub, var+5); \ - /* copy it up to our scope before we destroy sub_req's pool */ \ + /* copy it up to our scope before we destroy sub_req's ap_context_t */ \ result = ap_pstrdup(r->pool, result); \ /* cleanup by destroying the subrequest */ \ ap_destroy_sub_req(rsub); \ @@ -3756,7 +3756,7 @@ static char *lookup_variable(request_rec *r, char *var) static char *lookup_header(request_rec *r, const char *name) { - array_header *hdrs_arr; + ap_array_header_t *hdrs_arr; table_entry *hdrs; int i; @@ -3786,7 +3786,7 @@ static char *lookup_header(request_rec *r, const char *name) */ -static cache *init_cache(pool *p) +static cache *init_cache(ap_context_t *p) { cache *c; diff --git a/modules/mappers/mod_rewrite.h b/modules/mappers/mod_rewrite.h index 22ff337558..abdba13f84 100644 --- a/modules/mappers/mod_rewrite.h +++ b/modules/mappers/mod_rewrite.h @@ -115,7 +115,7 @@ #include "http_vhost.h" /* - * The key in the r->notes table wherein we store our accumulated + * The key in the r->notes ap_table_t wherein we store our accumulated * Vary values, and the one used for per-condition checks in a chain. */ #define VARY_KEY "rewrite-Vary" @@ -281,7 +281,7 @@ typedef struct { } rewritecond_entry; typedef struct { - array_header *rewriteconds; /* the corresponding RewriteCond entries */ + ap_array_header_t *rewriteconds; /* the corresponding RewriteCond entries */ char *pattern; /* the RegExp pattern string */ regex_t *regexp; /* the RegExp pattern compilation */ char *output; /* the Substitution string */ @@ -302,9 +302,9 @@ typedef struct { char *rewritelogfile; /* the RewriteLog filename */ int rewritelogfp; /* the RewriteLog open filepointer */ int rewriteloglevel; /* the RewriteLog level of verbosity */ - array_header *rewritemaps; /* the RewriteMap entries */ - array_header *rewriteconds; /* the RewriteCond entries (temporary) */ - array_header *rewriterules; /* the RewriteRule entries */ + ap_array_header_t *rewritemaps; /* the RewriteMap entries */ + ap_array_header_t *rewriteconds; /* the RewriteCond entries (temporary) */ + ap_array_header_t *rewriterules; /* the RewriteRule entries */ server_rec *server; /* the corresponding server indicator */ } rewrite_server_conf; @@ -315,15 +315,15 @@ typedef struct { typedef struct { int state; /* the RewriteEngine state */ int options; /* the RewriteOption state */ - array_header *rewriteconds; /* the RewriteCond entries (temporary) */ - array_header *rewriterules; /* the RewriteRule entries */ + ap_array_header_t *rewriteconds; /* the RewriteCond entries (temporary) */ + ap_array_header_t *rewriterules; /* the RewriteRule entries */ char *directory; /* the directory where it applies */ char *baseurl; /* the base-URL where it applies */ } rewrite_perdir_conf; /* the cache structures, - * a 4-way hash table with LRU functionality + * a 4-way hash ap_table_t with LRU functionality */ typedef struct cacheentry { time_t time; @@ -337,13 +337,13 @@ typedef struct tlbentry { typedef struct cachelist { char *resource; - array_header *entries; - array_header *tlb; + ap_array_header_t *entries; + ap_array_header_t *tlb; } cachelist; typedef struct cache { - pool *pool; - array_header *lists; + ap_context_t *pool; + ap_array_header_t *lists; } cache; @@ -364,10 +364,10 @@ typedef struct backrefinfo { */ /* config structure handling */ -static void *config_server_create(pool *p, server_rec *s); -static void *config_server_merge (pool *p, void *basev, void *overridesv); -static void *config_perdir_create(pool *p, char *path); -static void *config_perdir_merge (pool *p, void *basev, void *overridesv); +static void *config_server_create(ap_context_t *p, server_rec *s); +static void *config_server_merge (ap_context_t *p, void *basev, void *overridesv); +static void *config_perdir_create(ap_context_t *p, char *path); +static void *config_perdir_merge (ap_context_t *p, void *basev, void *overridesv); /* config directive handling */ static const char *cmd_rewriteengine(cmd_parms *cmd, @@ -375,7 +375,7 @@ static const char *cmd_rewriteengine(cmd_parms *cmd, static const char *cmd_rewriteoptions(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *option); -static const char *cmd_rewriteoptions_setoption(pool *p, int *options, +static const char *cmd_rewriteoptions_setoption(ap_context_t *p, int *options, char *name); static const char *cmd_rewritelog (cmd_parms *cmd, void *dconf, char *a1); static const char *cmd_rewriteloglevel(cmd_parms *cmd, void *dconf, char *a1); @@ -386,22 +386,22 @@ static const char *cmd_rewritebase(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *a1); static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *str); -static const char *cmd_rewritecond_parseflagfield(pool *p, +static const char *cmd_rewritecond_parseflagfield(ap_context_t *p, rewritecond_entry *new, char *str); -static const char *cmd_rewritecond_setflag(pool *p, rewritecond_entry *cfg, +static const char *cmd_rewritecond_setflag(ap_context_t *p, rewritecond_entry *cfg, char *key, char *val); static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *str); -static const char *cmd_rewriterule_parseflagfield(pool *p, +static const char *cmd_rewriterule_parseflagfield(ap_context_t *p, rewriterule_entry *new, char *str); -static const char *cmd_rewriterule_setflag(pool *p, rewriterule_entry *cfg, +static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *cfg, char *key, char *val); /* initialisation */ -static void init_module(server_rec *s, pool *p); -static void init_child(server_rec *s, pool *p); +static void init_module(server_rec *s, ap_context_t *p); +static void init_child(server_rec *s, ap_context_t *p); /* runtime hooks */ static int hook_uri2file (request_rec *r); @@ -410,7 +410,7 @@ static int hook_fixup (request_rec *r); static int handler_redirect(request_rec *r); /* rewriting engine */ -static int apply_rewrite_list(request_rec *r, array_header *rewriterules, +static int apply_rewrite_list(request_rec *r, ap_array_header_t *rewriterules, char *perdir); static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p, char *perdir); @@ -422,7 +422,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, static void splitout_queryargs(request_rec *r, int qsappend); static void fully_qualify_uri(request_rec *r); static void reduce_uri(request_rec *r); -static void expand_backref_inbuffer(pool *p, char *buf, int nbuf, +static void expand_backref_inbuffer(ap_context_t *p, char *buf, int nbuf, backrefinfo *bri, char c); static char *expand_tildepaths(request_rec *r, char *uri); static void expand_map_lookups(request_rec *r, char *uri, int uri_len); @@ -447,20 +447,20 @@ static void rewrite_rand_init(void); static int rewrite_rand(int l, int h); /* rewriting logfile support */ -static void open_rewritelog(server_rec *s, pool *p); +static void open_rewritelog(server_rec *s, ap_context_t *p); static void rewritelog(request_rec *r, int level, const char *text, ...) __attribute__((format(printf,3,4))); static char *current_logtime(request_rec *r); /* rewriting lockfile support */ -static void rewritelock_create(server_rec *s, pool *p); -static void rewritelock_open(server_rec *s, pool *p); +static void rewritelock_create(server_rec *s, ap_context_t *p); +static void rewritelock_open(server_rec *s, ap_context_t *p); static void rewritelock_remove(void *data); static void rewritelock_alloc(request_rec *r); static void rewritelock_free(request_rec *r); /* program map support */ -static void run_rewritemap_programs(server_rec *s, pool *p); +static void run_rewritemap_programs(server_rec *s, ap_context_t *p); static int rewritemap_program_child(void *cmd, child_info *pinfo); /* env variable support */ @@ -470,7 +470,7 @@ static char *lookup_variable(request_rec *r, char *var); static char *lookup_header(request_rec *r, const char *name); /* caching functions */ -static cache *init_cache(pool *p); +static cache *init_cache(ap_context_t *p); static char *get_cache_string(cache *c, char *res, int mode, time_t mtime, char *key); static void set_cache_string(cache *c, char *res, int mode, time_t mtime, diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c index f0c2a7b7db..1c8cbff455 100644 --- a/modules/mappers/mod_so.c +++ b/modules/mappers/mod_so.c @@ -101,7 +101,7 @@ * You can use this to dynamically change the capability of your server * without bringing it down. * - * Because currently there is only limited built-in support in the Configure + * Because currently there is only limited built ap_context_t n support in the Configure * script for creating the shared library files (`.so'), please consult your * vendors cc(1), ld(1) and dlopen(3) manpages to find out the appropriate * compiler and linker flags and insert them manually into the Configuration @@ -144,10 +144,10 @@ typedef struct moduleinfo { } moduleinfo; typedef struct so_server_conf { - array_header *loaded_modules; + ap_array_header_t *loaded_modules; } so_server_conf; -static void *so_sconf_create(pool *p, server_rec *s) +static void *so_sconf_create(ap_context_t *p, server_rec *s) { so_server_conf *soc; @@ -269,7 +269,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy, ap_add_loaded_module(modp); /* - * Register a cleanup in the config pool (normally pconf). When + * Register a cleanup in the config ap_context_t (normally pconf). When * we do a restart (or shutdown) this cleanup will cause the * shared object to be unloaded. */ @@ -344,7 +344,7 @@ module MODULE_VAR_EXPORT so_module = { NULL, /* merge per-dir config */ so_sconf_create, /* server config */ NULL, /* merge server config */ - so_cmds, /* command table */ + so_cmds, /* command ap_table_t */ NULL, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index eb0e76a5e1..f81c88f4b3 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -98,7 +98,7 @@ typedef struct { * bother to have such a function. */ -static void *mkconfig(pool *p) +static void *mkconfig(ap_context_t *p) { spconfig *cfg = ap_pcalloc(p, sizeof(spconfig)); @@ -110,7 +110,7 @@ static void *mkconfig(pool *p) * Respond to a callback to create configuration record for a server or * vhost environment. */ -static void *create_mconfig_for_server(pool *p, server_rec *s) +static void *create_mconfig_for_server(ap_context_t *p, server_rec *s) { return mkconfig(p); } @@ -118,7 +118,7 @@ static void *create_mconfig_for_server(pool *p, server_rec *s) /* * Respond to a callback to create a config record for a specific directory. */ -static void *create_mconfig_for_directory(pool *p, char *dir) +static void *create_mconfig_for_directory(ap_context_t *p, char *dir) { return mkconfig(p); } @@ -231,7 +231,7 @@ static int check_speling(request_rec *r) int filoc, dotloc, urlen, pglen; DIR *dirp; struct DIR_TYPE *dir_entry; - array_header *candidates = NULL; + ap_array_header_t *candidates = NULL; cfg = ap_get_module_config(r->per_dir_config, &speling_module); if (!cfg->enabled) { @@ -428,11 +428,11 @@ static int check_speling(request_rec *r) * returned. */ else { - pool *p; - table *notes; - pool *sub_pool; - array_header *t; - array_header *v; + ap_context_t *p; + ap_table_t *notes; + ap_context_t *sub_pool; + ap_array_header_t *t; + ap_array_header_t *v; if (r->main == NULL) { @@ -514,7 +514,7 @@ static int check_speling(request_rec *r) } - /* Pass our table to http_protocol.c (see mod_negotiation): */ + /* Pass our ap_table_t to http_protocol.c (see mod_negotiation): */ ap_table_setn(notes, "variant-list", ap_array_pstrcat(p, t, 0)); ap_table_mergen(r->subprocess_env, "VARIANTS", @@ -544,7 +544,7 @@ module MODULE_VAR_EXPORT speling_module = NULL, /* merge per-dir config */ create_mconfig_for_server, /* server config */ NULL, /* merge server config */ - speling_cmds, /* command table */ + speling_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index 105d0040e9..ffcc59dcb9 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -99,8 +99,8 @@ module userdir_module; typedef struct userdir_config { int globally_disabled; char *userdir; - table *enabled_users; - table *disabled_users; + ap_table_t *enabled_users; + ap_table_t *disabled_users; } userdir_config; /* @@ -109,7 +109,7 @@ typedef struct userdir_config { * explicit) disablement, and the replacement string for all others. */ -static void *create_userdir_config(pool *p, server_rec *s) +static void *create_userdir_config(ap_context_t *p, server_rec *s) { userdir_config * newcfg = (userdir_config *) ap_pcalloc(p, sizeof(userdir_config)); @@ -137,7 +137,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, char *arg) const char *usernames = arg; char *kw = ap_getword_conf(cmd->pool, &usernames); - table *usertable; + ap_table_t *usertable; /* * Let's do the comparisons once. @@ -340,7 +340,7 @@ module userdir_module = { NULL, /* dir merger --- default is to override */ create_userdir_config, /* server config */ NULL, /* merge server config */ - userdir_cmds, /* command table */ + userdir_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c index 65cc5a2ef4..57ea60183f 100644 --- a/modules/mappers/mod_vhost_alias.c +++ b/modules/mappers/mod_vhost_alias.c @@ -101,7 +101,7 @@ typedef struct mva_sconf_t { mva_mode_e cgi_root_mode; } mva_sconf_t; -static void *mva_create_server_config(pool *p, server_rec *s) +static void *mva_create_server_config(ap_context_t *p, server_rec *s) { mva_sconf_t *conf; @@ -113,7 +113,7 @@ static void *mva_create_server_config(pool *p, server_rec *s) return conf; } -static void *mva_merge_server_config(pool *p, void *parentv, void *childv) +static void *mva_merge_server_config(ap_context_t *p, void *parentv, void *childv) { mva_sconf_t *parent = (mva_sconf_t *) parentv; mva_sconf_t *child = (mva_sconf_t *) childv; @@ -466,7 +466,7 @@ module MODULE_VAR_EXPORT vhost_alias_module = NULL, /* dir merger --- default is to override */ mva_create_server_config, /* server config */ mva_merge_server_config, /* merge server configs */ - mva_commands, /* command table */ + mva_commands, /* command ap_table_t */ NULL, /* handlers */ mva_translate, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c index f684600629..3f136f5e5e 100644 --- a/modules/metadata/mod_cern_meta.c +++ b/modules/metadata/mod_cern_meta.c @@ -170,7 +170,7 @@ typedef struct { char *metafiles; } cern_meta_dir_config; -static void *create_cern_meta_dir_config(pool *p, char *dummy) +static void *create_cern_meta_dir_config(ap_context_t *p, char *dummy) { cern_meta_dir_config *new = (cern_meta_dir_config *) ap_palloc(p, sizeof(cern_meta_dir_config)); @@ -182,7 +182,7 @@ static void *create_cern_meta_dir_config(pool *p, char *dummy) return new; } -static void *merge_cern_meta_dir_configs(pool *p, void *basev, void *addv) +static void *merge_cern_meta_dir_configs(ap_context_t *p, void *basev, void *addv) { cern_meta_dir_config *base = (cern_meta_dir_config *) basev; cern_meta_dir_config *add = (cern_meta_dir_config *) addv; @@ -234,7 +234,7 @@ static int scan_meta_file(request_rec *r, FILE *f) char w[MAX_STRING_LEN]; char *l; int p; - table *tmp_headers; + ap_table_t *tmp_headers; tmp_headers = ap_make_table(r->pool, 5); while (fgets(w, MAX_STRING_LEN - 1, f) != NULL) { @@ -381,7 +381,7 @@ module MODULE_VAR_EXPORT cern_meta_module = merge_cern_meta_dir_configs,/* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server configs */ - cern_meta_cmds, /* command table */ + cern_meta_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c index 274512cbb3..287ba61cb0 100644 --- a/modules/metadata/mod_env.c +++ b/modules/metadata/mod_env.c @@ -67,7 +67,7 @@ * 08.Dec.95 Now allows PassEnv directive to appear more than once in * conf files. * 10.Dec.95 optimisation. getenv() only called at startup and used - * to build a fast-to-access table. table used to build + * to build a fast-to-access table. ap_table_t used to build * per-server environment for each request. * robustness. better able to handle errors in configuration * files: @@ -103,14 +103,14 @@ #include "http_request.h" typedef struct { - table *vars; + ap_table_t *vars; char *unsetenv; int vars_present; } env_dir_config_rec; module MODULE_VAR_EXPORT env_module; -static void *create_env_dir_config(pool *p, char *dummy) +static void *create_env_dir_config(ap_context_t *p, char *dummy) { env_dir_config_rec *new = (env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec)); @@ -120,16 +120,16 @@ static void *create_env_dir_config(pool *p, char *dummy) return (void *) new; } -static void *merge_env_dir_configs(pool *p, void *basev, void *addv) +static void *merge_env_dir_configs(ap_context_t *p, void *basev, void *addv) { env_dir_config_rec *base = (env_dir_config_rec *) basev; env_dir_config_rec *add = (env_dir_config_rec *) addv; env_dir_config_rec *new = (env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec)); - table *new_table; - table_entry *elts; - array_header *arr; + ap_table_t *new_table; + ap_table_entry_t *elts; + ap_array_header_t *arr; int i; const char *uenv, *unset; @@ -147,7 +147,7 @@ static void *merge_env_dir_configs(pool *p, void *basev, void *addv) new_table = ap_copy_table(p, base->vars); arr = ap_table_elts(add->vars); - elts = (table_entry *)arr->elts; + elts = (ap_table_entry_t *)arr->elts; for (i = 0; i < arr->nelts; ++i) { ap_table_setn(new_table, elts[i].key, elts[i].val); @@ -171,7 +171,7 @@ static const char *add_env_module_vars_passed(cmd_parms *cmd, env_dir_config_rec *sconf, const char *arg) { - table *vars = sconf->vars; + ap_table_t *vars = sconf->vars; char *env_var; char *name_ptr; @@ -190,7 +190,7 @@ static const char *add_env_module_vars_set(cmd_parms *cmd, env_dir_config_rec *sconf, const char *arg) { - table *vars = sconf->vars; + ap_table_t *vars = sconf->vars; char *name, *value; name = ap_getword_conf(cmd->pool, &arg); @@ -234,10 +234,10 @@ static const command_rec env_module_cmds[] = static int fixup_env_module(request_rec *r) { - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; env_dir_config_rec *sconf = ap_get_module_config(r->per_dir_config, &env_module); - table *vars = sconf->vars; + ap_table_t *vars = sconf->vars; if (!sconf->vars_present) return DECLINED; @@ -260,7 +260,7 @@ module MODULE_VAR_EXPORT env_module = merge_env_dir_configs, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server configs */ - env_module_cmds, /* command table */ + env_module_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 8ed69cc804..fb364fd168 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -200,7 +200,7 @@ typedef struct { int active; char *expiresdefault; - table *expiresbytype; + ap_table_t *expiresbytype; } expires_dir_config; /* from mod_dir, why is this alias used? @@ -213,7 +213,7 @@ typedef struct { module MODULE_VAR_EXPORT expires_module; -static void *create_dir_expires_config(pool *p, char *dummy) +static void *create_dir_expires_config(ap_context_t *p, char *dummy) { expires_dir_config *new = (expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config)); @@ -239,7 +239,7 @@ static const char *set_expiresactive(cmd_parms *cmd, expires_dir_config * dir_co * string. If we return NULL then real_code contains code converted * to the cnnnn format. */ -static char *check_code(pool *p, const char *code, char **real_code) +static char *check_code(ap_context_t *p, const char *code, char **real_code) { char *word; char base = 'X'; @@ -376,7 +376,7 @@ static const command_rec expires_cmds[] = {NULL} }; -static void *merge_expires_dir_configs(pool *p, void *basev, void *addv) +static void *merge_expires_dir_configs(ap_context_t *p, void *basev, void *addv) { expires_dir_config *new = (expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config)); expires_dir_config *base = (expires_dir_config *) basev; @@ -496,7 +496,7 @@ module MODULE_VAR_EXPORT expires_module = merge_expires_dir_configs, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server configs */ - expires_cmds, /* command table */ + expires_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 8518ce43cc..aad2a15ec8 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -122,12 +122,12 @@ typedef struct { * a per-dir and per-server config */ typedef struct { - array_header *headers; + ap_array_header_t *headers; } headers_conf; module MODULE_VAR_EXPORT headers_module; -static void *create_headers_config(pool *p, server_rec *s) +static void *create_headers_config(ap_context_t *p, server_rec *s) { headers_conf *a = (headers_conf *) ap_pcalloc(p, sizeof(headers_conf)); @@ -136,12 +136,12 @@ static void *create_headers_config(pool *p, server_rec *s) return a; } -static void *create_headers_dir_config(pool *p, char *d) +static void *create_headers_dir_config(ap_context_t *p, char *d) { return (headers_conf *) create_headers_config(p, NULL); } -static void *merge_headers_config(pool *p, void *basev, void *overridesv) +static void *merge_headers_config(ap_context_t *p, void *basev, void *overridesv) { headers_conf *a = (headers_conf *) ap_pcalloc(p, sizeof(headers_conf)); @@ -202,7 +202,7 @@ static const command_rec headers_cmds[] = {NULL} }; -static void do_headers_fixup(request_rec *r, array_header *headers) +static void do_headers_fixup(request_rec *r, ap_array_header_t *headers) { int i; @@ -251,7 +251,7 @@ module MODULE_VAR_EXPORT headers_module = merge_headers_config, /* dir merger --- default is to override */ create_headers_config, /* server config */ merge_headers_config, /* merge server configs */ - headers_cmds, /* command table */ + headers_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index 5f23c34cca..8adf72af01 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -93,9 +93,9 @@ * * For compliance with Mr Darwin's terms: this has been very significantly * modified from the free "file" command. - * - all-in-one file for compilation convenience when moving from one + * - all ap_context_t n-one file for compilation convenience when moving from one * version of Apache to the next. - * - Memory allocation is done through the Apache API's pool structure. + * - Memory allocation is done through the Apache API's ap_context_t structure. * - All functions have had necessary Apache API request or server * structures passed to them where necessary to call other Apache API * routines. (i.e. usually for logging, files, or memory allocation in @@ -248,7 +248,7 @@ static int zmagic(request_rec *, unsigned char *, int); static int getvalue(server_rec *, struct magic *, char **); static int hextoint(int); static char *getstr(server_rec *, char *, char *, int, int *); -static int parse(server_rec *, pool *p, char *, int); +static int parse(server_rec *, ap_context_t *p, char *, int); static int match(request_rec *, unsigned char *, int); static int mget(request_rec *, union VALUETYPE *, unsigned char *, @@ -271,7 +271,7 @@ static int fsmagic(request_rec *r, const char *fn); * make HOWMANY too high unless you have a very fast CPU. */ -/* these types are used to index the table 'types': keep em in sync! */ +/* these types are used to index the ap_table_t 'types': keep em in sync! */ /* HTML inserted in first because this is a web server module now */ #define L_HTML 0 /* HTML */ #define L_C 1 /* first and foremost on UNIX */ @@ -498,13 +498,13 @@ typedef struct { module mime_magic_module; -static void *create_magic_server_config(pool *p, server_rec *d) +static void *create_magic_server_config(ap_context_t *p, server_rec *d) { /* allocate the config - use pcalloc because it needs to be zeroed */ return ap_pcalloc(p, sizeof(magic_server_config_rec)); } -static void *merge_magic_server_config(pool *p, void *basev, void *addv) +static void *merge_magic_server_config(ap_context_t *p, void *basev, void *addv) { magic_server_config_rec *base = (magic_server_config_rec *) basev; magic_server_config_rec *add = (magic_server_config_rec *) addv; @@ -931,7 +931,7 @@ static void tryit(request_rec *r, unsigned char *buf, int nb, int checkzmagic) * apprentice - load configuration from the magic file r * API request record */ -static int apprentice(server_rec *s, pool *p) +static int apprentice(server_rec *s, ap_context_t *p) { FILE *f; char line[BUFSIZ + 1]; @@ -1072,7 +1072,7 @@ static unsigned long signextend(server_rec *s, struct magic *m, unsigned long v) /* * parse one line from magic file, put into magic[index++] if valid */ -static int parse(server_rec *serv, pool *p, char *l, int lineno) +static int parse(server_rec *serv, ap_context_t *p, char *l, int lineno) { struct magic *m; char *t, *s; @@ -2172,7 +2172,7 @@ static int uncompress(request_rec *r, int method, { struct uncompress_parms parm; BUFF *bout; - pool *sub_pool; + ap_context_t *sub_pool; parm.r = r; parm.method = method; @@ -2235,7 +2235,7 @@ static int is_tar(unsigned char *buf, int nbytes) sum = 0; p = header->charptr; - for (i = sizeof(union record); --i >= 0;) { + for (i = sizeof(union record); - ap_context_t >= 0;) { /* * We can't use unsigned char here because of old compilers, e.g. V7. */ @@ -2243,7 +2243,7 @@ static int is_tar(unsigned char *buf, int nbytes) } /* Adjust checksum to count the "chksum" field as blanks. */ - for (i = sizeof(header->header.chksum); --i >= 0;) + for (i = sizeof(header->header.chksum); - ap_context_t >= 0;) sum -= 0xFF & header->header.chksum[i]; sum += ' ' * sizeof header->header.chksum; @@ -2351,7 +2351,7 @@ static int revision_suffix(request_rec *r) * initialize the module */ -static void magic_init(server_rec *main_server, pool *p) +static void magic_init(server_rec *main_server, ap_context_t *p) { int result; magic_server_config_rec *conf; @@ -2451,7 +2451,7 @@ module mime_magic_module = NULL, /* dir merger --- default is to override */ create_magic_server_config, /* server config */ merge_magic_server_config, /* merge server config */ - mime_magic_cmds, /* command table */ + mime_magic_cmds, /* command ap_table_t */ NULL, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index 03324558c2..395d1e4cdb 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -133,7 +133,7 @@ typedef struct { char *name; /* header name */ char *regex; /* regex to match against */ regex_t *preg; /* compiled regex */ - table *features; /* env vars to set (or unset) */ + ap_table_t *features; /* env vars to set (or unset) */ ENUM_BITFIELD( /* is it a "special" header ? */ enum special, special_type,4); @@ -141,12 +141,12 @@ typedef struct { } sei_entry; typedef struct { - array_header *conditionals; + ap_array_header_t *conditionals; } sei_cfg_rec; module MODULE_VAR_EXPORT setenvif_module; -static void *create_setenvif_config(pool *p, server_rec *dummy) +static void *create_setenvif_config(ap_context_t *p, server_rec *dummy) { sei_cfg_rec *new = (sei_cfg_rec *) ap_palloc(p, sizeof(sei_cfg_rec)); @@ -154,7 +154,7 @@ static void *create_setenvif_config(pool *p, server_rec *dummy) return (void *) new; } -static void *merge_setenvif_config(pool *p, void *basev, void *overridesv) +static void *merge_setenvif_config(ap_context_t *p, void *basev, void *overridesv) { sei_cfg_rec *a = ap_pcalloc(p, sizeof(sei_cfg_rec)); sei_cfg_rec *base = basev, *overrides = overridesv; @@ -323,7 +323,7 @@ static int match_headers(request_rec *r) server_rec *s = r->server; sei_cfg_rec *sconf; sei_entry *entries; - table_entry *elts; + ap_table_entry_t *elts; const char *val; int i, j; char *last_name; @@ -383,8 +383,8 @@ static int match_headers(request_rec *r) } if (!ap_regexec(b->preg, val, 0, NULL, 0)) { - array_header *arr = ap_table_elts(b->features); - elts = (table_entry *) arr->elts; + ap_array_header_t *arr = ap_table_elts(b->features); + elts = (ap_table_entry_t *) arr->elts; for (j = 0; j < arr->nelts; ++j) { if (!strcmp(elts[j].val, "!")) { @@ -412,7 +412,7 @@ module MODULE_VAR_EXPORT setenvif_module = NULL, /* dir merger --- default is to override */ create_setenvif_config, /* server config */ merge_setenvif_config, /* merge server configs */ - setenvif_module_cmds, /* command table */ + setenvif_module_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index 09a1756cd3..5a0cac3d3d 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -161,7 +161,7 @@ static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX], unique_id_rec_total_size, unique_id_rec_size_uu; -static void unique_id_global_init(server_rec *s, pool *p) +static void unique_id_global_init(server_rec *s, ap_context_t *p) { #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 @@ -245,7 +245,7 @@ static void unique_id_global_init(server_rec *s, pool *p) #endif } -static void unique_id_child_init(server_rec *s, pool *p) +static void unique_id_child_init(server_rec *s, ap_context_t *p) { pid_t pid; #ifndef NO_GETTIMEOFDAY @@ -400,7 +400,7 @@ module MODULE_VAR_EXPORT unique_id_module = { NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server configs */ - NULL, /* command table */ + NULL, /* command ap_table_t */ NULL, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c index 0372e32aa1..2828352d3a 100644 --- a/modules/metadata/mod_usertrack.c +++ b/modules/metadata/mod_usertrack.c @@ -241,7 +241,7 @@ static int spot_cookie(request_rec *r) return OK; /* We set our cookie */ } -static void *make_cookie_log_state(pool *p, server_rec *s) +static void *make_cookie_log_state(ap_context_t *p, server_rec *s) { cookie_log_state *cls = (cookie_log_state *) ap_palloc(p, sizeof(cookie_log_state)); @@ -251,7 +251,7 @@ static void *make_cookie_log_state(pool *p, server_rec *s) return (void *) cls; } -static void *make_cookie_dir(pool *p, char *d) +static void *make_cookie_dir(ap_context_t *p, char *d) { cookie_dir_rec *dcfg; @@ -363,7 +363,7 @@ module MODULE_VAR_EXPORT usertrack_module = { NULL, /* dir merger --- default is to override */ make_cookie_log_state, /* server config */ NULL, /* merge server configs */ - cookie_log_cmds, /* command table */ + cookie_log_cmds, /* command ap_table_t */ NULL, /* handlers */ register_hooks /* register hooks */ }; diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 5d22d08164..a940b945bf 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -233,7 +233,7 @@ static int proxy_fixup(request_rec *r) return OK; /* otherwise; we've done the best we can */ } -static void proxy_init(server_rec *r, pool *p) +static void proxy_init(server_rec *r, ap_context_t *p) { ap_proxy_garbage_init(r, p); } @@ -289,7 +289,7 @@ static int proxy_handler(request_rec *r) void *sconf = r->server->module_config; proxy_server_conf *conf = (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module); - array_header *proxies = conf->proxies; + ap_array_header_t *proxies = conf->proxies; struct proxy_remote *ents = (struct proxy_remote *) proxies->elts; int i, rc; cache_req *cr; @@ -404,7 +404,7 @@ static int proxy_handler(request_rec *r) /* Setup configurable data */ static void * - create_proxy_config(pool *p, server_rec *s) + create_proxy_config(ap_context_t *p, server_rec *s) { proxy_server_conf *ps = ap_pcalloc(p, sizeof(proxy_server_conf)); @@ -882,7 +882,7 @@ module MODULE_VAR_EXPORT proxy_module = NULL, /* merge per-directory config structures */ create_proxy_config, /* create per-server config structure */ NULL, /* merge per-server config structures */ - proxy_cmds, /* command table */ + proxy_cmds, /* command ap_table_t */ proxy_handlers, /* handlers */ proxy_trans, /* translate_handler */ NULL, /* check_user_id */ diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index 9eb3428d80..e7064e379f 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -204,13 +204,13 @@ struct cache_conf { typedef struct { struct cache_conf cache; /* cache configuration */ - array_header *proxies; - array_header *aliases; - array_header *raliases; - array_header *noproxies; - array_header *dirconn; - array_header *nocaches; - array_header *allowed_connect_ports; + ap_array_header_t *proxies; + ap_array_header_t *aliases; + ap_array_header_t *raliases; + ap_array_header_t *noproxies; + ap_array_header_t *dirconn; + ap_array_header_t *nocaches; + ap_array_header_t *allowed_connect_ports; char *domain; /* domain name to use in absence of a domain name in the request */ int req; /* true if proxy requests are enabled */ enum { @@ -247,7 +247,7 @@ typedef struct { unsigned int written; /* total *content* bytes written to cache */ float cache_completion; /* specific to this request */ char *resp_line; /* the whole status like (protocol, code + message) */ - table *hdrs; /* the HTTP headers of the file */ + ap_table_t *hdrs; /* the HTTP headers of the file */ } cache_req; /* Additional information passed to the function called by ap_table_do() */ @@ -263,7 +263,7 @@ struct tbl_do_args { void ap_proxy_cache_tidy(cache_req *c); int ap_proxy_cache_check(request_rec *r, char *url, struct cache_conf *conf, cache_req **cr); -int ap_proxy_cache_update(cache_req *c, table *resp_hdrs, +int ap_proxy_cache_update(cache_req *c, ap_table_t *resp_hdrs, const int is_HTTP1, int nocache); void ap_proxy_garbage_coll(request_rec *r); @@ -288,14 +288,14 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url, int ap_proxy_hex2c(const char *x); void ap_proxy_c2hex(int ch, char *x); -char *ap_proxy_canonenc(pool *p, const char *x, int len, enum enctype t, +char *ap_proxy_canonenc(ap_context_t *p, const char *x, int len, enum enctype t, int isenc); -char *ap_proxy_canon_netloc(pool *p, char **const urlp, char **userp, +char *ap_proxy_canon_netloc(ap_context_t *p, char **const urlp, char **userp, char **passwordp, char **hostp, int *port); -const char *ap_proxy_date_canon(pool *p, const char *x); +const char *ap_proxy_date_canon(ap_context_t *p, const char *x); table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f); long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c); -void ap_proxy_send_headers(request_rec *r, const char *respline, table *hdrs); +void ap_proxy_send_headers(request_rec *r, const char *respline, ap_table_t *hdrs); int ap_proxy_liststr(const char *list, const char *val); void ap_proxy_hash(const char *it, char *val, int ndepth, int nlength); int ap_proxy_hex2sec(const char *x); @@ -303,12 +303,12 @@ void ap_proxy_sec2hex(int t, char *y); cache_req *ap_proxy_cache_error(cache_req *r); int ap_proxyerror(request_rec *r, int statuscode, const char *message); const char *ap_proxy_host2addr(const char *host, struct hostent *reqhp); -int ap_proxy_is_ipaddr(struct dirconn_entry *This, pool *p); -int ap_proxy_is_domainname(struct dirconn_entry *This, pool *p); -int ap_proxy_is_hostname(struct dirconn_entry *This, pool *p); -int ap_proxy_is_word(struct dirconn_entry *This, pool *p); +int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_context_t *p); +int ap_proxy_is_domainname(struct dirconn_entry *This, ap_context_t *p); +int ap_proxy_is_hostname(struct dirconn_entry *This, ap_context_t *p); +int ap_proxy_is_word(struct dirconn_entry *This, ap_context_t *p); int ap_proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r); -int ap_proxy_garbage_init(server_rec *, pool *); +int ap_proxy_garbage_init(server_rec *, ap_context_t *); /* This function is called by ap_table_do() for all header lines */ int ap_proxy_send_hdr_line(void *p, const char *key, const char *value); unsigned ap_proxy_bputs2(const char *data, BUFF *client, cache_req *cache); diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c index f4aa899fce..9df6644866 100644 --- a/modules/proxy/proxy_ftp.c +++ b/modules/proxy/proxy_ftp.c @@ -118,7 +118,7 @@ static int ftp_check_string(const char *x) int ap_proxy_ftp_canon(request_rec *r, char *url) { char *user, *password, *host, *path, *parms, *strp, sport[7]; - pool *p = r->pool; + ap_context_t *p = r->pool; const char *err; int port; @@ -415,7 +415,7 @@ static long int send_dir(BUFF *f, request_rec *r, cache_req *c, char *cwd) * with username and password (which was presumably queried from the user) * supplied in the Authorization: header. * Note that we "invent" a realm name which consists of the - * ftp://user@host part of the reqest (sans password -if supplied but invalid-) + * ftp://user@host part of the reqest (sans password ap_context_t f supplied but invalid-) */ static int ftp_unauthorized (request_rec *r, int log_it) { @@ -457,10 +457,10 @@ int ap_proxy_ftp_handler(request_rec *r, cache_req *c, char *url) struct sockaddr_in server; struct hostent server_hp; struct in_addr destaddr; - table *resp_hdrs; + ap_table_t *resp_hdrs; BUFF *f; BUFF *data = NULL; - pool *p = r->pool; + ap_context_t *p = r->pool; int one = 1; const long int zero = 0L; NET_SIZE_T clen; diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index ff092c8acd..937b314866 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -133,8 +133,8 @@ static const char *proxy_location_reverse_map(request_rec *r, const char *url) return url; } -/* Clear all connection-based headers from the incoming headers table */ -static void clear_connection(pool *p, table *headers) +/* Clear all connection-based headers from the incoming headers ap_table_t */ +static void clear_connection(ap_context_t *p, ap_table_t *headers) { const char *name; char *next = ap_pstrdup(p, ap_table_get(headers, "Connection")); @@ -172,8 +172,8 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url, char *strp2; const char *err, *desthost; int i, j, sock, len, backasswards; - array_header *reqhdrs_arr; - table *resp_hdrs; + ap_array_header_t *reqhdrs_arr; + ap_table_t *resp_hdrs; table_entry *reqhdrs; struct sockaddr_in server; struct in_addr destaddr; @@ -181,7 +181,7 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url, BUFF *f; char buffer[HUGE_STRING_LEN]; char portstr[32]; - pool *p = r->pool; + ap_context_t *p = r->pool; const long int zero = 0L; int destport = 0; char *destportstr = NULL; diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 1276b6f567..a33854ccba 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -136,7 +136,7 @@ void ap_proxy_c2hex(int ch, char *x) * those which must not be touched. */ char * - ap_proxy_canonenc(pool *p, const char *x, int len, enum enctype t, int isenc) + ap_proxy_canonenc(ap_context_t *p, const char *x, int len, enum enctype t, int isenc) { int i, j, ch; char *y; @@ -212,7 +212,7 @@ char * * Returns an error string. */ char * - ap_proxy_canon_netloc(pool *p, char **const urlp, char **userp, + ap_proxy_canon_netloc(ap_context_t *p, char **const urlp, char **userp, char **passwordp, char **hostp, int *port) { int i; @@ -273,7 +273,7 @@ char * return "Port number in URL > 65535"; } } - ap_str_tolower(host); /* DNS names are case-insensitive */ + ap_str_tolower(host); /* DNS names are case ap_context_t nsensitive */ if (*host == '\0') return "Missing host in URL"; /* check hostname syntax */ @@ -310,7 +310,7 @@ static const char * const lwday[7] = * formatted, then it exits very quickly. */ const char * - ap_proxy_date_canon(pool *p, const char *x) + ap_proxy_date_canon(ap_context_t *p, const char *x) { int wk, mday, year, hour, min, sec, mon; char *q, month[4], zone[4], week[4]; @@ -431,7 +431,7 @@ static int proxy_getline(char *s, int n, BUFF *in, int fold) */ table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f) { - table *resp_hdrs; + ap_table_t *resp_hdrs; int len; char *value, *end; char field[MAX_STRING_LEN]; @@ -606,7 +606,7 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c) * * A timeout should be set before calling this routine. */ -void ap_proxy_send_headers(request_rec *r, const char *respline, table *t) +void ap_proxy_send_headers(request_rec *r, const char *respline, ap_table_t *t) { int i; BUFF *fp = r->connection->client; @@ -626,7 +626,7 @@ void ap_proxy_send_headers(request_rec *r, const char *respline, table *t) /* - * list is a comma-separated list of case-insensitive tokens, with + * list is a comma-separated list of case ap_context_t nsensitive tokens, with * optional whitespace around the tokens. * The return returns 1 if the token val is found in the list, or 0 * otherwise. @@ -902,7 +902,7 @@ static const char * } /* Return TRUE if addr represents an IP address (or an IP network address) */ -int ap_proxy_is_ipaddr(struct dirconn_entry *This, pool *p) +int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_context_t *p) { const char *addr = This->name; long ip_addr[4]; @@ -1083,7 +1083,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r) } /* Return TRUE if addr represents a domain name */ -int ap_proxy_is_domainname(struct dirconn_entry *This, pool *p) +int ap_proxy_is_domainname(struct dirconn_entry *This, ap_context_t *p) { char *addr = This->name; int i; @@ -1107,7 +1107,7 @@ int ap_proxy_is_domainname(struct dirconn_entry *This, pool *p) return 0; /* Strip trailing dots */ - for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; --i) + for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; - ap_context_t ) addr[i] = '\0'; This->matcher = proxy_match_domainname; @@ -1136,7 +1136,7 @@ static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r) } /* Return TRUE if addr represents a host name */ -int ap_proxy_is_hostname(struct dirconn_entry *This, pool *p) +int ap_proxy_is_hostname(struct dirconn_entry *This, ap_context_t *p) { struct hostent host; char *addr = This->name; @@ -1162,7 +1162,7 @@ int ap_proxy_is_hostname(struct dirconn_entry *This, pool *p) This->hostentry = ap_pduphostent (p, &host); /* Strip trailing dots */ - for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; --i) + for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; - ap_context_t ) addr[i] = '\0'; This->matcher = proxy_match_hostname; @@ -1202,7 +1202,7 @@ static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r) } /* Return TRUE if addr is to be matched as a word */ -int ap_proxy_is_word(struct dirconn_entry *This, pool *p) +int ap_proxy_is_word(struct dirconn_entry *This, ap_context_t *p) { This->matcher = proxy_match_word; return 1; diff --git a/modules/test/mod_rndchunk.c b/modules/test/mod_rndchunk.c index 3f2a702a82..041f1af8f9 100644 --- a/modules/test/mod_rndchunk.c +++ b/modules/test/mod_rndchunk.c @@ -166,7 +166,7 @@ module rndchunk_module = { NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - NULL, /* command table */ + NULL, /* command ap_table_t */ rndchunk_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/modules/test/mod_test_util_uri.c b/modules/test/mod_test_util_uri.c index 4fb428fafc..b2fe6571a2 100644 --- a/modules/test/mod_test_util_uri.c +++ b/modules/test/mod_test_util_uri.c @@ -66,7 +66,7 @@ * SetHandler test-util-uri * </Location> * - * Then make a request to /test-util-uri. An html table of errors will + * Then make a request to /test-util-uri. An html ap_table_t of errors will * be output... and a total count of errors. */ @@ -138,7 +138,7 @@ static char *my_stpcpy(char *d, const char *s) static unsigned iterate_pieces(request_rec *r, const test_uri_t *pieces, int row) { unsigned u; - pool *sub; + ap_context_t *sub; char *input_uri; char *strp; uri_components result; @@ -341,7 +341,7 @@ module test_util_uri_module = { NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server config */ - NULL, /* command table */ + NULL, /* command ap_table_t */ test_util_uri_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/os/beos/os.c b/os/beos/os.c index 72281c296e..0eb63fc5f9 100644 --- a/os/beos/os.c +++ b/os/beos/os.c @@ -1,6 +1,6 @@ /* * This file will include OS specific functions which are not inlineable. - * Any inlineable functions should be defined in os-inline.c instead. + * Any inlineable functions should be defined in os ap_context_t nline.c instead. */ #include "ap_config.h" diff --git a/os/beos/os.h b/os/beos/os.h index a4af416269..57a2ad1e44 100644 --- a/os/beos/os.h +++ b/os/beos/os.h @@ -68,7 +68,7 @@ /* * This file in included in all Apache source code. It contains definitions * of facilities available on _this_ operating system (HAVE_* macros), - * and prototypes of OS specific functions defined in os.c or os-inline.c + * and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c */ extern int ap_os_is_path_absolute(const char *file); diff --git a/os/bs2000/bs2login.c b/os/bs2000/bs2login.c index 32eb1aecb0..3bbf03f7b7 100644 --- a/os/bs2000/bs2login.c +++ b/os/bs2000/bs2login.c @@ -168,7 +168,7 @@ static bs2_ForkType os_forktype(void) /* This routine is called by http_core for the BS2000Account directive */ /* It stores the account name for later use */ -const char *os_set_account(pool *p, const char *account) +const char *os_set_account(ap_context_t *p, const char *account) { char account_temp[ACCT_LEN+1]; diff --git a/os/bs2000/ebcdic.c b/os/bs2000/ebcdic.c index 0303fc6dbb..36f3ca5e08 100644 --- a/os/bs2000/ebcdic.c +++ b/os/bs2000/ebcdic.c @@ -67,7 +67,7 @@ Within the POSIX subsystem, the same character set was chosen as in "native BS2000", namely EBCDIC. EBCDIC Table. (Yes, in EBCDIC, the letters 'a'..'z' are not contiguous!) -This table is bijective, i.e. there are no ambigous or duplicate characters +This ap_table_t is bijective, i.e. there are no ambigous or duplicate characters 00 00 01 02 03 85 09 86 7f 87 8d 8e 0b 0c 0d 0e 0f *................* 10 10 11 12 13 8f 0a 08 97 18 19 9c 9d 1c 1d 1e 1f *................* 20 80 81 82 83 84 92 17 1b 88 89 8a 8b 8c 05 06 07 *................* @@ -122,17 +122,17 @@ const unsigned char os_toascii_strictly[256] = { 0x38, 0x39, 0xb3, 0x7b, 0xdc, 0x7d, 0xda, 0x7e /*0123456789.{.}.~*/ }; -/* This table is (almost) identical to the previous one. The only difference +/* This ap_table_t is (almost) identical to the previous one. The only difference * is the fact that it maps every EBCDIC *except 0x0A* to its ASCII - * equivalent. The reason for this table is simple: Throughout the + * equivalent. The reason for this ap_table_t is simple: Throughout the * server, protocol strings are used in the form * "Content-Type: text/plain\015\012". Now all the characters in the string * are stored as EBCDIC, only the semantics of \012 is completely - * different from LF (look it up in the table above). \015 happens to be + * different from LF (look it up in the ap_table_t above). \015 happens to be * mapped to \015 anyway, so there's no special case for it. * * In THIS table, EBCDIC-\012 is mapped to ASCII-\012. - * This table is therefore used wherever an EBCDIC to ASCII conversion is + * This ap_table_t is therefore used wherever an EBCDIC to ASCII conversion is * needed in the server. */ /* ebcdic-to-ascii with \012 mapped to ASCII-\n */ diff --git a/os/bs2000/os.c b/os/bs2000/os.c index c33810a2f0..942a06aa7f 100644 --- a/os/bs2000/os.c +++ b/os/bs2000/os.c @@ -57,7 +57,7 @@ /* * This file will include OS specific functions which are not inlineable. - * Any inlineable functions should be defined in os-inline.c instead. + * Any inlineable functions should be defined in os ap_context_t nline.c instead. */ #include "httpd.h" diff --git a/os/bs2000/os.h b/os/bs2000/os.h index 1ede0813f2..fb66b6155e 100644 --- a/os/bs2000/os.h +++ b/os/bs2000/os.h @@ -6,7 +6,7 @@ /* * This file in included in all Apache source code. It contains definitions * of facilities available on _this_ operating system (HAVE_* macros), - * and prototypes of OS specific functions defined in os.c or os-inline.c + * and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c */ #if !defined(INLINE) && defined(USE_GNU_INLINE) @@ -17,7 +17,7 @@ INLINE int ap_os_is_path_absolute(const char *file); -#include "os-inline.c" +#include "os ap_context_t nline.c" #endif #ifndef INLINE diff --git a/os/os2/os.h b/os/os2/os.h index d717f1f8ca..dbca54b217 100644 --- a/os/os2/os.h +++ b/os/os2/os.h @@ -8,7 +8,7 @@ /* * This file in included in all Apache source code. It contains definitions * of facilities available on _this_ operating system (HAVE_* macros), - * and prototypes of OS specific functions defined in os.c or os-inline.c + * and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c */ #if defined(__GNUC__) && !defined(INLINE) @@ -19,7 +19,7 @@ INLINE int ap_os_is_path_absolute(const char *file); -#include "os-inline.c" +#include "os ap_context_t nline.c" #endif #ifndef INLINE diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c index 86128412cf..165c5f1fef 100644 --- a/os/os2/util_os2.c +++ b/os/os2/util_os2.c @@ -5,7 +5,7 @@ #include "http_log.h" -API_EXPORT(char *)ap_os_canonical_filename(pool *pPool, const char *szFile) +API_EXPORT(char *)ap_os_canonical_filename(ap_context_t *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; char buf2[HUGE_STRING_LEN]; diff --git a/os/tpf/ebcdic.c b/os/tpf/ebcdic.c index be029f4259..479ace1de5 100644 --- a/os/tpf/ebcdic.c +++ b/os/tpf/ebcdic.c @@ -67,7 +67,7 @@ the BS2000 (apache/src/os/bs2000/ebcdic.c). /* Bijective EBCDIC (character set IBM-1047) to US-ASCII table: -This table is bijective - there are no ambigous or duplicate characters. +This ap_table_t is bijective - there are no ambigous or duplicate characters. */ const unsigned char os_toascii_strictly[256] = { 0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f, /* 00-0f: */ @@ -106,7 +106,7 @@ const unsigned char os_toascii_strictly[256] = { /* Server EBCDIC (character set IBM-1047) to US-ASCII table: -This table is a copy of the os_toascii_strictly bijective table above. +This ap_table_t is a copy of the os_toascii_strictly bijective ap_table_t above. The only change is that hex 0a (\012 octal) is mapped to hex 0a (ASCII's line feed) instead of hex 8e. This is done because throughout Apache, protocol string definitions hardcode the linefeed as \012 (octal): @@ -150,7 +150,7 @@ const unsigned char os_toascii[256] = { /* The US-ASCII to EBCDIC (character set IBM-1047) table: -This table is bijective (no ambiguous or duplicate characters) +This ap_table_t is bijective (no ambiguous or duplicate characters) */ const unsigned char os_toebcdic[256] = { 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, /* 00-0f: */ diff --git a/os/tpf/os.c b/os/tpf/os.c index e4682324cd..dabe414f0f 100644 --- a/os/tpf/os.c +++ b/os/tpf/os.c @@ -57,7 +57,7 @@ /* * This file will include OS specific functions which are not inlineable. - * Any inlineable functions should be defined in os-inline.c instead. + * Any inlineable functions should be defined in os ap_context_t nline.c instead. */ #include "httpd.h" @@ -211,7 +211,7 @@ int execvp(const char *file, char *const argv[]) -int ap_tpf_spawn_child(pool *p, int (*func) (void *, child_info *), +int ap_tpf_spawn_child(ap_context_t *p, int (*func) (void *, child_info *), void *data, enum kill_conditions kill_how, int *pipe_in, int *pipe_out, int *pipe_err, int out_fds[], int in_fds[], int err_fds[]) @@ -222,7 +222,7 @@ int ap_tpf_spawn_child(pool *p, int (*func) (void *, child_info *), int fd_flags_out, fd_flags_in, fd_flags_err; struct tpf_fork_input fork_input; TPF_FORK_CHILD *cld = (TPF_FORK_CHILD *) data; - array_header *env_arr = ap_table_elts ((array_header *) cld->subprocess_env); + ap_array_header_t *env_arr = ap_table_elts ((array_header *) cld->subprocess_env); table_entry *elts = (table_entry *) env_arr->elts; @@ -395,7 +395,7 @@ int os_check_server(char *server) { return 0; } -void os_note_additional_cleanups(pool *p, int sd) { +void os_note_additional_cleanups(ap_context_t *p, int sd) { char sockfilename[50]; /* write the socket to file so that TPF socket device driver will close socket in case we happen to abend. */ diff --git a/os/tpf/os.h b/os/tpf/os.h index ff65322902..916ef109fe 100644 --- a/os/tpf/os.h +++ b/os/tpf/os.h @@ -10,7 +10,7 @@ /* * This file in included in all Apache source code. It contains definitions * of facilities available on _this_ operating system (HAVE_* macros), - * and prototypes of OS specific functions defined in os.c or os-inline.c + * and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c */ #include "ap_config.h" @@ -20,7 +20,7 @@ * part of the header */ #define INLINE extern ap_inline -#include "os-inline.c" +#include "os ap_context_t nline.c" #endif #ifndef INLINE diff --git a/os/unix/os.h b/os/unix/os.h index 54124c77fc..683f735326 100644 --- a/os/unix/os.h +++ b/os/unix/os.h @@ -67,7 +67,7 @@ /* * This file in included in all Apache source code. It contains definitions * of facilities available on _this_ operating system (HAVE_* macros), - * and prototypes of OS specific functions defined in os.c or os-inline.c + * and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c */ #if !defined(INLINE) && defined(USE_GNU_INLINE) diff --git a/os/win32/mod_isapi.c b/os/win32/mod_isapi.c index fa002708ba..1b874a87e8 100644 --- a/os/win32/mod_isapi.c +++ b/os/win32/mod_isapi.c @@ -68,7 +68,7 @@ * function as well). * * To load, simply place the ISA in a location in the document tree. - * Then add an "AddHandler isapi-isa dll" into your config file. + * Then add an "AddHandler isapi ap_context_t sa dll" into your config file. * You should now be able to load ISAPI DLLs just be reffering to their * URLs. Make sure the ExecCGI option is active in the directory * the ISA is in. @@ -129,7 +129,7 @@ int isapi_handler (request_rec *r) { BOOL (*isapi_term)(DWORD); /* optional entry point 3 */ isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid)); - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; int retval; /* Use similar restrictions as CGIs */ @@ -296,7 +296,7 @@ int isapi_handler (request_rec *r) { BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName, LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) { request_rec *r = ((isapi_cid *)hConn)->r; - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; const char *result; /* Mostly, we just grab it from the environment, but there are @@ -546,7 +546,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest, } handler_rec isapi_handlers[] = { -{ "isapi-isa", isapi_handler }, +{ "isapi ap_context_t sa", isapi_handler }, { NULL} }; @@ -557,7 +557,7 @@ module isapi_module = { NULL, /* merge per-dir config */ NULL, /* server config */ NULL, /* merge server config */ - NULL, /* command table */ + NULL, /* command ap_table_t */ isapi_handlers, /* handlers */ NULL, /* filename translation */ NULL, /* check_user_id */ diff --git a/os/win32/os.h b/os/win32/os.h index c034f7d8a5..d1f3f53b8a 100644 --- a/os/win32/os.h +++ b/os/win32/os.h @@ -13,7 +13,7 @@ /* char *crypt(const char *pw, const char *salt); */ #define crypt(buf,salt) (buf) -/* Use the Windows built-in spawnvp */ +/* Use the Windows built ap_context_t n spawnvp */ #define ap_spawnvp(file, argv) (spawnvp(file, argv)) /* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c index 348e0f9e2a..1ec908f9a4 100644 --- a/os/win32/util_win32.c +++ b/os/win32/util_win32.c @@ -29,7 +29,7 @@ static BOOL OnlyDots(char *pString) * is present on the existing path. This routine also * converts alias names to long names. */ -API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, +API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; @@ -149,7 +149,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, /* Perform canonicalization with the exception that the * input case is preserved. */ -API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, +API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile) { char *pNewStr; @@ -268,7 +268,7 @@ API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, /* Perform complete canonicalization. */ -API_EXPORT(char *) ap_os_canonical_filename(pool *pPool, const char *szFile) +API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *pPool, const char *szFile) { char *pNewName; pNewName = ap_os_case_canonical_filename(pPool, szFile); diff --git a/server/config.c b/server/config.c index a6864eca02..489ae78dc3 100644 --- a/server/config.c +++ b/server/config.c @@ -90,15 +90,15 @@ HOOK_STRUCT( ) IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) -IMPLEMENT_HOOK_VOID(pre_config,(pool *pconf,pool *plog,pool *ptemp), +IMPLEMENT_HOOK_VOID(pre_config,(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp), (pconf,plog,ptemp)) IMPLEMENT_HOOK_VOID(post_config, - (pool *pconf, pool *plog, pool *ptemp, server_rec *s), + (ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s), (pconf,plog,ptemp,s)) IMPLEMENT_HOOK_VOID(open_logs, - (pool *pconf, pool *plog, pool *ptemp, server_rec *s), + (ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s), (pconf,plog,ptemp,s)) -IMPLEMENT_HOOK_VOID(child_init,(pool *pchild, server_rec *s),(pchild,s)) +IMPLEMENT_HOOK_VOID(child_init,(ap_context_t *pchild, server_rec *s),(pchild,s)) DEF_Explain @@ -121,8 +121,8 @@ API_VAR_EXPORT module *top_module = NULL; API_VAR_EXPORT module **ap_loaded_modules=NULL; typedef int (*handler_func) (request_rec *); -typedef void *(*dir_maker_func) (pool *, char *); -typedef void *(*merger_func) (pool *, void *, void *); +typedef void *(*dir_maker_func) (ap_context_t *, char *); +typedef void *(*merger_func) (ap_context_t *, void *, void *); /* Dealing with config vectors. These are associated with per-directory, * per-server, and per-request configuration, and have a void* pointer for @@ -151,14 +151,14 @@ API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val) } #endif -static void *create_empty_config(pool *p) +static void *create_empty_config(ap_context_t *p) { void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); return (void *) conf_vector; } -static void *create_default_per_dir_config(pool *p) +static void *create_default_per_dir_config(ap_context_t *p) { void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); module *modp; @@ -174,7 +174,7 @@ static void *create_default_per_dir_config(pool *p) } void * - ap_merge_per_dir_configs(pool *p, void *base, void *new) + ap_merge_per_dir_configs(ap_context_t *p, void *base, void *new) { void **conf_vector = (void **) ap_palloc(p, sizeof(void *) * total_modules); void **base_vector = (void **) base; @@ -194,7 +194,7 @@ void * return (void *) conf_vector; } -static void *create_server_config(pool *p, server_rec *s) +static void *create_server_config(ap_context_t *p, server_rec *s) { void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); module *modp; @@ -207,7 +207,7 @@ static void *create_server_config(pool *p, server_rec *s) return (void *) conf_vector; } -static void merge_server_configs(pool *p, void *base, void *virt) +static void merge_server_configs(ap_context_t *p, void *base, void *virt) { /* Can reuse the 'virt' vector for the spine of it, since we don't * have to deal with the moral equivalent of .htaccess files here... @@ -228,17 +228,17 @@ static void merge_server_configs(pool *p, void *base, void *virt) } } -void *ap_create_request_config(pool *p) +void *ap_create_request_config(ap_context_t *p) { return create_empty_config(p); } -void *ap_create_conn_config(pool *p) +void *ap_create_conn_config(ap_context_t *p) { return create_empty_config(p); } -CORE_EXPORT(void *) ap_create_per_dir_config(pool *p) +CORE_EXPORT(void *) ap_create_per_dir_config(ap_context_t *p) { return create_empty_config(p); } @@ -257,7 +257,7 @@ typedef struct { static fast_handler_rec *handlers; static fast_handler_rec *wildhandlers; -static void init_handlers(pool *p) +static void init_handlers(ap_context_t *p) { module *modp; int nhandlers = 0; @@ -487,7 +487,7 @@ API_EXPORT(void) ap_add_loaded_module(module *mod) * * Notes: 1. ap_add_module() would already complain if no more space * exists for adding a dynamically loaded module - * 2. ap_add_module() accepts double-inclusion, so we have + * 2. ap_add_module() accepts double ap_context_t nclusion, so we have * to accept this, too. */ for (m = ap_loaded_modules; *m != NULL; m++) @@ -933,7 +933,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_pt static cmd_parms default_parms = {NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; -API_EXPORT(const char *) ap_server_root_relative(pool *p, const char *file) +API_EXPORT(const char *) ap_server_root_relative(ap_context_t *p, const char *file) { if(ap_os_is_path_absolute(file)) return file; @@ -949,10 +949,10 @@ API_EXPORT(const char *) ap_server_root_relative(pool *p, const char *file) /* Structure to be passed to cfg_open_custom(): it contains an * index which is incremented from 0 to nelts on each call to * cfg_getline() (which in turn calls arr_elts_getstr()) - * and an array_header pointer for the string array. + * and an ap_array_header_t pointer for the string array. */ typedef struct { - array_header *array; + ap_array_header_t *array; int curr_idx; } arr_elts_param_t; @@ -981,8 +981,8 @@ static int arr_elts_close(void *param) return 0; } -static void process_command_config(server_rec *s, array_header *arr, pool *p, - pool *ptemp) +static void process_command_config(server_rec *s, ap_array_header_t *arr, ap_context_t *p, + ap_context_t *ptemp) { const char *errmsg; cmd_parms parms; @@ -1010,7 +1010,7 @@ static void process_command_config(server_rec *s, array_header *arr, pool *p, ap_cfg_closefile(parms.config_file); } -void ap_process_resource_config(server_rec *s, const char *fname, pool *p, pool *ptemp) +void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t *p, ap_context_t *ptemp) { const char *errmsg; cmd_parms parms; @@ -1134,7 +1134,7 @@ int ap_parse_htaccess(void **result, request_rec *r, int override, } -CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname, +CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *hostname, server_rec *main_server, server_rec **ps) { server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec)); @@ -1190,7 +1190,7 @@ CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname, } -static void fixup_virtual_hosts(pool *p, server_rec *main_server) +static void fixup_virtual_hosts(ap_context_t *p, server_rec *main_server) { server_rec *virt; @@ -1235,13 +1235,13 @@ static void fixup_virtual_hosts(pool *p, server_rec *main_server) * Getting *everything* configured... */ -static void init_config_globals(pool *p) +static void init_config_globals(ap_context_t *p) { /* Global virtual host hash bucket pointers. Init to null. */ ap_init_vhost_config(p); } -static server_rec *init_server_config(pool *p) +static server_rec *init_server_config(ap_context_t *p) { server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec)); @@ -1276,7 +1276,7 @@ static server_rec *init_server_config(pool *p) } -server_rec *ap_read_config(pool *p, pool *ptemp, const char *confname) +server_rec *ap_read_config(ap_context_t *p, ap_context_t *ptemp, const char *confname) { server_rec *s = init_server_config(p); @@ -1298,7 +1298,7 @@ server_rec *ap_read_config(pool *p, pool *ptemp, const char *confname) return s; } -void ap_single_module_configure(pool *p, server_rec *s, module *m) +void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m) { if (m->create_server_config) ap_set_module_config(s->module_config, m, @@ -1308,16 +1308,16 @@ void ap_single_module_configure(pool *p, server_rec *s, module *m) (*m->create_dir_config)(p, NULL)); } -void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s) +void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s) { ap_run_post_config(pconf,plog,ptemp,s); init_handlers(pconf); } -void ap_child_init_hook(pool *pchild, server_rec *s) +void ap_child_init_hook(ap_context_t *pchild, server_rec *s) { /* TODO: uh this seems ugly, is there a better way? */ - ap_child_init_alloc(); + /*ap_child_init_alloc(); PUT THIS BACK IN XXXXX */ ap_run_child_init(pchild,s); } @@ -1419,7 +1419,7 @@ void ap_show_modules() { int n; - printf("Compiled-in modules:\n"); + printf("Compiled ap_context_t n modules:\n"); for (n = 0; ap_loaded_modules[n]; ++n) printf(" %s\n", ap_loaded_modules[n]->name); } diff --git a/server/connection.c b/server/connection.c index a9f0eac514..813824f352 100644 --- a/server/connection.c +++ b/server/connection.c @@ -72,7 +72,7 @@ HOOK_STRUCT( IMPLEMENT_HOOK_VOID(pre_connection,(conn_rec *c),(c)) IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED) -/* TODO: re-implement the lingering close stuff */ +/* TODO: re ap_context_t mplement the lingering close stuff */ #define NO_LINGCLOSE /* @@ -256,7 +256,7 @@ int ap_process_http_connection(conn_rec *c) structure, but for now... */ -conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout, +conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout, const struct sockaddr_in *remaddr, const struct sockaddr_in *saddr, long id) { diff --git a/server/gen_uri_delims.c b/server/gen_uri_delims.c index 15a73fbc7a..b71e96ad71 100644 --- a/server/gen_uri_delims.c +++ b/server/gen_uri_delims.c @@ -1,6 +1,6 @@ #include <stdio.h> -/* generate a table of 256 values, where certain characters are +/* generate a ap_table_t of 256 values, where certain characters are * marked "interesting"... for the uri parsing process. */ diff --git a/server/listen.c b/server/listen.c index 5e73cc5090..051f708a04 100644 --- a/server/listen.c +++ b/server/listen.c @@ -160,13 +160,14 @@ static int make_sock(const struct sockaddr_in *server) } -static void close_listeners_on_exec(void *v) +static ap_status_t close_listeners_on_exec(void *v) { ap_listen_rec *lr; for (lr = ap_listeners; lr; lr = lr->next) { close(lr->fd); } + return APR_SUCCESS; } @@ -196,7 +197,7 @@ static void alloc_listener(struct sockaddr_in *local_addr) } -int ap_listen_open(pool *pconf, unsigned port) +int ap_listen_open(ap_context_t *pconf, unsigned port) { ap_listen_rec *lr; ap_listen_rec *next; diff --git a/server/log.c b/server/log.c index 91d6f6fb11..369d8b1b77 100644 --- a/server/log.c +++ b/server/log.c @@ -64,6 +64,7 @@ #define CORE_PRIVATE +#include "apr_lib.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" @@ -154,7 +155,7 @@ static const TRANS priorities[] = { {NULL, -1}, }; -static int error_log_child(void *cmd, child_info *pinfo) +static int error_log_child(void *cmd, ap_child_info_t *pinfo) { /* Child process code for 'ErrorLog "|..."'; * may want a common framework for this, since I expect it will @@ -183,7 +184,7 @@ static int error_log_child(void *cmd, child_info *pinfo) return(child_pid); } -static void open_error_log(server_rec *s, pool *p) +static void open_error_log(server_rec *s, ap_context_t *p) { const char *fname; @@ -241,7 +242,7 @@ static void open_error_log(server_rec *s, pool *p) } } -void ap_open_logs(server_rec *s_main, pool *p) +void ap_open_logs(server_rec *s_main, ap_context_t *p) { server_rec *virt, *q; int replace_stderr; @@ -493,7 +494,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, va_end(args); } -void ap_log_pid(pool *p, const char *fname) +void ap_log_pid(ap_context_t *p, const char *fname) { FILE *pid_file; struct stat finfo; @@ -677,7 +678,7 @@ static void piped_log_cleanup_for_exec(void *data) } -API_EXPORT(piped_log *) ap_open_piped_log(pool *p, const char *program) +API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program) { piped_log *pl; @@ -709,7 +710,7 @@ API_EXPORT(void) ap_close_piped_log(piped_log *pl) } #else -static int piped_log_child(void *cmd, child_info *pinfo) +static int piped_log_child(void *cmd, ap_child_info_t *pinfo) { /* Child process code for 'TransferLog "|..."'; * may want a common framework for this, since I expect it will @@ -738,7 +739,7 @@ static int piped_log_child(void *cmd, child_info *pinfo) } -API_EXPORT(piped_log *) ap_open_piped_log(pool *p, const char *program) +API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program) { piped_log *pl; FILE *dummy; diff --git a/server/main.c b/server/main.c index 93f87fde88..4aa16ada35 100644 --- a/server/main.c +++ b/server/main.c @@ -66,9 +66,9 @@ char *ap_server_argv0; API_VAR_EXPORT const char *ap_server_root; -array_header *ap_server_pre_read_config; -array_header *ap_server_post_read_config; -array_header *ap_server_config_defines; +ap_array_header_t *ap_server_pre_read_config; +ap_array_header_t *ap_server_post_read_config; +ap_array_header_t *ap_server_config_defines; static void show_compile_settings(void) { @@ -156,7 +156,7 @@ static void show_compile_settings(void) printf(" -D SHARED_CORE\n"); #endif -/* This list displays the compiled-in default paths: */ +/* This list displays the compiled ap_context_t n default paths: */ #ifdef HTTPD_ROOT printf(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n"); #endif @@ -222,7 +222,7 @@ static void usage(char *bin) fprintf(stderr, " -v : show version number\n"); fprintf(stderr, " -V : show compile settings\n"); fprintf(stderr, " -h : list available command line options (this page)\n"); - fprintf(stderr, " -l : list compiled-in modules\n"); + fprintf(stderr, " -l : list compiled ap_context_t n modules\n"); fprintf(stderr, " -L : list available configuration directives\n"); /* TODOC: -S has been replaced by '-t -D DUMP_VHOSTS' */ /* fprintf(stderr, " -S : show parsed settings (currently only vhost settings)\n"); */ @@ -232,7 +232,7 @@ static void usage(char *bin) exit(1); } -pool *g_pHookPool; +ap_context_t *g_pHookPool; extern char *optarg; @@ -249,11 +249,11 @@ int main(int argc, char **argv) const char *confname = SERVER_CONFIG_FILE; const char *def_server_root = HTTPD_ROOT; server_rec *server_conf; - pool *pglobal; /* Global pool */ - pool *pconf; /* Pool for config stuff */ - pool *plog; /* Pool for error-logging files */ - pool *ptemp; /* Pool for temporart config stuff */ - pool *pcommands; /* Pool for -C and -c switches */ + ap_context_t *pglobal; /* Global pool */ + ap_context_t *pconf; /* Pool for config stuff */ + ap_context_t *plog; /* Pool for error-logging files */ + ap_context_t *ptemp; /* Pool for temporart config stuff */ + ap_context_t *pcommands; /* Pool for -C and -c switches */ /* TODO: PATHSEPARATOR should be one of the os defines */ #define PATHSEPARATOR '/' @@ -267,10 +267,10 @@ int main(int argc, char **argv) ap_util_init(); ap_util_uri_init(); - pglobal = ap_init_alloc(); + ap_create_context(NULL, NULL, &pglobal); g_pHookPool=pglobal; - pcommands = ap_make_sub_pool(pglobal); + ap_create_context(pglobal, NULL, &pcommands); ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *)); ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *)); ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *)); @@ -317,9 +317,9 @@ int main(int argc, char **argv) } } - pconf = ap_make_sub_pool(pglobal); - plog = ap_make_sub_pool(pglobal); - ptemp = ap_make_sub_pool(pconf); + ap_create_context(pglobal, NULL, &pconf); + ap_create_context(pglobal, NULL, &plog); + ap_create_context(pconf, NULL, &ptemp); /* for legacy reasons, we read the configuration twice before we actually serve any requests */ @@ -340,7 +340,7 @@ int main(int argc, char **argv) for (;;) { ap_clear_pool(pconf); - ptemp = ap_make_sub_pool(pconf); + ap_create_context(pconf, NULL, &ptemp); ap_server_root = def_server_root; ap_run_pre_config(pconf, plog, ptemp); server_conf = ap_read_config(pconf, ptemp, confname); diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index e1fd827c0e..39760eed38 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -157,9 +157,9 @@ struct other_child_rec { static other_child_rec *other_children; #endif -static pool *pconf; /* Pool for config stuff */ -static pool *pchild; /* Pool for httpd child stuff */ -static pool *thread_pool_parent; /* Parent of per-thread pools */ +static ap_context_t *pconf; /* Pool for config stuff */ +static ap_context_t *pchild; /* Pool for httpd child stuff */ +static ap_context_t *thread_pool_parent; /* Parent of per-thread pools */ static pthread_mutex_t thread_pool_create_mutex; static int child_num; @@ -680,7 +680,7 @@ static void process_child_status(int pid, ap_wait_t status) } } -static int setup_listeners(pool *p, server_rec *s) +static int setup_listeners(ap_context_t *p, server_rec *s) { ap_listen_rec *lr; int num_listeners = 0; @@ -733,7 +733,7 @@ int ap_graceful_stop_signalled(void) * Child process main loop. */ -static void process_socket(pool *p, struct sockaddr *sa_client, int csd, +static void process_socket(ap_context_t *p, struct sockaddr *sa_client, int csd, int conn_id) { struct sockaddr sa_server; /* ZZZZ */ @@ -846,8 +846,8 @@ static void *worker_thread(void *arg) { struct sockaddr sa_client; int csd = -1; - pool *tpool; /* Pool for this thread */ - pool *ptrans; /* Pool for per-transaction stuff */ + ap_context_t *tpool; /* Pool for this thread */ + ap_context_t *ptrans; /* Pool for per-transaction stuff */ int sd = -1; int srv; int curr_pollfd, last_pollfd = 0; @@ -1261,7 +1261,7 @@ static void server_main_loop(int remaining_children_to_start) } } -int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) +int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) { int remaining_children_to_start; int i; @@ -1401,7 +1401,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void dexter_pre_config(pool *p, pool *plog, pool *ptemp) +static void dexter_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp) { static int restart_num = 0; @@ -1653,7 +1653,7 @@ module MODULE_VAR_EXPORT mpm_dexter_module = { NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - dexter_cmds, /* command table */ + dexter_cmds, /* command ap_table_t */ NULL, /* handlers */ dexter_hooks /* register_hooks */ }; diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index c9128a8442..e127bdbbd8 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -98,7 +98,7 @@ typedef struct { int pid; int tid; int sd; - pool *tpool; /* "pthread" would be confusing */ + ap_context_t *tpool; /* "pthread" would be confusing */ } proc_info; #if 0 @@ -153,8 +153,8 @@ struct other_child_rec { static other_child_rec *other_children; #endif -static pool *pconf; /* Pool for config stuff */ -static pool *pchild; /* Pool for httpd child stuff */ +static ap_context_t *pconf; /* Pool for config stuff */ +static ap_context_t *pchild; /* Pool for httpd child stuff */ static int my_pid; /* Linux getpid() doesn't work except in main thread. Use this instead */ @@ -673,7 +673,7 @@ static void process_child_status(int pid, ap_wait_t status) } } -static int setup_listeners(pool *pconf, server_rec *s) +static int setup_listeners(ap_context_t *pconf, server_rec *s) { ap_listen_rec *lr; int num_listeners = 0; @@ -726,7 +726,7 @@ int ap_graceful_stop_signalled(void) * Child process main loop. */ -static void process_socket(pool *p, struct sockaddr *sa_client, int csd, int my_child_num, int my_thread_num) +static void process_socket(ap_context_t *p, struct sockaddr *sa_client, int csd, int my_child_num, int my_thread_num) { struct sockaddr sa_server; /* ZZZZ */ size_t len = sizeof(struct sockaddr); @@ -798,10 +798,10 @@ static void * worker_thread(void * dummy) proc_info * ti = dummy; int process_slot = ti->pid; int thread_slot = ti->tid; - pool *tpool = ti->tpool; + ap_context_t *tpool = ti->tpool; struct sockaddr sa_client; int csd = -1; - pool *ptrans; /* Pool for per-transaction stuff */ + ap_context_t *ptrans; /* Pool for per-transaction stuff */ int sd = -1; int srv; int curr_pollfd, last_pollfd = 0; @@ -809,7 +809,7 @@ static void * worker_thread(void * dummy) free(ti); - ptrans = ap_make_sub_pool(tpool); + ap_create_context(tpool, NULL, &ptrans); pthread_mutex_lock(&worker_thread_count_mutex); worker_thread_count++; @@ -917,7 +917,7 @@ static void child_main(int child_num_arg) ap_listen_rec *lr; my_pid = getpid(); - pchild = ap_make_sub_pool(pconf); + ap_create_context(pconf, NULL, &pchild); /*stuff to do before we switch id's, so we have permissions.*/ reopen_scoreboard(pchild); @@ -971,7 +971,7 @@ static void child_main(int child_num_arg) my_info->pid = my_child_num; my_info->tid = i; my_info->sd = 0; - my_info->tpool = ap_make_sub_pool(pchild); + ap_create_context(pchild, NULL, &my_info->tpool); /* We are creating threads right now */ (void) ap_update_child_status(my_child_num, i, SERVER_STARTING, @@ -1276,7 +1276,7 @@ static void server_main_loop(int remaining_children_to_start) } } -int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) +int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) { int remaining_children_to_start; @@ -1434,7 +1434,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void mpmt_pthread_pre_config(pool *pconf, pool *plog, pool *ptemp) +static void mpmt_pthread_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) { static int restart_num = 0; @@ -1693,7 +1693,7 @@ module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = { NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - mpmt_pthread_cmds, /* command table */ + mpmt_pthread_cmds, /* command ap_table_t */ NULL, /* handlers */ mpmt_pthread_hooks /* register_hooks */ }; diff --git a/server/mpm/mpmt_pthread/scoreboard.c b/server/mpm/mpmt_pthread/scoreboard.c index 2be4c2b97c..34f0f8fba2 100644 --- a/server/mpm/mpmt_pthread/scoreboard.c +++ b/server/mpm/mpmt_pthread/scoreboard.c @@ -27,7 +27,7 @@ caddr_t get_shared_heap(const char *); scoreboard *ap_scoreboard_image = NULL; static char *ap_server_argv0=NULL; -extern pool * pconf; +extern ap_context_t * pconf; /***************************************************************** * @@ -46,7 +46,7 @@ extern pool * pconf; * shared memory (so they use memcpy etc.) */ -void reinit_scoreboard(pool *p) +void reinit_scoreboard(ap_context_t *p) { ap_assert(!ap_scoreboard_image); ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE); @@ -114,7 +114,7 @@ caddr_t get_shared_heap(const char *Name) return BaseAddress; } -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { caddr_t m; @@ -137,7 +137,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -API_EXPORT(void) reopen_scoreboard(pool *p) +API_EXPORT(void) reopen_scoreboard(ap_context_t *p) { caddr_t m; int rc; @@ -189,7 +189,7 @@ static void cleanup_shared_mem(void *d) shm_unlink(ap_scoreboard_fname); } -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { char buf[512]; caddr_t m; @@ -224,13 +224,13 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -API_EXPORT(void) reopen_scoreboard(pool *p) +API_EXPORT(void) reopen_scoreboard(ap_context_t *p) { } #elif defined(USE_MMAP_SCOREBOARD) -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { caddr_t m; @@ -304,7 +304,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -API_EXPORT(void) reopen_scoreboard(pool *p) +API_EXPORT(void) reopen_scoreboard(ap_context_t *p) { } @@ -312,7 +312,7 @@ API_EXPORT(void) reopen_scoreboard(pool *p) static key_t shmkey = IPC_PRIVATE; static int shmid = -1; -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { struct shmid_ds shmbuf; const server_rec * server_conf = ap_get_server_conf(); @@ -397,7 +397,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -API_EXPORT(void) reopen_scoreboard(pool *p) +API_EXPORT(void) reopen_scoreboard(ap_context_t *p) { } @@ -444,7 +444,7 @@ static void cleanup_scoreboard_file(void *foo) unlink(ap_scoreboard_fname); } -API_EXPORT(void) reopen_scoreboard(pool *p) +API_EXPORT(void) reopen_scoreboard(ap_context_t *p) { if (scoreboard_fd != -1) ap_pclosef(p, scoreboard_fd); @@ -459,7 +459,7 @@ API_EXPORT(void) reopen_scoreboard(pool *p) #endif /* Called by parent process */ -void reinit_scoreboard(pool *p) +void reinit_scoreboard(ap_context_t *p) { int running_gen = 0; if (ap_scoreboard_image) diff --git a/server/mpm/mpmt_pthread/scoreboard.h b/server/mpm/mpmt_pthread/scoreboard.h index c1277507f6..a5beeb1131 100644 --- a/server/mpm/mpmt_pthread/scoreboard.h +++ b/server/mpm/mpmt_pthread/scoreboard.h @@ -195,7 +195,7 @@ typedef struct { #endif API_EXPORT(int) ap_exists_scoreboard_image(void); -void reinit_scoareboard(pool *p); +void reinit_scoareboard(ap_context_t *p); void cleanup_scoreboard(void); API_EXPORT(void) ap_sync_scoreboard_image(void); @@ -205,10 +205,10 @@ caddr_t get_shared_heap(const char *Name); #elif defined(USE_POSIX_SCOREBOARD) static void cleanup_shared_mem(void *d); #else -void reinit_scoreboard(pool *p); +void reinit_scoreboard(ap_context_t *p); #endif -API_EXPORT(void) reopen_scoreboard(pool *p); +API_EXPORT(void) reopen_scoreboard(ap_context_t *p); ap_inline void ap_sync_scoreboard_image(void); void increment_counts(int child_num, int thread_num, request_rec *r); diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index f9239dbc57..8ffb390a3f 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -165,8 +165,8 @@ struct other_child_rec { static other_child_rec *other_children; #endif -static pool *pconf; /* Pool for config stuff */ -static pool *pchild; /* Pool for httpd child stuff */ +static ap_context_t *pconf; /* Pool for config stuff */ +static ap_context_t *pchild; /* Pool for httpd child stuff */ static int my_pid; /* it seems silly to call getpid all the time */ #ifndef MULTITHREAD @@ -228,7 +228,7 @@ static void clean_child_exit(int code) } #if defined(USE_FCNTL_SERIALIZED_ACCEPT) || defined(USE_FLOCK_SERIALIZED_ACCEPT) -static void expand_lock_fname(pool *p) +static void expand_lock_fname(ap_context_t *p) { /* XXXX possibly bogus cast */ ap_lock_fname = ap_psprintf(p, "%s.%lu", @@ -244,7 +244,7 @@ static ulock_t uslock = NULL; #define accept_mutex_child_init(x) -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { ptrdiff_t old; usptr_t *us; @@ -321,7 +321,7 @@ static void accept_mutex_child_cleanup(void *foo) } } -static void accept_mutex_child_init(pool *p) +static void accept_mutex_child_init(ap_context_t *p) { ap_register_cleanup(p, NULL, accept_mutex_child_cleanup, ap_null_cleanup); } @@ -335,7 +335,7 @@ static void accept_mutex_cleanup(void *foo) accept_mutex = (void *)(caddr_t)-1; } -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { pthread_mutexattr_t mattr; int fd; @@ -454,7 +454,7 @@ static void accept_mutex_cleanup(void *foo) #define accept_mutex_child_init(x) -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { union semun ick; struct semid_ds buf; @@ -485,7 +485,7 @@ static void accept_mutex_init(pool *p) } ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup); - /* pre-initialize these */ + /* pre ap_context_t nitialize these */ op_on.sem_num = 0; op_on.sem_op = -1; op_on.sem_flg = SEM_UNDO; @@ -526,7 +526,7 @@ static int lock_fd = -1; * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { lock_it.l_whence = SEEK_SET; /* from current point */ @@ -596,7 +596,7 @@ static void accept_mutex_cleanup(void *foo) * Initialize mutex lock. * Done by each child at it's birth */ -static void accept_mutex_child_init(pool *p) +static void accept_mutex_child_init(ap_context_t *p) { lock_fd = ap_popenf(p, ap_lock_fname, O_WRONLY, 0600); @@ -611,7 +611,7 @@ static void accept_mutex_child_init(pool *p) * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { expand_lock_fname(p); unlink(ap_lock_fname); @@ -661,7 +661,7 @@ static void accept_mutex_cleanup(void *foo) * Initialize mutex lock. * Done by each child at it's birth */ -static void accept_mutex_child_init(pool *p) +static void accept_mutex_child_init(ap_context_t *p) { int rc = DosOpenMutexSem(NULL, &lock_sem); @@ -678,7 +678,7 @@ static void accept_mutex_child_init(pool *p) * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE); @@ -725,7 +725,7 @@ static void accept_mutex_cleanup(void *foo) #define accept_mutex_init(x) -static void accept_mutex_child_init(pool *p) +static void accept_mutex_child_init(ap_context_t *p) { ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup); tpf_core_held = 0; @@ -934,7 +934,7 @@ caddr_t get_shared_heap(const char *Name) return BaseAddress; } -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { caddr_t m; @@ -957,7 +957,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(pool *p) +static void reopen_scoreboard(ap_context_t *p) { caddr_t m; int rc; @@ -1009,7 +1009,7 @@ static void cleanup_shared_mem(void *d) shm_unlink(ap_scoreboard_fname); } -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { char buf[512]; caddr_t m; @@ -1044,13 +1044,13 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(pool *p) +static void reopen_scoreboard(ap_context_t *p) { } #elif defined(USE_MMAP_SCOREBOARD) -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { caddr_t m; @@ -1124,7 +1124,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(pool *p) +static void reopen_scoreboard(ap_context_t *p) { } @@ -1132,7 +1132,7 @@ static void reopen_scoreboard(pool *p) static key_t shmkey = IPC_PRIVATE; static int shmid = -1; -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { struct shmid_ds shmbuf; #ifdef MOVEBREAK @@ -1216,7 +1216,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(pool *p) +static void reopen_scoreboard(ap_context_t *p) { } @@ -1232,7 +1232,7 @@ static void cleanup_scoreboard_heap() } } -static void setup_shared_mem(pool *p) +static void setup_shared_mem(ap_context_t *p) { cinfc(CINFC_WRITE, CINFC_CMMCTK2); ap_scoreboard_image = (scoreboard *) gsysc(SCOREBOARD_FRAMES, SCOREBOARD_NAME); @@ -1246,7 +1246,7 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(pool *p) +static void reopen_scoreboard(ap_context_t *p) { cinfc(CINFC_WRITE, CINFC_CMMCTK2); } @@ -1294,7 +1294,7 @@ static void cleanup_scoreboard_file(void *foo) unlink(ap_scoreboard_fname); } -void reopen_scoreboard(pool *p) +void reopen_scoreboard(ap_context_t *p) { if (scoreboard_fd != -1) ap_pclosef(p, scoreboard_fd); @@ -1312,7 +1312,7 @@ void reopen_scoreboard(pool *p) #endif /* Called by parent process */ -static void reinit_scoreboard(pool *p) +static void reinit_scoreboard(ap_context_t *p) { int running_gen = 0; if (ap_scoreboard_image) @@ -1931,7 +1931,7 @@ static void child_main(int child_num_arg) ap_listen_rec *lr; ap_listen_rec *last_lr; ap_listen_rec *first_lr; - pool *ptrans; + ap_context_t *ptrans; conn_rec *current_conn; ap_iol *iol; @@ -1941,12 +1941,12 @@ static void child_main(int child_num_arg) requests_this_child = 0; last_lr = NULL; - /* Get a sub pool for global allocations in this child, so that + /* Get a sub ap_context_t for global allocations in this child, so that * we can have cleanups occur when the child exits. */ - pchild = ap_make_sub_pool(pconf); + ap_create_context(pconf, NULL, &pchild); - ptrans = ap_make_sub_pool(pchild); + ap_create_context(pchild, NULL, &ptrans); /* needs to be done before we switch UIDs so we have permissions */ reopen_scoreboard(pchild); @@ -2514,7 +2514,7 @@ static void process_child_status(int pid, ap_wait_t status) } -static int setup_listeners(pool *p, server_rec *s) +static int setup_listeners(ap_context_t *p, server_rec *s) { ap_listen_rec *lr; @@ -2540,7 +2540,7 @@ static int setup_listeners(pool *p, server_rec *s) * Executive routines. */ -int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) +int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) { int remaining_children_to_start; @@ -2752,7 +2752,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void prefork_pre_config(pool *p, pool *plog, pool *ptemp) +static void prefork_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp) { static int restart_num = 0; @@ -2981,7 +2981,7 @@ module MODULE_VAR_EXPORT mpm_prefork_module = { NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - prefork_cmds, /* command table */ + prefork_cmds, /* command ap_table_t */ NULL, /* handlers */ prefork_hooks, /* register hooks */ }; diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index f06172948c..a38b03847d 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -128,12 +128,12 @@ struct other_child_rec { static other_child_rec *other_children; #endif -static pool *pconf; /* Pool for config stuff */ +static ap_context_t *pconf; /* Pool for config stuff */ static scoreboard *ap_scoreboard_image = NULL; struct thread_globals { int child_num; - pool *pchild; /* Pool for httpd child stuff */ + ap_context_t *pchild; /* Pool for httpd child stuff */ int usr1_just_die; }; @@ -142,7 +142,7 @@ static struct thread_globals **ppthread_globals = NULL; #define THREAD_GLOBAL(gvar) ((*ppthread_globals)->gvar) -void reinit_scoreboard(pool *p) +void reinit_scoreboard(ap_context_t *p) { if (ap_scoreboard_image == NULL) { ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE); @@ -189,7 +189,7 @@ static void accept_mutex_cleanup(void *foo) * Initialize mutex lock. * Done by each child at it's birth */ -static void accept_mutex_child_init(pool *p) +static void accept_mutex_child_init(ap_context_t *p) { int rc = DosOpenMutexSem(NULL, &lock_sem); @@ -206,7 +206,7 @@ static void accept_mutex_child_init(pool *p) * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(pool *p) +static void accept_mutex_init(ap_context_t *p) { int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE); @@ -884,10 +884,10 @@ static void child_main(void *child_num_arg) struct sockaddr sa_client; ap_listen_rec *lr = NULL; ap_listen_rec *first_lr = NULL; - pool *ptrans; + ap_context_t *ptrans; conn_rec *current_conn; ap_iol *iol; - pool *pchild; + ap_context_t *pchild; parent_score *sc_parent_rec; int csd = -1, requests_this_child = 0; fd_set main_fds; @@ -902,7 +902,7 @@ static void child_main(void *child_num_arg) signal(SIGUSR1, just_die); signal(SIGTERM, just_die); - /* Get a sub pool for global allocations in this child, so that + /* Get a sub ap_context_t for global allocations in this child, so that * we can have cleanups occur when the child exits. */ pchild = ap_make_sub_pool(pconf); @@ -1378,7 +1378,7 @@ static void process_child_status(int tid, ap_wait_t status) } -static int setup_listeners(pool *pconf, server_rec *s) +static int setup_listeners(ap_context_t *pconf, server_rec *s) { ap_listen_rec *lr; @@ -1404,7 +1404,7 @@ static int setup_listeners(pool *pconf, server_rec *s) * Executive routines. */ -int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) +int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) { int remaining_children_to_start; int i; @@ -1603,7 +1603,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s) return 0; } -static void spmt_os2_pre_config(pool *pconf, pool *plog, pool *ptemp) +static void spmt_os2_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) { one_process = !!getenv("ONE_PROCESS"); @@ -1797,7 +1797,7 @@ module MODULE_VAR_EXPORT mpm_spmt_os2_module = { NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - spmt_os2_cmds, /* command table */ + spmt_os2_cmds, /* command ap_table_t */ NULL, /* handlers */ spmt_os2_hooks, /* register_hooks */ }; diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index aa732a99cf..f2ae539a1e 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -86,7 +86,7 @@ static struct pollfd *listenfds; static int num_listenfds = 0; int listenmaxfd = -1; -static pool *pconf; /* Pool for config stuff */ +static ap_context_t *pconf; /* Pool for config stuff */ static char ap_coredump_dir[MAX_STRING_LEN]; @@ -268,7 +268,7 @@ static ap_inline ap_listen_rec *find_ready_listener(fd_set * main_fds) } return NULL; } -static int setup_listeners(pool *pconf, server_rec *s) +static int setup_listeners(ap_context_t *pconf, server_rec *s) { ap_listen_rec *lr; int num_listeners = 0; @@ -294,7 +294,7 @@ static int setup_listeners(pool *pconf, server_rec *s) return num_listeners; } -static int setup_inherited_listeners(pool *p, server_rec *s) +static int setup_inherited_listeners(ap_context_t *p, server_rec *s) { WSAPROTOCOL_INFO WSAProtocolInfo; HANDLE pipe; @@ -761,7 +761,7 @@ static void child_main(int child_num) while (1) { BUFF *conn_io; - pool *ptrans; + ap_context_t *ptrans; int csd = -1; conn_rec *current_conn; @@ -896,7 +896,7 @@ static void worker_main() int rv; time_t end_time; int i; - pool *pchild; + ap_context_t *pchild; pchild = ap_make_sub_pool(pconf); @@ -1054,7 +1054,7 @@ static void cleanup_process(HANDLE *handles, HANDLE *events, int position, int * (*processes)--; } -static int create_process(pool *p, HANDLE *handles, HANDLE *events, int *processes) +static int create_process(ap_context_t *p, HANDLE *handles, HANDLE *events, int *processes) { int rv; char buf[1024]; @@ -1301,7 +1301,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even * We are making a big assumption here that the child process, once signaled, * will REALLY go away. Since this is a restart, we do not want to hold the * new child process up waiting for the old child to die. Remove the old - * child out of the process_handles table and hope for the best... + * child out of the process_handles ap_table_t and hope for the best... */ for (i = 0; i < children_to_kill; i++) { /* APD3("master_main: signalling child #%d handle %d to die", i, process_handles[i]); */ @@ -1314,7 +1314,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even else { /* A child process must have exited because of MaxRequestPerChild being hit * or a fatal error condition (seg fault, etc.). Remove the dead process - * from the process_handles and process_kill_events table and create a new + * from the process_handles and process_kill_events ap_table_t and create a new * child process. * TODO: Consider restarting the child immediately without looping through http_main * and without rereading the configuration. Will need this if we ever support multiple @@ -1362,7 +1362,7 @@ die_now: /* * winnt_pre_config() */ -static void winnt_pre_config(pool *pconf, pool *plog, pool *ptemp) +static void winnt_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) { char *pid; one_process=1;//!!getenv("ONE_PROCESS"); @@ -1393,12 +1393,12 @@ static void winnt_pre_config(pool *pconf, pool *plog, pool *ptemp) } -static void winnt_post_config(pool *pconf, pool *plog, pool *ptemp, server_rec* server_conf) +static void winnt_post_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec* server_conf) { server_conf = server_conf; } -API_EXPORT(int) ap_mpm_run(pool *_pconf, pool *plog, server_rec *s ) +API_EXPORT(int) ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s ) { char* exit_event_name; @@ -1662,7 +1662,7 @@ module MODULE_VAR_EXPORT mpm_winnt_module = { NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - winnt_cmds, /* command table */ + winnt_cmds, /* command ap_table_t */ NULL, /* handlers */ winnt_hooks /* register_hooks */ }; diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h index 5664dd7987..8b915bec72 100644 --- a/server/mpm/winnt/mpm_winnt.h +++ b/server/mpm/winnt/mpm_winnt.h @@ -68,7 +68,7 @@ typedef struct CompContext { OVERLAPPED Overlapped; SOCKET accept_socket; BUFF* conn_io; - pool *ptrans; + ap_context_t *ptrans; struct sockaddr sa_server; int sa_server_len; struct sockaddr sa_client; diff --git a/server/mpm/winnt/registry.c b/server/mpm/winnt/registry.c index 23eeb5e449..5030f1ba37 100644 --- a/server/mpm/winnt/registry.c +++ b/server/mpm/winnt/registry.c @@ -59,7 +59,7 @@ /* * Get the data for registry key value. This is a generic function that * can either get a value into a caller-supplied buffer, or it can - * allocate space for the value from the pass-in pool. It will normally + * allocate space for the value from the pass ap_context_t n pool. It will normally * be used by other functions within this file to get specific key values * (e.g. registry_get_server_root()). This function returns a number of * different error statuses, allowing the caller to differentiate @@ -69,13 +69,13 @@ * * If ppValue is NULL, allocate space for the value and return it in * *pValue. The return value is the number of bytes in the value. - * The first argument is the pool to use to allocate space for the value. + * The first argument is the ap_context_t to use to allocate space for the value. * * If pValue is not NULL, assume it is a buffer of nSizeValue bytes, * and write the value into the buffer. The return value is the number * of bytes in the value (so if the return value is greater than * the supplied nSizeValue, the caller knows that *pValue is truncated). - * The pool argument is ignored. + * The ap_context_t argument is ignored. * * The return value is the number of bytes in the successfully retreived * key if everything worked, or: @@ -92,7 +92,7 @@ * message will be logged at priority "warning". */ -static int ap_registry_get_key_int(pool *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue) +static int ap_registry_get_key_int(ap_context_t *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue) { long rv; HKEY hKey; @@ -199,7 +199,7 @@ static int ap_registry_get_key_int(pool *p, char *key, char *name, char *pBuffer * an error getting the key. */ -int ap_registry_get_server_root(pool *p, char *dir, int size) +int ap_registry_get_server_root(ap_context_t *p, char *dir, int size) { int rv; @@ -222,7 +222,7 @@ char *ap_get_service_key(char *service_name) return(key); } -int ap_registry_get_service_conf(pool *p, char *dir, int size, char *service_name) +int ap_registry_get_service_conf(ap_context_t *p, char *dir, int size, char *service_name) { int rv; char *key = ap_get_service_key(service_name); diff --git a/server/util.c b/server/util.c index 15245a4975..fe8b636736 100644 --- a/server/util.c +++ b/server/util.c @@ -126,7 +126,7 @@ API_EXPORT(char *) ap_get_time() * Examine a field value (such as a media-/content-type) string and return * it sans any parameters; e.g., strip off any ';charset=foo' and the like. */ -API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype) +API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype) { const char *semi; @@ -142,7 +142,7 @@ API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype) } } -API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt) +API_EXPORT(char *) ap_ht_time(ap_context_t *p, time_t t, const char *fmt, int gmt) { /* ZZZ this function can be replaced by calls to time formatting routines in APR. */ @@ -191,7 +191,7 @@ API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt) return ap_pstrdup(p, ts); } -API_EXPORT(char *) ap_gm_timestr_822(pool *p, time_t sec) +API_EXPORT(char *) ap_gm_timestr_822(ap_context_t *p, time_t sec) { struct tm *tms; char *date_str = ap_palloc(p, 48 * sizeof(char)); @@ -380,7 +380,7 @@ API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, s * AT&T V8 regexp package. */ -API_EXPORT(char *) ap_pregsub(pool *p, const char *input, const char *source, +API_EXPORT(char *) ap_pregsub(ap_context_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[]) { const char *src = input; @@ -567,7 +567,7 @@ API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n) /* * return the parent directory name including trailing / of the file s */ -API_EXPORT(char *) ap_make_dirstr_parent(pool *p, const char *s) +API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s) { char *last_slash = strrchr(s, '/'); char *d; @@ -589,7 +589,7 @@ API_EXPORT(char *) ap_make_dirstr_parent(pool *p, const char *s) * This function is deprecated. Use one of the preceeding two functions * which are faster. */ -API_EXPORT(char *) ap_make_dirstr(pool *p, const char *s, int n) +API_EXPORT(char *) ap_make_dirstr(ap_context_t *p, const char *s, int n) { register int x, f; char *res; @@ -640,12 +640,12 @@ API_EXPORT(void) ap_chdir_file(const char *file) * error... ah well. */ } -API_EXPORT(char *) ap_getword_nc(pool *atrans, char **line, char stop) +API_EXPORT(char *) ap_getword_nc(ap_context_t *atrans, char **line, char stop) { return ap_getword(atrans, (const char **) line, stop); } -API_EXPORT(char *) ap_getword(pool *atrans, const char **line, char stop) +API_EXPORT(char *) ap_getword(ap_context_t *atrans, const char **line, char stop) { char *pos = strchr(*line, stop); char *res; @@ -667,12 +667,12 @@ API_EXPORT(char *) ap_getword(pool *atrans, const char **line, char stop) return res; } -API_EXPORT(char *) ap_getword_white_nc(pool *atrans, char **line) +API_EXPORT(char *) ap_getword_white_nc(ap_context_t *atrans, char **line) { return ap_getword_white(atrans, (const char **) line); } -API_EXPORT(char *) ap_getword_white(pool *atrans, const char **line) +API_EXPORT(char *) ap_getword_white(ap_context_t *atrans, const char **line) { int pos = -1, x; char *res; @@ -701,12 +701,12 @@ API_EXPORT(char *) ap_getword_white(pool *atrans, const char **line) return res; } -API_EXPORT(char *) ap_getword_nulls_nc(pool *atrans, char **line, char stop) +API_EXPORT(char *) ap_getword_nulls_nc(ap_context_t *atrans, char **line, char stop) { return ap_getword_nulls(atrans, (const char **) line, stop); } -API_EXPORT(char *) ap_getword_nulls(pool *atrans, const char **line, char stop) +API_EXPORT(char *) ap_getword_nulls(ap_context_t *atrans, const char **line, char stop) { char *pos = strchr(*line, stop); char *res; @@ -730,7 +730,7 @@ API_EXPORT(char *) ap_getword_nulls(pool *atrans, const char **line, char stop) * all honored */ -static char *substring_conf(pool *p, const char *start, int len, char quote) +static char *substring_conf(ap_context_t *p, const char *start, int len, char quote) { char *result = ap_palloc(p, len + 2); char *resp = result; @@ -748,12 +748,12 @@ static char *substring_conf(pool *p, const char *start, int len, char quote) return result; } -API_EXPORT(char *) ap_getword_conf_nc(pool *p, char **line) +API_EXPORT(char *) ap_getword_conf_nc(ap_context_t *p, char **line) { return ap_getword_conf(p, (const char **) line); } -API_EXPORT(char *) ap_getword_conf(pool *p, const char **line) +API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line) { const char *str = *line, *strend; char *res; @@ -803,9 +803,9 @@ API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp) return (cfp->close == NULL) ? 0 : cfp->close(cfp->param); } -/* Common structure that holds the file and pool for ap_pcfg_openfile */ +/* Common structure that holds the file and ap_context_t for ap_pcfg_openfile */ typedef struct { - struct pool *pool; + ap_context_t *pool; FILE *file; } poolfile_t; @@ -828,7 +828,7 @@ static void *cfg_getstr(void *buf, size_t bufsiz, void *param) } /* Open a configfile_t as FILE, return open configfile_t struct pointer */ -API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name) +API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char *name) { configfile_t *new_cfg; poolfile_t *new_pfile; @@ -895,7 +895,7 @@ API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name) /* Allocate a configfile_t handle with user defined functions and params */ -API_EXPORT(configfile_t *) ap_pcfg_open_custom(pool *p, const char *descr, +API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char *descr, void *param, int(*getch)(void *param), void *(*getstr) (void *buf, size_t bufsiz, void *param), @@ -1126,7 +1126,7 @@ API_EXPORT(const char *) ap_size_list_item(const char **field, int *len) * the converted list item (or NULL if none) and the address pointed to by * field is shifted to the next non-comma, non-whitespace. */ -API_EXPORT(char *) ap_get_list_item(pool *p, const char **field) +API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field) { const char *tok_start; const unsigned char *ptr; @@ -1215,7 +1215,7 @@ API_EXPORT(char *) ap_get_list_item(pool *p, const char **field) * This would be much more efficient if we stored header fields as * an array of list items as they are received instead of a plain string. */ -API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok) +API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char *tok) { const unsigned char *pos; const unsigned char *ptr = (const unsigned char *)line; @@ -1318,7 +1318,7 @@ API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok) * by whitespace at the caller's option. */ -API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_white) +API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int accept_white) { const char *ptr = *accept_line; const char *tok_start; @@ -1358,7 +1358,7 @@ API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_wh /* find http tokens, see the definition of token from RFC2068 */ -API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok) +API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok) { const unsigned char *start_token; const unsigned char *s; @@ -1392,7 +1392,7 @@ API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok) } -API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok) +API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char *tok) { int llen, tlen, lidx; @@ -1410,7 +1410,7 @@ API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok) return (strncasecmp(&line[lidx], tok, tlen) == 0); } -API_EXPORT(char *) ap_escape_shell_cmd(pool *p, const char *str) +API_EXPORT(char *) ap_escape_shell_cmd(ap_context_t *p, const char *str) { char *cmd; unsigned char *d; @@ -1508,7 +1508,7 @@ API_EXPORT(int) ap_unescape_url(char *url) return OK; } -API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname, +API_EXPORT(char *) ap_construct_server(ap_context_t *p, const char *hostname, unsigned port, const request_rec *r) { if (ap_is_default_port(port, r)) @@ -1553,7 +1553,7 @@ static ap_inline unsigned char *c2x(unsigned what, unsigned char *where) * something with a '/' in it (and thus does not prefix "./"). */ -API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *segment) +API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *segment) { char *copy = ap_palloc(p, 3 * strlen(segment) + 1); const unsigned char *s = (const unsigned char *)segment; @@ -1573,7 +1573,7 @@ API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *segment) return copy; } -API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial) +API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int partial) { char *copy = ap_palloc(p, 3 * strlen(path) + 3); const unsigned char *s = (const unsigned char *)path; @@ -1604,7 +1604,7 @@ API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial) /* ap_escape_uri is now a macro for os_escape_path */ -API_EXPORT(char *) ap_escape_html(pool *p, const char *s) +API_EXPORT(char *) ap_escape_html(ap_context_t *p, const char *s) { int i, j; char *x; @@ -1651,7 +1651,7 @@ API_EXPORT(int) ap_is_directory(const char *path) return (S_ISDIR(finfo.st_mode)); } -API_EXPORT(char *) ap_make_full_path(pool *a, const char *src1, +API_EXPORT(char *) ap_make_full_path(ap_context_t *a, const char *src1, const char *src2) { register int x; @@ -1941,7 +1941,7 @@ unsigned long ap_get_virthost_addr(char *w, unsigned short *ports) } -static char *find_fqdn(pool *a, struct hostent *p) +static char *find_fqdn(ap_context_t *a, struct hostent *p) { int x; @@ -1956,7 +1956,7 @@ static char *find_fqdn(pool *a, struct hostent *p) return ap_pstrdup(a, (void *) p->h_name); } -char *ap_get_local_host(pool *a) +char *ap_get_local_host(ap_context_t *a) { #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 @@ -1988,7 +1988,7 @@ char *ap_get_local_host(pool *a) /* simple 'pool' alloc()ing glue to ap_base64.c */ -API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded) +API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded) { char *decoded; int l; @@ -2000,7 +2000,7 @@ API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded) return decoded; } -API_EXPORT(char *) ap_pbase64encode(pool *p, char *string) +API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string) { char *encoded; int l = strlen(string); @@ -2014,12 +2014,12 @@ API_EXPORT(char *) ap_pbase64encode(pool *p, char *string) /* deprecated names for the above two functions, here for compatibility */ -API_EXPORT(char *) ap_uudecode(pool *p, const char *bufcoded) +API_EXPORT(char *) ap_uudecode(ap_context_t *p, const char *bufcoded) { return ap_pbase64decode(p, bufcoded); } -API_EXPORT(char *) ap_uuencode(pool *p, char *string) +API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string) { return ap_pbase64encode(p, string); } @@ -2053,7 +2053,7 @@ void os2pathname(char *path) /* quotes in the string are doubled up. * Used to escape quotes in args passed to OS/2's cmd.exe */ -char *ap_double_quotes(pool *p, char *str) +char *ap_double_quotes(ap_context_t *p, char *str) { int num_quotes = 0; int len = 0; @@ -2125,7 +2125,7 @@ API_EXPORT(void) ap_content_type_tolower(char *str) /* * Given a string, replace any bare " with \" . */ -API_EXPORT(char *) ap_escape_quotes (pool *p, const char *instring) +API_EXPORT(char *) ap_escape_quotes (ap_context_t *p, const char *instring) { int newlen = 0; const char *inchr = instring; diff --git a/server/util_date.c b/server/util_date.c index 5111a600f0..634252ec5d 100644 --- a/server/util_date.c +++ b/server/util_date.c @@ -57,7 +57,7 @@ /* * util_date.c: date parsing utility routines - * These routines are (hopefully) platform-independent. + * These routines are (hopefully) platform ap_context_t ndependent. * * 27 Oct 1996 Roy Fielding * Extracted (with many modifications) from mod_proxy.c and diff --git a/server/util_md5.c b/server/util_md5.c index f1a9564d99..d59c717eaa 100644 --- a/server/util_md5.c +++ b/server/util_md5.c @@ -87,7 +87,7 @@ #include "httpd.h" #include "util_md5.h" -API_EXPORT(char *) ap_md5_binary(pool *p, const unsigned char *buf, int length) +API_EXPORT(char *) ap_md5_binary(ap_context_t *p, const unsigned char *buf, int length) { const char *hex = "0123456789abcdef"; AP_MD5_CTX my_md5; @@ -112,7 +112,7 @@ API_EXPORT(char *) ap_md5_binary(pool *p, const unsigned char *buf, int length) return ap_pstrdup(p, result); } -API_EXPORT(char *) ap_md5(pool *p, const unsigned char *string) +API_EXPORT(char *) ap_md5(ap_context_t *p, const unsigned char *string) { return ap_md5_binary(p, string, (int) strlen((char *)string)); } @@ -162,7 +162,7 @@ API_EXPORT(char *) ap_md5(pool *p, const unsigned char *string) static char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -API_EXPORT(char *) ap_md5contextTo64(pool *a, AP_MD5_CTX * context) +API_EXPORT(char *) ap_md5contextTo64(ap_context_t *a, AP_MD5_CTX * context) { unsigned char digest[18]; char *encodedDigest; @@ -189,7 +189,7 @@ API_EXPORT(char *) ap_md5contextTo64(pool *a, AP_MD5_CTX * context) #ifdef CHARSET_EBCDIC -API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile, int convert) +API_EXPORT(char *) ap_md5digest(ap_context_t *p, APRFile infile, int convert) { AP_MD5_CTX context; unsigned char buf[1000]; @@ -212,7 +212,7 @@ API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile, int convert) #else -API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile) +API_EXPORT(char *) ap_md5digest(ap_context_t *p, APRFile infile) { AP_MD5_CTX context; unsigned char buf[1000]; diff --git a/server/util_script.c b/server/util_script.c index 012896d7c2..1eba115e84 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -94,7 +94,7 @@ * are handled in create_argv. * */ -static char **create_argv(pool *p, char *path, char *user, char *group, +static char **create_argv(ap_context_t *p, char *path, char *user, char *group, char *av0, const char *args) { int x, numwords; @@ -137,7 +137,7 @@ static char **create_argv(pool *p, char *path, char *user, char *group, } -static char *http2env(pool *a, char *w) +static char *http2env(ap_context_t *a, char *w) { char *res = ap_pstrcat(a, "HTTP_", w, NULL); char *cp = res; @@ -154,10 +154,10 @@ static char *http2env(pool *a, char *w) return res; } -API_EXPORT(char **) ap_create_environment(pool *p, table *t) +API_EXPORT(char **) ap_create_environment(ap_context_t *p, ap_table_t *t) { - array_header *env_arr = ap_table_elts(t); - table_entry *elts = (table_entry *) env_arr->elts; + ap_array_header_t *env_arr = ap_table_elts(t); + ap_table_entry_t *elts = (ap_table_entry_t *) env_arr->elts; char **env = (char **) ap_palloc(p, (env_arr->nelts + 2) * sizeof(char *)); int i, j; char *tz; @@ -194,7 +194,7 @@ API_EXPORT(char **) ap_create_environment(pool *p, table *t) API_EXPORT(void) ap_add_common_vars(request_rec *r) { - table *e; + ap_table_t *e; server_rec *s = r->server; conn_rec *c = r->connection; const char *rem_logname; @@ -203,11 +203,11 @@ API_EXPORT(void) ap_add_common_vars(request_rec *r) char *env_temp; #endif const char *host; - array_header *hdrs_arr = ap_table_elts(r->headers_in); - table_entry *hdrs = (table_entry *) hdrs_arr->elts; + ap_array_header_t *hdrs_arr = ap_table_elts(r->headers_in); + ap_table_entry_t *hdrs = (ap_table_entry_t *) hdrs_arr->elts; int i; - /* use a temporary table which we'll overlap onto + /* use a temporary ap_table_t which we'll overlap onto * r->subprocess_env later */ e = ap_make_table(r->pool, 25 + hdrs_arr->nelts); @@ -332,7 +332,7 @@ API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info) } /* Obtain the Request-URI from the original request-line, returning - * a new string from the request pool containing the URI or "". + * a new string from the request ap_context_t containing the URI or "". */ static char *original_uri(request_rec *r) { @@ -361,7 +361,7 @@ static char *original_uri(request_rec *r) API_EXPORT(void) ap_add_cgi_vars(request_rec *r) { - table *e = r->subprocess_env; + ap_table_t *e = r->subprocess_env; ap_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1"); ap_table_setn(e, "SERVER_PROTOCOL", r->protocol); @@ -436,8 +436,8 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, char *w, *l; int p; int cgi_status = HTTP_OK; - table *merge; - table *cookie_table; + ap_table_t *merge; + ap_table_t *cookie_table; if (buffer) { *buffer = '\0'; @@ -649,7 +649,7 @@ API_EXPORT(void) ap_send_size(size_t size, request_rec *r) } #if defined(OS2) || defined(WIN32) -static char **create_argv_cmd(pool *p, char *av0, const char *args, char *path) +static char **create_argv_cmd(ap_context_t *p, char *av0, const char *args, char *path) { register int x, n; char **av; @@ -684,7 +684,7 @@ static char **create_argv_cmd(pool *p, char *av0, const char *args, char *path) /* ZZZ need to look at this in more depth and convert to an AP func so we can get rid of OS specific code. */ -API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0, +API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char *argv0, char **env, int shellcmd) { int pid = 0; @@ -996,7 +996,7 @@ API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0, } #else - /* TODO: re-implement suexec */ + /* TODO: re ap_context_t mplement suexec */ #if 0 if (ap_suexec_enabled && ((r->server->server_uid != ap_user_id) diff --git a/server/util_uri.c b/server/util_uri.c index 5d9a1e6f86..47fa1e385f 100644 --- a/server/util_uri.c +++ b/server/util_uri.c @@ -103,7 +103,7 @@ API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r) * from a call to gethostbyname() and lives in static storage. * By creating a copy we can tuck it away for later use. */ -API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp) +API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hostent *hp) { struct hostent *newent; char **ptrs; @@ -156,7 +156,7 @@ API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp) * COPY OF the hostent structure, intended to be stored and used later. * (gethostbyname() uses static storage that would be overwritten on each call) */ -API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname) +API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *hostname) { struct hostent *hp = gethostbyname(hostname); return (hp == NULL) ? NULL : ap_pduphostent(p, hp); @@ -166,7 +166,7 @@ API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname) /* Unparse a uri_components structure to an URI string. * Optionally suppress the password for security reasons. */ -API_EXPORT(char *) ap_unparse_uri_components(pool *p, const uri_components *uptr, unsigned flags) +API_EXPORT(char *) ap_unparse_uri_components(ap_context_t *p, const uri_components *uptr, unsigned flags) { char *ret = ""; @@ -298,7 +298,7 @@ void ap_util_uri_init(void) * - fills in fields of uri_components *uptr * - none on any of the r->* fields */ -API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components *uptr) +API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr) { int ret; regmatch_t match[10]; /* This must have at least as much elements @@ -400,7 +400,7 @@ API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components * that fast memchr()s use. But that would be way non-portable. -djg */ -/* We have a table that we can index by character and it tells us if the +/* We have a ap_table_t that we can index by character and it tells us if the * character is one of the interesting delimiters. Note that we even get * compares for NUL for free -- it's just another delimiter. */ @@ -440,7 +440,7 @@ void ap_util_uri_init(void) * - fills in fields of uri_components *uptr * - none on any of the r->* fields */ -API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components *uptr) +API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr) { const char *s; const char *s1; @@ -564,7 +564,7 @@ deal_with_host: * currently at http://www.mcom.com/newsref/std/tunneling_ssl.html * for the format of the "CONNECT host:port HTTP/1.0" request */ -API_EXPORT(int) ap_parse_hostinfo_components(pool *p, const char *hostinfo, uri_components *uptr) +API_EXPORT(int) ap_parse_hostinfo_components(ap_context_t *p, const char *hostinfo, uri_components *uptr) { const char *s; char *endstr; diff --git a/server/vhost.c b/server/vhost.c index cd329b24c3..f241e85ae3 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -98,7 +98,7 @@ struct ipaddr_chain { * sharing this address */ }; -/* This defines the size of the hash table used for hashing ip addresses +/* This defines the size of the hash ap_table_t used for hashing ip addresses * of virtual hosts. It must be a power of two. */ #ifndef IPHASH_TABLE_SIZE @@ -148,7 +148,7 @@ static server_addr_rec **name_vhost_list_tail; /* called at the beginning of the config */ -void ap_init_vhost_config(pool *p) +void ap_init_vhost_config(ap_context_t *p) { memset(iphash_table, 0, sizeof(iphash_table)); default_list = NULL; @@ -164,7 +164,7 @@ void ap_init_vhost_config(pool *p) * *paddr is the variable used to keep track of **paddr between calls * port is the default port to assume */ -static const char *get_addresses(pool *p, char *w, server_addr_rec ***paddr, +static const char *get_addresses(ap_context_t *p, char *w, server_addr_rec ***paddr, unsigned port) { /* ZZZ redesign to use AP funcs and types. Will see what I can do to make it @@ -244,7 +244,7 @@ static const char *get_addresses(pool *p, char *w, server_addr_rec ***paddr, /* parse the <VirtualHost> addresses */ -const char *ap_parse_vhost_addrs(pool *p, const char *hostname, server_rec *s) +const char *ap_parse_vhost_addrs(ap_context_t *p, const char *hostname, server_rec *s) { server_addr_rec **addrs; const char *err; @@ -278,7 +278,7 @@ const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, char *arg) } -/* hash table statistics, keep this in here for the beta period so +/* hash ap_table_t statistics, keep this in here for the beta period so * we can find out if the hash function is ok */ #ifdef IPHASH_STATISTICS @@ -349,7 +349,7 @@ static ap_inline unsigned hash_inaddr(unsigned key) -static ipaddr_chain *new_ipaddr_chain(pool *p, +static ipaddr_chain *new_ipaddr_chain(ap_context_t *p, server_rec *s, server_addr_rec *sar) { ipaddr_chain *new; @@ -363,7 +363,7 @@ static ipaddr_chain *new_ipaddr_chain(pool *p, } -static name_chain *new_name_chain(pool *p, server_rec *s, server_addr_rec *sar) +static name_chain *new_name_chain(ap_context_t *p, server_rec *s, server_addr_rec *sar) { name_chain *new; @@ -382,7 +382,7 @@ static ap_inline ipaddr_chain *find_ipaddr(struct in_addr *server_ip, ipaddr_chain *trav; unsigned addr; - /* scan the hash table for an exact match first */ + /* scan the hash ap_table_t for an exact match first */ addr = server_ip->s_addr; bucket = hash_inaddr(addr); for (trav = iphash_table[bucket]; trav; trav = trav->next) { @@ -473,7 +473,7 @@ static void dump_vhost_config(APRFile fd) } /* compile the tables and such we need to do the run-time vhost lookups */ -void ap_fini_vhost_config(pool *p, server_rec *main_s) +void ap_fini_vhost_config(ap_context_t *p, server_rec *main_s) { /* ZZZ need to redesign for use with AP funcs. will look into this later. */ @@ -498,7 +498,7 @@ void ap_fini_vhost_config(pool *p, server_rec *main_s) iphash_table_tail[i] = &iphash_table[i]; } - /* The first things to go into the hash table are the NameVirtualHosts + /* The first things to go into the hash ap_table_t are the NameVirtualHosts * Since name_vhost_list is in the same order that the directives * occured in the config file, we'll copy it in that order. */ @@ -514,7 +514,7 @@ void ap_fini_vhost_config(pool *p, server_rec *main_s) */ } - /* The next things to go into the hash table are the virtual hosts + /* The next things to go into the hash ap_table_t are the virtual hosts * themselves. They're listed off of main_s->next in the reverse * order they occured in the config file, so we insert them at * the iphash_table_tail but don't advance the tail. @@ -687,7 +687,7 @@ static void fix_hostname(request_rec *r) static int matches_aliases(server_rec *s, const char *host) { int i; - array_header *names; + ap_array_header_t *names; /* match ServerName */ if (!strcasecmp(host, s->server_hostname)) { @@ -902,7 +902,7 @@ void ap_update_vhost_given_ip(conn_rec *conn) ipaddr_chain *trav; unsigned port = ntohs(conn->local_addr.sin_port); - /* scan the hash table for an exact match first */ + /* scan the hash ap_table_t for an exact match first */ trav = find_ipaddr(&conn->local_addr.sin_addr, port); if (trav) { /* save the name_chain for later in case this is a name-vhost */ diff --git a/srclib/expat-lite/xmlparse.h b/srclib/expat-lite/xmlparse.h index f2f9c9be1c..0fdfa75a4e 100644 --- a/srclib/expat-lite/xmlparse.h +++ b/srclib/expat-lite/xmlparse.h @@ -246,7 +246,7 @@ same byte that represents that character in ASCII. 3. All characters encoded must have Unicode scalar values <= 0xFFFF, (ie characters that would be encoded by surrogates in UTF-16 are not allowed). Note that this restriction doesn't apply to -the built-in support for UTF-8 and UTF-16. +the built ap_context_t n support for UTF-8 and UTF-16. 4. No Unicode character may be encoded by more than one distinct sequence of bytes. */ diff --git a/support/ab.c b/support/ab.c index 0d968b247a..64e965907b 100644 --- a/support/ab.c +++ b/support/ab.c @@ -80,7 +80,7 @@ ** - Enhanced by Dean Gaudet <dgaudet@apache.org>, November 1997 ** - Cleaned up by Ralf S. Engelschall <rse@apache.org>, March 1998 ** - POST and verbosity by Kurt Sussman <kls@merlot.com>, August 1998 - ** - HTML table output added by David N. Welton <davidw@prosa.it>, January 1999 + ** - HTML ap_table_t output added by David N. Welton <davidw@prosa.it>, January 1999 ** - Added Cookie, Arbitrary header and auth support. <dirkx@webweaving.org>, April 199 ** */ @@ -890,7 +890,7 @@ static void usage(char *progname) fprintf(stderr, " -T content-type Content-type header for POSTing\n"); fprintf(stderr, " -v verbosity How much troubleshooting info to print\n"); fprintf(stderr, " -w Print out results in HTML tables\n"); - fprintf(stderr, " -x attributes String to insert as table attributes\n"); + fprintf(stderr, " -x attributes String to insert as ap_table_t attributes\n"); fprintf(stderr, " -y attributes String to insert as tr attributes\n"); fprintf(stderr, " -z attributes String to insert as td or th attributes\n"); fprintf(stderr, " -C attribute Add cookie, eg. 'Apache=1234. (repeatable)\n"); @@ -975,7 +975,7 @@ int main(int argc, char **argv) int c, r,l; char tmp[1024]; - /* table defaults */ + /* ap_table_t defaults */ tablestring = ""; trstring = ""; tdstring = "bgcolor=white"; diff --git a/support/logresolve.c b/support/logresolve.c index bcdc6e51b5..f6436c5799 100644 --- a/support/logresolve.c +++ b/support/logresolve.c @@ -61,7 +61,7 @@ static void stats(FILE *output); #define MAXDNAME 256 #endif -/* number of buckets in cache hash table */ +/* number of buckets in cache hash ap_table_t */ #define BUCKETS 256 #if defined(NEED_STRDUP) diff --git a/test/test_find.c b/test/test_find.c index 6f887f5007..f4141e9e44 100644 --- a/test/test_find.c +++ b/test/test_find.c @@ -13,7 +13,7 @@ #include <stdio.h> #include <stdlib.h> #include "httpd.h" -#include "alloc.h" +#include "apr_general.h" /* * Dummy a bunch of stuff just to get a compile @@ -41,7 +41,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, int main (void) { - ap_pool *p; + ap_context_t *p; char line[512]; char tok[512]; diff --git a/test/test_parser.c b/test/test_parser.c index 23e2c21c50..29d53feef2 100644 --- a/test/test_parser.c +++ b/test/test_parser.c @@ -13,7 +13,7 @@ #include <stdio.h> #include <stdlib.h> #include "httpd.h" -#include "alloc.h" +#include "apr_general.h" /* * Dummy a bunch of stuff just to get a compile @@ -41,7 +41,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, int main (void) { - ap_pool *p; + ap_context_t *p; const char *field; char *newstr; char instr[512]; diff --git a/test/time-sem.c b/test/time-sem.c index 8bf67c7254..73b4f8ab77 100644 --- a/test/time-sem.c +++ b/test/time-sem.c @@ -494,7 +494,7 @@ void main (int argc, char **argv) unsigned long *shared_counter; if (argc != 3) { - fprintf (stderr, "Usage: time-sem num-child num-iter\n"); + fprintf (stderr, "Usage: time-sem num-child num ap_context_t ter\n"); exit (1); } |