cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

1998-06-03 Thread rse
rse 98/06/03 05:12:12

  Modified:src  CHANGES
   src/modules/standard mod_rewrite.c
  Log:
  Fix recently introduced Win32 child spawning code in mod_rewrite.c which was
  broken because of invalid ap_pstrcat() - strcat() transformation.  I'm a
  little bit confused: Seems like no one has actually compiled Apache with all
  modules under Win32 just before Jim rolled the 1.3.0 tarball. Because else
  someone had received a compile error. Hmmm... I knew why I hates to put code
  into mod_rewrite I couldn't test myself... :-(
  
  Revision  ChangesPath
  1.882 +4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.881
  retrieving revision 1.882
  diff -u -r1.881 -r1.882
  --- CHANGES   1998/06/02 12:50:44 1.881
  +++ CHANGES   1998/06/03 12:12:10 1.882
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.1
   
  +  *) Fix recently introduced Win32 child spawning code in mod_rewrite.c which
  + was broken because of invalid ap_pstrcat() - strcat() transformation.
  + [Ralf S. Engelschall]
  +
 *) Proxy Cache Fixes: account for directory sizes, fork off garbage 
collection
to continue in background, use predefined types (off_t, size_t, time_t),
log the current cache usage percentage at LogLevel debug
  
  
  
  1.114 +2 -2  apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- mod_rewrite.c 1998/05/29 09:19:41 1.113
  +++ mod_rewrite.c 1998/06/03 12:12:11 1.114
  @@ -3190,11 +3190,11 @@
   #if defined(WIN32)
   /* MS Windows */
   {
  -char *pCommand;
  +char pCommand[MAX_STRING_LEN];
   STARTUPINFO si;
   PROCESS_INFORMATION pi;
   
  -pCommand = strcat(SHELL_PATH,  /C , cmd, NULL);
  +sprintf(pCommand, %s /C %s, SHELL_PATH, cmd);
   
   memset(si, 0, sizeof(si));
   memset(pi, 0, sizeof(pi));
  
  
  


cvs commit: apache-1.3/src/include conf.h

1998-06-03 Thread dgaudet
dgaudet 98/06/03 10:54:46

  Modified:src  PORTING
   src/include conf.h
  Log:
  explain NET_SIZE_T and why it is a mess
  
  Revision  ChangesPath
  1.29  +2 -1  apache-1.3/src/PORTING
  
  Index: PORTING
  ===
  RCS file: /export/home/cvs/apache-1.3/src/PORTING,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- PORTING   1998/05/09 03:25:41 1.28
  +++ PORTING   1998/06/03 17:54:45 1.29
  @@ -338,7 +338,8 @@
 NET_SIZE_T:
  Some functions such as accept(), getsockname(), getpeername() take
  an int *len on some architectures and a size_t *len on others.
  -   If left undefined apache will default it to int.
  +   If left undefined apache will default it to int.  See include/conf.h
  +   for a description of NET_SIZE_T.
   
 NEED_HASHBANG_EMUL:
  The execve()/etc. functions on this platform do not deal with #!,
  
  
  
  1.213 +19 -2 apache-1.3/src/include/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/conf.h,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- conf.h1998/05/29 00:15:56 1.212
  +++ conf.h1998/06/03 17:54:45 1.213
  @@ -1066,8 +1066,25 @@
   #define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
   #endif
   
  -/* some architectures require size_t * pointers where others require int *
  - * pointers in functions such as accept(), getsockname(), getpeername()
  +/*
  + * NET_SIZE_T exists because of shortsightedness on the POSIX committee.  BSD
  + * systems used int * as the parameter to accept(), getsockname(),
  + * getpeername() et al.  Consequently many unixes took an int * for that
  + * parameter.  The POSIX committee decided that int was just too generic 
and
  + * had to be replaced with size_t almost everywhere.  There's no problem with
  + * that when you're passing by value.  But when you're passing by reference
  + * this creates a gross source incompatibility with existing programs.  On
  + * 32-bit architectures it creates only a warning.  On 64-bit architectures 
it
  + * creates broken code -- because int * is a pointer to a 64-bit quantity 
and
  + * size_t * is frequently a pointer to a 32-bit quantity.
  + *
  + * Some Unixes adopted size_t * for the sake of POSIX compliance.  Others
  + * ignored it because it was such a broken interface.  Chaos ensued.  POSIX
  + * finally woke up and decided that it was wrong and created a new type
  + * socklen_t.  The only useful value for socklen_t is int, and that's how
  + * everyone who has a clue implements it.  It is almost always the case that
  + * NET_SIZE_T should be defined to be an int, unless the system being 
compiled
  + * for was created in the window of POSIX madness.
*/
   #ifndef NET_SIZE_T
   #define NET_SIZE_T int