#include "apr.h"
#include "apr_hooks.h"
#include "apr_optional_hooks.h"
#include "os.h"
#include "ap_config_auto.h"
#include "ap_config_layout.h"
マクロ定義 | |
#define | AP_DECLARE_STATIC |
#define | AP_DECLARE_EXPORT |
#define | AP_DECLARE(type) type |
#define | AP_DECLARE_NONSTD(type) type |
#define | AP_DECLARE_DATA |
#define | AP_MODULE_DECLARE(type) type |
#define | AP_MODULE_DECLARE_NONSTD(type) type |
#define | AP_MODULE_DECLARE_DATA |
#define | AP_DECLARE_HOOK(ret, name, args) APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args) |
#define | AP_IMPLEMENT_HOOK_BASE(name) APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ap,AP,name) |
#define | AP_IMPLEMENT_HOOK_VOID(name, args_decl, args_use) APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use) |
#define | AP_IMPLEMENT_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline) |
#define | AP_IMPLEMENT_HOOK_RUN_FIRST(ret, name, args_decl, args_use, decline) |
#define | AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ret, name, args_decl, args_use, ok, decline) |
#define | AP_OPTIONAL_HOOK(name, fn, pre, succ, order) APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order) |
#define | AP_HAVE_RELIABLE_PIPED_LOGS TRUE |
#define AP_DECLARE | ( | type | ) | type |
Apache Core dso functions are declared with AP_DECLARE(), so they may use the most appropriate calling convention. Hook functions and other Core functions with variable arguments must use AP_DECLARE_NONSTD().
AP_DECLARE(rettype) ap_func(args)
#define AP_DECLARE_DATA |
Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA. This assures the appropriate indirection is invoked at compile time.
AP_DECLARE_DATA type apr_variable
#define AP_DECLARE_EXPORT |
AP_DECLARE_EXPORT is defined when building the Apache Core dynamic library, so that all public symbols are exported.
#define AP_DECLARE_HOOK | ( | ret, | |||
name, | |||||
args | ) | APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args) |
Declare a hook function
ret | The return type of the hook | |
name | The hook's name (as a literal) | |
args | The arguments the hook function takes, in brackets. |
#define AP_DECLARE_NONSTD | ( | type | ) | type |
Apache Core dso variable argument and hook functions are declared with AP_DECLARE_NONSTD(), as they must use the C language calling convention.
AP_DECLARE_NONSTD(rettype) ap_func(args [...])
#define AP_DECLARE_STATIC |
AP_DECLARE_STATIC is defined when including Apache's Core headers, to provide static linkage when the dynamic library may be unavailable.
AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when including Apache's Core headers, to import and link the symbols from the dynamic Apache Core library and assure appropriate indirection and calling conventions at compile time.
#define AP_IMPLEMENT_HOOK_RUN_ALL | ( | ret, | |||
name, | |||||
args_decl, | |||||
args_use, | |||||
ok, | |||||
decline | ) |
値:
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \ args_use,ok,decline)
ret | The return type of the hook (and the hook runner) | |
name | The name of the hook | |
args_decl | The declaration of the arguments for the hook, for example "(int x,void *y)" | |
args_use | The arguments for the hook as used in a call, for example "(x,y)" | |
ok | The "ok" return value | |
decline | The "decline" return value |
#define AP_IMPLEMENT_HOOK_RUN_FIRST | ( | ret, | |||
name, | |||||
args_decl, | |||||
args_use, | |||||
decline | ) |
値:
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \ args_use,decline)
ret | The return type of the hook (and the hook runner) | |
name | The name of the hook | |
args_decl | The declaration of the arguments for the hook, for example "(int x,void *y)" | |
args_use | The arguments for the hook as used in a call, for example "(x,y)" | |
decline | The "decline" return value |
#define AP_IMPLEMENT_HOOK_VOID | ( | name, | |||
args_decl, | |||||
args_use | ) | APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use) |
Implement an Apache core hook that has no return code, and therefore runs all of the registered functions. The implementation is called ap_run_name.
name | The name of the hook | |
args_decl | The declaration of the arguments for the hook, for example "(int x,void *y)" | |
args_use | The arguments for the hook as used in a call, for example "(x,y)" |
#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL | ( | ret, | |||
name, | |||||
args_decl, | |||||
args_use, | |||||
ok, | |||||
decline | ) |
値:
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \ args_use,ok,decline)
#define AP_MODULE_DECLARE | ( | type | ) | type |
Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.
Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols declared with AP_MODULE_DECLARE_DATA are always exported.
module AP_MODULE_DECLARE_DATA mod_tag
#define AP_OPTIONAL_HOOK | ( | name, | |||
fn, | |||||
pre, | |||||
succ, | |||||
order | ) | APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order) |
Hook an optional hook. Unlike static hooks, this uses a macro instead of a function.