Commit c1f7f3f0 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  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
parent 6f2720cf
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -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