You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2011/03/22 20:49:19 UTC

svn commit: r1084323 - in /apr/apr/branches/1.4.x: include/apr_thread_proc.h include/arch/win32/apr_arch_file_io.h misc/win32/internal.c misc/win32/misc.c misc/win32/rand.c poll/unix/pollset.c time/win32/timestr.c

Author: trawick
Date: Tue Mar 22 19:49:19 2011
New Revision: 1084323

URL: http://svn.apache.org/viewvc?rev=1084323&view=rev
Log:
grab some Windows/MinGW code tweaks from trunk for quieter gcc builds

time/win32/timestr.c:                  all  of r892188
include/arch/win32/apr_arch_file_io.h: part of r892386
misc/win32/rand.c:                     all  of r892426
misc/win32/misc.c:                     part of r892177
misc/win32/internal.c:                 all  of r892390
poll/unix/pollset.c:                   part of r892386

Modified:
    apr/apr/branches/1.4.x/include/apr_thread_proc.h
    apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h
    apr/apr/branches/1.4.x/misc/win32/internal.c
    apr/apr/branches/1.4.x/misc/win32/misc.c
    apr/apr/branches/1.4.x/misc/win32/rand.c
    apr/apr/branches/1.4.x/poll/unix/pollset.c
    apr/apr/branches/1.4.x/time/win32/timestr.c

Modified: apr/apr/branches/1.4.x/include/apr_thread_proc.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/apr_thread_proc.h?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/apr_thread_proc.h (original)
+++ apr/apr/branches/1.4.x/include/apr_thread_proc.h Tue Mar 22 19:49:19 2011
@@ -775,7 +775,9 @@ APR_DECLARE(apr_status_t) apr_proc_kill(
  * @param proc The process to register
  * @param how How to kill the process, one of:
  * <PRE>
- *         APR_KILL_NEVER         -- process is never sent any signals
+ *         APR_KILL_NEVER         -- process is never sent any signals; it is
+ *                                   reaped if it has exited before the pool is
+ *                                   cleaned up
  *         APR_KILL_ALWAYS        -- process is sent SIGKILL on apr_pool_t cleanup
  *         APR_KILL_AFTER_TIMEOUT -- SIGTERM, wait 3 seconds, SIGKILL
  *         APR_JUST_WAIT          -- wait forever for the process to complete

Modified: apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h (original)
+++ apr/apr/branches/1.4.x/include/arch/win32/apr_arch_file_io.h Tue Mar 22 19:49:19 2011
@@ -252,4 +252,12 @@ apr_status_t filepath_root_case(char **r
 
 apr_status_t file_cleanup(void *);
 
+extern apr_status_t
+apr_file_socket_pipe_create(apr_file_t **in,
+                            apr_file_t **out,
+                            apr_pool_t *p);
+
+extern apr_status_t
+apr_file_socket_pipe_close(apr_file_t *file);
+
 #endif  /* ! FILE_IO_H */

Modified: apr/apr/branches/1.4.x/misc/win32/internal.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/misc/win32/internal.c?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/misc/win32/internal.c (original)
+++ apr/apr/branches/1.4.x/misc/win32/internal.c Tue Mar 22 19:49:19 2011
@@ -96,6 +96,6 @@ int apr_wastrtoastr(char const * const *
         }
     }
 
-    *retarr = newarr;
+    *retarr = (char const * const *)newarr;
     return args;
 }

Modified: apr/apr/branches/1.4.x/misc/win32/misc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/misc/win32/misc.c?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/misc/win32/misc.c (original)
+++ apr/apr/branches/1.4.x/misc/win32/misc.c Tue Mar 22 19:49:19 2011
@@ -17,6 +17,7 @@
 #include "apr_private.h"
 #include "apr_arch_misc.h"
 #include "apr_arch_file_io.h"
+#include "apr_dbg_win32_handles.h"
 #include "assert.h"
 #include "apr_lib.h"
 #include "tchar.h"
@@ -35,7 +36,7 @@ apr_status_t apr_get_oslevel(apr_oslevel
         {
             static unsigned int servpack = 0;
             TCHAR *pservpack;
-            if (pservpack = oslev.szCSDVersion) {
+            if ((pservpack = oslev.szCSDVersion)) {
                 while (*pservpack && !apr_isdigit(*pservpack)) {
                     pservpack++;
                 }
@@ -213,8 +214,8 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(c
         sbuf[1023] = '\0';
         if (!fh) {
             (GetModuleFileNameA)(NULL, sbuf, 250);
-            sprintf(strchr(sbuf, '\0'), ".%d",
-                    (GetCurrentProcessId)());
+            sprintf(strchr(sbuf, '\0'), ".%u",
+                    (unsigned int)(GetCurrentProcessId)());
             fh = (CreateFileA)(sbuf, GENERIC_WRITE, 0, NULL, 
                             CREATE_ALWAYS, 0, NULL);
             (InitializeCriticalSection)(&cs);
@@ -223,7 +224,8 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(c
 
     if (!nh) {
         (sprintf)(sbuf, "%p %08x %08x %s() %s:%d\n",
-                  ha, seq, GetCurrentThreadId(), fn, fl, ln);
+                  ha, (unsigned int)seq, (unsigned int)GetCurrentThreadId(),
+                  fn, fl, ln);
         (EnterCriticalSection)(&cs);
         (WriteFile)(fh, sbuf, (DWORD)strlen(sbuf), &wrote, NULL);
         (LeaveCriticalSection)(&cs);
@@ -250,7 +252,8 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(c
                 }
             }
             (sprintf)(sbuf, "%p %08x %08x %s(%s) %s:%d\n",
-                      *hv, seq, GetCurrentThreadId(), 
+                      *hv, (unsigned int)seq,
+                      (unsigned int)GetCurrentThreadId(), 
                       fn, dsc, fl, ln);
             (WriteFile)(fh, sbuf, (DWORD)strlen(sbuf), &wrote, NULL);
         } while (--nh);

Modified: apr/apr/branches/1.4.x/misc/win32/rand.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/misc/win32/rand.c?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/misc/win32/rand.c (original)
+++ apr/apr/branches/1.4.x/misc/win32/rand.c Tue Mar 22 19:49:19 2011
@@ -15,6 +15,7 @@
  */
 
 #include "apr.h"
+#include <rpc.h>
 #include <wincrypt.h>
 #include "apr_private.h"
 #include "apr_general.h"

Modified: apr/apr/branches/1.4.x/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/poll/unix/pollset.c?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/poll/unix/pollset.c (original)
+++ apr/apr/branches/1.4.x/poll/unix/pollset.c Tue Mar 22 19:49:19 2011
@@ -33,14 +33,6 @@ static apr_pollset_method_e pollset_defa
 #if !APR_FILES_AS_SOCKETS
 #if defined (WIN32)
 
-extern apr_status_t
-apr_file_socket_pipe_create(apr_file_t **in,
-                            apr_file_t **out,
-                            apr_pool_t *p);
-
-extern apr_status_t
-apr_file_socket_pipe_close(apr_file_t *file);
-
 /* Create a dummy wakeup socket pipe for interrupting the poller
  */
 static apr_status_t create_wakeup_pipe(apr_pollset_t *pollset)

Modified: apr/apr/branches/1.4.x/time/win32/timestr.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/time/win32/timestr.c?rev=1084323&r1=1084322&r2=1084323&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/time/win32/timestr.c (original)
+++ apr/apr/branches/1.4.x/time/win32/timestr.c Tue Mar 22 19:49:19 2011
@@ -18,6 +18,10 @@
 #include "apr_portable.h"
 #include "apr_strings.h"
 
+#if APR_HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
 APR_DECLARE_DATA const char apr_month_snames[12][4] =
 {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"