cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c

1999-07-11 Thread ben
ben 99/07/11 06:27:32

  Modified:mpm/src/ap Makefile.tmpl
   mpm/src/include ap_hooks.h http_config.h http_request.h
   mpm/src/main http_config.c http_core.c http_request.c
   mpm/src/modules/mpm/prefork prefork.c
   mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c
mod_auth.c mod_autoindex.c mod_dir.c mod_env.c
mod_imap.c mod_log_config.c mod_mime.c
mod_negotiation.c mod_setenvif.c mod_userdir.c
  Added:   mpm/src/ap ap_hooks.c
  Log:
  Add topological sorting to hook ordering.
  
  Revision  ChangesPath
  1.6   +1 -1  apache-2.0/mpm/src/ap/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.tmpl 1999/06/29 09:00:06 1.5
  +++ Makefile.tmpl 1999/07/11 13:27:23 1.6
  @@ -6,7 +6,7 @@
   LIB=libap.a
   
   OBJS=ap_cpystrn.o ap_execve.o ap_fnmatch.o ap_getpass.o ap_md5c.o 
ap_signal.o \
  - ap_slack.o ap_snprintf.o ap_buf.o
  + ap_slack.o ap_snprintf.o ap_buf.o ap_hooks.o
   
   .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $<
  
  
  
  1.1  apache-2.0/mpm/src/ap/ap_hooks.c
  
  Index: ap_hooks.c
  ===
  #include "httpd.h"
  #include "ap_hooks.h"
  #include 
  
  #if 0
  #define ap_palloc(pool,size)  malloc(size)
  #endif
  
  /* NB: This must echo the LINK_##name structure */
  typedef struct
  {
  void (*dummy)(void *);
  const char *szName;
  const char * const *aszPredecessors;
  const char * const *aszSuccessors;
  } TSortData;
  
  typedef struct tsort_
  {
  void *pData;
  int nPredecessors;
  struct tsort_ **ppPredecessors;
  struct tsort_ *pNext;
  } TSort;
  
  static TSort *prepare(pool *p,TSortData *pItems,int nItems)
  {
  TSort *pData=ap_palloc(p,nItems*sizeof *pData);
  int n;
  
  for(n=0 ; n < nItems ; ++n)
{
pData[n].nPredecessors=0;
pData[n].ppPredecessors=ap_palloc(p,nItems*sizeof 
*pData[n].ppPredecessors);
pData[n].pNext=NULL;
pData[n].pData=&pItems[n];
}
  
  for(n=0 ; n < nItems ; ++n)
{
int i,k;
  
for(i=0 ; pItems[n].aszPredecessors && pItems[n].aszPredecessors[i] ; 
++i)
for(k=0 ; k < nItems ; ++k)
if(!strcmp(pItems[k].szName,pItems[n].aszPredecessors[i]))
{
int l;
for(l=0 ; l < pData[n].nPredecessors ; ++l)
if(pData[n].ppPredecessors[l] == &pData[k])
goto got_it;
pData[n].ppPredecessors[pData[n].nPredecessors]=&pData[k];
++pData[n].nPredecessors;
got_it:
break;
}
for(i=0 ; pItems[n].aszSuccessors && pItems[n].aszSuccessors[i] ; ++i)
for(k=0 ; k < nItems ; ++k)
if(!strcmp(pItems[k].szName,pItems[n].aszSuccessors[i]))
{
int l;
for(l=0 ; l < pData[k].nPredecessors ; ++l)
if(pData[k].ppPredecessors[l] == &pData[n])
goto got_it2;
pData[k].ppPredecessors[pData[k].nPredecessors]=&pData[n];
++pData[k].nPredecessors;
got_it2:
break;
}
}
  
  return pData;
  }
  
  static TSort *tsort(TSort *pData,int nItems)
  {
  int nTotal;
  TSort *pHead=NULL;
  TSort *pTail=NULL;
  
  for(nTotal=0 ; nTotal < nItems ; ++nTotal)
{
int n,i,k;
  
for(n=0 ; ; ++n)
{
if(n == nItems)
assert(0);  // we have a loop...
if(!pData[n].pNext && !pData[n].nPredecessors)
break;
}
if(pTail)
pTail->pNext=&pData[n];
else
pHead=&pData[n];
pTail=&pData[n];
pTail->pNext=pTail; // fudge it so it looks linked
for(i=0 ; i < nItems ; ++i)
for(k=0 ; pData[i].ppPredecessors[k] ; ++k)
if(pData[i].ppPredecessors[k] == &pData[n])
{
--pData[i].nPredecessors;
break;
}
}
  pTail->pNext=NULL;// unfudge the tail
  return pHead;
  }
  
  static array_header *sort_hook(array_header *pHooks,const char *szName)
  {
  pool *p=ap_make_sub_pool(g_pHookPool);
  TSort *pSort;
  array_header *pNew;
  int n;
  
  pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts);
  tsort(pSort,pHooks->nelts);

cvs commit: apache-2.0/mpm/src/os/os2 iol_socket.c iol_socket.h Makefile.tmpl util_os2.c

1999-07-11 Thread bjh
bjh 99/07/11 07:49:07

  Modified:mpm/src  Configure
   mpm/src/main http_protocol.c
   mpm/src/os/os2 Makefile.tmpl util_os2.c
  Added:   mpm/src/modules/mpm/spmt_os2 .cvsignore Makefile.libdir
Makefile.tmpl scoreboard.h spmt_os2.c
   mpm/src/os/os2 iol_socket.c iol_socket.h
  Log:
  Make it all work on OS/2.
  Includes an OS/2 specific single process, multithreaded mpm.
  
  Revision  ChangesPath
  1.11  +6 -5  apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Configure 1999/07/10 18:20:16 1.10
  +++ Configure 1999/07/11 14:49:03 1.11
  @@ -341,11 +341,12 @@
OSDIR="os/os2"
DEF_WANTHSREGEX=yes
OS='EMX OS/2'
  - CFLAGS="$CFLAGS -DOS2 -Zbsd-signals -Zbin-files -Zcrtdll -DTCPIPV4 -g"
  - LDFLAGS="$LDFLAGS -Zexe -Zcrtdll"
  + CFLAGS="$CFLAGS -DOS2 -DTCPIPV4 -g -Zmt"
  + LDFLAGS="$LDFLAGS -Zexe -Zmtd -Zsysv-signals -Zbin-files"
LIBS="$LIBS -lsocket -lufc -lbsd"
DBM_LIB="-lgdbm"
SHELL=sh
  + DEF_MPM_METHOD=spmt_os2
;;
   *-hi-hiux)
OS='HI-UX'
  @@ -1717,13 +1718,13 @@
   ## Now create modules.c
   ##
   
  -$CAT > $awkfile < $awkfile <<'EOFM'
   BEGIN {
modules[n++] = "core"
pmodules[pn++] = "core"
   } 
  -/^Module/ { modules[n++] = \$2 ; pmodules[pn++] = \$2 } 
  -/^%Module/ { pmodules[pn++] = \$2 } 
  +/^Module/ { modules[n++] = $2 ; pmodules[pn++] = $2 } 
  +/^%Module/ { pmodules[pn++] = $2 } 
   END {
print "/*"
print " * modules.c --- automatically generated by Apache"
  
  
  
  1.10  +1 -1  apache-2.0/mpm/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_protocol.c   1999/07/07 15:31:58 1.9
  +++ http_protocol.c   1999/07/11 14:49:04 1.10
  @@ -1936,7 +1936,7 @@
   else
   o = IOBUFSIZE;
   
  -while ((n = read(fd, buf, o)) < 1 && 
  +while ((n = read(fd, buf, o)) < 0 && 
   (errno == EINTR || errno == EAGAIN) && 
   !ap_is_aborted(r->connection))
   continue;
  
  
  
  1.1  apache-2.0/mpm/src/modules/mpm/spmt_os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/mpm/src/modules/mpm/spmt_os2/Makefile.libdir
  
  Index: Makefile.libdir
  ===
  This is a place-holder which indicates to Configure that it shouldn't
  provide the default targets when building the Makefile in this directory.
  Instead it'll just prepend all the important variable definitions, and
  copy the Makefile.tmpl onto the end.
  
  
  
  1.1  apache-2.0/mpm/src/modules/mpm/spmt_os2/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  
  LIB=libspmt_os2.$(LIBEXT)
  
  OBJS=\
   spmt_os2.o
  
  all: lib
  
  lib: $(LIB)
  
  libspmt_os2.a: $(OBJS)
rm -f $@
ar cr $@ $(OBJS)
$(RANLIB) $@
  
  spmt_os2.dll: $(OBJS) spmt_os2.def
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS) $(LIBS_SHLIB)
emxbind -b -q -s -h0 -dspmt_os2.def $* && \
rm $*
  
  .SUFFIXES: .o .dll
  
  .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $<
  
  clean:
rm -f $(OBJS) $(OBJS_PIC) $(LIB)
  
  distclean: clean
-rm -f Makefile
  
  # We really don't expect end users to use this rule.  It works only with
  # gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
  # using it.
  depend:
cp Makefile.tmpl Makefile.tmpl.bak \
&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
&& gcc -MM $(INCLUDES) $(CFLAGS) *.c | sed -e "s%\(.\)%/\\1%g" 
>> Makefile.new \
&& sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
   -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
> Makefile.tmpl \
&& rm Makefile.new
  
  #Dependencies
  
  $(OBJS): Makefile
  
  # DO NOT REMOVE
  spmt_os2.o: spmt_os2.c $(INCDIR)/httpd.h \
   $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
   $(INCDIR)/ap_config_auto.h $(INCDIR)/os.h \
   $(INCDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
   $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
   $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
   $(INCDIR)/ap.h $(INCDIR)/apr.h \
   $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \
   $(INCDIR)/http_log.h $(INCDIR)/http_config.h \
   $(INCDIR)/ap_hooks.h $(INCDI

cvs commit: apache-2.0/mpm/src/modules/standard Makefile.tmpl

1999-07-11 Thread ben
ben 99/07/11 09:36:52

  Modified:mpm/src/ap Makefile.tmpl
   mpm/src/main Makefile.tmpl
   mpm/src/modules/standard Makefile.tmpl
  Log:
  make depend.
  
  Revision  ChangesPath
  1.7   +5 -0  apache-2.0/mpm/src/ap/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.tmpl 1999/07/11 13:27:23 1.6
  +++ Makefile.tmpl 1999/07/11 16:36:50 1.7
  @@ -58,6 +58,11 @@
   ap_getpass.o: ap_getpass.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \
$(INCDIR)/ap_ctype.h $(INCDIR)/ap.h $(INCDIR)/apr.h
  +ap_hooks.o: ap_hooks.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
  + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
  + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \
  + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  + $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/ap_hooks.h
   ap_md5c.o: ap_md5c.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h $(OSDIR)/os-inline.c \
$(INCDIR)/ap_ctype.h $(INCDIR)/ap_md5.h $(INCDIR)/ap.h \
  
  
  
  1.12  +8 -1  apache-2.0/mpm/src/main/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/Makefile.tmpl,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile.tmpl 1999/07/06 21:32:09 1.11
  +++ Makefile.tmpl 1999/07/11 16:36:51 1.12
  @@ -64,7 +64,6 @@
$(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
$(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_log.h \
$(INCDIR)/ap_mpm.h
  -ap_hooks.o: ap_hooks.c
   buff.o: buff.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \
  @@ -154,6 +153,14 @@
$(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
$(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
$(INCDIR)/ap_hooks.h $(INCDIR)/ap_listen.h $(INCDIR)/http_log.h
  +mpm_prefork.o: mpm_prefork.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
  + $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
  + $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \
  + $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  + $(INCDIR)/apr.h $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \
  + $(INCDIR)/http_log.h $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
  + $(INCDIR)/http_core.h $(INCDIR)/http_connection.h \
  + $(INCDIR)/scoreboard_prefork.h
   rfc1413.o: rfc1413.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h $(INCDIR)/alloc.h \
  
  
  
  1.6   +5 -3  apache-2.0/mpm/src/modules/standard/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/Makefile.tmpl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.tmpl 1999/07/06 21:32:18 1.5
  +++ Makefile.tmpl 1999/07/11 16:36:51 1.6
  @@ -29,7 +29,8 @@
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
$(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
$(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  - $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h
  + $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
  + $(INCDIR)/http_request.h
   mod_asis.o: mod_asis.c $(INCDIR)/httpd.h $(INCDIR)/ap_config.h \
$(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h \
$(OSDIR)/os.h $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
  @@ -266,7 +267,7 @@
$(INCDIR)/http_core.h $(INCDIR)/http_protocol.h \
$(INCDIR)/http_conf_globals.h $(INCDIR)/http_main.h \
$(INCDIR)/util_script.h $(INCDIR)/scoreboard.h \
  - /usr/include/pthread.h $(INCDIR)/http_log.h
  + $(INCDIR)/http_log.h
   mod_unique_id.o: mod_unique_id.c $(INCDIR)/httpd.h \
$(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
  @@ -281,7 +282,8 @@
$(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
$(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
$(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  - $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h
  + $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
  + $(INCDIR)/http_request.h
   mod_usertrack.o: mod_usertrack.c $(INCDIR)/httpd.h \
$(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
  
  
  


cvs commit: apache-2.0/mpm/src/main http_config.c http_connection.c http_protocol.c http_request.c

1999-07-11 Thread ben
ben 99/07/11 09:42:25

  Modified:mpm/src/include ap_hooks.h
   mpm/src/main http_config.c http_connection.c http_protocol.c
http_request.c
  Log:
  Make run_all symbolic.
  
  Revision  ChangesPath
  1.6   +3 -0  apache-2.0/mpm/src/include/ap_hooks.h
  
  Index: ap_hooks.h
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ap_hooks.h1999/07/11 13:27:24 1.5
  +++ ap_hooks.h1999/07/11 16:42:23 1.6
  @@ -56,6 +56,9 @@
   return rv_final; \
   }
   
  +#define RUN_ALL  1
  +#define RUN_TO_FIRST_ERROR   0
  +
   #define IMPLEMENT_HOOK(ret,name,args,args2,run_all,ok,decline) \
IMPLEMENT_HOOK_BASE(ret,ret r_;,r_=,r_,name,args,args2,run_all,r_ != 
decline,r_ != ok,run_all ? ok : decline)
   #define IMPLEMENT_VOID_HOOK(name,args,args2,run_all) \
  
  
  
  1.9   +1 -1  apache-2.0/mpm/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http_config.c 1999/07/11 13:27:25 1.8
  +++ http_config.c 1999/07/11 16:42:23 1.9
  @@ -389,7 +389,7 @@
   return run_method(r, offsets_into_method_ptrs.logger, 1);
   }
   
  -IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),1,OK,DECLINED)
  +IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED)
   
   /* Auth stuff --- anything that defines one of these will presumably
* want to define something for the other.  Note that check_auth is
  
  
  
  1.10  +1 -1  apache-2.0/mpm/src/main/http_connection.c
  
  Index: http_connection.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_connection.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_connection.c 1999/07/07 15:31:58 1.9
  +++ http_connection.c 1999/07/11 16:42:24 1.10
  @@ -68,7 +68,7 @@
HOOK_LINK(pre_connection)
   );
   
  -IMPLEMENT_VOID_HOOK(pre_connection,(conn_rec *c),(c),1)
  +IMPLEMENT_VOID_HOOK(pre_connection,(conn_rec *c),(c),RUN_ALL)
   
   /* TODO: re-implement the lingering close stuff */
   #define NO_LINGCLOSE
  
  
  
  1.11  +1 -1  apache-2.0/mpm/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- http_protocol.c   1999/07/11 14:49:04 1.10
  +++ http_protocol.c   1999/07/11 16:42:24 1.11
  @@ -2688,4 +2688,4 @@
   ap_finalize_request_protocol(r);
   }
   
  -IMPLEMENT_HOOK(int,post_read_request,(request_rec *r),(r),1,OK,DECLINED)
  +IMPLEMENT_HOOK(int,post_read_request,(request_rec 
*r),(r),RUN_ALL,OK,DECLINED)
  
  
  
  1.9   +2 -1  apache-2.0/mpm/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http_request.c1999/07/11 13:27:25 1.8
  +++ http_request.c1999/07/11 16:42:24 1.9
  @@ -82,7 +82,8 @@
HOOK_LINK(translate_name)
   )
   
  -IMPLEMENT_HOOK(int,translate_name,(request_rec *r),(r),0,OK,DECLINED)
  +IMPLEMENT_HOOK(int,translate_name,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK,
  +DECLINED)
   
   /*
*
  
  
  


cvs commit: apache-2.0/mpm/src/modules/standard mod_alias.c mod_setenvif.c mod_userdir.c

1999-07-11 Thread ben
ben 99/07/11 09:54:10

  Modified:mpm/src/ap ap_hooks.c
   mpm/src/include ap_hooks.h
   mpm/src/main http_core.c
   mpm/src/modules/standard mod_alias.c mod_setenvif.c
mod_userdir.c
  Log:
  Add non-topological ordering for hooks.
  
  Revision  ChangesPath
  1.2   +10 -0 apache-2.0/mpm/src/ap/ap_hooks.c
  
  Index: ap_hooks.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/ap/ap_hooks.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_hooks.c1999/07/11 13:27:23 1.1
  +++ ap_hooks.c1999/07/11 16:54:00 1.2
  @@ -13,6 +13,7 @@
   const char *szName;
   const char * const *aszPredecessors;
   const char * const *aszSuccessors;
  +int nOrder;
   } TSortData;
   
   typedef struct tsort_
  @@ -23,11 +24,20 @@
   struct tsort_ *pNext;
   } TSort;
   
  +static int crude_order(const void *a_,const void *b_)
  +{
  +const TSortData *a=a_;
  +const TSortData *b=b_;
  +
  +return a->nOrder-b->nOrder;
  +}
  +
   static TSort *prepare(pool *p,TSortData *pItems,int nItems)
   {
   TSort *pData=ap_palloc(p,nItems*sizeof *pData);
   int n;
   
  +qsort(pItems,nItems,sizeof *pItems,crude_order);
   for(n=0 ; n < nItems ; ++n)
{
pData[n].nPredecessors=0;
  
  
  
  1.7   +13 -2 apache-2.0/mpm/src/include/ap_hooks.h
  
  Index: ap_hooks.h
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/ap_hooks.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ap_hooks.h1999/07/11 16:42:23 1.6
  +++ ap_hooks.h1999/07/11 16:54:02 1.7
  @@ -3,7 +3,8 @@
   
   #define DECLARE_HOOK(ret,name,args) \
   typedef ret HOOK_##name args; \
  -void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre,const char * 
const *aszSucc); \
  +void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre, \
  + const char * const *aszSucc,int nOrder); \
   ret ap_run_##name args; \
   typedef struct _LINK_##name \
   { \
  @@ -11,6 +12,7 @@
   const char *szName; \
   const char * const *aszPredecessors; \
   const char * const *aszSuccessors; \
  +int nOrder; \
   } LINK_##name;
   
   #define HOOK_STRUCT(members) \
  @@ -20,7 +22,8 @@
   array_header *link_##name;
   
   #define 
IMPLEMENT_HOOK_BASE(ret,rv_decl,sv,rv,name,args,args2,run_all,term1,term2,rv_final)
 \
  -void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre,const char * 
const *aszSucc) \
  +void ap_hook_##name(HOOK_##name *pf,const char * const *aszPre, \
  + const char * const *aszSucc,int nOrder) \
   { \
   LINK_##name *pHook; \
   if(!_hooks.link_##name) \
  @@ -32,6 +35,7 @@
   pHook->pFunc=pf; \
   pHook->aszPredecessors=aszPre; \
   pHook->aszSuccessors=aszSucc; \
  +pHook->nOrder=nOrder; \
   pHook->szName=g_szCurrentHookName; \
   if(g_bDebugHooks) \
ap_show_hook(#name,aszPre,aszSucc); \
  @@ -63,6 +67,13 @@
IMPLEMENT_HOOK_BASE(ret,ret r_;,r_=,r_,name,args,args2,run_all,r_ != 
decline,r_ != ok,run_all ? ok : decline)
   #define IMPLEMENT_VOID_HOOK(name,args,args2,run_all) \
IMPLEMENT_HOOK_BASE(voidname,args,args2,run_all,1,0,)
  +
  + /* Hook orderings */
  +#define HOOK_REALLY_FIRST(-10)
  +#define HOOK_FIRST   0
  +#define HOOK_MIDDLE  10
  +#define HOOK_LAST20
  +#define HOOK_REALLY_LAST 30
   
   extern pool *g_pHookPool;
   extern int g_bDebugHooks;
  
  
  
  1.5   +1 -1  apache-2.0/mpm/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- http_core.c   1999/07/11 13:27:25 1.4
  +++ http_core.c   1999/07/11 16:54:04 1.5
  @@ -2631,7 +2631,7 @@
   
   static void register_hooks()
   {
  -ap_hook_translate_name(core_translate,NULL,NULL);
  +ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST);
   }
   
   API_VAR_EXPORT module core_module = {
  
  
  
  1.5   +1 -1  apache-2.0/mpm/src/modules/standard/mod_alias.c
  
  Index: mod_alias.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_alias.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_alias.c   1999/07/11 13:27:28 1.4
  +++ mod_alias.c   1999/07/11 16:54:08 1.5
  @@ -399,7 +399,7 @@
   {
   static const char * const aszPre[]={ "mod_userdir.c",NULL };
   
  -ap_hook_translate_name(translate_alias_re

cvs commit: apache-2.0/mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c

1999-07-11 Thread ben
ben 99/07/11 12:00:57

  Modified:mpm/src/include http_config.h http_request.h
   mpm/src/main http_config.c http_core.c http_request.c
   mpm/src/modules/mpm/prefork prefork.c
   mpm/src/modules/standard mod_access.c mod_alias.c mod_asis.c
mod_auth.c mod_autoindex.c mod_dir.c mod_env.c
mod_imap.c mod_log_config.c mod_mime.c
mod_negotiation.c mod_setenvif.c mod_userdir.c
  Log:
  Another hook.
  
  Revision  ChangesPath
  1.7   +0 -1  apache-2.0/mpm/src/include/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- http_config.h 1999/07/11 13:27:24 1.6
  +++ http_config.h 1999/07/11 19:00:47 1.7
  @@ -240,7 +240,6 @@
* logger --- log a transaction.
*/
   
  -int (*ap_check_user_id) (request_rec *);
   int (*auth_checker) (request_rec *);
   int (*access_checker) (request_rec *);
   int (*type_checker) (request_rec *);
  
  
  
  1.3   +1 -0  apache-2.0/mpm/src/include/http_request.h
  
  Index: http_request.h
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_request.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- http_request.h1999/07/11 13:27:24 1.2
  +++ http_request.h1999/07/11 19:00:47 1.3
  @@ -114,6 +114,7 @@
   
 /* Hooks */
   DECLARE_HOOK(int,translate_name,(request_rec *))
  +DECLARE_HOOK(int,check_user_id,(request_rec *))
   
   #ifdef __cplusplus
   }
  
  
  
  1.10  +0 -8  apache-2.0/mpm/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_config.c 1999/07/11 16:42:23 1.9
  +++ http_config.c 1999/07/11 19:00:48 1.10
  @@ -237,7 +237,6 @@
   
   {
   #define m(meth)  { XtOffsetOf(module,meth),#meth }
  -m(ap_check_user_id),
   m(auth_checker),
   m(type_checker),
   m(fixer_upper),
  @@ -276,7 +275,6 @@
*/
   static const int method_offsets[] =
   {
  -XtOffsetOf(module, ap_check_user_id),
   XtOffsetOf(module, auth_checker),
   XtOffsetOf(module, access_checker),
   XtOffsetOf(module, type_checker),
  @@ -286,7 +284,6 @@
   #define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0]))
   
   static struct {
  -int ap_check_user_id;
   int auth_checker;
   int access_checker;
   int type_checker;
  @@ -395,11 +392,6 @@
* want to define something for the other.  Note that check_auth is
* separate from check_access to make catching some config errors easier.
*/
  -
  -int ap_check_user_id(request_rec *r)
  -{
  -return run_method(r, offsets_into_method_ptrs.ap_check_user_id, 0);
  -}
   
   int ap_check_auth(request_rec *r)
   {
  
  
  
  1.6   +0 -1  apache-2.0/mpm/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- http_core.c   1999/07/11 16:54:04 1.5
  +++ http_core.c   1999/07/11 19:00:48 1.6
  @@ -2647,7 +2647,6 @@
   merge_core_server_configs,   /* merge per-server config structures */
   core_cmds,   /* command table */
   core_handlers,   /* handlers */
  -NULL,/* check_user_id */
   NULL,/* check auth */
   do_nothing,  /* check access */
   do_nothing,  /* type_checker */
  
  
  
  1.10  +9 -6  apache-2.0/mpm/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_request.c1999/07/11 16:42:24 1.9
  +++ http_request.c1999/07/11 19:00:49 1.10
  @@ -80,10 +80,13 @@
   
   HOOK_STRUCT(
HOOK_LINK(translate_name)
  + HOOK_LINK(check_user_id)
   )
   
   IMPLEMENT_HOOK(int,translate_name,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK,
   DECLINED)
  +IMPLEMENT_HOOK(int,check_user_id,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK,
  +DECLINED)
   
   /*
*
  @@ -803,11 +806,11 @@
|| ap_satisfies(rnew) == SATISFY_NOSPEC)