mirror of
https://github.com/apache/httpd.git
synced 2025-08-13 14:40:20 +00:00
This is an ugly little hack to allow DSO modules to work. This basically
forces Apache to link in all of the APR functions whether they are used by any static modules or not. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
STAMP = buildmk.stamp
|
STAMP = buildmk.stamp
|
||||||
|
|
||||||
all: $(STAMP) generated_lists
|
all: $(STAMP) generated_lists export_lists
|
||||||
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
|
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
|
||||||
|
|
||||||
generated_lists:
|
generated_lists:
|
||||||
@ -72,6 +72,9 @@ generated_lists:
|
|||||||
@echo config_m4_files = `find . -name config.m4` > $@
|
@echo config_m4_files = `find . -name config.m4` > $@
|
||||||
@n=`helpers/PrintPath libtoolize`; echo libtool_prefix = `dirname $$n`/.. >> $@
|
@n=`helpers/PrintPath libtoolize`; echo libtool_prefix = `dirname $$n`/.. >> $@
|
||||||
|
|
||||||
|
export_lists:
|
||||||
|
@build/buildexports.sh main/exports.c support/httpd.exp
|
||||||
|
|
||||||
$(STAMP): build/buildcheck.sh
|
$(STAMP): build/buildcheck.sh
|
||||||
@build/buildcheck.sh && touch $(STAMP)
|
@build/buildcheck.sh && touch $(STAMP)
|
||||||
|
|
||||||
|
31
build/buildexports.sh
Executable file
31
build/buildexports.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
exec >$1
|
||||||
|
exec <$2
|
||||||
|
|
||||||
|
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 ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
while read LINE
|
||||||
|
do
|
||||||
|
if [ "x`echo $LINE | egrep '^[:space:]*apr_'`" != "x" ]; then
|
||||||
|
newline=`echo "$LINE" |\
|
||||||
|
sed -e 's%^\(.*\)%void *ap_hack_\1 = \1\;%'`
|
||||||
|
echo $newline
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "void *ap_ugly_hack;"
|
||||||
|
exit 0
|
@ -89,6 +89,8 @@ extern AP_DECLARE_DATA apr_array_header_t *ap_server_post_read_config;
|
|||||||
* effect the server based on command line options */
|
* effect the server based on command line options */
|
||||||
extern AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines;
|
extern AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines;
|
||||||
|
|
||||||
|
extern void *ap_ugly_hack;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,7 +9,7 @@ LTLIBRARY_SOURCES = \
|
|||||||
util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
|
util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
|
||||||
rfc1413.c http_connection.c listen.c \
|
rfc1413.c http_connection.c listen.c \
|
||||||
mpm_common.c util_charset.c util_debug.c util_xml.c \
|
mpm_common.c util_charset.c util_debug.c util_xml.c \
|
||||||
util_filter.c
|
util_filter.c exports.c
|
||||||
|
|
||||||
include $(top_srcdir)/build/ltlib.mk
|
include $(top_srcdir)/build/ltlib.mk
|
||||||
|
|
||||||
|
@ -293,6 +293,13 @@ int main(int argc, char *argv[])
|
|||||||
const char *optarg;
|
const char *optarg;
|
||||||
|
|
||||||
apr_initialize();
|
apr_initialize();
|
||||||
|
|
||||||
|
/* This ugly little hack pulls any function referenced in exports.c into
|
||||||
|
* the web server. exports.c is generated by buildconf, and it
|
||||||
|
* has all of the apr functions specified by httpd.exp.
|
||||||
|
*/
|
||||||
|
ap_ugly_hack = apr_initialize;
|
||||||
|
|
||||||
process = create_process(argc, argv);
|
process = create_process(argc, argv);
|
||||||
pglobal = process->pool;
|
pglobal = process->pool;
|
||||||
pconf = process->pconf;
|
pconf = process->pconf;
|
||||||
|
@ -333,6 +333,8 @@ apr_signal
|
|||||||
apr_snprintf
|
apr_snprintf
|
||||||
apr_socket_from_file
|
apr_socket_from_file
|
||||||
apr_stat
|
apr_stat
|
||||||
|
apr_strnatcmp
|
||||||
|
apr_strnatcasecmp
|
||||||
apr_table_add
|
apr_table_add
|
||||||
apr_table_addn
|
apr_table_addn
|
||||||
apr_table_do
|
apr_table_do
|
||||||
|
Reference in New Issue
Block a user