apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1084310 - in /apr/apr/branches/1.5.x: 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
Date Tue, 22 Mar 2011 19:32:15 GMT
Author: trawick
Date: Tue Mar 22 19:32:14 2011
New Revision: 1084310

URL: http://svn.apache.org/viewvc?rev=1084310&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.5.x/include/arch/win32/apr_arch_file_io.h
    apr/apr/branches/1.5.x/misc/win32/internal.c
    apr/apr/branches/1.5.x/misc/win32/misc.c
    apr/apr/branches/1.5.x/misc/win32/rand.c
    apr/apr/branches/1.5.x/poll/unix/pollset.c
    apr/apr/branches/1.5.x/time/win32/timestr.c

Modified: apr/apr/branches/1.5.x/include/arch/win32/apr_arch_file_io.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/include/arch/win32/apr_arch_file_io.h?rev=1084310&r1=1084309&r2=1084310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/include/arch/win32/apr_arch_file_io.h (original)
+++ apr/apr/branches/1.5.x/include/arch/win32/apr_arch_file_io.h Tue Mar 22 19:32:14 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.5.x/misc/win32/internal.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/misc/win32/internal.c?rev=1084310&r1=1084309&r2=1084310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/misc/win32/internal.c (original)
+++ apr/apr/branches/1.5.x/misc/win32/internal.c Tue Mar 22 19:32:14 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.5.x/misc/win32/misc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/misc/win32/misc.c?rev=1084310&r1=1084309&r2=1084310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/misc/win32/misc.c (original)
+++ apr/apr/branches/1.5.x/misc/win32/misc.c Tue Mar 22 19:32:14 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.5.x/misc/win32/rand.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/misc/win32/rand.c?rev=1084310&r1=1084309&r2=1084310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/misc/win32/rand.c (original)
+++ apr/apr/branches/1.5.x/misc/win32/rand.c Tue Mar 22 19:32:14 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.5.x/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/poll/unix/pollset.c?rev=1084310&r1=1084309&r2=1084310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/poll/unix/pollset.c (original)
+++ apr/apr/branches/1.5.x/poll/unix/pollset.c Tue Mar 22 19:32:14 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.5.x/time/win32/timestr.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/time/win32/timestr.c?rev=1084310&r1=1084309&r2=1084310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/time/win32/timestr.c (original)
+++ apr/apr/branches/1.5.x/time/win32/timestr.c Tue Mar 22 19:32:14 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"



Mime
View raw message