httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject Re: PATCH: Enable DSO Support for OS/390 USS -- Update
Date Mon, 19 Jun 2000 21:12:25 GMT
Ovies,
This patch is just too much to go into the 1.3 tree.  The only things that can go into the
1.3 tree now are very isolated, narrowly scoped fixes. Bill Rowe has been doing a lot of
work on Apache for Windows, but his work does not impact the Unix branch at all and he
(and a few others) are able to test the hell out of his changes. The Unix specific code
(especially the configuration code) supports 100+ of versions of Unix and it's just not
practical to ensure this patch doesn't break any of them.

I'll make this patch available from www.apache.org/~stoddard. I'll commit a os390 readme
update if you write it up. I'll also add this patch to the Available Patches section of
the STATUS file.

Bill
----- Original Message -----
From: Ovies Brabson <oviesb@us.ibm.com>
To: <new-httpd@apache.org>
Sent: Thursday, June 15, 2000 6:13 PM
Subject: PATCH: Enable DSO Support for OS/390 USS -- Update


> This is an updated version of the patch I sent before to enable DSO
> support for the OS/390 USS platform.  The changes affect two files:
> src/os/os390/os.c and src/support/Makefile.tmpl.  os.c was modified to
> allow ap_os_dso_sym to obtain the address of an exported function as
> well as the address of an exported variable.  src/support/Makefile.tmpl
> was modified to cleanup the .x files generated by the OS/390 make in the
> src/support directory when make clean and distclean is invoked.
>
>
>


--------------------------------------------------------------------------------


> ? apache-1.3/cgi-src
> ? apache-1.3/htdocs/manual/info
> ? apache-1.3/src/os/emx
> Index: apache-1.3/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/Makefile.tmpl,v
> retrieving revision 1.96
> diff -u -r1.96 Makefile.tmpl
> --- apache-1.3/Makefile.tmpl 2000/04/13 19:08:25 1.96
> +++ apache-1.3/Makefile.tmpl 2000/06/15 18:56:03
> @@ -290,10 +290,14 @@
>   echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
>   $(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
>   SHLIB_EXPORT_FILES="`grep '^SHLIB_EXPORT_FILES=' $(TOP)/$(SRC)/Makefile | sed -e
's:^.*=::'`"; \
> - if [ ".$${SHLIB_EXPORT_FILES}" != . ]; then \
> + if [ ".$${SHLIB_EXPORT_FILES}" != .no ]; then \
>   $(CP) $(TOP)/$(SRC)/support/httpd.exp $(root)$(libexecdir)/; \
>   chmod 644 $(root)$(libexecdir)/httpd.exp; \
>   fi; \
> + case "x$(PLATFORM)" in \
> + x*390*) $(CP) $(TOP)/$(SRC)/lib$(TARGET).x $(root)$(libexecdir)/; \
> + chmod 644 $(root)$(libexecdir)/lib$(TARGET).x;; \
> + esac; \
>   else \
>   echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
>   $(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
> @@ -301,8 +305,9 @@
>   -@if [ ".`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_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep
$(root)$(libexecdir)/lib$(TARGET).ep"; \
> - $(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep;
\
> + SHARED_CORE_EP="`grep '^SHARED_CORE_EP=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`";
\
> + echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$${SHARED_CORE_EP}
$(root)$(libexecdir)/$${SHARED_CORE_EP}"; \
> + $(INSTALL_CORE) $(TOP)/$(SRC)/$${SHARED_CORE_EP}
$(root)$(libexecdir)/$${SHARED_CORE_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 \
> @@ -443,6 +448,10 @@
>   @osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os/:os/:'`;
\
>   echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
>   $(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/; \
> + case "x$(PLATFORM)" in \
> + x*390*) echo "$(CP) $(TOP)/$(SRC)/$${osdir}/ebcdic.h $(root)$(includedir)/"; \
> + $(CP) $(TOP)/$(SRC)/$${osdir}/ebcdic.h $(root)$(includedir)/;; \
> + esac; \
>   echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/"; \
>   $(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/
>   chmod 644 $(root)$(includedir)/*.h $(root)$(includedir)/xml/*.h
> Index: apache-1.3/src/Configure
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/Configure,v
> retrieving revision 1.399
> diff -u -r1.399 Configure
> --- apache-1.3/src/Configure 2000/06/15 13:01:34 1.399
> +++ apache-1.3/src/Configure 2000/06/15 18:56:04
> @@ -1329,6 +1329,18 @@
>       LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
>       LDFLAGS_SHLIB_EXPORT=""
>              ;;
> + *-IBM-OS390*)
> +     DEF_SHARED_CORE=yes
> +     CFLAGS_SHLIB="-W c,DLL,EXPO,RENT,LO"
> +     LDFLAGS_SHLIB="-W l,DLL"
> +     LDFLAGS="$LDFLAGS_SHLIB"
> +     LD_SHLIB=$CC
> +     LDFLAGS_SHLIB_EXPORT=""
> +     LD_SHCORE_LIBS="$LIBS"
> +     SHCORE_IMPLIB='lib$(TARGET).x'
> +     LIBS_SHLIB='$(SRCDIR)/$(SHCORE_IMPLIB) $(EXTRA_LIBS)'
> +     SHARED_CORE_EP='sh_core.ep'
> +     ;;
>   *)
>       ##  ok, no known explict support for shared objects
>       ##  on this platform, but we give not up immediately.
> @@ -1999,7 +2011,11 @@
>  ####################################################################
>  ## Now add the target for the main Makefile
>  ##
> -echo "SUBDIRS=$SUBDIRS lib modules" >> Makefile
> +SUBDIRS="$SUBDIRS lib modules"
> +echo "SUBDIRS=$SUBDIRS" >> Makefile
> +## Exclude the modules directory to build the shared core for OS/390
> +CORE_SUBDIRS=`echo $SUBDIRS | sed 's: modules::'`
> +echo "CORE_SUBDIRS=$CORE_SUBDIRS" >> Makefile
>  echo "SUBTARGET=$SUBTARGET" >> Makefile
>  echo "SHLIB_SUFFIX_NAME=$SHLIB_SUFFIX_NAME" >> Makefile
>  echo "SHMOD_SUFFIX_NAME=$SHMOD_SUFFIX_NAME" >> Makefile
> @@ -2375,10 +2391,14 @@
>   split(pp[3], parts, ".")
>   base=parts[1]
>   objspic=objspic " " base ".lo"
> + modobjs=modobjs " " base ".o"
> + modx=modx " " base ".x"
>       }
>       END

>   printf "SHLIBS=%s\n", shlibs;
>   printf "OBJS_PIC=%s\n", objspic;
> + printf "MOD_OBJS=%s\n", modobjs;
> + printf "MOD_X=%s\n", modx;
>       }'
>
>       $CAT << 'EOF' >> $moddir/Makefile
> @@ -2400,11 +2420,15 @@
>   $(CC) -c $(INCLUDES) $(CFLAGS) $<
>
>  .c.so:
> - $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo
> - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $*.lo $(LIBS_SHLIB)
> + $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $<
> + case "x$(OS)" in \
> +     xOS390) $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $*.o $(LIBS_SHLIB);; \
> +          *) mv $*.o $*.lo; \
> +             $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $*.lo $(LIBS_SHLIB);; \
> + esac
>
>  clean:
> - rm -f $(LIB) $(OBJS) $(SHLIBS) $(OBJS_PIC)
> + rm -f $(LIB) $(OBJS) $(SHLIBS) $(OBJS_PIC) $(MOD_OBJS) $(MOD_X)
>
>  distclean: clean
>   rm -f Makefile
> Index: apache-1.3/src/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/Makefile.tmpl,v
> retrieving revision 1.115
> diff -u -r1.115 Makefile.tmpl
> --- apache-1.3/src/Makefile.tmpl 1999/12/09 17:19:31 1.115
> +++ apache-1.3/src/Makefile.tmpl 2000/06/15 18:56:04
> @@ -48,18 +48,60 @@
>         -o lib$(TARGET).ep -DSHARED_CORE_TIESTATIC main/http_main.c \
>     -L. -l$(TARGET) $(LIBS)
>
> -lib$(TARGET).$(SHLIB_SUFFIX_NAME): subdirs modules.o
> - $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
> - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS)
$(REGLIB) $(EXPATLIB) $(LD_SHCORE_DEF) $(LD_SHCORE_LIBS)
> - @if [ ".$(SHLIB_SUFFIX_LIST)" != . ]; then \
> - rm -f lib$(TARGET).$(SHLIB_SUFFIX_NAME).*; \
> - for suffix in $(SHLIB_SUFFIX_LIST) ""; do \
> - [ ".$$suffix" = . ] && continue; \
> -     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; \
> +lib$(TARGET).$(SHLIB_SUFFIX_NAME): subdirs
> + @if [ ".$(OS)" != ".OS390" ]; then \
> + $(MAKE) modules.o; \
> + $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c; \
> + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o $(OBJS)
$(REGLIB) $(EXPATLIB) $(LD_SHCORE_DEF) $(LD_SHCORE_LIBS); \
> + if [ ".$(SHLIB_SUFFIX_LIST)" != . ]; then \
> + rm -f lib$(TARGET).$(SHLIB_SUFFIX_NAME).*; \
> + for suffix in $(SHLIB_SUFFIX_LIST) ""; do \
> + [ ".$$suffix" = . ] && continue; \
> + 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; \
>   fi
>
> +# Used to generate import library for OS/390.  In order to create the import library
> +# containing all of the core exported symbols, the core so has to be built before any
> +# of the optional modules.  core-subdirs are all the subdirectories containing core
> +# functions.  They are compiled first.  Then mod_so is compiled.  Then the so for the
core
> +# is linked.  Due to some strange behavior on OS/390 it was necessary to list all the
.o
> +# files when linking the core so.  The for loop in the lib$(TARGET).x target scans all
> +# the lib files and collects the names of all the .o files that make up the core.  Once
> +# the core so is created, then lib$(TARGET).ep is created.  Finally we fall back to
the
> +# target_shared target and build the optional modules.
> +
> +lib$(TARGET).x: core-subdirs
> + @cd modules/standard; $(MAKE) lib; cd ../..
> + @for i in $(CORE_SUBDIRS); do \
> + lib_file="`find $$i -name 'lib*.a'`"; \
> + lib_objs="`ar -t $$lib_file`"; \
> + lib_objs="`echo $$lib_objs | sed 's:\\n: :g; s:__.SYMDEF::'`"; \
> + lib_dir="`echo $$lib_file | sed 's:/lib.*\.a::'`"; \
> + for j in $$lib_objs; do \
> + objs_list="$$objs_list $$lib_dir/$$j"; \
> + done; \
> + done; \
> + $(MAKE) core-so "CORE_OBJS=$$objs_list"
> + $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \
> +       -o $(SHARED_CORE_EP) -DSHARED_CORE_TIESTATIC -L. main/http_main.c $(LIBS_SHLIB)
> +
> +core-subdirs:
> + @for i in $(CORE_SUBDIRS); do \
> + echo "===> $(SDP)$$i"; \
> + ( cd $$i && $(MAKE) SDP='$(SDP)' ) || exit 1; \
> + echo "<=== $(SDP)$$i"; \
> + done
> +
> +core-so:
> + $(CC) -c $(INCLUDES) $(CFLAGS) modules.c
> + $(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
> + $(LD_SHLIB) $(LDFLAGS) -o lib$(TARGET).$(SHLIB_SUFFIX_NAME) buildmark.o modules.o
$(CORE_OBJS) modules/standard/mod_so.o
> +
> +# End of OS/390 specific targets for shared core
> +
>  subdirs:
>   @for i in $(SUBDIRS); do \
>   echo "===> $(SDP)$$i"; \
> @@ -78,7 +120,7 @@
>   echo "<=== $(SDP)support"
>
>  clean:
> - -rm -f $(TARGET) lib$(TARGET).* *.o
> + -rm -f $(TARGET) lib$(TARGET).* *.o $(SHARED_CORE_EP) *.x
>   @for i in $(SUBDIRS); do \
>   echo "===> $(SDP)$$i"; \
>   ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' $@ ) || exit 1; \
> @@ -86,7 +128,7 @@
>   done
>
>  distclean:
> - -rm -f $(TARGET) lib$(TARGET).* *.o
> + -rm -f $(TARGET) lib$(TARGET).* *.o $(SHARED_CORE_EP) *.x
>   @for i in $(SUBDIRS); do \
>   echo "===> $(SDP)$$i"; \
>   ( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' $@ ) || exit 1; \
> Index: apache-1.3/src/helpers/TestCompile
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/helpers/TestCompile,v
> retrieving revision 1.38
> diff -u -r1.38 TestCompile
> --- apache-1.3/src/helpers/TestCompile 2000/06/15 12:57:49 1.38
> +++ apache-1.3/src/helpers/TestCompile 2000/06/15 18:56:04
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>  exstat=1
> -trap 'rm -f Makefile dummy ../dummy.o dummy.exe testfunc.c testfunc ../testfunc.o
testfunc.exe; exit $exstat' 0 1 2 3 15
> +trap 'rm -f Makefile dummy ../dummy.o ../dummy.x dummy.exe testfunc.c testfunc
../testfunc.o ../testfunc.x testfunc.exe; exit $exstat' 0 1 2 3 15
>  #
>  # Yet another Apache Configure helper script.
>  # This script tests certain aspects of the compilation
> @@ -240,7 +240,7 @@
>  #
>  # Get makefile settings and build a basic Makefile
>  #
> -rm -f dummy ../dummy.o testfunc ../testfunc.o
> +rm -f dummy ../dummy.o ../dummy.x testfunc ../testfunc.o ../testfunc.x
>
>  cat ../Makefile.config > Makefile
>  cat <<EOF >> Makefile
> Index: apache-1.3/src/helpers/binbuild.sh
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/helpers/binbuild.sh,v
> retrieving revision 1.16
> diff -u -r1.16 binbuild.sh
> --- apache-1.3/src/helpers/binbuild.sh 2000/01/30 00:36:55 1.16
> +++ apache-1.3/src/helpers/binbuild.sh 2000/06/15 18:56:04
> @@ -7,10 +7,7 @@
>  # See http://www.apache.org/docs/LICENSE
>
>  OS=`src/helpers/GuessOS`
> -case "x$OS" in
> -  x*390*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most";;
> -      *)
CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max";;
> -esac
> +CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max"
>  APDIR=`pwd`
>  APDIR=`basename $APDIR`
>  VER=`echo $APDIR |sed s/apache_//`
> Index: apache-1.3/src/main/http_main.c
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
> retrieving revision 1.501
> diff -u -r1.501 http_main.c
> --- apache-1.3/src/main/http_main.c 2000/06/13 16:34:04 1.501
> +++ apache-1.3/src/main/http_main.c 2000/06/15 18:56:05
> @@ -4872,6 +4872,9 @@
>  #endif
>   )) != -1) {
>   char **new;
> +#ifdef OS390
> +    optarg = *(__opargf());
> +#endif
>   switch (c) {
>   case 'c':
>       new = (char **)ap_push_array(ap_server_post_read_config);
> @@ -7007,6 +7010,8 @@
>
>  #if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
>  #define VARNAME "SHLIB_PATH"
> +#elif defined(OS390)
> +#define VARNAME "LIBPATH"
>  #else
>  #define VARNAME "LD_LIBRARY_PATH"
>  #endif
> @@ -7016,14 +7021,29 @@
>  #endif
>
>  #ifndef SHARED_CORE_EXECUTABLE_PROGRAM
> +#if !defined(OS390)
>  #define SHARED_CORE_EXECUTABLE_PROGRAM "lib" TARGET ".ep"
> +#else
> +#define SHARED_CORE_EXECUTABLE_PROGRAM "sh_core.ep"
>  #endif
> +#endif
>
>  extern char *optarg;
>  extern int   optind;
>
> +#ifdef OS390
> +/* envp is not a parameter to main on OS390.  Need to use environ. */
> +extern char **environ;
> +
> +int main(int argc, char *argv[])
> +{
> +    char **envp;
> +#else
> +
>  int main(int argc, char *argv[], char *envp[])
>  {
> +
> +#endif
>      char prog[MAX_STRING_LEN];
>      char llp_buf[MAX_STRING_LEN];
>      char **llp_slot;
> @@ -7032,9 +7052,9 @@
>      char **envpnew;
>      int c, i, l;
>
> -#ifdef MPE
> +#if defined(MPE) || defined(OS390)
>      /*
> -     * MPE doesn't currently initialize the envp parameter.  Instead, we must
> +     * MPE and OS390 don't currently initialize the envp parameter.  Instead, we must
>       * use the global variable environ.
>       */
>      envp = environ;
> @@ -7097,9 +7117,22 @@
>   envp = envpnew;
>   llp_slot = &envp[i++];
>   envp[i] = NULL;
> +    }
> +    if (llp_existing != NULL) {
> +#ifdef OS390
> +       /* Ensure that "::" remains at beginning or end of LIBPATH */
> +       if (strstr(llp_existing, "::") == llp_existing) {
> +           /* "::" is at beginning of LIBPATH */
> +           ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s:%s", VARNAME, llp_existing,
llp_dir);
> +       }
> +       else {
> +           /* "::" is at end of LIBPATH */
> +           ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s:%s", VARNAME, llp_dir,
llp_existing);
> +       }
> +#else
> +       ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s:%s", VARNAME, llp_dir,
llp_existing);
> +#endif
>      }
> -    if (llp_existing != NULL)
> - ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s:%s", VARNAME, llp_dir, llp_existing);
>      else
>   ap_snprintf(llp_buf, sizeof(llp_buf), "%s=%s", VARNAME, llp_dir);
>      *llp_slot = strdup(llp_buf);
> Index: apache-1.3/src/modules/example/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/example/Makefile.tmpl,v
> retrieving revision 1.10
> diff -u -r1.10 Makefile.tmpl
> --- apache-1.3/src/modules/example/Makefile.tmpl 1998/09/07 06:59:33 1.10
> +++ apache-1.3/src/modules/example/Makefile.tmpl 2000/06/15 18:56:06
> @@ -1,7 +1,7 @@
>
>  #Dependencies
>
> -$(OBJS) $(OBJS_PIC): Makefile
> +$(OBJS) $(OBJS_PIC) $(MOD_OBJS): Makefile
>
>  # DO NOT REMOVE
>  mod_example.o: mod_example.c $(INCDIR)/httpd.h \
> Index: apache-1.3/src/modules/experimental/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/experimental/Makefile.tmpl,v
> retrieving revision 1.15
> diff -u -r1.15 Makefile.tmpl
> --- apache-1.3/src/modules/experimental/Makefile.tmpl 1999/08/17 19:29:58 1.15
> +++ apache-1.3/src/modules/experimental/Makefile.tmpl 2000/06/15 18:56:06
> @@ -1,7 +1,7 @@
>
>  #Dependencies
>
> -$(OBJS) $(OBJS_PIC): Makefile
> +$(OBJS) $(OBJS_PIC) $(MOD_OBJS): Makefile
>
>  # DO NOT REMOVE
>  mod_mmap_static.o: mod_mmap_static.c $(INCDIR)/httpd.h \
> Index: apache-1.3/src/modules/extra/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/extra/Makefile.tmpl,v
> retrieving revision 1.6
> diff -u -r1.6 Makefile.tmpl
> --- apache-1.3/src/modules/extra/Makefile.tmpl 1998/05/10 13:04:33 1.6
> +++ apache-1.3/src/modules/extra/Makefile.tmpl 2000/06/15 18:56:06
> @@ -1,6 +1,6 @@
>
>  #Dependencies
>
> -$(OBJS) $(OBJS_PIC): Makefile
> +$(OBJS) $(OBJS_PIC) $(MOD_OBJS): Makefile
>
>  # DO NOT REMOVE
> Index: apache-1.3/src/modules/proxy/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/proxy/Makefile.tmpl,v
> retrieving revision 1.26
> diff -u -r1.26 Makefile.tmpl
> --- apache-1.3/src/modules/proxy/Makefile.tmpl 1999/05/04 11:21:13 1.26
> +++ apache-1.3/src/modules/proxy/Makefile.tmpl 2000/06/15 18:56:06
> @@ -17,9 +17,14 @@
>   ar cr $@ $(OBJS)
>   $(RANLIB) $@
>
> -libproxy.so: $(OBJS_PIC)
> +libproxy.so:
>   rm -f $@
> - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB)
> + case "x$(OS)" in \
> +   xOS390) $(MAKE) $(OBJS); \
> +           $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS) $(LIBS_SHLIB);; \
> +        *) $(MAKE) $(OBJS_PIC); \
> +           $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB);; \
> + esac
>
>  libproxy.dll: $(OBJS_PIC) mod_proxy.def
>   $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB)
> @@ -29,13 +34,13 @@
>  .SUFFIXES: .o .lo .dll
>
>  .c.o:
> - $(CC) -c $(INCLUDES) $(CFLAGS) $<
> + $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $<
>
>  .c.lo:
>   $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo
>
>  clean:
> - rm -f $(OBJS) $(OBJS_PIC) $(LIB)
> + rm -f $(OBJS) $(OBJS_PIC) $(LIB) *.x
>
>  distclean: clean
>   -rm -f Makefile
> Index: apache-1.3/src/modules/standard/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/standard/Makefile.tmpl,v
> retrieving revision 1.22
> diff -u -r1.22 Makefile.tmpl
> --- apache-1.3/src/modules/standard/Makefile.tmpl 1998/09/07 06:59:35 1.22
> +++ apache-1.3/src/modules/standard/Makefile.tmpl 2000/06/15 18:56:06
> @@ -1,7 +1,7 @@
>
>  #Dependencies
>
> -$(OBJS) $(OBJS_PIC): Makefile
> +$(OBJS) $(OBJS_PIC) $(MOD_OBJS): Makefile
>
>  # DO NOT REMOVE
>  mod_access.o: mod_access.c $(INCDIR)/httpd.h \
> Index: apache-1.3/src/modules/test/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/modules/test/Makefile.tmpl,v
> retrieving revision 1.11
> diff -u -r1.11 Makefile.tmpl
> --- apache-1.3/src/modules/test/Makefile.tmpl 1998/07/20 16:20:23 1.11
> +++ apache-1.3/src/modules/test/Makefile.tmpl 2000/06/15 18:56:06
> @@ -1,7 +1,7 @@
>
>  #Dependencies
>
> -$(OBJS) $(OBJS_PIC): Makefile
> +$(OBJS) $(OBJS_PIC) $(MOD_OBJS): Makefile
>
>  # DO NOT REMOVE
>  mod_rndchunk.o: mod_rndchunk.c $(INCDIR)/httpd.h \
> Index: apache-1.3/src/os/os390/os.c
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/os/os390/os.c,v
> retrieving revision 1.1
> diff -u -r1.1 os.c
> --- apache-1.3/src/os/os390/os.c 1999/12/09 17:12:13 1.1
> +++ apache-1.3/src/os/os390/os.c 2000/06/15 18:56:06
> @@ -62,6 +62,7 @@
>
>  #include "httpd.h"
>  #include "http_core.h"
> +#include "http_log.h"
>  #include "os.h"
>
>  /* Check the Content-Type to decide if conversion is needed */
> @@ -101,3 +102,44 @@
>      return convert_to_ascii;
>  }
>
> +/*
> + * Dynamic shared object functions used by modso.c
> + */
> +
> +void ap_os_dso_init(void)
> +{
> +}
> +
> +ap_os_dso_handle_t ap_os_dso_load(const char *path)
> +{
> +   return dllload(path);
> +}
> +
> +
> +void ap_os_dso_unload(ap_os_dso_handle_t handle)
> +{
> +    int rc = 0;
> +    rc = dllfree(handle);
> +    if (rc) {
> +        ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
> +                     "OS/390 dllfree failed.  Return code is:  %d.  Errno and reason
information is:  (%d), %s.",
> +                     rc, errno, strerror(errno));
> +    }
> +}
> +
> +
> +void *ap_os_dso_sym(ap_os_dso_handle_t handle, const char *symname)
> +{
> +    void *symPtr = 0;
> +    symPtr = dllqueryvar(handle, symname);
> +    if (symPtr == NULL) {
> +        symPtr = (void *)dllqueryfn(handle, symname);
> +    }
> +    return symPtr;
> +}
> +
> +
> +const char *ap_os_dso_error(void)
> +{
> +    return strerror(errno);
> +}
> Index: apache-1.3/src/os/os390/os.h
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/os/os390/os.h,v
> retrieving revision 1.1
> diff -u -r1.1 os.h
> --- apache-1.3/src/os/os390/os.h 1999/12/09 17:12:14 1.1
> +++ apache-1.3/src/os/os390/os.h 2000/06/15 18:56:07
> @@ -37,4 +37,15 @@
>  struct request_rec;
>  extern int ap_checkconv(struct request_rec *r);
>
> +/* Prototypes for dynamic shared object (dll) functions.
> + * These functions are used by modso.c
> + */
> +#include <dll.h>
> +#define ap_os_dso_handle_t  dllhandle *
> +void ap_os_dso_init(void);
> +ap_os_dso_handle_t ap_os_dso_load(const char *path);
> +void ap_os_dso_unload(ap_os_dso_handle_t handle);
> +void *ap_os_dso_sym(ap_os_dso_handle_t handle, const char *symname);
> +const char *ap_os_dso_error(void);
> +
>  #endif /*! APACHE_OS_H*/
> Index: apache-1.3/src/support/Makefile.tmpl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/support/Makefile.tmpl,v
> retrieving revision 1.31
> diff -u -r1.31 Makefile.tmpl
> --- apache-1.3/src/support/Makefile.tmpl 1999/12/09 17:19:48 1.31
> +++ apache-1.3/src/support/Makefile.tmpl 2000/06/15 18:56:07
> @@ -36,13 +36,14 @@
>       -e 's%@CFLAGS_SHLIB@%$(CFLAGS_SHLIB)%g' \
>       -e 's%@LD_SHLIB@%$(LD_SHLIB)%g' \
>       -e 's%@LDFLAGS_MOD_SHLIB@%$(LDFLAGS_MOD_SHLIB)%g' \
> -     -e 's%@LIBS_SHLIB@%$(LIBS_SHLIB)%g' && chmod a+x apxs
> +     -e 's%@LIBS_SHLIB@%$(LIBS_SHLIB)%g' \
> +     -e 's%@SHCORE_IMPLIB@%$(SHCORE_IMPLIB)%g' && chmod a+x apxs
>
>  suexec: suexec.o
>   $(CC) $(CFLAGS) -o suexec $(LDFLAGS) suexec.o $(LIBS)
>
>  clean:
> - rm -f $(TARGETS) *.o
> + rm -f $(TARGETS) *.o *.x
>
>  distclean: clean
>   -rm -f Makefile
> Index: apache-1.3/src/support/apxs.pl
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/support/apxs.pl,v
> retrieving revision 1.33
> diff -u -r1.33 apxs.pl
> --- apache-1.3/src/support/apxs.pl 2000/02/28 20:56:07 1.33
> +++ apache-1.3/src/support/apxs.pl 2000/06/15 18:56:07
> @@ -75,6 +75,7 @@
>  my $CFG_LD_SHLIB      = q(@LD_SHLIB@);          # substituted via Makefile.tmpl
>  my $CFG_LDFLAGS_SHLIB = q(@LDFLAGS_MOD_SHLIB@); # substituted via Makefile.tmpl
>  my $CFG_LIBS_SHLIB    = q(@LIBS_SHLIB@);        # substituted via Makefile.tmpl
> +my $CFG_SHCORE_IMPLIB = q(@SHCORE_IMPLIB@);     # substituted via Makefile.tmpl
>  my $CFG_PREFIX        = q(@prefix@);            # substituted via APACI install
>  my $CFG_SBINDIR       = q(@sbindir@);           # substituted via APACI install
>  my $CFG_INCLUDEDIR    = q(@includedir@);        # substituted via APACI install
> @@ -293,7 +294,7 @@
>          my $name;
>          foreach $name (qw(
>              TARGET CC CFLAGS CFLAGS_SHLIB LD_SHLIB LDFLAGS_SHLIB LIBS_SHLIB
> -            PREFIX SBINDIR INCLUDEDIR LIBEXECDIR SYSCONFDIR
> +            PREFIX SBINDIR INCLUDEDIR LIBEXECDIR SYSCONFDIR SHCORE_IMPLIB
>          )) {
>              if ($arg eq $name or $arg eq lc($name)) {
>                  my $val = eval "\$CFG_$name";
> @@ -393,7 +394,7 @@
>          $opt .= " -l$opt_l";
>      }
>      $cmd .= $opt;
> -    $cmd .= " $CFG_LIBS_SHLIB";
> +    $cmd .= " $CFG_LIBEXECDIR/$CFG_SHCORE_IMPLIB";
>      push(@cmds, $cmd);
>
>      #   execute the commands
>


Mime
View raw message