randy 98/12/01 16:00:20
Modified: . Makefile.tmpl configure src CHANGES Configuration.tmpl Configure Makefile.tmpl src/include httpd.h src/main http_config.c http_log.c http_main.c util.c src/modules/proxy proxy_cache.c src/modules/standard mod_include.c mod_log_agent.c mod_log_config.c mod_log_referer.c mod_mime.c src/support Makefile.tmpl apxs.pl Log: Fix TARGET configuration when configuring and installing using APACI configure. TARGET now defines the basename of the configuration file, startup script, manual page, etc. log_error_core() now reports the server binary name given by argv[0]. TARGET can now also be defined with --target=TARGET parameter passed to APACI configure. Reviewed by: Jim Jagielski, Randy Terbush, Ralf Engelschall Revision Changes Path 1.51 +41 -33 apache-1.3/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/Makefile.tmpl,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- Makefile.tmpl 1998/11/13 11:25:01 1.50 +++ Makefile.tmpl 1998/12/01 23:59:51 1.51 @@ -88,6 +88,9 @@ INSTALL_DATA = $(INSTALL) -m 644 PERL = @PERL@ +# installation name of Apache webserver +TARGET = @TARGET@ + # installation root # (overrideable by package maintainers for # rolling packages without bristling the system) @@ -201,12 +204,12 @@ echo "| works correctly you now should first check the |"; \ echo "| (initially created or preserved) configuration files |"; \ echo "| |"; \ - echo "| $(sysconfdir)/{httpd,access,srm}.conf"; \ + echo "| $(sysconfdir)/{$(TARGET),access,srm}.conf"; \ echo "| |"; \ echo "| and then you should be able to immediately fire up |"; \ echo "| Apache the first time by running: |"; \ echo "| |"; \ - echo "| $(sbindir)/apachectl start"; \ + echo "| $(sbindir)/$(TARGET)ctl start"; \ echo "| |"; \ echo "| Thanks for using Apache. The Apache Group |"; \ echo "| http://www.apache.org/ |"; \ @@ -238,26 +241,26 @@ # install the server program and optionally corresponding # shared object files. install-programs: - @echo "===> [programs: Installing Apache httpd program and shared objects]" - $(INSTALL_PROGRAM) $(TOP)/$(SRC)/httpd $(root)$(sbindir)/httpd + @echo "===> [programs: Installing Apache $(TARGET) program and shared objects]" + $(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET) [EMAIL PROTECTED] [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \ SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \ SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \ - echo "$(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.ep $(root)$(libexecdir)/libhttpd.ep"; \ - $(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.ep $(root)$(libexecdir)/libhttpd.ep; \ - echo "$(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}"; \ - $(INSTALL_DSO) $(TOP)/$(SRC)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}; \ + echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep"; \ + $(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \ + echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}"; \ + $(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}; \ if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \ - echo "$(RM) $(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}.*"; \ - $(RM) $(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}.*; \ + echo "$(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \ + $(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \ for suffix in $${SHLIB_SUFFIX_LIST} ""; do \ [ ".$${suffix}" = . ] && continue; \ - echo "$(LN) $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}.$${suffix}"; \ - $(LN) $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/libhttpd.$${SHLIB_SUFFIX_NAME}.$${suffix}; \ + echo "$(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; \ + $(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; \ done; \ fi; \ fi - $(INSTALL_DATA) $(TOP)/$(SRC)/support/httpd.8 $(root)$(mandir)/man8/httpd.8 + $(INSTALL_DATA) $(TOP)/$(SRC)/support/httpd.8 $(root)$(mandir)/man8/$(TARGET).8 [EMAIL PROTECTED](RM) $(SRC)/.apaci.install.conf; touch $(SRC)/.apaci.install.conf [EMAIL PROTECTED] [ ".`grep '^[ ]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \ for mod in `egrep '^[ ]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci |\ @@ -287,12 +290,12 @@ @echo "===> [support: Installing Apache support programs and scripts]" $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/ab $(root)$(sbindir)/ab $(INSTALL_DATA) $(TOP)/$(SRC)/support/ab.1 $(root)$(mandir)/man1/ab.1 - @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/apachectl"; \ - sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/httpd.pid;' \ - -e 's;HTTPD=.*;HTTPD=$(sbindir)/httpd;' \ + @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$(TARGET)ctl"; \ + sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \ + -e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \ < $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \ - $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/apachectl - $(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.1 $(root)$(mandir)/man1/apachectl.1 + $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$(TARGET)ctl + $(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.1 $(root)$(mandir)/man1/$(TARGET)ctl.1 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htpasswd $(root)$(bindir)/htpasswd $(INSTALL_DATA) $(TOP)/$(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htdigest $(root)$(bindir)/htdigest @@ -357,7 +360,7 @@ for script in printenv test-cgi; do \ cat $(TOP)/cgi-bin/$${script} |\ sed -e 's;^#!/.*perl;#!$(PERL);' \ - > $(TOP)/$(SRC)/.apaci.install.tmp; \ + > $(TOP)/$(SRC)/.apaci.install.tmp; \ echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(datadir)/cgi-bin/$${script}"; \ $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(datadir)/cgi-bin/$${script}; \ done; \ @@ -374,6 +377,11 @@ install-config: @echo "===> [config: Installing Apache configuration files]" [EMAIL PROTECTED] conf in httpd.conf access.conf srm.conf; do \ + if [ .$$conf = .httpd.conf ]; then \ + target_conf="$(TARGET).conf"; \ + else \ + target_conf="$$conf"; \ + fi; \ (echo "##"; \ echo "## $${conf} -- Apache HTTP server configuration file"; \ echo "##"; \ @@ -385,27 +393,27 @@ -e 's;@@ServerRoot@@/cgi-bin;$(datadir)/cgi-bin;' \ -e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \ -e 's;@@ServerRoot@@;$(prefix);' \ - -e 's;logs/accept.lock;$(runtimedir)/httpd.lock;' \ - -e 's;logs/apache_runtime_status;$(runtimedir)/httpd.scoreboard;' \ - -e 's;logs/httpd.pid;$(runtimedir)/httpd.pid;' \ - -e 's;logs/access_log;$(logfiledir)/access_log;' \ - -e 's;logs/error_log;$(logfiledir)/error_log;' \ - -e 's;logs/referer_log;$(logfiledir)/referer_log;' \ - -e 's;logs/agent_log;$(logfiledir)/agent_log;' \ + -e 's;logs/accept.lock;$(runtimedir)/$(TARGET).lock;' \ + -e 's;logs/apache_runtime_status;$(runtimedir)/$(TARGET).scoreboard;' \ + -e 's;logs/httpd.pid;$(runtimedir)/$(TARGET).pid;' \ + -e 's;logs/access_log;$(logfiledir)/$(TARGET)-access_log;' \ + -e 's;logs/error_log;$(logfiledir)/$(TARGET)-error_log;' \ + -e 's;logs/referer_log;$(logfiledir)/$(TARGET)-referer_log;' \ + -e 's;logs/agent_log;$(logfiledir)/$(TARGET)-agent_log;' \ -e 's;conf/magic;$(sysconfdir)/magic;' \ -e 's;conf/mime.types;$(sysconfdir)/mime.types;' \ -e 's;Group #-1;Group $(conf_group);' \ -e 's;Port 80;Port $(conf_port);' \ -e 's;ServerAdmin [EMAIL PROTECTED];ServerAdmin $(conf_serveradmin);' \ -e 's;ServerName new.host.name;ServerName $(conf_servername);' \ - > $(TOP)/$(SRC)/.apaci.install.tmp && \ - echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${conf}.default"; \ - $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${conf}.default; \ - if [ ! -f "$(root)$(sysconfdir)/$${conf}" ]; then \ - echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${conf}"; \ - $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${conf}; \ + > $(TOP)/$(SRC)/.apaci.install.tmp && \ + echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}.default"; \ + $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}.default; \ + if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \ + echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}"; \ + $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}; \ else \ - echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${conf}]"; \ + echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${target_conf}]"; \ fi; \ done [EMAIL PROTECTED] conf in mime.types magic; do \ 1.51 +20 -10 apache-1.3/configure Index: configure =================================================================== RCS file: /home/cvs/apache-1.3/configure,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- configure 1998/11/08 21:24:01 1.50 +++ configure 1998/12/01 23:59:52 1.51 @@ -164,6 +164,11 @@ ## determine default parameters ## +# target name +if [ ".$TARGET" = . ]; then + TARGET=httpd +fi + # default paths prefix='/usr/local/apache' exec_prefix='$prefix' @@ -285,7 +290,7 @@ echo "##" >>$configstatus echo "" >>$configstatus for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \ - LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB; do + LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB TARGET; do eval "val=\"\$$var\"" if [ ".$val" != . ]; then echo "$var=$val" |\ @@ -394,6 +399,7 @@ echo " --layout print installation layout (check and debug)" echo "" echo "Installation layout options:" + echo " --target=TARGET install server executable and associated files using basename TARGET" echo " --prefix=PREFIX install architecture-independent files in PREFIX" echo " --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX" echo " --bindir=DIR install user executables in DIR [EPREFIX/bin]" @@ -440,6 +446,9 @@ --layout) layout=1 ;; + --target=*) + TARGET="$apc_optarg" + ;; --prefix=*) prefix="$apc_optarg" ;; @@ -907,13 +916,13 @@ echo "Compilation paths:" echo " HTTPD_ROOT: $prefix" echo " SHARED_CORE_DIR: $libexecdir" - echo " DEFAULT_PIDLOG: ${runtimedir_relative}httpd.pid" - echo " DEFAULT_SCOREBOARD: ${runtimedir_relative}httpd.scoreboard" - echo " DEFAULT_LOCKFILE: ${runtimedir_relative}httpd.lock" + echo " DEFAULT_PIDLOG: ${runtimedir_relative}${TARGET}.pid" + echo " DEFAULT_SCOREBOARD: ${runtimedir_relative}${TARGET}.scoreboard" + echo " DEFAULT_LOCKFILE: ${runtimedir_relative}${TARGET}.lock" echo " DEFAULT_XFERLOG: ${logfiledir_relative}access_log" echo " DEFAULT_ERRORLOG: ${logfiledir_relative}error_log" echo " TYPES_CONFIG_FILE: ${sysconfdir_relative}mime.types" - echo " SERVER_CONFIG_FILE: ${sysconfdir_relative}httpd.conf" + echo " SERVER_CONFIG_FILE: ${sysconfdir_relative}${TARGET}.conf" echo " ACCESS_CONFIG_FILE: ${sysconfdir_relative}access.conf" echo " RESOURCE_CONFIG_FILE: ${sysconfdir_relative}srm.conf" echo "" @@ -944,6 +953,7 @@ -e "[EMAIL PROTECTED]@%$src%g" \ -e "[EMAIL PROTECTED]@%$mkf%g" \ -e "[EMAIL PROTECTED]@%$aux%g" \ +-e "[EMAIL PROTECTED]@%$TARGET%g" \ -e "[EMAIL PROTECTED]@%$prefix%g" \ -e "[EMAIL PROTECTED]@%$exec_prefix%g" \ -e "[EMAIL PROTECTED]@%$bindir%g" \ @@ -986,13 +996,13 @@ echo "echo '-DHTTPD_ROOT=\"$prefix\"'" >>$src/apaci echo "echo '-DSUEXEC_BIN=\"$sbindir/suexec\"'" >>$src/apaci echo "echo '-DSHARED_CORE_DIR=\"$libexecdir\"'" >>$src/apaci -echo "echo '-DDEFAULT_PIDLOG=\"${runtimedir_relative}httpd.pid\"'" >>$src/apaci -echo "echo '-DDEFAULT_SCOREBOARD=\"${runtimedir_relative}httpd.scoreboard\"'" >>$src/apaci -echo "echo '-DDEFAULT_LOCKFILE=\"${runtimedir_relative}httpd.lock\"'" >>$src/apaci +echo "echo '-DDEFAULT_PIDLOG=\"${runtimedir_relative}${TARGET}.pid\"'" >>$src/apaci +echo "echo '-DDEFAULT_SCOREBOARD=\"${runtimedir_relative}${TARGET}.scoreboard\"'" >>$src/apaci +echo "echo '-DDEFAULT_LOCKFILE=\"${runtimedir_relative}${TARGET}.lock\"'" >>$src/apaci echo "echo '-DDEFAULT_XFERLOG=\"${logfiledir_relative}access_log\"'" >>$src/apaci echo "echo '-DDEFAULT_ERRORLOG=\"${logfiledir_relative}error_log\"'" >>$src/apaci echo "echo '-DTYPES_CONFIG_FILE=\"${sysconfdir_relative}mime.types\"'" >>$src/apaci -echo "echo '-DSERVER_CONFIG_FILE=\"${sysconfdir_relative}httpd.conf\"'" >>$src/apaci +echo "echo '-DSERVER_CONFIG_FILE=\"${sysconfdir_relative}${TARGET}.conf\"'" >>$src/apaci echo "echo '-DACCESS_CONFIG_FILE=\"${sysconfdir_relative}access.conf\"'" >>$src/apaci echo "echo '-DRESOURCE_CONFIG_FILE=\"${sysconfdir_relative}srm.conf\"'" >>$src/apaci chmod a+x $src/apaci @@ -1010,7 +1020,7 @@ # generate settings from imported environment variables OIFS="$IFS" IFS="$DIFS" for var in CC CPP OPTIM CFLAGS CFLAGS_SHLIB LDFLAGS LD_SHLIB LDFLAGS_SHLIB \ - LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB DEPS; do + LDFLAGS_SHLIB_EXPORT LIBS INCLUDES RANLIB DEPS TARGET; do eval "val=\"\$$var\""; if [ ".$val" != . ]; then case $var in 1.1153 +7 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1152 retrieving revision 1.1153 diff -u -r1.1152 -r1.1153 --- CHANGES 1998/11/30 22:26:47 1.1152 +++ CHANGES 1998/12/01 23:59:53 1.1153 @@ -1,4 +1,11 @@ Changes with Apache 1.3.4 + *) Fix TARGET configuration when configuring and installing using + APACI configure. TARGET now defines the basename of the configuration + file, startup script, manual page, etc. log_error_core() now reports + the server binary name given by argv[0]. TARGET can now also be defined + with --target=TARGET parameter passed to APACI configure. + [Ralf Engelschall, Randy Terbush] + *) mod_include.c:handle_perl() now properly tests for OPT_INCNOEXEC rather than OPT_INCLUDES [Rainer Schoepf <[EMAIL PROTECTED]>] 1.112 +5 -0 apache-1.3/src/Configuration.tmpl Index: Configuration.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/src/Configuration.tmpl,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- Configuration.tmpl 1998/09/16 19:38:26 1.111 +++ Configuration.tmpl 1998/12/01 23:59:53 1.112 @@ -63,6 +63,11 @@ #RANLIB= ################################################################ +# Name of the installed Apache HTTP webserver. +# +#TARGET= + +################################################################ # Dynamic Shared Object (DSO) support # # There is experimental support for compiling the Apache core and 1.307 +15 -2 apache-1.3/src/Configure Index: Configure =================================================================== RCS file: /home/cvs/apache-1.3/src/Configure,v retrieving revision 1.306 retrieving revision 1.307 diff -u -r1.306 -r1.307 --- Configure 1998/11/11 18:36:07 1.306 +++ Configure 1998/12/01 23:59:54 1.307 @@ -254,7 +254,6 @@ DBM_LIB="-ldbm" DB_LIB="-ldb" SHELL="/bin/sh" -TARGET="httpd" SUBTARGET="target_static" SHLIB_SUFFIX_NAME="" SHLIB_SUFFIX_LIST="" @@ -888,6 +887,7 @@ ## TOPTIM=`egrep '^OPTIM=' Makefile.config | tail -1 | awk -F= '{print $2}'` TRANLIB=`egrep '^RANLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` +TTARGET=`egrep '^TARGET=' Makefile.config | tail -1 | awk -F= '{print $2}'` #################################################################### ## Check for user provided flags for shared object support @@ -898,6 +898,20 @@ TCFLAGS_SHLIB=`egrep '^CFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` #################################################################### +## Handle TARGET name +## +if [ "x$TTARGET" = "x" ]; then + TARGET=httpd + echo "TARGET=$TARGET" >> Makefile.config +else + TARGET=$TTARGET +fi +if [ "x$TARGET" != "xhttpd" ]; then + echo " + using custom target name: $TARGET" + CFLAGS="$CFLAGS -DTARGET=\\\"$TARGET\\\"" +fi + +#################################################################### ## We adjust now CFLAGS_SHLIB, LDFLAGS_SHLIB and LDFLAGS_SHLIB_EXPORT as ## required. For more platforms just add the required lines below. ## @@ -1710,7 +1724,6 @@ #################################################################### ## Now add the target for the main Makefile ## -echo "TARGET=$TARGET" >> Makefile echo "SUBDIRS=$SUBDIRS" >> Makefile echo "SUBTARGET=$SUBTARGET" >> Makefile echo "SHLIB_SUFFIX_NAME=$SHLIB_SUFFIX_NAME" >> Makefile 1.107 +11 -11 apache-1.3/src/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/src/Makefile.tmpl,v retrieving revision 1.106 retrieving revision 1.107 diff -u -r1.106 -r1.107 --- Makefile.tmpl 1998/09/17 14:43:21 1.106 +++ Makefile.tmpl 1998/12/01 23:59:54 1.107 @@ -30,24 +30,24 @@ $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ -o $(TARGET) buildmark.o $(OBJS) $(REGLIB) $(LIBS) -target_shared: libhttpd.ep +target_shared: lib$(TARGET).ep $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ -o $(TARGET) -DSHARED_CORE_BOOTSTRAP main/http_main.c -libhttpd.ep: libhttpd.$(SHLIB_SUFFIX_NAME) +lib$(TARGET).ep: lib$(TARGET).$(SHLIB_SUFFIX_NAME) $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ - -o libhttpd.ep -DSHARED_CORE_TIESTATIC main/http_main.c \ - -L. -lhttpd $(LIBS) + -o lib$(TARGET).ep -DSHARED_CORE_TIESTATIC main/http_main.c \ + -L. -l$(TARGET) $(LIBS) -libhttpd.$(SHLIB_SUFFIX_NAME): subdirs modules.o +lib$(TARGET).$(SHLIB_SUFFIX_NAME): subdirs modules.o $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o libhttpd.$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS) $(REGLIB) + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS) $(REGLIB) @if [ ".$(SHLIB_SUFFIX_LIST)" != . ]; then \ - rm -f libhttpd.$(SHLIB_SUFFIX_NAME).*; \ + rm -f lib$(TARGET).$(SHLIB_SUFFIX_NAME).*; \ for suffix in $(SHLIB_SUFFIX_LIST) ""; do \ [ ".$$suffix" = . ] && continue; \ - echo "ln libhttpd.$(SHLIB_SUFFIX_NAME) libhttpd.$(SHLIB_SUFFIX_NAME).$$suffix"; \ - ln libhttpd.$(SHLIB_SUFFIX_NAME) libhttpd.$(SHLIB_SUFFIX_NAME).$$suffix; \ + echo "ln lib$(TARGET).$(SHLIB_SUFFIX_NAME) lib$(TARGET).$(SHLIB_SUFFIX_NAME).$$suffix"; \ + ln lib$(TARGET).$(SHLIB_SUFFIX_NAME) lib$(TARGET).$(SHLIB_SUFFIX_NAME).$$suffix; \ done; \ fi @@ -66,7 +66,7 @@ echo "<=== $(SDP)support" clean: - -rm -f $(TARGET) libhttpd.* *.o + -rm -f $(TARGET) lib$(TARGET).* *.o @for i in $(SUBDIRS); do \ echo "===> $(SDP)$$i"; \ ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' $@ ) || exit 1; \ @@ -74,7 +74,7 @@ done distclean: - -rm -f $(TARGET) libhttpd.* *.o + -rm -f $(TARGET) lib$(TARGET).* *.o @for i in $(SUBDIRS); do \ echo "===> $(SDP)$$i"; \ ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' $@ ) || exit 1; \ 1.253 +5 -0 apache-1.3/src/include/httpd.h Index: httpd.h =================================================================== RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v retrieving revision 1.252 retrieving revision 1.253 diff -u -r1.252 -r1.253 --- httpd.h 1998/11/10 07:30:07 1.252 +++ httpd.h 1998/12/01 23:59:59 1.253 @@ -110,6 +110,11 @@ /* Default administrator's address */ #define DEFAULT_ADMIN "[no address given]" +/* The target name of the installed Apache */ +#ifndef TARGET +#define TARGET "httpd" +#endif + /* * --------- You shouldn't have to edit anything below this line ---------- * 1.136 +6 -6 apache-1.3/src/main/http_config.c Index: http_config.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_config.c,v retrieving revision 1.135 retrieving revision 1.136 diff -u -r1.135 -r1.136 --- http_config.c 1998/10/30 22:41:24 1.135 +++ http_config.c 1998/12/02 00:00:02 1.136 @@ -539,8 +539,8 @@ */ if (m->version != MODULE_MAGIC_NUMBER_MAJOR) { - fprintf(stderr, "httpd: module \"%s\" is not compatible with this " - "version of Apache.\n", m->name); + fprintf(stderr, "%s: module \"%s\" is not compatible with this " + "version of Apache.\n", ap_server_argv0, m->name); fprintf(stderr, "Please contact the vendor for the correct version.\n"); exit(1); } @@ -554,8 +554,8 @@ dynamic_modules++; if (dynamic_modules > DYNAMIC_MODULE_LIMIT) { - fprintf(stderr, "httpd: module \"%s\" could not be loaded, because" - " the dynamic\n", m->name); + fprintf(stderr, "%s: module \"%s\" could not be loaded, because" + " the dynamic\n", ap_server_argv0, m->name); fprintf(stderr, "module limit was reached. Please increase " "DYNAMIC_MODULE_LIMIT and recompile.\n"); exit(1); @@ -1179,8 +1179,8 @@ if (!(parms.config_file = ap_pcfg_openfile(p,fname))) { perror("fopen"); - fprintf(stderr, "httpd: could not open document config file %s\n", - fname); + fprintf(stderr, "%s: could not open document config file %s\n", + ap_server_argv0, fname); exit(1); } 1.74 +12 -6 apache-1.3/src/main/http_log.c Index: http_log.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- http_log.c 1998/10/23 00:34:20 1.73 +++ http_log.c 1998/12/02 00:00:06 1.74 @@ -65,6 +65,7 @@ #define CORE_PRIVATE #include "httpd.h" +#include "http_conf_globals.h" #include "http_config.h" #include "http_core.h" #include "http_log.h" @@ -206,14 +207,15 @@ fname++; for (fac = facilities; fac->t_name; fac++) { if (!strcasecmp(fname, fac->t_name)) { - openlog("httpd", LOG_NDELAY|LOG_CONS|LOG_PID, fac->t_val); + openlog(ap_server_argv0, LOG_NDELAY|LOG_CONS|LOG_PID, + fac->t_val); s->error_log = NULL; return; } } } else - openlog("httpd", LOG_NDELAY|LOG_CONS|LOG_PID, LOG_LOCAL7); + openlog(ap_server_argv0, LOG_NDELAY|LOG_CONS|LOG_PID, LOG_LOCAL7); s->error_log = NULL; } @@ -222,7 +224,8 @@ fname = ap_server_root_relative(p, s->error_fname); if (!(s->error_log = ap_pfopen(p, fname, "a"))) { perror("fopen"); - fprintf(stderr,"httpd: could not open error log file %s.\n", fname); + fprintf(stderr, "%s: could not open error log file %s.\n", + ap_server_argv0, fname); exit(1); } } @@ -319,7 +322,8 @@ } if (logf) { - len = ap_snprintf(errstr, sizeof(errstr), "[%s] ", ap_get_time()); + len = ap_snprintf(errstr, sizeof(errstr), "%s: [%s] ", + ap_server_argv0, ap_get_time()); } else { len = 0; } @@ -393,7 +397,8 @@ */ nErrorCode = GetLastError(); len += ap_snprintf(errstr + len, sizeof(errstr) - len, - "(FormatMessage failed with code %d): ", nErrorCode); + "(FormatMessage failed with code %d): ", + nErrorCode); } else { /* FormatMessage put the message in the buffer, but it may @@ -488,7 +493,8 @@ if(!(pid_file = fopen(fname, "w"))) { perror("fopen"); - fprintf(stderr, "httpd: could not log pid to file %s\n", fname); + fprintf(stderr, "%s: could not log pid to file %s\n", + ap_server_argv0, fname); exit(1); } fprintf(pid_file, "%ld\n", (long)mypid); 1.406 +67 -42 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.405 retrieving revision 1.406 diff -u -r1.405 -r1.406 --- http_main.c 1998/11/06 22:42:43 1.405 +++ http_main.c 1998/12/02 00:00:06 1.406 @@ -1612,13 +1612,16 @@ m = (caddr_t) create_shared_heap("\\SHAREMEM\\SCOREBOARD", SCOREBOARD_SIZE); if (m == 0) { - fprintf(stderr, "httpd: Could not create OS/2 Shared memory pool.\n"); + fprintf(stderr, "%s: Could not create OS/2 Shared memory pool.\n", + ap_server_argv0); exit(APEXIT_INIT); } rc = _uopen((Heap_t) m); if (rc != 0) { - fprintf(stderr, "httpd: Could not uopen() newly created OS/2 Shared memory pool.\n"); + fprintf(stderr, + "%s: Could not uopen() newly created OS/2 Shared memory pool.\n", + ap_server_argv0); } ap_scoreboard_image = (scoreboard *) m; ap_scoreboard_image->global.exit_generation = 0; @@ -1631,7 +1634,8 @@ m = (caddr_t) get_shared_heap("\\SHAREMEM\\SCOREBOARD"); if (m == 0) { - fprintf(stderr, "httpd: Could not find existing OS/2 Shared memory pool.\n"); + fprintf(stderr, "%s: Could not find existing OS/2 Shared memory pool.\n", + ap_server_argv0); exit(APEXIT_INIT); } @@ -1677,23 +1681,30 @@ static void setup_shared_mem(pool *p) { + char buf[512]; caddr_t m; int fd; fd = shm_open(ap_scoreboard_fname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); if (fd == -1) { - perror("httpd: could not open(create) scoreboard"); + ap_snprintf(buf, sizeof(buf), "%s: could not open(create) scoreboard", + ap_server_argv0); + perror(buf); exit(APEXIT_INIT); } if (ltrunc(fd, (off_t) SCOREBOARD_SIZE, SEEK_SET) == -1) { - perror("httpd: could not ltrunc scoreboard"); + ap_snprintf(buf, sizeof(buf), "%s: could not ltrunc scoreboard", + ap_server_argv0); + perror(buf); shm_unlink(ap_scoreboard_fname); exit(APEXIT_INIT); } if ((m = (caddr_t) mmap((caddr_t) 0, (size_t) SCOREBOARD_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, (off_t) 0)) == (caddr_t) - 1) { - perror("httpd: cannot mmap scoreboard"); + ap_snprintf(buf, sizeof(buf), "%s: cannot mmap scoreboard", + ap_server_argv0); + perror(buf); shm_unlink(ap_scoreboard_fname); exit(APEXIT_INIT); } @@ -1738,14 +1749,14 @@ int fd = mkstemp(mfile); if (fd == -1) { perror("open"); - fprintf(stderr, "httpd: Could not open %s\n", mfile); + fprintf(stderr, "%s: Could not open %s\n", ap_server_argv0, mfile); exit(APEXIT_INIT); } m = mmap((caddr_t) 0, SCOREBOARD_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (m == (caddr_t) - 1) { perror("mmap"); - fprintf(stderr, "httpd: Could not mmap %s\n", mfile); + fprintf(stderr, "%s: Could not mmap %s\n", ap_server_argv0, mfile); exit(APEXIT_INIT); } close(fd); @@ -1757,7 +1768,7 @@ #endif if (m == (caddr_t) - 1) { perror("mmap"); - fprintf(stderr, "httpd: Could not mmap memory\n"); + fprintf(stderr, "%s: Could not mmap memory\n", ap_server_argv0); exit(APEXIT_INIT); } #else @@ -1767,14 +1778,14 @@ fd = open("/dev/zero", O_RDWR); if (fd == -1) { perror("open"); - fprintf(stderr, "httpd: Could not open /dev/zero\n"); + fprintf(stderr, "%s: Could not open /dev/zero\n", ap_server_argv0); exit(APEXIT_INIT); } m = mmap((caddr_t) 0, SCOREBOARD_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (m == (caddr_t) - 1) { perror("mmap"); - fprintf(stderr, "httpd: Could not mmap /dev/zero\n"); + fprintf(stderr, "%s: Could not mmap /dev/zero\n", ap_server_argv0); exit(APEXIT_INIT); } close(fd); @@ -1802,8 +1813,9 @@ #ifdef LINUX if (errno == ENOSYS) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, server_conf, - "httpd: Your kernel was built without CONFIG_SYSVIPC\n" - "httpd: please consult the Apache FAQ for details"); + "Your kernel was built without CONFIG_SYSVIPC\n" + "%s: Please consult the Apache FAQ for details", + ap_server_argv0); } #endif ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, @@ -2789,7 +2801,7 @@ exit(0); else if (x == -1) { perror("fork"); - fprintf(stderr, "httpd: unable to fork new process\n"); + fprintf(stderr, "%s: unable to fork new process\n", ap_server_argv0); exit(1); } RAISE_SIGSTOP(DETACH); @@ -2797,13 +2809,13 @@ #ifndef NO_SETSID if ((pgrp = setsid()) == -1) { perror("setsid"); - fprintf(stderr, "httpd: setsid failed\n"); + fprintf(stderr, "%s: setsid failed\n", ap_server_argv0); exit(1); } #elif defined(NEXT) || defined(NEWSOS) if (setpgrp(0, getpid()) == -1 || (pgrp = getpgrp(0)) == -1) { perror("setpgrp"); - fprintf(stderr, "httpd: setpgrp or getpgrp failed\n"); + fprintf(stderr, "%s: setpgrp or getpgrp failed\n", ap_server_argv0); exit(1); } #elif defined(OS2) || defined(TPF) @@ -2815,15 +2827,15 @@ #else if ((pgrp = setpgrp(getpid(), 0)) == -1) { perror("setpgrp"); - fprintf(stderr, "httpd: setpgrp failed\n"); + fprintf(stderr, "%s: setpgrp failed\n", ap_server_argv0); exit(1); } #endif /* close out the standard file descriptors */ if (freopen("/dev/null", "r", stdin) == NULL) { - fprintf(stderr, "httpd: unable to replace stdin with /dev/null: %s\n", - strerror(errno)); + fprintf(stderr, "%s: unable to replace stdin with /dev/null: %s\n", + ap_server_argv0, strerror(errno)); /* continue anyhow -- note we can't close out descriptor 0 because we * have nothing to replace it with, and if we didn't have a descriptor * 0 the next file would be created with that value ... leading to @@ -2831,8 +2843,8 @@ */ } if (freopen("/dev/null", "w", stdout) == NULL) { - fprintf(stderr, "httpd: unable to replace stdout with /dev/null: %s\n", - strerror(errno)); + fprintf(stderr, "%s: unable to replace stdout with /dev/null: %s\n", + ap_server_argv0, strerror(errno)); } /* stderr is a tricky one, we really want it to be the error_log, * but we haven't opened that yet. So leave it alone for now and it'll @@ -4157,27 +4169,27 @@ #ifdef WCOREDUMP if (WCOREDUMP(status)) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, - server_conf, - "httpd: child pid %d exit signal %s (%d), " - "possible coredump in %s", - pid, (WTERMSIG(status) >= NumSIG) ? "" : - SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status), - ap_coredump_dir); + server_conf, + "child pid %d exit signal %s (%d), " + "possible coredump in %s", + pid, (WTERMSIG(status) >= NumSIG) ? "" : + SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status), + ap_coredump_dir); } else { #endif ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, - server_conf, - "httpd: child pid %d exit signal %s (%d)", - pid, SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status)); + server_conf, + "child pid %d exit signal %s (%d)", pid, + SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status)); #ifdef WCOREDUMP } #endif #else ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, - server_conf, - "httpd: child pid %d exit signal %d", - pid, WTERMSIG(status)); + server_conf, + "child pid %d exit signal %d", + pid, WTERMSIG(status)); #endif } } @@ -4363,12 +4375,12 @@ if ( pidfile != NULL && unlink(pidfile) == 0) ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf, - "httpd: removed PID file %s (pid=%ld)", + "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); } ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf, - "httpd: caught SIGTERM, shutting down"); + "caught SIGTERM, shutting down"); clean_parent_exit(0); } @@ -4440,7 +4452,8 @@ int configtestonly = 0; int sock_in; int sock_out; - + char *s; + #ifdef SecureWare if (set_auth_parameters(argc, argv) < 0) perror("set_auth_parameters"); @@ -4458,8 +4471,14 @@ MONCONTROL(0); common_init(); + + if ((s = strrchr(argv[0], '/')) != NULL) { + ap_server_argv0 = ++s; + } + else { + ap_server_argv0 = argv[0]; + } - ap_server_argv0 = argv[0]; ap_cpystrn(ap_server_root, HTTPD_ROOT, sizeof(ap_server_root)); ap_cpystrn(ap_server_confname, SERVER_CONFIG_FILE, sizeof(ap_server_confname)); @@ -5717,7 +5736,7 @@ if ( pidfile != NULL && unlink(pidfile) == 0) ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf, - "httpd: removed PID file %s (pid=%ld)", + "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); } @@ -5795,10 +5814,16 @@ int install = 0; int configtestonly = 0; char *signal_to_send = NULL; + char *s; common_init(); - ap_server_argv0 = argv[0]; + if ((s = strrchr(argv[0], '/')) != NULL) { + ap_server_argv0 = ++s; + } + else { + ap_server_argv0 = argv[0]; + } /* Get the serverroot from the registry, if it exists. This can be * overridden by a command line -d argument. @@ -6005,7 +6030,7 @@ #endif #ifndef SHARED_CORE_EXECUTABLE_PROGRAM -#define SHARED_CORE_EXECUTABLE_PROGRAM "libhttpd.ep" +#define SHARED_CORE_EXECUTABLE_PROGRAM "lib" TARGET ".ep" #endif extern char *optarg; @@ -6086,8 +6111,8 @@ */ if (execve(prog, argv, envp) == -1) { fprintf(stderr, - "httpd: Unable to exec Shared Core Executable Program `%s'\n", - prog); + "%s: Unable to exec Shared Core Executable Program `%s'\n", + ap_server_argv0, prog); return 1; } else 1.141 +4 -3 apache-1.3/src/main/util.c Index: util.c =================================================================== RCS file: /home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.140 retrieving revision 1.141 diff -u -r1.140 -r1.141 --- util.c 1998/11/10 03:45:06 1.140 +++ util.c 1998/12/02 00:00:07 1.141 @@ -1535,7 +1535,7 @@ return (atoi(&name[1])); if (!(ent = getpwnam(name))) { - fprintf(stderr, "httpd: bad user name %s\n", name); + fprintf(stderr, "%s: bad user name %s\n", ap_server_argv0, name); exit(1); } return (ent->pw_uid); @@ -1553,7 +1553,7 @@ return (atoi(&name[1])); if (!(ent = getgrnam(name))) { - fprintf(stderr, "httpd: bad group name %s\n", name); + fprintf(stderr, "%s: bad group name %s\n", ap_server_argv0, name); exit(1); } return (ent->gr_gid); @@ -1644,7 +1644,8 @@ } str[MAXHOSTNAMELEN] = '\0'; if ((!(p = gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) { - fprintf(stderr, "httpd: cannot determine local host name.\n"); + fprintf(stderr, "%s: cannot determine local host name.\n", + ap_server_argv0); fprintf(stderr, "Use the ServerName directive to set it manually.\n"); exit(1); } 1.53 +7 -3 apache-1.3/src/modules/proxy/proxy_cache.c Index: proxy_cache.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- proxy_cache.c 1998/08/31 19:51:59 1.52 +++ proxy_cache.c 1998/12/02 00:00:13 1.53 @@ -58,6 +58,7 @@ /* Cache and garbage collection routines for Apache proxy */ #include "mod_proxy.h" +#include "http_conf_globals.h" #include "http_log.h" #include "http_main.h" #include "util_date.h" @@ -227,19 +228,22 @@ #ifndef NO_SETSID if ((pgrp = setsid()) == -1) { perror("setsid"); - fprintf(stderr, "httpd: setsid failed\n"); + fprintf(stderr, "%s: setsid failed\n", + ap_server_argv0); exit(1); } #elif defined(NEXT) || defined(NEWSOS) if (setpgrp(0, getpid()) == -1 || (pgrp = getpgrp(0)) == -1) { perror("setpgrp"); - fprintf(stderr, "httpd: setpgrp or getpgrp failed\n"); + fprintf(stderr, "%S: setpgrp or getpgrp failed\n", + ap_server_argv0); exit(1); } #else if ((pgrp = setpgrp(getpid(), 0)) == -1) { perror("setpgrp"); - fprintf(stderr, "httpd: setpgrp failed\n"); + fprintf(stderr, "%s: setpgrp failed\n", + ap_server_argv0); exit(1); } #endif 1.108 +10 -10 apache-1.3/src/modules/standard/mod_include.c Index: mod_include.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_include.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -r1.107 -r1.108 --- mod_include.c 1998/11/30 22:26:49 1.107 +++ mod_include.c 1998/12/02 00:00:15 1.108 @@ -833,7 +833,7 @@ fprintf(dbg, "Exec failed\n"); #endif ap_snprintf(err_string, sizeof(err_string), - "httpd: exec of %s failed, reason: %s (errno = %d)\n", + "exec of %s failed, reason: %s (errno = %d)\n", SHELL_PATH, strerror(errno), errno); write(STDERR_FILENO, err_string, strlen(err_string)); exit(0); @@ -954,8 +954,8 @@ if (ap_allow_options(r) & OPT_INCNOEXEC) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "httpd: #perl SSI disallowed by IncludesNoExec in %s", - r->filename); + "#perl SSI disallowed by IncludesNoExec in %s", + r->filename); return DECLINED; } while (1) { @@ -2204,8 +2204,8 @@ if (!strcmp(directive, "exec")) { if (noexec) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "httpd: exec used but not allowed in %s", - r->filename); + "exec used but not allowed in %s", + r->filename); if (printing) { ap_rputs(error, r); } @@ -2243,9 +2243,9 @@ #endif else { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "httpd: unknown directive \"%s\" " - "in parsed doc %s", - directive, r->filename); + "unknown directive \"%s\" " + "in parsed doc %s", + directive, r->filename); if (printing) { ap_rputs(error, r); } @@ -2253,8 +2253,8 @@ } if (ret) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "httpd: premature EOF in parsed file %s", - r->filename); + "premature EOF in parsed file %s", + r->filename); return; } } 1.31 +1 -1 apache-1.3/src/modules/standard/mod_log_agent.c Index: mod_log_agent.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_log_agent.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- mod_log_agent.c 1998/08/03 09:15:12 1.30 +++ mod_log_agent.c 1998/12/02 00:00:16 1.31 @@ -126,7 +126,7 @@ else if (*cls->fname != '\0') { if ((cls->agent_fd = ap_popenf(p, fname, xfer_flags, xfer_mode)) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, s, - "httpd: could not open agent log file %s.", fname); + "could not open agent log file %s.", fname); exit(1); } } 1.68 +1 -1 apache-1.3/src/modules/standard/mod_log_config.c Index: mod_log_config.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- mod_log_config.c 1998/09/22 09:19:59 1.67 +++ mod_log_config.c 1998/12/02 00:00:16 1.68 @@ -913,7 +913,7 @@ char *fname = ap_server_root_relative(p, cls->fname); if ((cls->log_fd = ap_popenf(p, fname, xfer_flags, xfer_mode)) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, s, - "httpd: could not open transfer log file %s.", fname); + "could not open transfer log file %s.", fname); exit(1); } } 1.34 +1 -1 apache-1.3/src/modules/standard/mod_log_referer.c Index: mod_log_referer.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_log_referer.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- mod_log_referer.c 1998/08/03 09:15:13 1.33 +++ mod_log_referer.c 1998/12/02 00:00:17 1.34 @@ -143,7 +143,7 @@ else if (*cls->fname != '\0') { if ((cls->referer_fd = ap_popenf(p, fname, xfer_flags, xfer_mode)) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, s, - "httpd: could not open referer log file %s.", fname); + "could not open referer log file %s.", fname); exit(1); } } 1.46 +1 -1 apache-1.3/src/modules/standard/mod_mime.c Index: mod_mime.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- mod_mime.c 1998/10/23 19:28:53 1.45 +++ mod_mime.c 1998/12/02 00:00:17 1.46 @@ -250,7 +250,7 @@ if (!(f = ap_pcfg_openfile(p, types_confname))) { ap_log_error(APLOG_MARK, APLOG_ERR, s, - "httpd: could not open mime types log file %s.", types_confname); + "could not open mime types log file %s.", types_confname); exit(1); } 1.27 +1 -0 apache-1.3/src/support/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /home/cvs/apache-1.3/src/support/Makefile.tmpl,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- Makefile.tmpl 1998/09/03 18:03:06 1.26 +++ Makefile.tmpl 1998/12/02 00:00:19 1.27 @@ -30,6 +30,7 @@ apxs: apxs.pl sed <apxs.pl >apxs \ + -e '[EMAIL PROTECTED]@%$(TARGET)%g' \ -e '[EMAIL PROTECTED]@%$(CC)%g' \ -e '[EMAIL PROTECTED]@%$(CFLAGS)%g' \ -e '[EMAIL PROTECTED]@%$(CFLAGS_SHLIB)%g' \ 1.13 +15 -13 apache-1.3/src/support/apxs.pl Index: apxs.pl =================================================================== RCS file: /home/cvs/apache-1.3/src/support/apxs.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- apxs.pl 1998/11/19 16:41:12 1.12 +++ apxs.pl 1998/12/02 00:00:19 1.13 @@ -68,6 +68,7 @@ ## Configuration ## +my $CFG_TARGET = '@TARGET@'; # substituted via Makefile.tmpl my $CFG_CC = '@CC@'; # substituted via Makefile.tmpl my $CFG_CFLAGS = '@CFLAGS@'; # substituted via Makefile.tmpl my $CFG_CFLAGS_SHLIB = '@CFLAGS_SHLIB@'; # substituted via Makefile.tmpl @@ -90,11 +91,11 @@ ## ## Initial shared object support check ## -if (not grep(/mod_so/, `$CFG_SBINDIR/httpd -l`)) { +if (not grep(/mod_so/, `$CFG_SBINDIR/$CFG_TARGET -l`)) { print STDERR "apxs:Error: Sorry, no shared object support for Apache\n"; print STDERR "apxs:Error: available under your platform. Make sure\n"; print STDERR "apxs:Error: the Apache module mod_so is compiled into\n"; - print STDERR "apxs:Error: your server binary `$CFG_SBINDIR/httpd'.\n"; + print STDERR "apxs:Error: your server binary `$CFG_SBINDIR/$CFG_TARGET'.\n"; exit(1); } @@ -234,6 +235,7 @@ my $data = join('', <DATA>); $data =~ s|%NAME%|$name|sg; + $data =~ s|%TARGET%|$CFG_TARGET|sg; my ($mkf, $src) = ($data =~ m|^(.+)-=#=-\n(.+)|s); @@ -430,17 +432,17 @@ # activate module via LoadModule/AddModule directive if ($opt_a or $opt_A) { - if (not -f "$CFG_SYSCONFDIR/httpd.conf") { - print "apxs:Error: Config file $CFG_SYSCONFDIR/httpd.conf not found\n"; + if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") { + print "apxs:Error: Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found\n"; exit(1); } - open(FP, "<$CFG_SYSCONFDIR/httpd.conf") || die; + open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die; my $content = join('', <FP>); close(FP); if ($content !~ m|\n#?\s*LoadModule\s+|) { - print STDERR "apxs:Error: Activation failed for custom $CFG_SYSCONFDIR/httpd.conf file.\n"; + print STDERR "apxs:Error: Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.\n"; print STDERR "apxs:Error: At least one `LoadModule' directive already has to exist.\n"; exit(1); } @@ -455,7 +457,7 @@ $update = 1; $lmd =~ m|LoadModule\s+(.+?)_module.*|; my $what = $opt_A ? "preparing" : "activating"; - print STDERR "[$what module `$1' in $CFG_SYSCONFDIR/httpd.conf]\n"; + print STDERR "[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]\n"; } } my $amd; @@ -468,12 +470,12 @@ } } if ($update) { - open(FP, ">$CFG_SYSCONFDIR/httpd.conf.new") || die; + open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new") || die; print FP $content; close(FP); - system("cp $CFG_SYSCONFDIR/httpd.conf $CFG_SYSCONFDIR/httpd.conf.bak && " . - "cp $CFG_SYSCONFDIR/httpd.conf.new $CFG_SYSCONFDIR/httpd.conf && " . - "rm $CFG_SYSCONFDIR/httpd.conf.new"); + system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " . + "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " . + "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new"); } } } @@ -537,10 +539,10 @@ ** ** $ apxs -c -i mod_%NAME%.c ** -** Then activate it in Apache's httpd.conf file for instance +** Then activate it in Apache's %TARGET%.conf file for instance ** for the URL /%NAME% in as follows: ** -** # httpd.conf +** # %TARGET%.conf ** LoadModule %NAME%_module libexec/mod_%NAME%.so ** <Location /%NAME%> ** SetHandler %NAME%