cvs commit: apache/src util_script.c

1996-12-26 Thread Randy Terbush
randy   96/12/26 09:36:24

  Modified:src   util_script.c
  Log:
  Attempt to make this more portable. Use _POSIX_ARG_MAX and include limits.h.
  
  Revision  ChangesPath
  1.33  +2 -2  apache/src/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apache/src/util_script.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -C3 -r1.32 -r1.33
  *** util_script.c 1996/12/24 19:27:19 1.32
  --- util_script.c 1996/12/26 17:36:23 1.33
  ***
  *** 60,66 
#include http_core.h  /* For document_root.  Sigh... */
#include http_request.h   /* for sub_req_lookup_uri() */
#include util_script.h
  ! 

/*
 * Various utility functions which are common to a whole lot of
  --- 60,66 
#include http_core.h  /* For document_root.  Sigh... */
#include http_request.h   /* for sub_req_lookup_uri() */
#include util_script.h
  ! #include limits.h

/*
 * Various utility functions which are common to a whole lot of
  ***
  *** 79,85 
char *t, *arg;
va_list args;

  ! if ((av = (char **)palloc(r-pool, ARG_MAX)) == NULL)
log_unixerr(malloc, NULL, failed to allocate memory for arg list, 
r-server);

av[0] = av0;
  --- 79,85 
char *t, *arg;
va_list args;

  ! if ((av = (char **)palloc(r-pool, _POSIX_ARG_MAX)) == NULL)
log_unixerr(malloc, NULL, failed to allocate memory for arg list, 
r-server);

av[0] = av0;
  
  
  


cvs commit: apache/src Configure util_script.c util_script.h

1996-12-26 Thread Randy Terbush
randy   96/12/26 11:07:10

  Modified:src   Configure util_script.c util_script.h
  Log:
  Revert to a more sane solution for ARG_MAX define in create_argv().
  Include a fixe to Configure which solves incompatibilty with 'awk'
  on Solaris and I suspect others. (-v was the culprit)
  
  Revision  ChangesPath
  1.59  +2 -2  apache/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache/src/Configure,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -C3 -r1.58 -r1.59
  *** Configure 1996/12/17 20:21:39 1.58
  --- Configure 1996/12/26 19:07:04 1.59
  ***
  *** 91,98 
#
# Add module set only
#
  ! awk -v make=$makefile_tmpl Makefile $tmpfile '\
  !BEGIN { printf # Makefile automatically generated from %s\n, make; \
   print # and configuration file by Apache config script. ; \
   print # Hand-edited changes will be lost if the config script; \
   print # is re-run.; \
  --- 91,98 
#
# Add module set only
#
  ! awk Makefile $tmpfile '\
  !BEGIN { printf # Makefile automatically generated from %s\n, 
$makefile_tmpl; \
   print # and configuration file by Apache config script. ; \
   print # Hand-edited changes will be lost if the config script; \
   print # is re-run.; \
  
  
  
  1.34  +1 -2  apache/src/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apache/src/util_script.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -C3 -r1.33 -r1.34
  *** util_script.c 1996/12/26 17:36:23 1.33
  --- util_script.c 1996/12/26 19:07:05 1.34
  ***
  *** 60,66 
#include http_core.h  /* For document_root.  Sigh... */
#include http_request.h   /* for sub_req_lookup_uri() */
#include util_script.h
  - #include limits.h

/*
 * Various utility functions which are common to a whole lot of
  --- 60,65 
  ***
  *** 79,85 
char *t, *arg;
va_list args;

  ! if ((av = (char **)palloc(r-pool, _POSIX_ARG_MAX)) == NULL)
log_unixerr(malloc, NULL, failed to allocate memory for arg list, 
r-server);

av[0] = av0;
  --- 78,84 
char *t, *arg;
va_list args;

  ! if ((av = (char **)palloc(r-pool, APACHE_ARG_MAX)) == NULL)
log_unixerr(malloc, NULL, failed to allocate memory for arg list, 
r-server);

av[0] = av0;
  
  
  
  1.12  +6 -0  apache/src/util_script.h
  
  Index: util_script.h
  ===
  RCS file: /export/home/cvs/apache/src/util_script.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -C3 -r1.11 -r1.12
  *** util_script.h 1996/12/24 18:23:18 1.11
  --- util_script.h 1996/12/26 19:07:06 1.12
  ***
  *** 50,55 
  --- 50,61 
 *
 */

  + #ifdef _POSIX_ARG_MAX
  + #define APACHE_ARG_MAX _POSIX_ARG_MAX
  + #else
  + #define APACHE_ARG_MAX 512
  + #endif
  + 
char **create_argv(request_rec *r, char *av0, ...);
#ifdef __EMX__
char **create_argv_cmd(pool *p, char *av0, const char *args, char *path);
  
  
  


cvs commit: apache/src Configure

1996-12-26 Thread Randy Terbush
randy   96/12/26 11:21:44

  Modified:src   Configure
  Log:
  Thinking in small steps today. Add the same error checking for -file
  
  Revision  ChangesPath
  1.61  +4 -0  apache/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache/src/Configure,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -C3 -r1.60 -r1.61
  *** Configure 1996/12/26 19:18:52 1.60
  --- Configure 1996/12/26 19:21:43 1.61
  ***
  *** 21,26 
  --- 21,30 
while [ x$1 != x ]; do
  if [ x$1 = x-file ] ; then
shift 1; file=$1; shift 1
  + if [ ! -r $file ]; then
  +   echo $file does not exist or is not readable.
  +   exit 1
  + fi
  elif [ x$1 = x-make ] ; then
shift 1; makefile_tmpl=$1; shift 1
if [ ! -r $makefile_tmpl ]; then