From: Doug MacEachern Date: Wed, 26 Apr 2000 07:14:39 +0000 (+0000) Subject: add AP_ prefix to *HOOK* macros X-Git-Tag: APACHE_2_0_ALPHA_3~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6644b3438735955231edc9df59be3564538cc9f5;p=thirdparty%2Fapache%2Fhttpd.git add AP_ prefix to *HOOK* macros git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85045 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_config.h b/include/http_config.h index 3121e69b20e..d2ef076e786 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -413,12 +413,12 @@ CORE_EXPORT(const char *) ap_handle_command(cmd_parms *parms, void *config, cons #endif /* Hooks */ -DECLARE_HOOK(int,header_parser,(request_rec *)) -DECLARE_HOOK(void,post_config, +AP_DECLARE_HOOK(int,header_parser,(request_rec *)) +AP_DECLARE_HOOK(void,post_config, (ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s)) -DECLARE_HOOK(void,open_logs, +AP_DECLARE_HOOK(void,open_logs, (ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s)) -DECLARE_HOOK(void,child_init,(ap_pool_t *pchild, server_rec *s)) +AP_DECLARE_HOOK(void,child_init,(ap_pool_t *pchild, server_rec *s)) #ifdef __cplusplus } diff --git a/include/http_connection.h b/include/http_connection.h index e4891f7360e..7b237c793f1 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -73,8 +73,8 @@ int ap_process_http_connection(conn_rec *); #endif /* Hooks */ -DECLARE_HOOK(void,pre_connection,(conn_rec *)) -DECLARE_HOOK(int,process_connection,(conn_rec *)) +AP_DECLARE_HOOK(void,pre_connection,(conn_rec *)) +AP_DECLARE_HOOK(int,process_connection,(conn_rec *)) #ifdef __cplusplus } diff --git a/include/http_protocol.h b/include/http_protocol.h index 79fe7104ab1..ea1b59ab4bc 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -227,10 +227,10 @@ API_EXPORT(int) ap_method_number_of(const char *method); * post_read_request --- run right after read_request or internal_redirect, * and not run during any subrequests. */ -DECLARE_HOOK(int,post_read_request,(request_rec *)) -DECLARE_HOOK(int,log_transaction,(request_rec *)) -DECLARE_HOOK(const char *,http_method,(const request_rec *)) -DECLARE_HOOK(unsigned short,default_port,(const request_rec *)) +AP_DECLARE_HOOK(int,post_read_request,(request_rec *)) +AP_DECLARE_HOOK(int,log_transaction,(request_rec *)) +AP_DECLARE_HOOK(const char *,http_method,(const request_rec *)) +AP_DECLARE_HOOK(unsigned short,default_port,(const request_rec *)) #ifdef __cplusplus } diff --git a/include/http_request.h b/include/http_request.h index 42b200db6af..57630c15d19 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -114,12 +114,12 @@ API_EXPORT(void) ap_die(int type, request_rec *r); #endif /* Hooks */ -DECLARE_HOOK(int,translate_name,(request_rec *)) -DECLARE_HOOK(int,check_user_id,(request_rec *)) -DECLARE_HOOK(int,fixups,(request_rec *)) -DECLARE_HOOK(int,type_checker,(request_rec *)) -DECLARE_HOOK(int,access_checker,(request_rec *)) -DECLARE_HOOK(int,auth_checker,(request_rec *)) +AP_DECLARE_HOOK(int,translate_name,(request_rec *)) +AP_DECLARE_HOOK(int,check_user_id,(request_rec *)) +AP_DECLARE_HOOK(int,fixups,(request_rec *)) +AP_DECLARE_HOOK(int,type_checker,(request_rec *)) +AP_DECLARE_HOOK(int,access_checker,(request_rec *)) +AP_DECLARE_HOOK(int,auth_checker,(request_rec *)) #ifdef __cplusplus } diff --git a/modules/aaa/mod_access.c b/modules/aaa/mod_access.c index afa259cf680..78c669f66f5 100644 --- a/modules/aaa/mod_access.c +++ b/modules/aaa/mod_access.c @@ -392,7 +392,7 @@ static int check_dir_access(request_rec *r) static void register_hooks(void) { - ap_hook_access_checker(check_dir_access,NULL,NULL,HOOK_MIDDLE); + ap_hook_access_checker(check_dir_access,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT access_module = diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index c985f52149b..4a6de2f02d4 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -317,8 +317,8 @@ static int check_user_access(request_rec *r) static void register_hooks(void) { - ap_hook_check_user_id(authenticate_basic_user,NULL,NULL,HOOK_MIDDLE); - ap_hook_auth_checker(check_user_access,NULL,NULL,HOOK_MIDDLE); + ap_hook_check_user_id(authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_auth_checker(check_user_access,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT auth_module = diff --git a/modules/aaa/mod_auth_anon.c b/modules/aaa/mod_auth_anon.c index 44cea729309..3a786d007f5 100644 --- a/modules/aaa/mod_auth_anon.c +++ b/modules/aaa/mod_auth_anon.c @@ -291,8 +291,8 @@ static int check_anon_access(request_rec *r) } static void register_hooks(void) { - ap_hook_check_user_id(anon_authenticate_basic_user,NULL,NULL,HOOK_MIDDLE); - ap_hook_auth_checker(check_anon_access,NULL,NULL,HOOK_MIDDLE); + ap_hook_check_user_id(anon_authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_auth_checker(check_anon_access,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT auth_anon_module = diff --git a/modules/aaa/mod_auth_db.c b/modules/aaa/mod_auth_db.c index 862e3d95df0..cbc263376e0 100644 --- a/modules/aaa/mod_auth_db.c +++ b/modules/aaa/mod_auth_db.c @@ -400,8 +400,8 @@ static int db_check_auth(request_rec *r) static void register_hooks(void) { - ap_hook_check_user_id(db_authenticate_basic_user,NULL,NULL,HOOK_MIDDLE); - ap_hook_auth_checker(db_check_auth,NULL,NULL,HOOK_MIDDLE); + ap_hook_check_user_id(db_authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_auth_checker(db_check_auth,NULL,NULL,AP_HOOK_MIDDLE); } module auth_db_module = diff --git a/modules/aaa/mod_auth_dbm.c b/modules/aaa/mod_auth_dbm.c index 7372fdc3220..d9e304bca29 100644 --- a/modules/aaa/mod_auth_dbm.c +++ b/modules/aaa/mod_auth_dbm.c @@ -313,8 +313,8 @@ static int dbm_check_auth(request_rec *r) static void register_hooks(void) { - ap_hook_check_user_id(dbm_authenticate_basic_user, NULL, NULL, HOOK_MIDDLE); - ap_hook_auth_checker(dbm_check_auth, NULL, NULL, HOOK_MIDDLE); + ap_hook_check_user_id(dbm_authenticate_basic_user, NULL, NULL, AP_HOOK_MIDDLE); + ap_hook_auth_checker(dbm_check_auth, NULL, NULL, AP_HOOK_MIDDLE); } module auth_dbm_module = diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 582c9da83ef..0d5671b3811 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -1871,9 +1871,9 @@ static void register_hooks(void) ap_hook_post_config(initialize_module, NULL, cfgPost, 0); ap_hook_post_read_request(parse_hdr_and_update_nc, parsePre, NULL, 0); - ap_hook_check_user_id(authenticate_digest_user, NULL, NULL, HOOK_MIDDLE); - ap_hook_auth_checker(digest_check_auth, NULL, NULL, HOOK_MIDDLE); - ap_hook_fixups(add_auth_info, NULL, NULL, HOOK_MIDDLE); + ap_hook_check_user_id(authenticate_digest_user, NULL, NULL, AP_HOOK_MIDDLE); + ap_hook_auth_checker(digest_check_auth, NULL, NULL, AP_HOOK_MIDDLE); + ap_hook_fixups(add_auth_info, NULL, NULL, AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT auth_digest_module = diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c index 81e269dc4c2..c99f32f7b30 100644 --- a/modules/cache/mod_file_cache.c +++ b/modules/cache/mod_file_cache.c @@ -529,13 +529,13 @@ static command_rec mmap_cmds[] = static void register_hooks(void) { /* static const char* const aszPre[]={"http_core.c",NULL}; */ - /* ap_hook_pre_config(pre_config,NULL,NULL,HOOK_MIDDLE); */ - ap_hook_post_config(file_cache_post_config, NULL, NULL, HOOK_MIDDLE); - ap_hook_translate_name(file_cache_xlat, NULL, NULL, HOOK_MIDDLE); + /* ap_hook_pre_config(pre_config,NULL,NULL,AP_HOOK_MIDDLE); */ + ap_hook_post_config(file_cache_post_config, NULL, NULL, AP_HOOK_MIDDLE); + ap_hook_translate_name(file_cache_xlat, NULL, NULL, AP_HOOK_MIDDLE); /* This trick doesn't work apparently because the translate hooks are single shot. If the core_hook returns OK, then our hook is not called. - ap_hook_translate_name(file_cache_xlat, aszPre, NULL, HOOK_MIDDLE); + ap_hook_translate_name(file_cache_xlat, aszPre, NULL, AP_HOOK_MIDDLE); */ }; diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index 57b9e342809..752a0dd1e50 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -118,7 +118,7 @@ static const command_rec echo_cmds[] = { static void register_hooks(void) { - ap_hook_process_connection(process_echo_connection,NULL,NULL,HOOK_MIDDLE); + ap_hook_process_connection(process_echo_connection,NULL,NULL,AP_HOOK_MIDDLE); } API_VAR_EXPORT module echo_module = { diff --git a/modules/experimental/mod_example.c b/modules/experimental/mod_example.c index 8d2e3244b2f..7d588e73b97 100644 --- a/modules/experimental/mod_example.c +++ b/modules/experimental/mod_example.c @@ -1119,9 +1119,9 @@ static const handler_rec example_handlers[] = * before this module. * successors -> a list of modules whose calls to this hook must come * after this module. - * position -> The relative position of this module. One of HOOK_FIRST, - * HOOK_MIDDLE, or HOOK_LAST. Most modules will use - * HOOK_MIDDLE. If multiple modules use the same relative + * position -> The relative position of this module. One of AP_HOOK_FIRST, + * AP_HOOK_MIDDLE, or AP_HOOK_LAST. Most modules will use + * AP_HOOK_MIDDLE. If multiple modules use the same relative * position, Apache will determine which to call first. * If your module relies on another module to run first, * or another module running after yours, use the @@ -1130,28 +1130,28 @@ static const handler_rec example_handlers[] = static void register_hooks(void) { /* module initializer */ - ap_hook_post_config(example_init, NULL, NULL, HOOK_MIDDLE); + ap_hook_post_config(example_init, NULL, NULL, AP_HOOK_MIDDLE); /* [2] filename-to-URI translation */ - ap_hook_translate_name(example_translate_handler, NULL, NULL, HOOK_MIDDLE); + ap_hook_translate_name(example_translate_handler, NULL, NULL, AP_HOOK_MIDDLE); /* [5] check/validate user_id */ - ap_hook_check_user_id(example_check_user_id, NULL, NULL, HOOK_MIDDLE); + ap_hook_check_user_id(example_check_user_id, NULL, NULL, AP_HOOK_MIDDLE); /* [6] check user_id is valid *here* */ - ap_hook_auth_checker(example_auth_checker, NULL, NULL, HOOK_MIDDLE); + ap_hook_auth_checker(example_auth_checker, NULL, NULL, AP_HOOK_MIDDLE); /* [4] check access by host address */ - ap_hook_access_checker(example_access_checker, NULL, NULL, HOOK_MIDDLE); + ap_hook_access_checker(example_access_checker, NULL, NULL, AP_HOOK_MIDDLE); /* [7] MIME type checker/setter */ - ap_hook_type_checker(example_type_checker, NULL, NULL, HOOK_MIDDLE); + ap_hook_type_checker(example_type_checker, NULL, NULL, AP_HOOK_MIDDLE); /* [8] fixups */ - ap_hook_fixups(example_fixer_upper, NULL, NULL, HOOK_MIDDLE); + ap_hook_fixups(example_fixer_upper, NULL, NULL, AP_HOOK_MIDDLE); /* [10] logger */ - ap_hook_log_transaction(example_logger, NULL, NULL, HOOK_MIDDLE); + ap_hook_log_transaction(example_logger, NULL, NULL, AP_HOOK_MIDDLE); /* [3] header parser */ - ap_hook_header_parser(example_header_parser, NULL, NULL, HOOK_MIDDLE); + ap_hook_header_parser(example_header_parser, NULL, NULL, AP_HOOK_MIDDLE); /* process initializer */ - ap_hook_child_init(example_child_init, NULL, NULL, HOOK_MIDDLE); + ap_hook_child_init(example_child_init, NULL, NULL, AP_HOOK_MIDDLE); /* [1] post read_request handling */ ap_hook_post_read_request(example_post_read_request, NULL, NULL, - HOOK_MIDDLE); + AP_HOOK_MIDDLE); } /*--------------------------------------------------------------------------*/ diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index ffd08003d77..22275159c1d 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -995,7 +995,7 @@ static const handler_rec cgid_handlers[] = static void register_hook(void) { - ap_hook_post_config(cgid_init, NULL, NULL, HOOK_MIDDLE); + ap_hook_post_config(cgid_init, NULL, NULL, AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT cgid_module = { diff --git a/modules/http/http_core.c b/modules/http/http_core.c index fb9f3431311..7adc2eb1c71 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2519,15 +2519,15 @@ static unsigned short core_port(const request_rec *r) static void register_hooks(void) { - ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST); + ap_hook_translate_name(core_translate,NULL,NULL,AP_HOOK_REALLY_LAST); ap_hook_process_connection(ap_process_http_connection,NULL,NULL, - HOOK_REALLY_LAST); - ap_hook_http_method(core_method,NULL,NULL,HOOK_REALLY_LAST); - ap_hook_default_port(core_port,NULL,NULL,HOOK_REALLY_LAST); - ap_hook_open_logs(core_open_logs,NULL,NULL,HOOK_MIDDLE); + AP_HOOK_REALLY_LAST); + ap_hook_http_method(core_method,NULL,NULL,AP_HOOK_REALLY_LAST); + ap_hook_default_port(core_port,NULL,NULL,AP_HOOK_REALLY_LAST); + ap_hook_open_logs(core_open_logs,NULL,NULL,AP_HOOK_MIDDLE); /* FIXME: I suspect we can eliminate the need for these - Ben */ - ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST); - ap_hook_access_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST); + ap_hook_type_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST); + ap_hook_access_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST); } API_VAR_EXPORT module core_module = { diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 77aecaf2c05..aaca570fbbc 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -78,11 +78,11 @@ #include "mpm_status.h" #include -HOOK_STRUCT( - HOOK_LINK(post_read_request) - HOOK_LINK(log_transaction) - HOOK_LINK(http_method) - HOOK_LINK(default_port) +AP_HOOK_STRUCT( + AP_HOOK_LINK(post_read_request) + AP_HOOK_LINK(log_transaction) + AP_HOOK_LINK(http_method) + AP_HOOK_LINK(default_port) ) #define SET_BYTES_SENT(r) \ @@ -2833,9 +2833,9 @@ API_EXPORT(void) ap_send_error_response(request_rec *r, int recursive_error) ap_rflush(r); } -IMPLEMENT_HOOK_RUN_ALL(int,post_read_request,(request_rec *r),(r),OK,DECLINED) -IMPLEMENT_HOOK_RUN_ALL(int,log_transaction,(request_rec *r),(r),OK,DECLINED) -IMPLEMENT_HOOK_RUN_FIRST(const char *,http_method,(const request_rec *r),(r), +AP_IMPLEMENT_HOOK_RUN_ALL(int,post_read_request,(request_rec *r),(r),OK,DECLINED) +AP_IMPLEMENT_HOOK_RUN_ALL(int,log_transaction,(request_rec *r),(r),OK,DECLINED) +AP_IMPLEMENT_HOOK_RUN_FIRST(const char *,http_method,(const request_rec *r),(r), NULL) -IMPLEMENT_HOOK_RUN_FIRST(unsigned short,default_port,(const request_rec *r), +AP_IMPLEMENT_HOOK_RUN_FIRST(unsigned short,default_port,(const request_rec *r), (r),0) diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 8e52484af8f..e1dda872de8 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -77,21 +77,21 @@ #include "http_main.h" #include "apr_fnmatch.h" -HOOK_STRUCT( - HOOK_LINK(translate_name) - HOOK_LINK(check_user_id) - HOOK_LINK(fixups) - HOOK_LINK(type_checker) - HOOK_LINK(access_checker) - HOOK_LINK(auth_checker) +AP_HOOK_STRUCT( + AP_HOOK_LINK(translate_name) + AP_HOOK_LINK(check_user_id) + AP_HOOK_LINK(fixups) + AP_HOOK_LINK(type_checker) + AP_HOOK_LINK(access_checker) + AP_HOOK_LINK(auth_checker) ) -IMPLEMENT_HOOK_RUN_FIRST(int,translate_name,(request_rec *r),(r),DECLINED) -IMPLEMENT_HOOK_RUN_FIRST(int,check_user_id,(request_rec *r),(r),DECLINED) -IMPLEMENT_HOOK_RUN_ALL(int,fixups,(request_rec *r),(r),OK,DECLINED) -IMPLEMENT_HOOK_RUN_FIRST(int,type_checker,(request_rec *r),(r),DECLINED) -IMPLEMENT_HOOK_RUN_ALL(int,access_checker,(request_rec *r),(r),OK,DECLINED) -IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker,(request_rec *r),(r),DECLINED) +AP_IMPLEMENT_HOOK_RUN_FIRST(int,translate_name,(request_rec *r),(r),DECLINED) +AP_IMPLEMENT_HOOK_RUN_FIRST(int,check_user_id,(request_rec *r),(r),DECLINED) +AP_IMPLEMENT_HOOK_RUN_ALL(int,fixups,(request_rec *r),(r),OK,DECLINED) +AP_IMPLEMENT_HOOK_RUN_FIRST(int,type_checker,(request_rec *r),(r),DECLINED) +AP_IMPLEMENT_HOOK_RUN_ALL(int,access_checker,(request_rec *r),(r),OK,DECLINED) +AP_IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker,(request_rec *r),(r),DECLINED) /***************************************************************** * diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 97102a69e5b..795de4dff0c 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -737,8 +737,8 @@ static int find_ct(request_rec *r) static void register_hooks(void) { - ap_hook_type_checker(find_ct,NULL,NULL,HOOK_MIDDLE); - ap_hook_post_config(mime_post_config,NULL,NULL,HOOK_MIDDLE); + ap_hook_type_checker(find_ct,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_post_config(mime_post_config,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT mime_module = { diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index f8cb50f11fc..07271899414 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -1139,8 +1139,8 @@ static void flush_all_logs(server_rec *s) static void register_hooks(void) { - ap_hook_open_logs(init_config_log,NULL,NULL,HOOK_MIDDLE); - ap_hook_log_transaction(multi_log_transaction,NULL,NULL,HOOK_MIDDLE); + ap_hook_open_logs(init_config_log,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_log_transaction(multi_log_transaction,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT config_log_module = diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index af02eaaee3f..ce2f2a338c9 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -401,8 +401,8 @@ static void register_hooks(void) { static const char * const aszPre[]={ "mod_userdir.c",NULL }; - ap_hook_translate_name(translate_alias_redir,aszPre,NULL,HOOK_MIDDLE); - ap_hook_fixups(fixup_redir,NULL,NULL,HOOK_MIDDLE); + ap_hook_translate_name(translate_alias_redir,aszPre,NULL,AP_HOOK_MIDDLE); + ap_hook_fixups(fixup_redir,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT alias_module = diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 994df48c038..e3aa38277b8 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -2739,8 +2739,8 @@ static const handler_rec negotiation_handlers[] = static void register_hooks(void) { - ap_hook_fixups(fix_encoding,NULL,NULL,HOOK_MIDDLE); - ap_hook_type_checker(handle_multi,NULL,NULL,HOOK_FIRST); + ap_hook_fixups(fix_encoding,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_type_checker(handle_multi,NULL,NULL,AP_HOOK_FIRST); } module MODULE_VAR_EXPORT negotiation_module = diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 03a638320d2..9a3ebc96311 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -202,12 +202,12 @@ static const handler_rec handler_table[] = { static void register_hooks(void) { - ap_hook_post_config(init_module,NULL,NULL,HOOK_MIDDLE); - ap_hook_child_init(init_child,NULL,NULL,HOOK_MIDDLE); + ap_hook_post_config(init_module,NULL,NULL,AP_HOOK_MIDDLE); + ap_hook_child_init(init_child,NULL,NULL,AP_HOOK_MIDDLE); - ap_hook_fixups(hook_fixup,NULL,NULL,HOOK_FIRST); - ap_hook_translate_name(hook_uri2file,NULL,NULL,HOOK_FIRST); - ap_hook_type_checker(hook_mimetype,NULL,NULL,HOOK_MIDDLE); + ap_hook_fixups(hook_fixup,NULL,NULL,AP_HOOK_FIRST); + ap_hook_translate_name(hook_uri2file,NULL,NULL,AP_HOOK_FIRST); + ap_hook_type_checker(hook_mimetype,NULL,NULL,AP_HOOK_MIDDLE); } /* the main config structure */ diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index 03b6e675e60..29faa63529e 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -551,7 +551,7 @@ static int check_speling(request_rec *r) static void register_hooks(void) { - ap_hook_fixups(check_speling,NULL,NULL,HOOK_LAST); + ap_hook_fixups(check_speling,NULL,NULL,AP_HOOK_LAST); } module MODULE_VAR_EXPORT speling_module = diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index 2a087886fd2..f54fd4400ec 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -342,7 +342,7 @@ static void register_hooks(void) { static const char * const aszSucc[]={ "mod_alias.c",NULL }; - ap_hook_translate_name(translate_userdir,NULL,aszSucc,HOOK_MIDDLE); + ap_hook_translate_name(translate_userdir,NULL,aszSucc,AP_HOOK_MIDDLE); } module userdir_module = { diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c index 1eddd82ad2c..c5d37832145 100644 --- a/modules/mappers/mod_vhost_alias.c +++ b/modules/mappers/mod_vhost_alias.c @@ -460,7 +460,7 @@ static int mva_translate(request_rec *r) static void register_hooks(void) { - ap_hook_translate_name(mva_translate, NULL, NULL, HOOK_MIDDLE); + ap_hook_translate_name(mva_translate, NULL, NULL, AP_HOOK_MIDDLE); }; module MODULE_VAR_EXPORT vhost_alias_module = diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c index 339937ed805..cface066a0f 100644 --- a/modules/metadata/mod_cern_meta.c +++ b/modules/metadata/mod_cern_meta.c @@ -379,7 +379,7 @@ static int add_cern_meta_data(request_rec *r) } static void register_hooks(void) { - ap_hook_fixups(add_cern_meta_data,NULL,NULL,HOOK_MIDDLE); + ap_hook_fixups(add_cern_meta_data,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT cern_meta_module = { diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c index fa434ddaef4..da52b08635c 100644 --- a/modules/metadata/mod_env.c +++ b/modules/metadata/mod_env.c @@ -254,7 +254,7 @@ static int fixup_env_module(request_rec *r) static void register_hooks(void) { - ap_hook_fixups(fixup_env_module,NULL,NULL,HOOK_MIDDLE); + ap_hook_fixups(fixup_env_module,NULL,NULL,AP_HOOK_MIDDLE); } diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 49f8f0f530e..1a870601485 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -494,7 +494,7 @@ static int add_expires(request_rec *r) static void register_hooks(void) { - ap_hook_fixups(add_expires,NULL,NULL,HOOK_MIDDLE); + ap_hook_fixups(add_expires,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT expires_module = diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index d9b8057ae32..a311345ba6a 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -244,7 +244,7 @@ static int fixup_headers(request_rec *r) } static void register_hooks(void) { - ap_hook_fixups(fixup_headers,NULL,NULL,HOOK_MIDDLE); + ap_hook_fixups(fixup_headers,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT headers_module = { diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index fdcc0cede4a..21cfc16c282 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -2487,8 +2487,8 @@ static void register_hooks(void) /* mod_mime_magic should be run after mod_mime, if at all. */ - ap_hook_type_checker(magic_find_ct, aszPre, NULL, HOOK_MIDDLE); - ap_hook_post_config(magic_init, NULL, NULL, HOOK_FIRST); + ap_hook_type_checker(magic_find_ct, aszPre, NULL, AP_HOOK_MIDDLE); + ap_hook_post_config(magic_init, NULL, NULL, AP_HOOK_FIRST); } /* diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index 7ce032d9363..13a63170cf3 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -404,7 +404,7 @@ static int match_headers(request_rec *r) static void register_hooks(void) { - ap_hook_post_read_request(match_headers,NULL,NULL,HOOK_MIDDLE); + ap_hook_post_read_request(match_headers,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT setenvif_module = diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index b37010e45c8..677e3b2bf18 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -395,9 +395,9 @@ static int gen_unique_id(request_rec *r) static void register_hooks(void) { - ap_hook_post_config(unique_id_global_init, NULL, NULL, HOOK_MIDDLE); - ap_hook_child_init(unique_id_child_init, NULL, NULL, HOOK_MIDDLE); - ap_hook_post_read_request(gen_unique_id, NULL, NULL, HOOK_MIDDLE); + ap_hook_post_config(unique_id_global_init, NULL, NULL, AP_HOOK_MIDDLE); + ap_hook_child_init(unique_id_child_init, NULL, NULL, AP_HOOK_MIDDLE); + ap_hook_post_read_request(gen_unique_id, NULL, NULL, AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT unique_id_module = { diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c index 3ec22492d27..7698f24c861 100644 --- a/modules/metadata/mod_usertrack.c +++ b/modules/metadata/mod_usertrack.c @@ -305,7 +305,7 @@ static const command_rec cookie_log_cmds[] = { }; static void register_hooks(void) { - ap_hook_fixups(spot_cookie,NULL,NULL,HOOK_MIDDLE); + ap_hook_fixups(spot_cookie,NULL,NULL,AP_HOOK_MIDDLE); } module MODULE_VAR_EXPORT usertrack_module = { STANDARD20_MODULE_STUFF, diff --git a/server/config.c b/server/config.c index 1f0b90cb264..7b9e70ce1da 100644 --- a/server/config.c +++ b/server/config.c @@ -85,21 +85,21 @@ #include "http_vhost.h" #include "util_cfgtree.h" -HOOK_STRUCT( - HOOK_LINK(header_parser) - HOOK_LINK(post_config) - HOOK_LINK(open_logs) - HOOK_LINK(child_init) +AP_HOOK_STRUCT( + AP_HOOK_LINK(header_parser) + AP_HOOK_LINK(post_config) + AP_HOOK_LINK(open_logs) + AP_HOOK_LINK(child_init) ) -IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) -IMPLEMENT_HOOK_VOID(post_config, +AP_IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) +AP_IMPLEMENT_HOOK_VOID(post_config, (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s), (pconf,plog,ptemp,s)) -IMPLEMENT_HOOK_VOID(open_logs, +AP_IMPLEMENT_HOOK_VOID(open_logs, (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s), (pconf,plog,ptemp,s)) -IMPLEMENT_HOOK_VOID(child_init,(ap_pool_t *pchild, server_rec *s),(pchild,s)) +AP_IMPLEMENT_HOOK_VOID(child_init,(ap_pool_t *pchild, server_rec *s),(pchild,s)) /**************************************************************** * diff --git a/server/connection.c b/server/connection.c index 6113d19f9ce..eeffd8d4e7c 100644 --- a/server/connection.c +++ b/server/connection.c @@ -67,13 +67,13 @@ #include "http_config.h" #include "http_vhost.h" -HOOK_STRUCT( - HOOK_LINK(pre_connection) - HOOK_LINK(process_connection) +AP_HOOK_STRUCT( + AP_HOOK_LINK(pre_connection) + AP_HOOK_LINK(process_connection) ) -IMPLEMENT_HOOK_VOID(pre_connection,(conn_rec *c),(c)) -IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED) +AP_IMPLEMENT_HOOK_VOID(pre_connection,(conn_rec *c),(c)) +AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED) /* * More machine-dependent networking gooo... on some systems,