httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <v.j.orlikow...@gte.net>
Subject [PATCH] Compiler cleanups from apr_initopt/apr_getopt
Date Wed, 09 Aug 2000 19:26:24 GMT
apr_initopt/apr_getopt expect argv to be const char* const*
This breaks the build with xlC in a couple of places.

Index: src/main/http_main.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/main/http_main.c,v
retrieving revision 1.64
diff -u -r1.64 http_main.c
--- http_main.c	2000/08/09 14:56:55	1.64
+++ http_main.c	2000/08/09 19:16:15
@@ -293,7 +293,7 @@
     const char *optarg;
 
     apr_initialize();
-    process = create_process(argc, (char *const *)argv);
+    process = create_process(argc, argv);
     pglobal = process->pool;
     pconf = process->pconf;
     ap_server_argv0 = process->short_name;
@@ -318,7 +318,7 @@
     /* Maintain AP_SERVER_BASEARGS list in http_main.h to allow the MPM 
      * to safely pass on our args from its rewrite_args() handler.
      */
-    apr_initopt(&opt, pcommands, process->argc, process->argv);
+    apr_initopt(&opt, pcommands, process->argc, (const char* const*)process->argv);
 
     while (apr_getopt(opt, AP_SERVER_BASEARGS, &c, &optarg) 
             == APR_SUCCESS) {
Index: src/support/ab.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/support/ab.c,v
retrieving revision 1.25
diff -u -r1.25 ab.c
--- ab.c	2000/08/09 15:01:59	1.25
+++ ab.c	2000/08/09 19:16:18
@@ -1007,8 +1007,8 @@
     }
 #endif
 
-    apr_initopt(&opt, cntxt, argc, argv);
-    while ((status = apr_getopt(opt, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:", &c, &optarg))
== APR_SUCCESS) {
+    apr_initopt(&opt, cntxt, argc, (const char* const*) argv);
+    while ((status = apr_getopt(opt, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:", &c, (const char**)
&optarg)) == APR_SUCCESS) {
         switch (c) {
         case 'n':
             requests = atoi(optarg);

-- 
Victor J. Orlikowski		v.j.orlikowski@gte.net
				vjo@raleigh.ibm.com
				vjo@us.ibm.com


Mime
View raw message