@@ -51,27 +51,32 @@ pub(crate) const SHUT_RDWR: i32 = WinSock::SD_BOTH as _;
51
51
pub ( crate ) const SHUT_RD : i32 = WinSock :: SD_RECEIVE as _ ;
52
52
pub ( crate ) const SHUT_WR : i32 = WinSock :: SD_SEND as _ ;
53
53
54
+ // Include the contents of `WinSock`, renaming as needed to match POSIX.
55
+ //
56
+ // Use `WSA_E_CANCELLED` for `ECANCELED` instead of `WSAECANCELLED`, because
57
+ // `WSAECANCELLED` will be removed in the future.
58
+ // <https://docs.microsoft.com/en-us/windows/win32/api/ws2spi/nc-ws2spi-lpnsplookupserviceend#remarks>
54
59
pub ( crate ) use WinSock :: {
55
60
closesocket as close, ioctlsocket as ioctl, WSAPoll as poll, ADDRESS_FAMILY as sa_family_t,
56
61
ADDRINFOA as addrinfo, IN6_ADDR as in6_addr, IN_ADDR as in_addr, IPV6_MREQ as ipv6_mreq,
57
62
IP_MREQ as ip_mreq, SOCKADDR as sockaddr, SOCKADDR_IN as sockaddr_in,
58
63
SOCKADDR_IN6 as sockaddr_in6, SOCKADDR_STORAGE as sockaddr_storage, WSAEACCES as EACCES ,
59
64
WSAEADDRINUSE as EADDRINUSE , WSAEADDRNOTAVAIL as EADDRNOTAVAIL ,
60
65
WSAEAFNOSUPPORT as EAFNOSUPPORT , WSAEALREADY as EALREADY , WSAEBADF as EBADF ,
61
- WSAECANCELLED as ECANCELED , WSAECONNABORTED as ECONNABORTED , WSAECONNREFUSED as ECONNREFUSED ,
62
- WSAECONNRESET as ECONNRESET , WSAEDESTADDRREQ as EDESTADDRREQ , WSAEDISCON as EDISCON ,
63
- WSAEDQUOT as EDQUOT , WSAEFAULT as EFAULT , WSAEHOSTDOWN as EHOSTDOWN ,
64
- WSAEHOSTUNREACH as EHOSTUNREACH , WSAEINPROGRESS as EINPROGRESS , WSAEINTR as EINTR ,
65
- WSAEINVAL as EINVAL , WSAEINVALIDPROCTABLE as EINVALIDPROCTABLE ,
66
- WSAEINVALIDPROVIDER as EINVALIDPROVIDER , WSAEISCONN as EISCONN , WSAELOOP as ELOOP ,
67
- WSAEMFILE as EMFILE , WSAEMSGSIZE as EMSGSIZE , WSAENAMETOOLONG as ENAMETOOLONG ,
68
- WSAENETDOWN as ENETDOWN , WSAENETRESET as ENETRESET , WSAENETUNREACH as ENETUNREACH ,
69
- WSAENOBUFS as ENOBUFS , WSAENOMORE as ENOMORE , WSAENOPROTOOPT as ENOPROTOOPT ,
70
- WSAENOTCONN as ENOTCONN , WSAENOTEMPTY as ENOTEMPTY , WSAENOTSOCK as ENOTSOCK ,
71
- WSAEOPNOTSUPP as EOPNOTSUPP , WSAEPFNOSUPPORT as EPFNOSUPPORT , WSAEPROCLIM as EPROCLIM ,
72
- WSAEPROTONOSUPPORT as EPROTONOSUPPORT , WSAEPROTOTYPE as EPROTOTYPE ,
66
+ WSAECONNABORTED as ECONNABORTED , WSAECONNREFUSED as ECONNREFUSED , WSAECONNRESET as ECONNRESET ,
67
+ WSAEDESTADDRREQ as EDESTADDRREQ , WSAEDISCON as EDISCON , WSAEDQUOT as EDQUOT ,
68
+ WSAEFAULT as EFAULT , WSAEHOSTDOWN as EHOSTDOWN , WSAEHOSTUNREACH as EHOSTUNREACH ,
69
+ WSAEINPROGRESS as EINPROGRESS , WSAEINTR as EINTR , WSAEINVAL as EINVAL ,
70
+ WSAEINVALIDPROCTABLE as EINVALIDPROCTABLE , WSAEINVALIDPROVIDER as EINVALIDPROVIDER ,
71
+ WSAEISCONN as EISCONN , WSAELOOP as ELOOP , WSAEMFILE as EMFILE , WSAEMSGSIZE as EMSGSIZE ,
72
+ WSAENAMETOOLONG as ENAMETOOLONG , WSAENETDOWN as ENETDOWN , WSAENETRESET as ENETRESET ,
73
+ WSAENETUNREACH as ENETUNREACH , WSAENOBUFS as ENOBUFS , WSAENOMORE as ENOMORE ,
74
+ WSAENOPROTOOPT as ENOPROTOOPT , WSAENOTCONN as ENOTCONN , WSAENOTEMPTY as ENOTEMPTY ,
75
+ WSAENOTSOCK as ENOTSOCK , WSAEOPNOTSUPP as EOPNOTSUPP , WSAEPFNOSUPPORT as EPFNOSUPPORT ,
76
+ WSAEPROCLIM as EPROCLIM , WSAEPROTONOSUPPORT as EPROTONOSUPPORT , WSAEPROTOTYPE as EPROTOTYPE ,
73
77
WSAEPROVIDERFAILEDINIT as EPROVIDERFAILEDINIT , WSAEREFUSED as EREFUSED , WSAEREMOTE as EREMOTE ,
74
78
WSAESHUTDOWN as ESHUTDOWN , WSAESOCKTNOSUPPORT as ESOCKTNOSUPPORT , WSAESTALE as ESTALE ,
75
79
WSAETIMEDOUT as ETIMEDOUT , WSAETOOMANYREFS as ETOOMANYREFS , WSAEUSERS as EUSERS ,
76
- WSAEWOULDBLOCK as EWOULDBLOCK , WSAEWOULDBLOCK as EAGAIN , WSAPOLLFD as pollfd, * ,
80
+ WSAEWOULDBLOCK as EWOULDBLOCK , WSAEWOULDBLOCK as EAGAIN , WSAPOLLFD as pollfd,
81
+ WSA_E_CANCELLED as ECANCELED , * ,
77
82
} ;
0 commit comments