subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1405521 - /subversion/trunk/subversion/svndumpfilter/main.c
Date Sun, 04 Nov 2012 10:40:42 GMT
Author: stefan2
Date: Sun Nov  4 10:40:41 2012
New Revision: 1405521

URL: http://svn.apache.org/viewvc?rev=1405521&view=rev
Log:
Fix "invalid storage class" compiler warning under Windows.  APR_DECLARE
cannot be used here as it produces invalid code.  Under Unix, this macro
is simply a no-op.  So, we need to define our own platform-specific type
for the imported APR function.

* subversion/svndumpfilter/main.c
  (open_fn_t): new platform-specific function type
  (create_stdio_stream): use the above

Modified:
    subversion/trunk/subversion/svndumpfilter/main.c

Modified: subversion/trunk/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/main.c?rev=1405521&r1=1405520&r2=1405521&view=diff
==============================================================================
--- subversion/trunk/subversion/svndumpfilter/main.c (original)
+++ subversion/trunk/subversion/svndumpfilter/main.c Sun Nov  4 10:40:41 2012
@@ -45,7 +45,12 @@
 
 #include "private/svn_mergeinfo_private.h"
 
-
+#ifdef _WIN32
+typedef apr_status_t (__stdcall *open_fn_t)(apr_file_t **, apr_pool_t *);
+#else
+typedef apr_status_t (*open_fn_t)(apr_file_t **, apr_pool_t *);
+#endif
+
 /*** Code. ***/
 
 /* Helper to open stdio streams */
@@ -62,8 +67,7 @@
 */
 static svn_error_t *
 create_stdio_stream(svn_stream_t **stream,
-                    APR_DECLARE(apr_status_t) open_fn(apr_file_t **,
-                                                      apr_pool_t *),
+                    open_fn_t open_fn,
                     apr_pool_t *pool)
 {
   apr_file_t *stdio_file;



Mime
View raw message