You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Küng <to...@gmail.com> on 2007/11/23 18:59:03 UTC
[PATCH] IPv6 with no problems on Win2k and earlier
Hi,
A while ago I sent a patch to make Subversion compile with IPv6 support.
Now there's a small problem which appears when using the latest Vista
SDK instead of an earlier one:
With the Vista SDK, it is required to define _WIN32_WINNT to >= 0x0501
if IPv6 is needed. If the define is set to a lower Windows version, IPv6
won't work (and with VS2008 it won't even compile properly).
But setting that define to XP or later (>= 0x0501) breaks the
application when run on OS versions < XP (e.g., Win2k).
To make the application work on < XP and still have IPv6 support on >=
XP systems (or Win2k with the IPv6 preview pack - but I won't recommend
anyone installing it, believe me...), it's required to include the
Wspiapi.h header file, and the ws2tcpip.h header file from the SDK. This
will compile a stub function in for the IPv6 functions which call the
original functions on >= XP, but fall back to the old functions on < XP.
The attached patch fixes this problem.
Sorry about this: I haven't noticed this problem before because I didn't
use the Vista SDK but still the one which came with VS2005, and I
usually don't test things on Win2k anymore.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Re: [PATCH] IPv6 with no problems on Win2k and earlier
Posted by "D.J. Heap" <dj...@gmail.com>.
On Nov 26, 2007 1:49 PM, Daniel Rall <dl...@collab.net> wrote:
> Stefan's patch looks pretty harmless to me; some Googling around on
> MSDN also suggests it's fine, but I didn't run into confirmation of
> the problem below. Any Windows committers want to look at this one?
>
I've got it marked for followup, but I won't be able to look into it
for a while -- probably a week and a half or so at the earliest.
Hopefully someone can followup on it sooner.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] IPv6 with no problems on Win2k and earlier
Posted by Daniel Rall <dl...@collab.net>.
Stefan's patch looks pretty harmless to me; some Googling around on
MSDN also suggests it's fine, but I didn't run into confirmation of
the problem below. Any Windows committers want to look at this one?
On Fri, 23 Nov 2007, Stefan Küng wrote:
> Hi,
>
> A while ago I sent a patch to make Subversion compile with IPv6 support.
> Now there's a small problem which appears when using the latest Vista
> SDK instead of an earlier one:
>
> With the Vista SDK, it is required to define _WIN32_WINNT to >= 0x0501
> if IPv6 is needed. If the define is set to a lower Windows version, IPv6
> won't work (and with VS2008 it won't even compile properly).
> But setting that define to XP or later (>= 0x0501) breaks the
> application when run on OS versions < XP (e.g., Win2k).
>
> To make the application work on < XP and still have IPv6 support on >=
> XP systems (or Win2k with the IPv6 preview pack - but I won't recommend
> anyone installing it, believe me...), it's required to include the
> Wspiapi.h header file, and the ws2tcpip.h header file from the SDK. This
> will compile a stub function in for the IPv6 functions which call the
> original functions on >= XP, but fall back to the old functions on < XP.
>
> The attached patch fixes this problem.
>
>
> Sorry about this: I haven't noticed this problem before because I didn't
> use the Vista SDK but still the one which came with VS2005, and I
> usually don't test things on Win2k anymore.
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net
> [[[
> When compiling with IPv6 support, include the helper header file to allow
> the applications still run on Win2k.
>
> * subversion/libsvn_subr/win32_xlate.c,
> subversion/libsvn_subr/config_win.c,
> subversion/libsvn_subr/win32_crashrpt.c : include ws2tcpip and wspiapi.
> ]]]
> Index: ext/Subversion/subversion/libsvn_subr/win32_xlate.c
> ===================================================================
> --- subversion/libsvn_subr/win32_xlate.c (revision 27993)
> +++ subversion/libsvn_subr/win32_xlate.c (working copy)
> @@ -23,6 +23,8 @@
>
> #ifdef APR_HAVE_IPV6
> #include <winsock2.h>
> +#include <Ws2tcpip.h>
> +#include <Wspiapi.h>
> #endif
> #include <windows.h>
> #include <mlang.h>
> Index: ext/Subversion/subversion/libsvn_subr/win32_crashrpt.c
> ===================================================================
> --- subversion/libsvn_subr/win32_crashrpt.c (revision 27993)
> +++ subversion/libsvn_subr/win32_crashrpt.c (working copy)
> @@ -22,6 +22,8 @@
> /*** Includes. ***/
> #ifdef APR_HAVE_IPV6
> #include <winsock2.h>
> +#include <Ws2tcpip.h>
> +#include <Wspiapi.h>
> #endif
> #include <windows.h>
> #include <dbghelp.h>
> Index: ext/Subversion/subversion/libsvn_subr/config_win.c
> ===================================================================
> --- subversion/libsvn_subr/config_win.c (revision 27993)
> +++ subversion/libsvn_subr/config_win.c (working copy)
> @@ -24,6 +24,8 @@
> #define WIN32_LEAN_AND_MEAN
> #ifdef APR_HAVE_IPV6
> #include <winsock2.h>
> +#include <Ws2tcpip.h>
> +#include <Wspiapi.h>
> #endif
> #include <windows.h>
> #include <shlobj.h>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org