]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Sander says:
authorBrian Havard <bjh@apache.org>
Sat, 21 Jul 2001 13:33:31 +0000 (13:33 +0000)
committerBrian Havard <bjh@apache.org>
Sat, 21 Jul 2001 13:33:31 +0000 (13:33 +0000)
  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

build/make_exports.awk

index 27fd631eb9eb2b6d20ca2d442209c1983450f8cf..5115301894e3dadf8fc284ff78286b0f45c72d16 100644 (file)
@@ -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