[reSIProcate] compat.hxx broken for IPPROTO_IPV6
Jeremy Geras
jgeras at counterpath.com
Thu Apr 23 11:44:30 CDT 2009
They have #if(_WIN32_WINNT >= 0x0501) just before the entry for IPPROTO_IPV6 in the version of ws2def.h that I've got, so nope, it isn't always in the enum.
I've changed compat.hxx to the following in my local copy to make things work -- note that this is slightly different from what I proposed originally, since there actually are places that check the value of IPPROTO_IPV6 (not just an #ifdef test), and it picks up the definition from the #define instead of the enum:
#ifdef USE_IPV6
#if(_WIN32_WINNT >= 0x0501)
#define IPPROTO_IPV6 ::IPPROTO_IPV6
#else
#ifdef _MSC_VER
#define __STR2__(x) #x
#define __STR1__(x) __STR2__(x)
#define __LOC__ __FILE__ "("__STR1__(__LINE__)"): "
#pragma message (__LOC__ " IPv6 support requested, but IPPROTO_V6 undefined; this platform does not appear to support IPv6 ")
#else
#warning IPv6 support requested, but IPPROTO_IPV6 undefined; this platform does not appear to support IPv6
#endif
#undef USE_IPV6
#endif
#endif
Jeremy
________________________________
From: Byron Campen [bcampen at estacado.net]
Sent: April 23, 2009 9:02 AM
To: Jeremy Geras
Cc: Scott Godin; resiprocate-devel at list.resiprocate.org
Subject: Re: [reSIProcate] compat.hxx broken for IPPROTO_IPV6
Ick. What an irritating thing to do. Presumably, this is in the enum whether or not V6 is actually supported? Or is V6 always supported in this SDK?
Best regards,
Byron Campen
So it looks like this is only a problem for folks who have updated their Platform SDK to some version beyond that which comes with VS 2005 ... I see the #define for IPPROTO_IPV6 in the old winsock2.h that came with VS .NET 2003, but it definitely is not there in the version that got installed with the latest Platform SDK.
From: slgodin at gmail.com<mailto:slgodin at gmail.com> [mailto:slgodin at gmail.com] On Behalf Of Scott Godin
Sent: March-25-09 5:33 AM
To: Jeremy Geras
Cc: resiprocate-devel at list.resiprocate.org<mailto:resiprocate-devel at list.resiprocate.org>
Subject: Re: [reSIProcate] compat.hxx broken for IPPROTO_IPV6
I have IPPPROTO_IPV6 defined in WinSock2.h at c:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include
Scott
2009/3/24 Jeremy Geras <jgeras at counterpath.com<mailto:jgeras at counterpath.com>>
Hi,
Unless I'm missing some #include that everyone else on Windows has, I don't think that IPPROTO_IPV6 can be checked with an #ifndef in rutil\compat.hxx the way that it is right now on the trunk... IPPROTO_IPV6 is part of an enum, it isn't #define'd.
So
#ifndef IPPROTO_IPV6
should actually be something more along the lines of
#if(_WIN32_WINNT >= 0x0501)
#define IPPROTO_IPV6
#else
...
Or maybe we should just #undef USE_IPV6 ?
In case it's relevant, I'm on Windows XP SP3 with the latest Platform SDK (6.1) compiling in VS 2008.
Jeremy
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at resiprocate.org<mailto:resiprocate-devel at resiprocate.org>
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at resiprocate.org<mailto:resiprocate-devel at resiprocate.org>
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20090423/6c9168bd/attachment.htm>
More information about the resiprocate-devel
mailing list