11 #ifndef ASIO_DETAIL_OLD_WIN_SDK_COMPAT_HPP 12 #define ASIO_DETAIL_OLD_WIN_SDK_COMPAT_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 23 #if !defined(IN6ADDR_ANY_INIT) 24 #define ASIO_HAS_OLD_WIN_SDK 1 25 #endif // !defined(IN6ADDR_ANY_INIT) 27 #if defined(ASIO_HAS_OLD_WIN_SDK) 42 sockaddr_storage_maxsize = 128,
43 sockaddr_storage_alignsize = (
sizeof(__int64)),
44 sockaddr_storage_pad1size = (sockaddr_storage_alignsize -
sizeof(short)),
45 sockaddr_storage_pad2size = (sockaddr_storage_maxsize -
46 (
sizeof(short) + sockaddr_storage_pad1size + sockaddr_storage_alignsize))
49 struct sockaddr_storage_emulation
52 char __ss_pad1[sockaddr_storage_pad1size];
54 char __ss_pad2[sockaddr_storage_pad2size];
57 struct in6_addr_emulation
69 # define s6_addr _S6_un._S6_u8 70 #endif // !defined(s6_addr) 72 struct sockaddr_in6_emulation
77 in6_addr_emulation sin6_addr;
81 struct ipv6_mreq_emulation
83 in6_addr_emulation ipv6mr_multiaddr;
84 unsigned int ipv6mr_interface;
87 struct addrinfo_emulation
96 addrinfo_emulation* ai_next;
99 #if !defined(AI_PASSIVE) 100 # define AI_PASSIVE 0x1 103 #if !defined(AI_CANONNAME) 104 # define AI_CANONNAME 0x2 107 #if !defined(AI_NUMERICHOST) 108 # define AI_NUMERICHOST 0x4 111 #if !defined(EAI_AGAIN) 112 # define EAI_AGAIN WSATRY_AGAIN 115 #if !defined(EAI_BADFLAGS) 116 # define EAI_BADFLAGS WSAEINVAL 119 #if !defined(EAI_FAIL) 120 # define EAI_FAIL WSANO_RECOVERY 123 #if !defined(EAI_FAMILY) 124 # define EAI_FAMILY WSAEAFNOSUPPORT 127 #if !defined(EAI_MEMORY) 128 # define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY 131 #if !defined(EAI_NODATA) 132 # define EAI_NODATA WSANO_DATA 135 #if !defined(EAI_NONAME) 136 # define EAI_NONAME WSAHOST_NOT_FOUND 139 #if !defined(EAI_SERVICE) 140 # define EAI_SERVICE WSATYPE_NOT_FOUND 143 #if !defined(EAI_SOCKTYPE) 144 # define EAI_SOCKTYPE WSAESOCKTNOSUPPORT 147 #if !defined(NI_NOFQDN) 148 # define NI_NOFQDN 0x01 151 #if !defined(NI_NUMERICHOST) 152 # define NI_NUMERICHOST 0x02 155 #if !defined(NI_NAMEREQD) 156 # define NI_NAMEREQD 0x04 159 #if !defined(NI_NUMERICSERV) 160 # define NI_NUMERICSERV 0x08 163 #if !defined(NI_DGRAM) 164 # define NI_DGRAM 0x10 167 #if !defined(IPPROTO_IPV6) 168 # define IPPROTO_IPV6 41 171 #if !defined(IPV6_UNICAST_HOPS) 172 # define IPV6_UNICAST_HOPS 4 175 #if !defined(IPV6_MULTICAST_IF) 176 # define IPV6_MULTICAST_IF 9 179 #if !defined(IPV6_MULTICAST_HOPS) 180 # define IPV6_MULTICAST_HOPS 10 183 #if !defined(IPV6_MULTICAST_LOOP) 184 # define IPV6_MULTICAST_LOOP 11 187 #if !defined(IPV6_JOIN_GROUP) 188 # define IPV6_JOIN_GROUP 12 191 #if !defined(IPV6_LEAVE_GROUP) 192 # define IPV6_LEAVE_GROUP 13 200 #endif // defined(ASIO_HAS_OLD_WIN_SDK) 203 #if !defined(IPV6_V6ONLY) 204 # define IPV6_V6ONLY 27 208 #if !defined(IPPROTO_ICMPV6) 209 # define IPPROTO_ICMPV6 58 212 #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 214 #endif // ASIO_DETAIL_OLD_WIN_SDK_COMPAT_HPP