Commit 264503d4 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

include: Add NI_* defines and add a WS(socklen_t) type.

parent 2538490d
...@@ -3238,7 +3238,7 @@ int WINAPI GetAddrInfoW(LPCWSTR nodename, LPCWSTR servname, const ADDRINFOW *hin ...@@ -3238,7 +3238,7 @@ int WINAPI GetAddrInfoW(LPCWSTR nodename, LPCWSTR servname, const ADDRINFOW *hin
return EAI_FAIL; 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) DWORD hostlen, PCHAR serv, DWORD servlen, INT flags)
{ {
#if HAVE_GETNAMEINFO #if HAVE_GETNAMEINFO
......
...@@ -53,6 +53,8 @@ typedef struct WS(addrinfoW) ...@@ -53,6 +53,8 @@ typedef struct WS(addrinfoW)
struct WS(addrinfoW)* ai_next; struct WS(addrinfoW)* ai_next;
} ADDRINFOW, *PADDRINFOW; } ADDRINFOW, *PADDRINFOW;
typedef int WS(socklen_t);
typedef ADDRINFOA ADDRINFO, *LPADDRINFO; typedef ADDRINFOA ADDRINFO, *LPADDRINFO;
/* /*
...@@ -202,6 +204,21 @@ typedef struct _INTERFACE_INFO ...@@ -202,6 +204,21 @@ typedef struct _INTERFACE_INFO
# define WS_EAI_SOCKTYPE WSAESOCKTNOSUPPORT # define WS_EAI_SOCKTYPE WSAESOCKTNOSUPPORT
#endif #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 #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -215,9 +232,9 @@ int WINAPI WS(getaddrinfo)(const char*,const char*,const struct WS(addrinfo)*,s ...@@ -215,9 +232,9 @@ int WINAPI WS(getaddrinfo)(const char*,const char*,const struct WS(addrinfo)*,s
#define GetAddrInfoA WS(getaddrinfo) #define GetAddrInfoA WS(getaddrinfo)
int WINAPI GetAddrInfoW(PCWSTR,PCWSTR,const ADDRINFOW*,PADDRINFOW*); int WINAPI GetAddrInfoW(PCWSTR,PCWSTR,const ADDRINFOW*,PADDRINFOW*);
#define GetAddrInfo WINELIB_NAME_AW(GetAddrInfo) #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) #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) #define GetNameInfo WINELIB_NAME_AW(GetNameInfo)
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment