diff options
author | Ryan Bloom <rbb@apache.org> | 2000-12-01 08:32:11 +0100 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2000-12-01 08:32:11 +0100 |
commit | 6baa1b4cb71b3fa813bad548fcc688381e53f058 (patch) | |
tree | 714c40c2085a1a4501951559710eb6bd9d8a4e2e /build/buildexports.sh | |
parent | Get htpasswd.c to build on EBCDIC machines again. (diff) | |
download | apache2-6baa1b4cb71b3fa813bad548fcc688381e53f058.tar.xz apache2-6baa1b4cb71b3fa813bad548fcc688381e53f058.zip |
Get Apache to use the new generated exports list. This works on my
Linux machine, but I am pretty sure there are going to be problems for
others. The idea here, is to be able to generate a list of the exported
functions from APR. This list needs to be correct, we can not list
functions that are not exported on the platform being built on. To
accomplish this, we generate a list of the exported symbols when we
configure APR. As a part of this list, we also include all of the
#if macros that surround those symbols. Apache then uses this list
of functions and macros to generate a file that refers to each of those
symbols. Because we have the macros, when we compile this file, the
compiler ignores any symbols that aren't valid on this platform.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87142 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rwxr-xr-x | build/buildexports.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/build/buildexports.sh b/build/buildexports.sh index 72a14e4f55..1a04a5f948 100755 --- a/build/buildexports.sh +++ b/build/buildexports.sh @@ -7,19 +7,36 @@ echo "/* This is an ugly hack that needs to be here, so that libtool will" echo " * link all of the APR functions into server regardless of whether" echo " * the base server uses them." echo " */" - +echo "" + +cd lib/apr/include +for file in *.h +do + echo "#include \"$file\"" +done +cd ../../../ echo "" while read LINE do + if [ "x`echo $LINE | egrep '^[:space:]*APR_'`" != "x" ]; then + ifline=`echo "$LINE" |\ + sed -e 's%^\(.*\)%\#if \1%'` + echo $ifline + fi if [ "x`echo $LINE | egrep '^[:space:]*apr_'`" != "x" ]; then - newline=`echo "$LINE" |\ - sed -e 's%^\(.*\)%extern const void *\1\\(void\);%'` - echo $newline +# newline=`echo "$LINE" |\ +# sed -e 's%^\(.*\)%extern const void *\1\\(void\);%'` +# echo $newline newline=`echo "$LINE" |\ sed -e 's%^\(.*\)%const void *ap_hack_\1 = \(const void *\)\1\;%'` echo $newline fi + if [ "x`echo $LINE | egrep '^[:space:]*\/APR_'`" != "x" ]; then + endline=`echo "$LINE" |\ + sed -e 's%^\/\(.*\)%\#endif \/\*\1\*\/%'` + echo "$endline" + fi done echo "" |