From: Doug MacEachern Date: Mon, 26 Mar 2001 15:39:52 +0000 (+0000) Subject: top_module global variable renamed to ap_top_module X-Git-Tag: 2.0.16~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc660e986045f9107ac0d1a375bb7faf67a23837;p=thirdparty%2Fapache%2Fhttpd.git top_module global variable renamed to ap_top_module git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88582 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index a0dbc839683..9fd4fbd6503 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ Changes with Apache 2.0.16-dev + *) top_module global variable renamed to ap_top_module [Perl] + *) Move ap_set_last_modified to the core. This is a potentially controversial change, because this is kind of HTTP specific. However many protocols should be able to take advantage of this kind of diff --git a/include/http_config.h b/include/http_config.h index f335bcf6601..a54c25040d2 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -729,9 +729,9 @@ AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden /** * The topmost module in the list - * @defvar module *top_module + * @defvar module *ap_top_module */ -AP_DECLARE_DATA extern module *top_module; +AP_DECLARE_DATA extern module *ap_top_module; /** * Array of all statically linked modules diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c index 9624270c316..cfe57e2991e 100644 --- a/modules/generators/mod_info.c +++ b/modules/generators/mod_info.c @@ -296,7 +296,7 @@ static int display_info(request_rec *r) if (!r->args || strcasecmp(r->args, "list")) { if (!r->args) { ap_rputs("Server Settings, ", r); - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { ap_rprintf(r, "%s", modp->name, modp->name); if (modp->next) { ap_rputs(", ", r); @@ -337,7 +337,7 @@ static int display_info(request_rec *r) "%s
\n", SERVER_CONFIG_FILE); } ap_rputs("
", r); - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { if (!r->args || !strcasecmp(modp->name, r->args)) { ap_rprintf(r, "
Module Name: " "%s\n", @@ -439,7 +439,7 @@ static int display_info(request_rec *r) } } else { - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { ap_rputs(modp->name, r); if (modp->next) { ap_rputs("
", r); diff --git a/server/config.c b/server/config.c index 38abcc8cc86..aa91902690d 100644 --- a/server/config.c +++ b/server/config.c @@ -148,7 +148,7 @@ static int total_modules = 0; * than DYNAMIC_MODULE_LIMIT. */ static int dynamic_modules = 0; -AP_DECLARE_DATA module *top_module = NULL; +AP_DECLARE_DATA module *ap_top_module = NULL; AP_DECLARE_DATA module **ap_loaded_modules=NULL; typedef int (*handler_func) (request_rec *); @@ -179,7 +179,7 @@ static ap_conf_vector_t *create_default_per_dir_config(apr_pool_t *p) (total_modules + DYNAMIC_MODULE_LIMIT)); module *modp; - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { dir_maker_func df = modp->create_dir_config; if (df) @@ -198,7 +198,7 @@ ap_conf_vector_t *ap_merge_per_dir_configs(apr_pool_t *p, void **new_vector = (void **) new_conf; module *modp; - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { merger_func df = modp->merge_dir_config; int i = modp->module_index; @@ -217,7 +217,7 @@ static ap_conf_vector_t *create_server_config(apr_pool_t *p, server_rec *s) (total_modules + DYNAMIC_MODULE_LIMIT)); module *modp; - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { if (modp->create_server_config) conf_vector[modp->module_index] = (*modp->create_server_config) (p, s); } @@ -236,7 +236,7 @@ static void merge_server_configs(apr_pool_t *p, ap_conf_vector_t *base, void **virt_vector = (void **) virt; module *modp; - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { merger_func df = modp->merge_server_config; int i = modp->module_index; @@ -356,8 +356,8 @@ AP_DECLARE(void) ap_add_module(module *m, apr_pool_t *p) } if (m->next == NULL) { - m->next = top_module; - top_module = m; + m->next = ap_top_module; + ap_top_module = m; } if (m->module_index == -1) { m->module_index = total_modules++; @@ -411,10 +411,10 @@ AP_DECLARE(void) ap_remove_module(module *m) { module *modp; - modp = top_module; + modp = ap_top_module; if (modp == m) { /* We are the top module, special case */ - top_module = modp->next; + ap_top_module = modp->next; m->next = NULL; } else { @@ -539,7 +539,7 @@ AP_DECLARE(module *) ap_find_linked_module(const char *name) { module *modp; - for (modp = top_module; modp; modp = modp->next) { + for (modp = ap_top_module; modp; modp = modp->next) { if (strcmp(modp->name, name) == 0) return modp; } @@ -786,7 +786,7 @@ static const char * ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool, const char *args; char *cmd_name; ap_directive_t *newdir; - module *mod = top_module; + module *mod = ap_top_module; const command_rec *cmd; if (*l == '#' || *l == '\0') @@ -922,7 +922,7 @@ static const char *ap_walk_config_sub(const ap_directive_t *current, cmd_parms *parms, ap_conf_vector_t *section_vector) { - module *mod = top_module; + module *mod = ap_top_module; while (1) { const command_rec *cmd; @@ -1157,7 +1157,7 @@ static const char *execute_now(char *cmd_line, const char *args, cmd_parms *parm apr_pool_t *p, apr_pool_t *ptemp, ap_directive_t **sub_tree, ap_directive_t *parent) { - module *mod = top_module; + module *mod = ap_top_module; const command_rec *cmd; if (!(cmd = ap_find_command_in_modules(cmd_line, &mod))) { @@ -1625,7 +1625,7 @@ AP_DECLARE(void) ap_run_rewrite_args(process_rec *process) { module *m; - for (m = top_module; m; m = m->next) + for (m = ap_top_module; m; m = m->next) if (m->rewrite_args) (*m->rewrite_args) (process); } diff --git a/support/httpd.exp b/support/httpd.exp index 3eef602b6b4..3c5693bcd73 100644 --- a/support/httpd.exp +++ b/support/httpd.exp @@ -600,4 +600,4 @@ regerror regexec regfree setenvif_module -top_module +ap_top_module