Robert Shearman : include: Add NI_* defines and add a WS(socklen_t) type.
Module: wine Branch: refs/heads/master Commit: 264503d40daa297eac2948b1a392ba4b86215d00 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=264503d40daa297eac2948b1... Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Jul 13 13:06:30 2006 +0100 include: Add NI_* defines and add a WS(socklen_t) type. --- dlls/ws2_32/socket.c | 2 +- include/ws2tcpip.h | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 8887ae8..4c17f21 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3238,7 +3238,7 @@ int WINAPI GetAddrInfoW(LPCWSTR nodename return EAI_FAIL; } -int WINAPI WS_getnameinfo(const SOCKADDR *sa, socklen_t salen, PCHAR host, +int WINAPI WS_getnameinfo(const SOCKADDR *sa, WS_socklen_t salen, PCHAR host, DWORD hostlen, PCHAR serv, DWORD servlen, INT flags) { #if HAVE_GETNAMEINFO diff --git a/include/ws2tcpip.h b/include/ws2tcpip.h index dcdcd4e..8d3c837 100644 --- a/include/ws2tcpip.h +++ b/include/ws2tcpip.h @@ -53,6 +53,8 @@ typedef struct WS(addrinfoW) struct WS(addrinfoW)* ai_next; } ADDRINFOW, *PADDRINFOW; +typedef int WS(socklen_t); + typedef ADDRINFOA ADDRINFO, *LPADDRINFO; /* @@ -202,6 +204,21 @@ # define WS_EAI_SERVICE WSATYPE_NOT_FOUN # define WS_EAI_SOCKTYPE WSAESOCKTNOSUPPORT #endif +/* Possible Windows flags for getnameinfo() */ +#ifndef USE_WS_PREFIX +# define NI_NOFQDN 0x01 +# define NI_NUMERICHOST 0x02 +# define NI_NAMEREQD 0x04 +# define NI_NUMERICSERV 0x08 +# define NI_DGRAM 0x10 +#else +# define WS_NI_NOFQDN 0x01 +# define WS_NI_NUMERICHOST 0x02 +# define WS_NI_NAMEREQD 0x04 +# define WS_NI_NUMERICSERV 0x08 +# define WS_NI_DGRAM 0x10 +#endif + #ifdef __cplusplus extern "C" { @@ -215,9 +232,9 @@ int WINAPI WS(getaddrinfo)(const char*, #define GetAddrInfoA WS(getaddrinfo) int WINAPI GetAddrInfoW(PCWSTR,PCWSTR,const ADDRINFOW*,PADDRINFOW*); #define GetAddrInfo WINELIB_NAME_AW(GetAddrInfo) -int WINAPI WS(getnameinfo)(const SOCKADDR*,socklen_t,PCHAR,DWORD,PCHAR,DWORD,INT); +int WINAPI WS(getnameinfo)(const SOCKADDR*,WS(socklen_t),PCHAR,DWORD,PCHAR,DWORD,INT); #define GetNameInfoA WS(getnameinfo) -INT WINAPI GetNameInfoW(const SOCKADDR*,socklen_t,PWCHAR,DWORD,PWCHAR,DWORD,INT); +INT WINAPI GetNameInfoW(const SOCKADDR*,WS(socklen_t),PWCHAR,DWORD,PWCHAR,DWORD,INT); #define GetNameInfo WINELIB_NAME_AW(GetNameInfo) /*
participants (1)
-
Alexandre Julliard