[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Improve mingw support

From: Paul Querna <chip_at_force-elite.com>
Date: 2006-07-15 12:50:19 CEST

This is a first swing at getting Subversion to build on Windows, using
only mingw.

Earlier today, APR's support for mingw was massively improved in trunk.
  It can now compile, and pass most of the test cases.

After this patch, Subversion will compile everything up to the test
programs (including the client and svnserve). The test program fails
when linking, with undefined references to the test_funcs. I believe
this is easy to correct, but might require changes to the Makefiles.

[[[
Improve the ability to compile under mingw32.

* libsvn_subr/cmdline.c,
   include/svn_client.h,
   libsvn_subr/simple_providers.c,
   libsvn_client/compat_providers.c: Remove support for the windows
      specific CryptProtectData for authentication. Mingw doesn't include
      the definitions for this in their headers.

* libsvn_subr/config_win.c: Define the minimum IE version to 5.0, since
      mingw32 doesn't seem to define this.

]]]

Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h (revision 20681)
+++ subversion/include/svn_client.h (working copy)
@@ -136,7 +136,7 @@
                                     apr_pool_t *pool);
 
 
-#if defined(WIN32) || defined(DOXYGEN)
+#if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
 /**
  * Create and return @a *provider, an authentication provider of type @c
  * svn_auth_cred_simple_t that gets/sets information from the user's
Index: subversion/libsvn_subr/cmdline.c
===================================================================
--- subversion/libsvn_subr/cmdline.c (revision 20681)
+++ subversion/libsvn_subr/cmdline.c (working copy)
@@ -350,7 +350,7 @@
 
   /* The main disk-caching auth providers, for both
      'username/password' creds and 'username' creds. */
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
   svn_auth_get_windows_simple_provider(&provider, pool);
   APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
 #endif
Index: subversion/libsvn_subr/config_win.c
===================================================================
--- subversion/libsvn_subr/config_win.c (revision 20681)
+++ subversion/libsvn_subr/config_win.c (working copy)
@@ -24,6 +24,13 @@
 
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
+
+#ifdef __MINGW32__
+# ifndef _WIN32_IE
+# define _WIN32_IE 0x0500
+# endif
+#endif
+
 #include <shlobj.h>
 
 #include <apr_file_info.h>
Index: subversion/libsvn_subr/simple_providers.c
===================================================================
--- subversion/libsvn_subr/simple_providers.c (revision 20681)
+++ subversion/libsvn_subr/simple_providers.c (working copy)
@@ -535,7 +535,7 @@
 /* Windows simple provider, encrypts the password on Win2k and later. */
 /*-----------------------------------------------------------------------*/
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 #include <wincrypt.h>
 #include <apr_base64.h>
 
Index: subversion/libsvn_client/compat_providers.c
===================================================================
--- subversion/libsvn_client/compat_providers.c (revision 20681)
+++ subversion/libsvn_client/compat_providers.c (working copy)
@@ -57,7 +57,7 @@
   svn_auth_get_simple_provider(provider, pool);
 }
 
-#if defined(WIN32)
+#if defined(WIN32) && !defined(__MINGW32__)
 void
 svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider,
                                        apr_pool_t *pool)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 15 12:50:34 2006

This is an archived mail posted to the Subversion Dev mailing list.