You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@locus.apache.org on 2000/03/14 21:14:50 UTC

cvs commit: apache-2.0/src/lib/apr/lib apr_execve.c

jim         00/03/14 12:14:50

  Modified:    src/lib/apr/lib apr_execve.c
  Log:
  More backporting... this of the compile-time
  warnings for OS/390
  
  Revision  Changes    Path
  1.7       +10 -10    apache-2.0/src/lib/apr/lib/apr_execve.c
  
  Index: apr_execve.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_execve.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_execve.c	2000/03/10 00:06:12	1.6
  +++ apr_execve.c	2000/03/14 20:14:49	1.7
  @@ -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
  @@ -132,7 +132,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.
    */
  -ap_status_t ap_execve(const char *filename, const char *argv[],
  -	      const char *envp[])
  +ap_status_t 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];
  @@ -256,7 +256,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];
  @@ -346,7 +346,7 @@
   	    }
   	    ++i;
   
  -	    newargv = (char **) malloc((p - lbuf + 1)
  +	    newargv = (const char **) malloc((p - lbuf + 1)
                         + (i + sargc + 1) * sizeof(*newargv));
   	    if (newargv == NULL) {
   		return NULL;