]> granicus.if.org Git - apache/commitdiff
Some minor fixes to provide protos and build with Watcom.
authorGuenter Knauf <fuankg@apache.org>
Wed, 20 Oct 2010 10:57:28 +0000 (10:57 +0000)
committerGuenter Knauf <fuankg@apache.org>
Wed, 20 Oct 2010 10:57:28 +0000 (10:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025492 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/child.c
server/mpm/winnt/mpm_winnt.c
server/mpm/winnt/service.c

index dd3a15d1dc5a0faeaef4347c68be0f10d90c4c5a..ba52526276eb7a6ddc8a26e1f219a2491abc5fe9 100644 (file)
@@ -41,6 +41,8 @@
 #include "apr_buckets.h"
 #include "scoreboard.h"
 
+#include <process.h>
+
 #ifdef __MINGW32__
 #include <mswsock.h>
 #endif 
index 197b3c77b70d1932c511385f77c3fa714e36ddc4..81e7dee1fd724475757f3f984311fdb5e3de547a 100644 (file)
@@ -30,6 +30,7 @@
 #include "apr_shm.h"
 #include "apr_thread_mutex.h"
 #include "ap_mpm.h"
+#include "apr_general.h"
 #include "ap_config.h"
 #include "ap_listen.h"
 #include "mpm_default.h"
 #include "apr_atomic.h"
 #include "scoreboard.h"
 
+#ifdef __WATCOMC__
+#define _environ environ
+#endif
+
 /* scoreboard.c does the heavy lifting; all we do is create the child
  * score by moving a handle down the pipe into the child's stdin.
  */
@@ -51,8 +56,6 @@ static volatile ap_generation_t my_generation=0;
 static HANDLE shutdown_event;  /* used to signal the parent to shutdown */
 static HANDLE restart_event;   /* used to signal the parent to restart */
 
-static char ap_coredump_dir[MAX_STRING_LEN];
-
 static int one_process = 0;
 static char const* signal_arg = NULL;
 
@@ -956,7 +959,7 @@ static apr_status_t service_set = SERVICE_UNSET;
 static apr_status_t service_to_start_success;
 static int inst_argc;
 static const char * const *inst_argv;
-static char *service_name = NULL;
+static const char *service_name = NULL;
 
 void winnt_rewrite_args(process_rec *process)
 {
@@ -979,7 +982,7 @@ void winnt_rewrite_args(process_rec *process)
     char *def_server_root;
     char *binpath;
     char optbuf[3];
-    const char *optarg;
+    const char *opt_arg;
     int fixed_args;
     char *pid;
     apr_getopt_t *opt;
@@ -1109,10 +1112,10 @@ void winnt_rewrite_args(process_rec *process)
 
     optbuf[0] = '-';
     optbuf[2] = '\0';
-    apr_getopt_init(&opt, process->pool, process->argc, (char**) process->argv);
+    apr_getopt_init(&opt, process->pool, process->argc, process->argv);
     opt->errfn = NULL;
     while ((rv = apr_getopt(opt, "wn:k:" AP_SERVER_BASEARGS,
-                            optbuf + 1, &optarg)) == APR_SUCCESS) {
+                            optbuf + 1, &opt_arg)) == APR_SUCCESS) {
         switch (optbuf[1]) {
 
         /* Shortcuts; include the -w option to hold the window open on error.
@@ -1125,11 +1128,11 @@ void winnt_rewrite_args(process_rec *process)
 
         case 'n':
             service_set = mpm_service_set_name(process->pool, &service_name,
-                                               optarg);
+                                               opt_arg);
             break;
 
         case 'k':
-            signal_arg = optarg;
+            signal_arg = opt_arg;
             break;
 
         case 'E':
@@ -1139,8 +1142,8 @@ void winnt_rewrite_args(process_rec *process)
             *(const char **)apr_array_push(mpm_new_argv) =
                 apr_pstrdup(process->pool, optbuf);
 
-            if (optarg) {
-                *(const char **)apr_array_push(mpm_new_argv) = optarg;
+            if (opt_arg) {
+                *(const char **)apr_array_push(mpm_new_argv) = opt_arg;
             }
             break;
         }
@@ -1190,7 +1193,7 @@ void winnt_rewrite_args(process_rec *process)
          * after logging begins, and the failure can land in the log.
          */
         if (!errout) {
-            mpm_nt_eventlog_stderr_open(service_name, process->pool);
+            mpm_nt_eventlog_stderr_open((char*)service_name, process->pool);
         }
         service_to_start_success = mpm_service_to_start(&service_name,
                                                         process->pool);
index a4ffd0400f272b62cdff057379f45a94ae880b76..8c19fcf5952dce8e34d00a109de5e5e114e3c7e2 100644 (file)
@@ -33,6 +33,7 @@
 #endif
 #undef _WINUSER_
 #include <winuser.h>
+#include <time.h>
 
 APLOG_USE_MODULE(mpm_winnt);
 
@@ -821,7 +822,7 @@ apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
                                const char * const * argv)
 {
     apr_status_t rv;
-    char **start_argv;
+    const char **start_argv;
     SC_HANDLE   schService;
     SC_HANDLE   schSCManager;