cvs commit: apache-1.3/src/helpers UpdateHide

1998-03-04 Thread Ralf S. Engelschall
rse 98/03/04 04:48:13

  Modified:src/helpers UpdateHide
  Log:
  - Add Apache license header
  - Add usage information
  - Add Linux hint
  - Correct regex recently added by Ken
  
  Revision  ChangesPath
  1.6   +65 -4 apache-1.3/src/helpers/UpdateHide
  
  Index: UpdateHide
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/UpdateHide,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UpdateHide1998/03/04 12:02:07 1.5
  +++ UpdateHide1998/03/04 12:48:12 1.6
  @@ -1,11 +1,72 @@
   :
   eval 'exec perl -S $0 ${1+"$@"}'
   if $running_under_some_shell;
  +## 
  +## Copyright (c) 1995-1998 The Apache Group.  All rights reserved.
   ##
  -##  UpdateHideHeader -- update include/hide.h header file
  +## Redistribution and use in source and binary forms, with or without
  +## modification, are permitted provided that the following conditions
  +## are met:
  +##
  +## 1. Redistributions of source code must retain the above copyright
  +##notice, this list of conditions and the following disclaimer. 
  +##
  +## 2. Redistributions in binary form must reproduce the above copyright
  +##notice, this list of conditions and the following disclaimer in
  +##the documentation and/or other materials provided with the
  +##distribution.
  +##
  +## 3. All advertising materials mentioning features or use of this
  +##software must display the following acknowledgment:
  +##"This product includes software developed by the Apache Group
  +##for use in the Apache HTTP server project (http://www.apache.org/)."
  +##
  +## 4. The names "Apache Server" and "Apache Group" must not be used to
  +##endorse or promote products derived from this software without
  +##prior written permission. For written permission, please contact
  +##[EMAIL PROTECTED]
  +##
  +## 5. Redistributions of any form whatsoever must retain the following
  +##acknowledgment:
  +##"This product includes software developed by the Apache Group
  +##for use in the Apache HTTP server project (http://www.apache.org/)."
  +##
  +## THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
  +## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  +## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
  +## ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  +## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  +## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  +## STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  +## OF THE POSSIBILITY OF SUCH DAMAGE.
  +## 
  +##
  +## This software consists of voluntary contributions made by many
  +## individuals on behalf of the Apache Group and was originally based
  +## on public domain software written at the National Center for
  +## Supercomputing Applications, University of Illinois, Urbana-Champaign.
  +## For more information on the Apache Group and the Apache HTTP server
  +## project, please see .
  +##
  +##
  +
  +##
  +##  UpdateHide -- update the include/hide.h header file
   ##  Written by Ralf S. Engelschall, <[EMAIL PROTECTED]>
   ##
   
  +#   usage
  +if ($#ARGV != 2) {
  +print STDERR "Usage:   UpdateHide   
\n";
  +print STDERR "Example: UpdateHide httpd include/hide.h 
`helpers/GuessOS`\n";
  +print STDERR "Hint:Use the 'makeupdate' target of src/Makefile to 
run it\n";
  +exit(1);
  +}
  +
   #   the parameters
   $httpdbinary = $ARGV[0];
   $headerfile  = $ARGV[1];
  @@ -42,13 +103,13 @@
   $nm_cmd   = '/usr/ccs/bin/nm -p -g';
   $us_strip = 0;
   }
  -elsif ($gnutriple =~ /linux/) {
  +elsif ($gnutriple =~ m|.*-linux.*|) {
   $nm_cmd   = '/usr/bin/nm -g';
   $us_strip = 0;
   }
   else {
   print STDERR "Sorry, UpdateHide currently can be used only under\n";
  -print STDERR "the following OS: FreeBSD, Solaris, HPUX\n";
  +print STDERR "the following OS: FreeBSD, Solaris, HPUX, Linux\n";
   exit(1);
   }
   
  @@ -76,7 +137,7 @@
   #already compiled with HIDE defined)
   $name =~ s|^AP_||;  
   #   skip any already-protected symbols
  -next if ($name =~ m:^ap(_)|(api):);
  +next if ($name =~ m/^ap(?:_|api)/);
   #   skip any compiler- or system-private symbols
   next if ($name !~ m|^[a-zA-Z]+|);
   #   skip any symbols in our exclusion list
  
  
  


cvs commit: apache-1.3/src/helpers UpdateHide

1998-03-04 Thread dgaudet
dgaudet 98/03/04 01:47:38

  Modified:src/helpers UpdateHide
  Log:
  Support for -DUSE_HSREGEX, no hiding for the regex symbols.
  Support for Linux... which incidentally has an R symbol type for read-only
  data (this is a gnu feature maybe, it may even be an optional posix thing).
  
  Revision  ChangesPath
  1.3   +7 -2  apache-1.3/src/helpers/UpdateHide
  
  Index: UpdateHide
  ===
  RCS file: /export/home/cvs/apache-1.3/src/helpers/UpdateHide,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UpdateHide1998/03/03 13:47:43 1.2
  +++ UpdateHide1998/03/04 09:47:37 1.3
  @@ -18,6 +18,7 @@
   main errno environ optarg
   dlclose dlerror dlopen dlsym
   start end atexit exit etext edata
  +regcomp regerror regexec regfree
   );
   @included   = qw(
   D:db_auth_module
  @@ -37,6 +38,10 @@
   $nm_cmd   = '/usr/ccs/bin/nm -p -g';
   $us_strip = 0;
   }
  +elsif ($gnutriple =~ /linux/) {
  +$nm_cmd   = '/usr/bin/nm -g';
  +$us_strip = 0;
  +}
   else {
   print STDERR "Sorry, UpdateHide currently can be used only under\n";
   print STDERR "the following OS: FreeBSD, Solaris, HPUX\n";
  @@ -57,7 +62,7 @@
   %ST = ();
   @L = `$nm_cmd $httpdbinary`;
   foreach $l (@L) {
  -if ($l =~ m|^.*\s+([BDT])\s+(\S+)\s*$|) {
  +if ($l =~ m|^.*\s+([BDRT])\s+(\S+)\s*$|) {
   ($type, $name) = ($1, $2);
   
   #   remove leading underscore (C linker convention)
  @@ -73,7 +78,7 @@
   
   #   insert the symbol into our lists
   $SB{$name}++ if $type eq 'B';
  -$SD{$name}++ if $type eq 'D';
  +$SD{$name}++ if $type eq 'D' or $type eq 'R';
   $ST{$name}++ if $type eq 'T';
   }
   }
  
  
  


cvs commit: apache-1.3/src/helpers UpdateHide

1998-02-28 Thread Ralf S. Engelschall
rse 98/02/28 07:39:38

  Modified:src  CHANGES Configuration.tmpl Configure Makefile.tmpl
buildmark.c
   src/include conf.h
   src/main fnmatch.c
   src/os/bs2000 ebcdic.c os-inline.c
   src/os/unix os-inline.c os.c
   src/os/emx os-inline.c
  Added:   src/include hide.h
   src/helpers UpdateHide
  Log:
  Take in the new HIDE feature to avoid namespace conflicts by using "Rule
  HIDE=yes" in the Configuration file.  Basically this patch adds a
  pre-generated include/hide.h file and the helpers/UpdateHide script for
  updating it when new functions are added. All other changes were just to make
  sure the conf.h file is really included (which itself includes hide.h if HIDE
  is defined), because we need the redefinition list everywhere to hide every
  function.
  
  Submitted by: Ralf S. Engelschall
  Reviewed by: Jim Jagielski, Dean Gaudet, Martin Kraemer, Ralf S. Engelschall
  
  Revision  ChangesPath
  1.673 +4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.672
  retrieving revision 1.673
  diff -u -r1.672 -r1.673
  --- CHANGES   1998/02/28 08:12:46 1.672
  +++ CHANGES   1998/02/28 15:39:25 1.673
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b6
   
  +  *) Add `Rule HIDE' to Configuration to hide the Apache symbol
  + namespace from conflicting with third-party libraries some
  + modules force to be linked with Apache. [Ralf S. Engelschall]
  +
 *) Add the `%a' construct to LogFormat and CustomLog to log the client IP
address. [Todd Eigenschink <[EMAIL PROTECTED]>, PR#1885]
   
  
  
  
  1.80  +6 -0  apache-1.3/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Configuration.tmpl,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- Configuration.tmpl1998/02/03 11:20:13 1.79
  +++ Configuration.tmpl1998/02/28 15:39:27 1.80
  @@ -92,12 +92,18 @@
   #  is performing this function. If PARANOID is set to yes, it will
   #  actually print-out the code that the modules execute
   #
  +# HIDE:
  +#  This has no run-time penalty, but helps keep the Apache
  +#  namespace from colliding with that used by other libraries
  +#  pulled in by modules. 
  +#
   
   Rule STATUS=yes
   Rule SOCKS4=no
   Rule IRIXNIS=no
   Rule IRIXN32=yes
   Rule PARANOID=no
  +Rule HIDE=no
   
   # The following rules should be set automatically by Configure. However, if
   # they are not set by Configure (because we don't know the correct value for
  
  
  
  1.191 +8 -0  apache-1.3/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.190
  retrieving revision 1.191
  diff -u -r1.190 -r1.191
  --- Configure 1998/02/28 11:50:53 1.190
  +++ Configure 1998/02/28 15:39:28 1.191
  @@ -161,6 +161,7 @@
   RULE_IRIXNIS=`./helpers/CutRule IRIXNIS $file`
   RULE_IRIXN32=`./helpers/CutRule IRIXN32 $file`
   RULE_PARANOID=`./helpers/CutRule PARANOID $file`
  +RULE_HIDE=`./helpers/CutRule HIDE $file`
   
   
   # Preset some "constants"; can be overridden on a per-platform basis below.
  @@ -915,6 +916,13 @@
   REGLIB="regex/libregex.a"
   SUBDIRS="$SUBDIRS regex"
   CFLAGS="$CFLAGS -DUSE_HSREGEX"
  +fi
  +
  +#
  +# Now the definition of HIDE if needed/wanted.
  +#
  +if [ "$RULE_HIDE" = "yes" ]; then
  +CFLAGS="$CFLAGS -DHIDE"
   fi
   
   # create modules.c
  
  
  
  1.80  +17 -1 apache-1.3/src/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Makefile.tmpl,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- Makefile.tmpl 1998/02/28 10:31:53 1.79
  +++ Makefile.tmpl 1998/02/28 15:39:29 1.80
  @@ -29,7 +29,7 @@
@false
   
   $(TARGET):  subdirs modules.o
  - $(CC) -c $(CFLAGS) buildmark.c
  + $(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) buildmark.c
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) -o $(TARGET) 
buildmark.o $(OBJS) $(REGLIB) $(LIBS)
   
   subdirs:
  @@ -61,6 +61,22 @@
for i in $(SUBDIRS); do \
( cd $$i && $(MAKE) CC='$(CC)' AUX_CFLAGS='$(CFLAGS)' 
RANLIB='$(RANLIB)' depend ) || exit 1; \
done
  +
  +# We really don't expect end users to use this rule. It builds a
  +# httpd binary with all modules built in and then updates the
  +# include/hide.h file according to the exported symbols of this
  +# binary. So run this