________________________________ From: LIU Hao Sent: Monday, August 9, 2021 12:58 PM To: [email protected]; Michel Zou Subject: Re: [Mingw-w64-public] patch to add htonll/ntohll 在 8/9/21 8:48 PM, Michel Zou 写道: > @@ -1018,6 +1019,7 @@ typedef unsigned int GROUP; > #ifndef __INSIDE_CYGWIN__ > WINSOCK_API_LINKAGE u_long WSAAPI ntohl(u_long netlong); > WINSOCK_API_LINKAGE u_short WSAAPI ntohs(u_short netshort); > + WINSOCK_API_LINKAGE unsigned __int64 WSAAPI(unsigned __int64 Value); ^ The function name was missing here. ----------/ Also, please add necessary `#if...#endif` checks about `_WIN32_WINNT`. Like this ?
From 1ae667f18a35d811186c951df2a25e5ffb7fcc28 Mon Sep 17 00:00:00 2001 From: Michel Zou <[email protected]> Date: Mon, 9 Aug 2021 15:16:26 +0200 Subject: [PATCH] ntohll --- mingw-w64-crt/lib-common/ws2_32.def.in | 2 ++ mingw-w64-crt/lib-common/wsock32.def | 2 ++ mingw-w64-crt/lib32/ws2_32.def | 2 ++ mingw-w64-crt/lib32/wsock32.def | 2 ++ mingw-w64-crt/libce/winsock.def | 2 ++ mingw-w64-crt/libce/ws2.def | 2 ++ mingw-w64-headers/include/winsock2.h | 6 ++++++ 7 files changed, 18 insertions(+) diff --git a/mingw-w64-crt/lib-common/ws2_32.def.in b/mingw-w64-crt/lib-common/ws2_32.def.in index b49c4b87d..1f9a2077b 100644 --- a/mingw-w64-crt/lib-common/ws2_32.def.in +++ b/mingw-w64-crt/lib-common/ws2_32.def.in @@ -11,12 +11,14 @@ getsockname getsockopt htonl htons +htonll ioctlsocket inet_addr inet_ntoa listen ntohl ntohs +ntohll recv recvfrom select diff --git a/mingw-w64-crt/lib-common/wsock32.def b/mingw-w64-crt/lib-common/wsock32.def index 7a24c2a82..2d102f3e0 100644 --- a/mingw-w64-crt/lib-common/wsock32.def +++ b/mingw-w64-crt/lib-common/wsock32.def @@ -14,12 +14,14 @@ getsockname getsockopt htonl htons +htonll inet_addr inet_ntoa ioctlsocket listen ntohl ntohs +ntohll recv recvfrom select diff --git a/mingw-w64-crt/lib32/ws2_32.def b/mingw-w64-crt/lib32/ws2_32.def index f78defcfb..edd90ccbd 100644 --- a/mingw-w64-crt/lib32/ws2_32.def +++ b/mingw-w64-crt/lib32/ws2_32.def @@ -14,12 +14,14 @@ getsockname@12 getsockopt@20 htonl@4 htons@4 +htonll@8 ioctlsocket@12 inet_addr@4 inet_ntoa@4 listen@8 ntohl@4 ntohs@4 +ntohll@8 recv@16 recvfrom@24 select@20 diff --git a/mingw-w64-crt/lib32/wsock32.def b/mingw-w64-crt/lib32/wsock32.def index 67a8a750f..63077c547 100644 --- a/mingw-w64-crt/lib32/wsock32.def +++ b/mingw-w64-crt/lib32/wsock32.def @@ -53,6 +53,7 @@ getsockname@12 getsockopt@20 htonl@4 htons@4 +htonll@8 inet_addr@4 inet_network@4 inet_ntoa@4 @@ -60,6 +61,7 @@ ioctlsocket@12 listen@8 ntohl@4 ntohs@4 +ntohll@8 rcmd@24 recv@16 recvfrom@24 diff --git a/mingw-w64-crt/libce/winsock.def b/mingw-w64-crt/libce/winsock.def index c9e2e958d..a75b84c69 100644 --- a/mingw-w64-crt/libce/winsock.def +++ b/mingw-w64-crt/libce/winsock.def @@ -18,12 +18,14 @@ getsockname getsockopt htonl htons +htonll inet_addr inet_ntoa ioctlsocket listen ntohl ntohs +ntohll recv recvfrom select diff --git a/mingw-w64-crt/libce/ws2.def b/mingw-w64-crt/libce/ws2.def index 0a4482eaa..e3d98a78d 100644 --- a/mingw-w64-crt/libce/ws2.def +++ b/mingw-w64-crt/libce/ws2.def @@ -65,6 +65,7 @@ getsockname getsockopt htonl htons +htonll in6addr_any in6addr_loopback inet_addr @@ -73,6 +74,7 @@ ioctlsocket listen ntohl ntohs +ntohll recv recvfrom select diff --git a/mingw-w64-headers/include/winsock2.h b/mingw-w64-headers/include/winsock2.h index 99f4c249d..522e93ead 100644 --- a/mingw-w64-headers/include/winsock2.h +++ b/mingw-w64-headers/include/winsock2.h @@ -1011,6 +1011,9 @@ typedef unsigned int GROUP; #ifndef __INSIDE_CYGWIN__ WINSOCK_API_LINKAGE u_long WSAAPI htonl(u_long hostlong); WINSOCK_API_LINKAGE u_short WSAAPI htons(u_short hostshort); +#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 + WINSOCK_API_LINKAGE unsigned __int64 WSAAPI htonll(unsigned __int64 Value); +#endif #endif /* !__INSIDE_CYGWIN__ */ WINSOCK_API_LINKAGE unsigned __LONG32 WSAAPI inet_addr(const char *cp); WINSOCK_API_LINKAGE char *WSAAPI inet_ntoa(struct in_addr in); @@ -1018,6 +1021,9 @@ typedef unsigned int GROUP; #ifndef __INSIDE_CYGWIN__ WINSOCK_API_LINKAGE u_long WSAAPI ntohl(u_long netlong); WINSOCK_API_LINKAGE u_short WSAAPI ntohs(u_short netshort); +#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 + WINSOCK_API_LINKAGE unsigned __int64 WSAAPI ntohll(unsigned __int64 Value); +#endif #endif /* !__INSIDE_CYGWIN__ */ WINSOCK_API_LINKAGE int WSAAPI recv(SOCKET s,char *buf,int len,int flags); WINSOCK_API_LINKAGE int WSAAPI recvfrom(SOCKET s,char *buf,int len,int flags,struct sockaddr *from,int *fromlen); -- 2.32.0
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
