Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 10801 invoked by uid 6000); 6 Dec 1999 22:17:23 -0000 Received: (qmail 10506 invoked by uid 2016); 6 Dec 1999 22:17:15 -0000 Delivered-To: apcore-apache-1.3-cvs@apache.org Received: (qmail 10288 invoked by uid 177); 6 Dec 1999 22:17:08 -0000 Date: 6 Dec 1999 22:17:08 -0000 Message-ID: <19991206221708.10277.qmail@hyperreal.org> From: martin@hyperreal.org To: apache-1.3-cvs@apache.org Subject: cvs commit: apache-1.3/src/regex regcomp.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org martin 99/12/06 14:17:06 Modified: src CHANGES src/ap ap_execve.c src/include ap.h ap_config.h src/regex regcomp.c Log: Fix various compile time warnings in hashbang_emul code which prevent successful compilation on OS/390 Submitted by: Ovies Brabson Reviewed by: Martin Kraemer Revision Changes Path 1.1471 +6 -2 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1470 retrieving revision 1.1471 diff -u -r1.1470 -r1.1471 --- CHANGES 1999/12/06 12:41:35 1.1470 +++ CHANGES 1999/12/06 22:16:35 1.1471 @@ -1,5 +1,9 @@ Changes with Apache 1.3.10 + *) Fix various compile time warnings in hashbang_emul code which + prevent successful compilation on OS/390 + [Ovies Brabson ] + *) EBCDIC: Fixed binary upload capability (plain and chunked) for all methods using the ap_*_client_block() functions, most notably POST and PUT. The functionality to switch input between protocol @@ -27,8 +31,8 @@ PDF files could not be read by Acrobat Reader (which sends long lists of byte ranges in each request) when the server was apache on ebcdic machines. - [Noted by Oliver Reh , solved by - Martin Kraemer] + [Noted by Oliver Reh , solved by Martin + Kraemer, warnings fixed by Ovies Brabson ] *) Add IndexOptions FoldersFirst to allow fancy-indexed directory listings to have the subdirectories always listed at the top. 1.13 +10 -10 apache-1.3/src/ap/ap_execve.c Index: ap_execve.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/ap/ap_execve.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ap_execve.c 1999/03/07 13:51:19 1.12 +++ ap_execve.c 1999/12/06 22:16:50 1.13 @@ -99,7 +99,7 @@ #undef execle #undef execve -static const char **hashbang(const char *filename, char **argv); +static const char **hashbang(const char *filename, char * const *argv); /* Historically, a list of arguments on the stack was often treated as @@ -133,7 +133,7 @@ /* Pass two --- copy the argument strings into the result space */ va_start(adummy, argv0); - argv[0] = argv0; + argv[0] = (char *)argv0; for (argc = 1; (argv[argc] = va_arg(adummy, char *)) != NULL; ++argc) { continue; } @@ -149,7 +149,7 @@ /* Count number of entries in vector "args", including the trailing NULL entry */ static int -count_args(const char **args) +count_args(char * const *args) { int i; for (i = 0; args[i] != NULL; ++i) { @@ -163,14 +163,14 @@ * We have to fiddle with the argv array to make it work on platforms * which don't support the "hashbang" interpreter line by default. */ -int ap_execve(const char *filename, const char *argv[], - const char *envp[]) +int ap_execve(const char *filename, char * const argv[], + char * const envp[]) { - const char **script_argv; + char **script_argv; extern char **environ; if (envp == NULL) { - envp = (const char **) environ; + envp = (char * const *) environ; } /* Try to execute the file directly first: */ @@ -201,7 +201,7 @@ * Interpret the line following the #! as a command line * in shell style. */ - if ((script_argv = hashbang(filename, argv)) != NULL) { + if ((script_argv = (char **)hashbang(filename, argv)) != NULL) { /* new filename is the interpreter to call */ filename = script_argv[0]; @@ -257,7 +257,7 @@ */ #define HACKBUFSZ 1024 /* Max chars in #! vector */ #define HACKVECSZ 128 /* Max words in #! vector */ -static const char **hashbang(const char *filename, char **argv) +static const char **hashbang(const char *filename, char * const *argv) { char lbuf[HACKBUFSZ]; char *sargv[HACKVECSZ]; @@ -347,7 +347,7 @@ } ++i; - newargv = (char **) malloc((p - lbuf + 1) + newargv = (const char **) malloc((p - lbuf + 1) + (i + sargc + 1) * sizeof(*newargv)); if (newargv == NULL) { fprintf(stderr, "Ouch! Out of memory in hashbang()!\n"); 1.26 +1 -1 apache-1.3/src/include/ap.h Index: ap.h =================================================================== RCS file: /export/home/cvs/apache-1.3/src/include/ap.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- ap.h 1999/10/11 23:04:13 1.25 +++ ap.h 1999/12/06 22:16:58 1.26 @@ -68,7 +68,7 @@ API_EXPORT(char *) ap_cpystrn(char *, const char *, size_t); int ap_slack(int, int); int ap_execle(const char *, const char *, ...); -int ap_execve(const char *, const char *argv[], const char *envp[]); +int ap_execve(const char *, char * const argv[], char * const envp[]); API_EXPORT(int) ap_getpass(const char *prompt, char *pwbuf, size_t bufsiz); /* small utility macros to make things easier to read */ 1.276 +2 -2 apache-1.3/src/include/ap_config.h Index: ap_config.h =================================================================== RCS file: /export/home/cvs/apache-1.3/src/include/ap_config.h,v retrieving revision 1.275 retrieving revision 1.276 diff -u -r1.275 -r1.276 --- ap_config.h 1999/12/04 02:50:43 1.275 +++ ap_config.h 1999/12/06 22:16:59 1.276 @@ -1244,8 +1244,8 @@ */ #ifdef NEED_HASHBANG_EMUL extern int ap_execle(const char *filename, const char *arg,...); -extern int ap_execve(const char *filename, const char *argv[], - const char *envp[]); +extern int ap_execve(const char *filename, char * const argv[], + char * const envp[]); /* ap_execle() is a wrapper function around ap_execve(). */ #define execle ap_execle #define execve(path,argv,envp) ap_execve(path,argv,envp) 1.11 +1 -1 apache-1.3/src/regex/regcomp.c Index: regcomp.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/regex/regcomp.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- regcomp.c 1999/11/24 22:31:08 1.10 +++ regcomp.c 1999/12/06 22:17:03 1.11 @@ -116,7 +116,7 @@ for (idx=0; idx < sizeof(cclasses) / sizeof(cclasses[0]); ++idx) { if (strcmp(cclasses[idx].name, "cntrl") == 0) { - cclasses[idx].chars = ctlchars_ebcdic; + cclasses[idx].chars = (char *)ctlchars_ebcdic; break; } }