From: William A. Rowe Jr Date: Wed, 6 Dec 2000 05:59:50 +0000 (+0000) Subject: This solves two issues, one is a backref from apr-util into the X-Git-Tag: APACHE_2_0_ALPHA_9~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3815aef2ee0fa7342311ab99e282c0e4a5a6141e;p=apache This solves two issues, one is a backref from apr-util into the apache namespace, and the second is the proper linkage declarations and their explanations. Documented the distinction between AP_IMPLEMENT_HOOK_ and AP_IMPLEMENT_EXPORT_HOOK_ This doesn't resolve any export issues within apr-util, however. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87229 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_config.h b/include/ap_config.h index 1d7df4cb30..e5f4e0ad7e 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -57,6 +57,7 @@ #include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */ #include "apr_lib.h" /* apr_isfoo() macros */ +#include "ap_hooks.h" /** * AP_DECLARE_EXPORT is defined when building the Apache Core dynamic @@ -136,6 +137,51 @@ */ #define MODULE_VAR_EXPORT AP_MODULE_DECLARE_DATA +#define AP_DECLARE_HOOK(ret,name,args) \ +AP_DECLARE_EXTERNAL_HOOK(AP,ret,name,args) + +#define AP_IMPLEMENT_HOOK_BASE(name) \ +AP_IMPLEMENT_EXTERNAL_HOOK_BASE(AP,name) + +/** + * Implement an Apache core hook that has no return code, and therefore + * runs all of the registered functions + * @param name The name of the hook + * @param args_decl The declaration of the arguments for the hook + * @param args_used The names for the arguments for the hook + * @deffunc void AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use) + * @tip If IMPLEMENTing a hook that is not linked into the Apache core, + * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_HOOK_VOID. + */ +#define AP_IMPLEMENT_HOOK_VOID(name,args_decl,args_use) \ +AP_IMPLEMENT_EXTERNAL_HOOK_VOID(AP,name,args_decl,args_use) + +/** + * Implement an Apache core hook that runs until one of the functions + * returns something other than OK or DECLINE + * @param name The name of the hook + * @param args_decl The declaration of the arguments for the hook + * @param args_used The names for the arguments for the hook + * @deffunc int AP_IMPLEMENT_HOOK_RUN_ALL(name, args_decl, args_use) + * @tip If IMPLEMENTing a hook that is not linked into the Apache core, + * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL. + */ +#define AP_IMPLEMENT_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok,decline) \ +AP_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(AP,ret,name,args_decl,args_use,ok,decline) + +/** + * Implement a hook that runs until the first function returns something + * other than DECLINE + * @param name The name of the hook + * @param args_decl The declaration of the arguments for the hook + * @param args_used The names for the arguments for the hook + * @deffunc int AP_IMPLEMENT_HOOK_RUN_FIRST(name, args_decl, args_use) + * @tip If IMPLEMENTing a hook that is not linked into the Apache core + * (e.g. within a dso) see AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST. + */ +#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret,name,args_decl,args_use,decline) \ +AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(AP,ret,name,args_decl,args_use,decline) + #ifdef WIN32 #include "os.h" #else