summaryrefslogtreecommitdiff
path: root/include/ap_config.h
diff options
context:
space:
mode:
authorBen Laurie <ben@apache.org>2001-05-20 14:13:33 +0000
committerBen Laurie <ben@apache.org>2001-05-20 14:13:33 +0000
commit883a3b25bfd53808454198d18826dedb2c0686ac (patch)
treeefbc517fa33adb7197b0b684a58f53875b9d8cb5 /include/ap_config.h
parent296c0e0690a2784a920afe2f74a9d9e0c517aa50 (diff)
downloadhttpd-883a3b25bfd53808454198d18826dedb2c0686ac.tar.gz
AP_ function for optional hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89178 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_config.h')
-rw-r--r--include/ap_config.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/ap_config.h b/include/ap_config.h
index 3e61ca69f8..e961a903e4 100644
--- a/include/ap_config.h
+++ b/include/ap_config.h
@@ -57,6 +57,7 @@
#include "apr.h"
#include "apr_hooks.h"
+#include "apr_optional_hooks.h"
/**
* @file ap_config.h
@@ -229,6 +230,27 @@
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \
args_use,decline)
+/* Note that the other optional hook implementations are straightforward but
+ * have not yet been needed
+ */
+
+/**
+ * Implement an optional hook. This is exactly the same as a standard hook
+ * implementation, except the hook is optional.
+ * @see AP_IMPLEMENT_HOOK_RUN_ALL
+ */
+#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)
+
+/**
+ * Hook an optional hook. Unlike static hooks, this uses a macro instead of a
+ * function
+ */
+#define AP_OPTIONAL_HOOK(name,fn,pre,succ,order) \
+ APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)
+
#include "os.h"
#ifndef WIN32
#include "ap_config_auto.h"