summaryrefslogtreecommitdiff
path: root/build/make_exports.awk
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2001-07-21 13:33:31 +0000
committerBrian Havard <bjh@apache.org>2001-07-21 13:33:31 +0000
commit07354859317399ae597c625f137d949d7869313f (patch)
treef4f20d40af494286a6ceed89c0267a28b260b61e /build/make_exports.awk
parentc92887ec0fa6ff3304d2cac6c1355b0ebfbfbd3c (diff)
downloadhttpd-07354859317399ae597c625f137d949d7869313f.tar.gz
Sander says:
I missed the hook declarations in my previous script. This is added by the patch below. The patch also removes unneeded ; that slipped in because I use c a lot more than awk :) I moved a rule around so removal of leading whitespace could go into one rule (see AP[RU]?_DECLARE). Also removed the additional idx variable in favor of checking the return value of the index function. Submitted by: Sander Striker <striker@apache.org> Reviewed by: Brian Havard <brianh@kheldar.apana.org.au> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89650 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/make_exports.awk')
-rw-r--r--build/make_exports.awk25
1 files changed, 17 insertions, 8 deletions
diff --git a/build/make_exports.awk b/build/make_exports.awk
index 27fd631eb9..5115301894 100644
--- a/build/make_exports.awk
+++ b/build/make_exports.awk
@@ -70,24 +70,33 @@ function leave_scope() {
}
function add_symbol(symbol) {
- idx = index(symbol, "#")
-
- if (!idx) {
+ if (!index(symbol, "#")) {
push("const void *ap_hack_" symbol " = (const void *)" symbol ";")
scope_used[scope] = 1
}
}
-/^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
- sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]", "");
- sub("[(].*", "");
- sub("^[ \t]+", "");
- sub("([^ ]* ^([ \t]*[(]))*", "");
+/^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
+ sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
+ sub("[(].*", "")
+ sub("([^ ]* ^([ \t]*[(]))*", "")
add_symbol($0)
next
}
+/^[ \t]*AP_DECLARE_HOOK[^(]*[(][^)]*[)]/ {
+ split($0, args, ",")
+ symbol = args[2]
+ sub("^[ \t]+", "", symbol)
+ sub("[ \t]+$", "", symbol)
+
+ add_symbol("ap_hook_" symbol)
+ add_symbol("ap_hook_get_" symbol)
+ add_symbol("ap_run_" symbol)
+ next
+}
+
/^#[ \t]*if(ndef| !defined[(])([^_]*_)*H/ {
enter_scope(TYPE_HEADER)
next