summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Jung <rjung@apache.org>2016-02-05 14:27:56 +0100
committerRainer Jung <rjung@apache.org>2016-02-05 14:27:56 +0100
commitb4c9ef848f1055dde38852f27744286f14dc5473 (patch)
treec25eb3042b24b6806adc3664e178f8b74d5bcefd
parentAllow Netware awk script which handles proxy (diff)
downloadapache2-b4c9ef848f1055dde38852f27744286f14dc5473.tar.xz
apache2-b4c9ef848f1055dde38852f27744286f14dc5473.zip
Remove recent new marker macroPROXY_HOOK_NON_LINKED
and instead use PROXY_DECLARE_OPTIONAL_HOOK which is defined to be equal to APR_DECLARE_EXTERNAL_HOOK. Correct explanation for the use of PROXY_DECLARE_OPTIONAL_HOOK. Use PROXY_DECLARE_OPTIONAL_HOOK for the correct hooks. Adjust build/make_nw_export.awk to match the new PROXY_DECLARE_OPTIONAL_HOOK. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728663 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/make_nw_export.awk2
-rw-r--r--modules/proxy/mod_proxy.h56
2 files changed, 26 insertions, 32 deletions
diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk
index 5603e822c5..6b21a84591 100644
--- a/build/make_nw_export.awk
+++ b/build/make_nw_export.awk
@@ -60,7 +60,7 @@ function add_symbol(sym_name) {
next
}
-/^[ \t]*PROXY_HOOK_NON_LINKED[ \t]*AP[RU]?_DECLARE_EXTERNAL_HOOK[^(]*[(][^)]*/ {
+/^[ \t]*PROXY_DECLARE_OPTIONAL_HOOK[^(]*[(][^)]*/ {
split($0, args, ",")
prefix = args[1]
sub("^.*[(]", "", prefix)
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
index 0acf84ac8b..3860eaa586 100644
--- a/modules/proxy/mod_proxy.h
+++ b/modules/proxy/mod_proxy.h
@@ -558,10 +558,13 @@ struct proxy_balancer_method {
#define PROXY_DECLARE_DATA __declspec(dllimport)
#endif
-/* A non-functional marker tag to inform build/make_nw_export.awk
- * that this hook is not linked in the module.
+/* Using PROXY_DECLARE_OPTIONAL_HOOK instead of
+ * APR_DECLARE_EXTERNAL_HOOK allows build/make_nw_export.awk
+ * to distinguish between hooks that implement
+ * proxy_hook_xx and proxy_hook_get_xx in mod_proxy.c and
+ * those which don't.
*/
-#define PROXY_HOOK_NON_LINKED
+#define PROXY_DECLARE_OPTIONAL_HOOK APR_DECLARE_EXTERNAL_HOOK
/* These 2 are in mod_proxy.c */
@@ -577,19 +580,16 @@ APR_DECLARE_OPTIONAL_FN(const char *, set_worker_hc_param,
const char *, const char *, void *));
-PROXY_HOOK_NON_LINKED APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, scheme_handler,
- (request_rec *r,
- proxy_worker *worker,
- proxy_server_conf *conf,
- char *url,
- const char *proxyhost,
- apr_port_t proxyport))
-PROXY_HOOK_NON_LINKED APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, canon_handler,
- (request_rec *r,
- char *url))
+APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, scheme_handler,
+ (request_rec *r, proxy_worker *worker,
+ proxy_server_conf *conf, char *url,
+ const char *proxyhost, apr_port_t proxyport))
+APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, canon_handler,
+ (request_rec *r, char *url))
-APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, create_req, (request_rec *r, request_rec *pr))
-APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, fixups, (request_rec *r))
+PROXY_DECLARE_OPTIONAL_HOOK(proxy, PROXY, int, create_req,
+ (request_rec *r, request_rec *pr))
+PROXY_DECLARE_OPTIONAL_HOOK(proxy, PROXY, int, fixups, (request_rec *r))
/**
* Let modules perform processing when the connection to the origin is being
@@ -597,8 +597,8 @@ APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, fixups, (request_rec *r))
* @param r The client request
* @param backend The proxy representation of the backend connection
*/
-APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, detach_backend, (request_rec *r,
- proxy_conn_rec *backend))
+PROXY_DECLARE_OPTIONAL_HOOK(proxy, PROXY, int, detach_backend,
+ (request_rec *r, proxy_conn_rec *backend))
/**
* pre request hook.
@@ -608,30 +608,24 @@ APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, detach_backend, (request_rec *r,
* and then the scheme_handler is called.
*
*/
-PROXY_HOOK_NON_LINKED APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, pre_request,
- (proxy_worker **worker,
- proxy_balancer **balancer,
- request_rec *r,
- proxy_server_conf *conf,
- char **url))
+APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, pre_request,
+ (proxy_worker **worker, proxy_balancer **balancer,
+ request_rec *r, proxy_server_conf *conf, char **url))
/**
* post request hook.
* It is called after request for updating runtime balancer status.
*/
-PROXY_HOOK_NON_LINKED APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, post_request,
- (proxy_worker *worker,
- proxy_balancer *balancer,
- request_rec *r,
- proxy_server_conf *conf))
+APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, post_request,
+ (proxy_worker *worker, proxy_balancer *balancer,
+ request_rec *r, proxy_server_conf *conf))
/**
* request status hook
* It is called after all proxy processing has been done. This gives other
* modules a chance to create default content on failure, for example
*/
-PROXY_HOOK_NON_LINKED APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, request_status,
- (int *status,
- request_rec *r))
+PROXY_DECLARE_OPTIONAL_HOOK(proxy, PROXY, int, request_status,
+ (int *status, request_rec *r))
/* proxy_util.c */