Boost logo

Boost-Commit :

From: chris_at_[hidden]
Date: 2008-02-02 07:02:23


Author: chris_kohlhoff
Date: 2008-02-02 07:02:23 EST (Sat, 02 Feb 2008)
New Revision: 43056
URL: http://svn.boost.org/trac/boost/changeset/43056

Log:
The latest Windows SDKs don't support IPv6 when building for Windows 2000,
so we need to use the SDK emulation in that case.

Text files modified:
   trunk/boost/asio/detail/old_win_sdk_compat.hpp | 16 +++++++++++++++-
   1 files changed, 15 insertions(+), 1 deletions(-)

Modified: trunk/boost/asio/detail/old_win_sdk_compat.hpp
==============================================================================
--- trunk/boost/asio/detail/old_win_sdk_compat.hpp (original)
+++ trunk/boost/asio/detail/old_win_sdk_compat.hpp 2008-02-02 07:02:23 EST (Sat, 02 Feb 2008)
@@ -31,6 +31,10 @@
 #if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
 
 // Emulation of types that are missing from old Platform SDKs.
+//
+// N.B. this emulation is also used if building for a Windows 2000 target with
+// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support
+// in that case.
 
 namespace boost {
 namespace asio {
@@ -55,9 +59,19 @@
 
 struct in6_addr_emulation
 {
- u_char s6_addr[16];
+ union
+ {
+ u_char Byte[16];
+ u_short Word[8];
+ } u;
 };
 
+#if !defined(s6_addr)
+# define _S6_un u
+# define _S6_u8 Byte
+# define s6_addr _S6_un._S6_u8
+#endif // !defined(s6_addr)
+
 struct sockaddr_in6_emulation
 {
   short sin6_family;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk