1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 # Based on apr's make_export.awk, which is
18 # based on Ryan Bloom's make_export.pl
21 printf(" ("EXPPREFIX")\n")
24 # List of functions that we don't support, yet??
28 /^[ \t]*AP([RU]|_CORE|_WD)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
29 sub("[ \t]*AP([RU]|_CORE|_WD)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
31 sub("([^ ]* (^([ \t]*[(])))+", "")
36 /^[ \t]*AP_DECLARE_HOOK[^(]*[(][^)]*/ {
39 sub("^[ \t]+", "", symbol)
40 sub("[ \t]+$", "", symbol)
41 add_symbol("ap_hook_" symbol)
42 add_symbol("ap_hook_get_" symbol)
43 add_symbol("ap_run_" symbol)
47 /^[ \t]*AP[RU]?_DECLARE_EXTERNAL_HOOK[^(]*[(][^)]*/ {
50 sub("^[ \t]+", "", symbol)
51 sub("[ \t]+$", "", symbol)
52 add_symbol("ap_hook_" symbol)
53 add_symbol("ap_hook_get_" symbol)
54 add_symbol("ap_run_" symbol)
58 /^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
59 sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
61 add_symbol("apr_" $0 "_pool_get")
65 /^[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(][^)]*[)]/ {
66 sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
68 add_symbol("apr_" $0 "_inherit_set")
72 /^[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(][^)]*[)]/ {
73 sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
75 add_symbol("apr_" $0 "_inherit_unset")
79 /^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;$/ {
81 gsub(/\[.*\]/, "", $NF)
86 # printf("\n\n#found: %d symbols.\n", found)
89 function add_symbol(sym_name) {
91 sub (" ", "", sym_name)
92 printf(" %s,\n", sym_name)