* net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6

mapping addition.
	(ga_clone): Just call ga_dup from here.
	(ga_duplist): New function to duplicate list of struct addrinfo.
	(ga_echeck): Don't check a_flags, it already happened in
	cygwin_getaddrinfo.
	(cygwin_freeaddrinfo): Always call ipv4_freeaddrinfo.
	(cygwin_getaddrinfo): Use new wincap.supports_all_posix_ai_flags
	flag rather than wincap.has_gaa_on_link_prefix.  Always duplicate
	WinSock's addrinfo list to a self-allocated list.  Handle AI_V4MAPPED
	for pre-Vista platforms supporting getaddrinfo.
	* wincap.h (wincapc::supports_all_posix_ai_flags): New element.
	* wincap.cc: Implement above element throughout.
	* include/netdb.h: Note how AI_ADDRCONFIG is not supported pre-Vista.
	Remove superfluous comment.
This commit is contained in:
Corinna Vinschen
2007-02-01 15:54:40 +00:00
parent 3281664245
commit 4815dd49bb
5 changed files with 165 additions and 21 deletions

View File

@ -148,9 +148,9 @@ extern __declspec(dllimport) int h_errno;
#define AI_CANONNAME 2
#define AI_NUMERICHOST 4
#define AI_NUMERICSERV 8
/* Only available since Vista. Ignored on older systems. */
#define AI_ALL 256
#define AI_ADDRCONFIG 1024
#define AI_ADDRCONFIG 1024 /* Only available on Vista. Unchangable default
on older systems. */
#define AI_V4MAPPED 2048
#define NI_NOFQDN 1