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 Changes Path 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);