4 printf(" * THIS FILE WAS AUTOGENERATED BY make_exports.awk\n")
6 printf(" * This is an ugly hack that needs to be here, so\n")
7 printf(" * that libtool will link all of the APR functions\n")
8 printf(" * into server regardless of whether the base server\n")
9 printf(" * uses them.\n")
12 printf("#define CORE_PRIVATE\n")
15 for (i =
1; i
< ARGC; i
++) {
17 sub("([^/]*[/])*", "", file
)
18 printf("#include \"%s\"\n", file
)
22 printf("const void *ap_ugly_hack = NULL;\n")
32 stack
[stackptr
] = line
36 function do_output
() {
38 printf(" * %s\n", FILENAME)
41 for (i =
0; i
< stackptr
; i
++) {
42 printf("%s\n", stack
[i
])
50 function enter_scope
(type
) {
52 scope_type
[scope
] = type
53 scope_stack
[scope
] = stackptr
54 delete scope_used
[scope
]
57 function leave_scope
() {
58 used = scope_used
[scope
]
61 stackptr = scope_stack
[scope
]
72 function add_symbol
(symbol
) {
73 if (!
index(symbol
, "#")) {
74 push
("const void *ap_hack_" symbol
" = (const void *)" symbol
";")
79 /^
[ \t]*AP
[RUI
]?_
(CORE_
)?DECLARE
[^
(]*[(][^
)]*[)]([^
]* )*[^
(]+[(]/ {
80 sub("[ \t]*AP[RUI]?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
82 sub("([^ ]* (^([ \t]*[(])))+", "")
88 /^
[ \t]*AP_DECLARE_HOOK
[^
(]*[(][^
)]*/ {
91 sub("^[ \t]+", "", symbol
)
92 sub("[ \t]+$", "", symbol
)
94 add_symbol
("ap_hook_" symbol
)
95 add_symbol
("ap_hook_get_" symbol
)
96 add_symbol
("ap_run_" symbol
)
100 /^
[ \t]*APR_POOL_DECLARE_ACCESSOR
[^
(]*[(][^
)]*[)]/ {
101 sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $
0)
102 sub("[)].*$", "", $
0)
103 add_symbol
("apr_" $
0 "_pool_get")
107 /^
[ \t]*APR_DECLARE_INHERIT_SET
[^
(]*[(][^
)]*[)]/ {
108 sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $
0)
109 sub("[)].*$", "", $
0)
110 add_symbol
("apr_" $
0 "_inherit_set")
114 /^
[ \t]*APR_DECLARE_INHERIT_UNSET
[^
(]*[(][^
)]*[)]/ {
115 sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $
0)
116 sub("[)].*$", "", $
0)
117 add_symbol
("apr_" $
0 "_inherit_unset")
121 /^
#[ \t]*if(ndef| !defined[(])([^_]*_)*H/ {
122 enter_scope
(TYPE_HEADER
)
126 /^
#[ \t]*if([n]?def)? / {
127 enter_scope
(TYPE_NORMAL
)
133 if (scope_type
[scope
] == TYPE_NORMAL
)