]> granicus.if.org Git - apache/commitdiff
Rename the module structures so that the exported symbol matches
authorMartin Kraemer <martin@apache.org>
Fri, 16 Feb 2001 13:38:31 +0000 (13:38 +0000)
committerMartin Kraemer <martin@apache.org>
Fri, 16 Feb 2001 13:38:31 +0000 (13:38 +0000)
the file name, and it is easier to automate the installation
process (generating LoadModule directives from the module filenames).

Next step is to remove the 4th argument to the APACHE_MODULE macro
completely and require people to use the matching names, and to
reduce the LoadModule directive to 1 argument.... Objections?

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88189 13f79535-47bb-0310-9956-ffa450edef68

13 files changed:
CHANGES
modules/aaa/config.m4
modules/aaa/mod_auth_anon.c
modules/aaa/mod_auth_db.c
modules/aaa/mod_auth_dbm.c
modules/aaa/mod_auth_digest.c
modules/filters/config.m4
modules/filters/mod_include.c
modules/filters/mod_include.h
modules/loggers/config.m4
modules/loggers/mod_log_config.c
modules/mappers/config.m4
modules/mappers/mod_actions.c

diff --git a/CHANGES b/CHANGES
index 49f93e713ddd31b299d5a4bfdd91fd27e415df2d..5439e87d3110f4ba6aa9abd49e691934861afacc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.12-dev
 
+  *) Rename the module structures so that the exported symbol matches
+     the file name, and it is easier to automate the installation
+     process (generating LoadModule directives from the module filenames).
+     [Martin Kraemer]
+
   *) Remove the coalesce filter.  With the ap_f* functions, this filter
      is no longer needed. [Ryan Bloom]
 
index 974fa71a4e0a5b6ad38613ea13851e2311785b21..3eb50dfcf3162230030568548beeca1e9bdd6733 100644 (file)
@@ -6,15 +6,15 @@ APACHE_MODPATH_INIT(aaa)
 
 APACHE_MODULE(access, host-based access control, , , yes)
 APACHE_MODULE(auth, user-based access control, , , yes)
-APACHE_MODULE(auth_anon, anonymous user access, , anon_auth, no)
-APACHE_MODULE(auth_dbm, DBM-based access databases, , dbm_auth, no)
+APACHE_MODULE(auth_anon, anonymous user access, , , no)
+APACHE_MODULE(auth_dbm, DBM-based access databases, , , no)
 
-APACHE_MODULE(auth_db, DB-based access databases, , db_auth, no, [
+APACHE_MODULE(auth_db, DB-based access databases, , , no, [
   AC_CHECK_HEADERS(db.h)
   AC_CHECK_LIB(db,main)
 ]) 
 
-APACHE_MODULE(auth_digest, digests, , digest_auth, no)
+APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , no)
 
 LTFLAGS="$LTFLAGS -export-dynamic"
 
index 6247013d9b29f34ade74e044de47ad0ce4ccfd58..db83c9a3efd050e5404fb9c33b08fe3b6c26e91e 100644 (file)
@@ -217,13 +217,13 @@ static const command_rec anon_auth_cmds[] =
     {NULL}
 };
 
-module AP_MODULE_DECLARE_DATA anon_auth_module;
+module AP_MODULE_DECLARE_DATA auth_anon_module;
 
 static int anon_authenticate_basic_user(request_rec *r)
 {
     anon_auth_config_rec *sec =
     (anon_auth_config_rec *) ap_get_module_config(r->per_dir_config,
-                                              &anon_auth_module);
+                                              &auth_anon_module);
     const char *sent_pw;
     int res = DECLINED;
 
@@ -284,7 +284,7 @@ static int check_anon_access(request_rec *r)
     conn_rec *c = r->connection;
     anon_auth_config_rec *sec =
     (anon_auth_config_rec *) ap_get_module_config(r->per_dir_config,
-                                              &anon_auth_module);
+                                              &auth_anon_module);
 
     if (!sec->anon_auth)
        return DECLINED;
@@ -303,7 +303,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_auth_checker(check_anon_access,NULL,NULL,APR_HOOK_MIDDLE);
 }
 
-module AP_MODULE_DECLARE_DATA anon_auth_module =
+module AP_MODULE_DECLARE_DATA auth_anon_module =
 {
     STANDARD20_MODULE_STUFF,
     create_anon_auth_dir_config,/* dir config creater */
index ca56e009b22ce2e357bb7617d6734b10bd8ae5b9..54d6e96d20d4e8364fd313fb3a3e9fc4e3ec9259 100644 (file)
@@ -75,7 +75,7 @@
  *           instead of   AuthDBMUserFile    AuthDBMGroupFile
  *
  * Also, in the configuration file you need to specify
- *  db_auth_module rather than auth_dbm_module
+ *  auth_db_module rather than auth_dbm_module
  *
  * On some BSD systems (e.g. FreeBSD and NetBSD) dbm is automatically
  * mapped to Berkeley DB. You can use either mod_auth_dbm or
@@ -161,7 +161,7 @@ static const command_rec db_auth_cmds[] =
     {NULL}
 };
 
-module db_auth_module;
+module auth_db_module;
 
 static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile)
 {
@@ -293,7 +293,7 @@ static int db_authenticate_basic_user(request_rec *r)
 {
     db_auth_config_rec *sec =
     (db_auth_config_rec *) ap_get_module_config(r->per_dir_config,
-                                               &db_auth_module);
+                                               &auth_db_module);
     const char *sent_pw;
     char *real_pw, *colon_pw;
     apr_status_t invalid_pw;
@@ -341,7 +341,7 @@ static int db_check_auth(request_rec *r)
 {
     db_auth_config_rec *sec =
     (db_auth_config_rec *) ap_get_module_config(r->per_dir_config,
-                                               &db_auth_module);
+                                               &auth_db_module);
     char *user = r->user;
     int m = r->method_number;
 
@@ -404,7 +404,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_auth_checker(db_check_auth,NULL,NULL,APR_HOOK_MIDDLE);
 }
 
-module db_auth_module =
+module auth_db_module =
 {
     STANDARD20_MODULE_STUFF,
     create_db_auth_dir_config, /* dir config creater */
index 5cf14f10ddf739dfaad627a2ae567bab521c946e..6896c8615a892f8fd3fe3222a54910632ad45417 100644 (file)
  *
  * XXX: this needs updating for apache-2.0 configuration method
  * MODULE-DEFINITION-START
- * Name: dbm_auth_module
+ * Name: auth_dbm_module
  * ConfigStart
     . ./helpers/find-dbm-lib
  * ConfigEnd
@@ -156,7 +156,7 @@ static const command_rec dbm_auth_cmds[] =
     {NULL}
 };
 
-module AP_MODULE_DECLARE_DATA dbm_auth_module;
+module AP_MODULE_DECLARE_DATA auth_dbm_module;
 
 static char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile)
 {
@@ -237,7 +237,7 @@ static int dbm_authenticate_basic_user(request_rec *r)
 {
     dbm_auth_config_rec *sec =
     (dbm_auth_config_rec *) ap_get_module_config(r->per_dir_config,
-                                             &dbm_auth_module);
+                                             &auth_dbm_module);
     const char *sent_pw;
     char *real_pw, *colon_pw;
     apr_status_t invalid_pw;
@@ -280,7 +280,7 @@ static int dbm_check_auth(request_rec *r)
 {
     dbm_auth_config_rec *sec =
     (dbm_auth_config_rec *) ap_get_module_config(r->per_dir_config,
-                                             &dbm_auth_module);
+                                             &auth_dbm_module);
     char *user = r->user;
     int m = r->method_number;
 
@@ -344,7 +344,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_auth_checker(dbm_check_auth, NULL, NULL, APR_HOOK_MIDDLE);
 }
 
-module AP_MODULE_DECLARE_DATA dbm_auth_module =
+module AP_MODULE_DECLARE_DATA auth_dbm_module =
 {
     STANDARD20_MODULE_STUFF,
     create_dbm_auth_dir_config,        /* dir config creater */
index 75a42ab59a4d28ad89bfff61083d7ac26d91ad27..3b1b66c4deae02fd3fceb896bf4deee25efa03e1 100644 (file)
@@ -262,7 +262,7 @@ static long shmem_size  = DEF_SHMEM_SIZE;
 static long num_buckets = DEF_NUM_BUCKETS;
 
 
-module AP_MODULE_DECLARE_DATA digest_auth_module;
+module AP_MODULE_DECLARE_DATA auth_digest_module;
 
 /*
  * initialization code
@@ -966,7 +966,7 @@ static int parse_hdr_and_update_nc(request_rec *r)
     resp->raw_request_uri = r->unparsed_uri;
     resp->psd_request_uri = &r->parsed_uri;
     resp->needed_auth = 0;
-    ap_set_module_config(r->request_config, &digest_auth_module, resp);
+    ap_set_module_config(r->request_config, &auth_digest_module, resp);
 
     res = get_digest_rec(r, resp);
     resp->client = get_client(resp->opaque_num, r);
@@ -1577,14 +1577,14 @@ static int authenticate_digest_user(request_rec *r)
     while (mainreq->main != NULL)  mainreq = mainreq->main;
     while (mainreq->prev != NULL)  mainreq = mainreq->prev;
     resp = (digest_header_rec *) ap_get_module_config(mainreq->request_config,
-                                                     &digest_auth_module);
+                                                     &auth_digest_module);
     resp->needed_auth = 1;
 
 
     /* get our conf */
 
     conf = (digest_config_rec *) ap_get_module_config(r->per_dir_config,
-                                                     &digest_auth_module);
+                                                     &auth_digest_module);
 
 
     /* check for existence and syntax of Auth header */
@@ -1813,7 +1813,7 @@ static int digest_check_auth(request_rec *r)
 {
     const digest_config_rec *conf =
                (digest_config_rec *) ap_get_module_config(r->per_dir_config,
-                                                          &digest_auth_module);
+                                                          &auth_digest_module);
     const char *user = r->user;
     int m = r->method_number;
     int method_restricted = 0;
@@ -1883,7 +1883,7 @@ static int digest_check_auth(request_rec *r)
 
     note_digest_auth_failure(r, conf,
        (digest_header_rec *) ap_get_module_config(r->request_config,
-                                                  &digest_auth_module),
+                                                  &auth_digest_module),
        0);
     return HTTP_UNAUTHORIZED;
 }
@@ -1908,10 +1908,10 @@ static int add_auth_info(request_rec *r)
 {
     const digest_config_rec *conf =
                (digest_config_rec *) ap_get_module_config(r->per_dir_config,
-                                                          &digest_auth_module);
+                                                          &auth_digest_module);
     digest_header_rec *resp =
                (digest_header_rec *) ap_get_module_config(r->request_config,
-                                                          &digest_auth_module);
+                                                          &auth_digest_module);
     const char *ai = NULL, *digest = NULL, *nextnonce = "";
 
     if (resp == NULL || !resp->needed_auth || conf == NULL)
@@ -2065,7 +2065,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_fixups(add_auth_info, NULL, NULL, APR_HOOK_MIDDLE);
 }
 
-module AP_MODULE_DECLARE_DATA digest_auth_module =
+module AP_MODULE_DECLARE_DATA auth_digest_module =
 {
     STANDARD20_MODULE_STUFF,
     create_digest_dir_config,  /* dir config creater */
index 946d61ceb2e50bb571ae242fbf1e2b2d49e5caee..d9c8ad2ec862ae98d85860aa4e14ec0292cce0fa 100644 (file)
@@ -4,7 +4,7 @@ dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
 
 APACHE_MODPATH_INIT(filters)
 
-APACHE_MODULE(include, Server Side Includes, , includes, yes)
+APACHE_MODULE(include, Server Side Includes, , , yes)
 
 LTFLAGS="$LTFLAGS -export-dynamic"
 
index 2f2b67c450b8e5ffb2b2899cec65f02c15409d71..e1c51ec9be14027d8ed8d639348e0d0944e3a9e9 100644 (file)
@@ -91,7 +91,7 @@
 #include "mod_include.h"
 #include "util_ebcdic.h"
 
-module AP_MODULE_DECLARE_DATA includes_module;
+module AP_MODULE_DECLARE_DATA include_module;
 static apr_hash_t *include_hash;
 static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *ssi_pfn_register;
 
@@ -812,7 +812,7 @@ static int handle_include(include_ctx_t *ctx, apr_bucket_brigade **bb, request_r
                 /* Basically, it puts a bread crumb in here, then looks */
                 /*   for the crumb later to see if its been here.       */
            if (rr) 
-               ap_set_module_config(rr->request_config, &includes_module, r);
+               ap_set_module_config(rr->request_config, &include_module, r);
 
                 if (!error_fmt) {
                     SPLIT_AND_PASS_PRETAG_BUCKETS(*bb, ctx, f->next);
@@ -829,7 +829,7 @@ static int handle_include(include_ctx_t *ctx, apr_bucket_brigade **bb, request_r
 
            /* destroy the sub request if it's not a nested include (crumb) */
                 if (rr != NULL
-               && ap_get_module_config(rr->request_config, &includes_module)
+               && ap_get_module_config(rr->request_config, &include_module)
                    != NESTED_INCLUDE_MAGIC) {
                ap_destroy_sub_req(rr);
                 }
@@ -2619,7 +2619,7 @@ static void send_parsed_content(apr_bucket_brigade **bb, request_rec *r,
  * option only changes the default.
  */
 
-module includes_module;
+module include_module;
 enum xbithack {
     xbithack_off, xbithack_on, xbithack_full
 };
@@ -2662,7 +2662,7 @@ static int includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
     request_rec *r = f->r;
     include_ctx_t *ctx = f->ctx;
     enum xbithack *state =
-    (enum xbithack *) ap_get_module_config(r->per_dir_config, &includes_module);
+    (enum xbithack *) ap_get_module_config(r->per_dir_config, &include_module);
     request_rec *parent;
 
     if (!(ap_allow_options(r) & OPT_INCLUDES)) {
@@ -2701,7 +2701,7 @@ static int includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
         ap_set_last_modified(r);
     }
 
-    if ((parent = ap_get_module_config(r->request_config, &includes_module))) {
+    if ((parent = ap_get_module_config(r->request_config, &include_module))) {
        /* Kludge --- for nested includes, we want to keep the subprocess
         * environment of the base document (for compatibility); that means
         * torquing our own last_modified date as well so that the
@@ -2732,7 +2732,7 @@ static int includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
 
     if (parent) {
        /* signify that the sub request should not be killed */
-       ap_set_module_config(r->request_config, &includes_module,
+       ap_set_module_config(r->request_config, &include_module,
            NESTED_INCLUDE_MAGIC);
     }
 
@@ -2785,7 +2785,7 @@ static void register_hooks(apr_pool_t *p)
     ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_CONTENT);
 }
 
-module AP_MODULE_DECLARE_DATA includes_module =
+module AP_MODULE_DECLARE_DATA include_module =
 {
     STANDARD20_MODULE_STUFF,
     create_includes_dir_config, /* dir config creater */
index 1ef907a1357ad9b3791370e4db329410ba504a09..30909c8c50da6031aa5972d11a8caa2e366804ce 100644 (file)
@@ -74,7 +74,7 @@
 #endif /*APR_CHARSET_EBCDIC*/
 
 /* just need some arbitrary non-NULL pointer which can't also be a request_rec */
-#define NESTED_INCLUDE_MAGIC   (&includes_module)
+#define NESTED_INCLUDE_MAGIC   (&include_module)
 
 /****************************************************************************
  * Used to keep context information during parsing of a request for SSI tags.
index e1628c66f07ce36e782816e986e11d54ffebbb0e..8d4304abc4dfa8d19623127e58853b393704bfe5 100644 (file)
@@ -4,6 +4,6 @@ dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
 
 APACHE_MODPATH_INIT(loggers)
        
-APACHE_MODULE(log_config, logging configuration, , config_log, yes)
+APACHE_MODULE(log_config, logging configuration, , , yes)
 
 APACHE_MODPATH_FINISH
index 7d3a701b20567304802f94a64fc0dcf648ff96ae..432059aecbf752e01c02722fbf1b5816b4c8b8c7 100644 (file)
 
 #define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %>s %b"
 
-module AP_MODULE_DECLARE_DATA config_log_module;
+module AP_MODULE_DECLARE_DATA log_config_module;
 
 static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE);
 static apr_fileperms_t xfer_perms = APR_OS_DEFAULT;
@@ -952,7 +952,7 @@ static int config_log_transaction(request_rec *r, config_log_state *cls,
 static int multi_log_transaction(request_rec *r)
 {
     multi_log_state *mls = ap_get_module_config(r->server->module_config,
-                                               &config_log_module);
+                                               &log_config_module);
     config_log_state *clsarray;
     int i;
 
@@ -1028,7 +1028,7 @@ static const char *log_format(cmd_parms *cmd, void *dummy, const char *fmt,
 {
     const char *err_string = NULL;
     multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
-                                               &config_log_module);
+                                               &log_config_module);
 
     /*
      * If we were given two arguments, the second is a name to be given to the
@@ -1054,7 +1054,7 @@ static const char *add_custom_log(cmd_parms *cmd, void *dummy, const char *fn,
 {
     const char *err_string = NULL;
     multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
-                                               &config_log_module);
+                                               &log_config_module);
     config_log_state *cls;
 
     cls = (config_log_state *) apr_array_push(mls->config_logs);
@@ -1151,7 +1151,7 @@ static config_log_state *open_multi_logs(server_rec *s, apr_pool_t *p)
 {
     int i;
     multi_log_state *mls = ap_get_module_config(s->module_config,
-                                             &config_log_module);
+                                             &log_config_module);
     config_log_state *clsarray;
     const char *dummy;
     const char *format;
@@ -1211,7 +1211,7 @@ static apr_status_t flush_all_logs(void *data)
     int i;
 
     for (; s; s = s->next) {
-        mls = ap_get_module_config(s->module_config, &config_log_module);
+        mls = ap_get_module_config(s->module_config, &log_config_module);
         log_list = NULL;
         if (mls->config_logs->nelts) {
             log_list = mls->config_logs;
@@ -1260,7 +1260,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_log_transaction(multi_log_transaction,NULL,NULL,APR_HOOK_MIDDLE);
 }
 
-module AP_MODULE_DECLARE_DATA config_log_module =
+module AP_MODULE_DECLARE_DATA log_config_module =
 {
     STANDARD20_MODULE_STUFF,
     NULL,                       /* create per-dir config */
index 5461253f2df514528e0626056e92c6cf3113eb33..29edb3353525b8009368290380c8070820cb9afd 100644 (file)
@@ -8,7 +8,7 @@ APACHE_MODULE(vhost_alias, mass hosting module, , , no)
 APACHE_MODULE(negotiation, content negoatiation, , , yes)
 APACHE_MODULE(dir, directory request handling, , , yes)
 APACHE_MODULE(imap, internal imagemaps, , , yes)
-APACHE_MODULE(actions, Action triggering on requests, , action, yes)
+APACHE_MODULE(actions, Action triggering on requests, , , yes)
 APACHE_MODULE(speling, correct common URL misspellings, , , no)
 APACHE_MODULE(userdir, mapping of user requests, , , yes)
 APACHE_MODULE(alias, translation of requests, , , yes)
index e0cd0ffc9b59b95545e77e7a255dd5f4d2c3e3b4..d6a31ddeb1022b7d441ea237d9b358bbade5ad99 100644 (file)
@@ -94,7 +94,7 @@ typedef struct {
     const char *scripted[METHODS];   /* Added with Script... */
 } action_dir_config;
 
-module action_module;
+module actions_module;
 
 static void *create_action_dir_config(apr_pool_t *p, char *dummy)
 {
@@ -161,7 +161,7 @@ static const command_rec action_cmds[] =
 static int action_handler(request_rec *r)
 {
     action_dir_config *conf = (action_dir_config *)
-        ap_get_module_config(r->per_dir_config, &action_module);
+        ap_get_module_config(r->per_dir_config, &actions_module);
     const char *t, *action = r->handler ? r->handler : 
        ap_field_noparam(r->pool, r->content_type);
     const char *script;
@@ -214,7 +214,7 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_handler(action_handler,NULL,NULL,APR_HOOK_LAST);
 }
 
-module action_module =
+module actions_module =
 {
     STANDARD20_MODULE_STUFF,
     create_action_dir_config,  /* dir config creater */