Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-11-19 17:29:37 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-11-19 17:29:37 +0400
commit5b56e9b02b58d2d95ab97c184daa29caf2147eed (patch)
tree140333e757003f1951ac777ee6c6d22ffdcaba67 /winsup/cygwin/autoload.cc
parentff125797e38c9628ae1308973231660a22563309 (diff)
* autoload.cc (IdnToAscii): Define.
(IdnToUnicode): Define. (FreeAddrInfoW): Define. (GetAddrInfoW): Define. (GetNameInfoW): Define. * net.cc: Drop W. Richard STEVENS libgai implementation. (cygwin_freeaddrinfo): Move code from ipv4_freeaddrinfo here. Move definition up in file to avoid forward declaration in ga_duplist. (ga_dup): Take addrinfoW as input. Add parameters to get IDN flags and to set error value. Handle IDN flags and especially AI_CANONIDN. Convert input wchar_t ai_canonname string to multibyte for output. (ga_duplist): Add parameters to get IDN flags and to set error value and propagate to ga_dup. Call cygwin_freeaddrinfo. (gai_errmap): Add comments. Align error strings to GLibc. Add EAI_IDN_ENCODE entry. (get_ipv6_funcs): Remove. (load_ipv6_guard): Remove. (ipv6_inited): Remove. (load_ipv6): Remove. (load_ipv6_funcs): Remove. (cygwin_getaddrinfo): Drop calling load_ipv6. Handle AI_IDN* flags. Convert input strings to wchar_t and call GetAddrInfoW/FreeAddrInfoW. In case hints is NULL, set default ai_flags explicitely to AI_V4MAPPED | AI_ADDRCONFIG, as documented for Glibc. Only add AI_ALL if AI_ADDRCONFIG is not given. Unconditionally add Windows-specific AI_DISABLE_IDN_ENCODING to ai_flags to make IDN behaviour compatible to Glibc even on Windows 8 and later. (cygwin_getnameinfo): Drop calling load_ipv6. Handle NI_IDN* flags. Call GetNameInfoW and convert returned strings from wchar_t to multibyte. * include/netdb.h: Add comments to describe flags and error values. (AI_*): Define all flags using hex values for clearness. (AI_IDN): Define. (AI_CANONIDN): Define. (AI_IDN_ALLOW_UNASSIGNED): Define. (AI_IDN_USE_STD3_ASCII_RULES): Define. (NI_*): Define all flags using hex values for clearness. (NI_IDN): Define. (NI_IDN_ALLOW_UNASSIGNED): Define. (NI_IDN_USE_STD3_ASCII_RULES): Define. (EAI_IDN_ENCODE): Define.
Diffstat (limited to 'winsup/cygwin/autoload.cc')
-rw-r--r--winsup/cygwin/autoload.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index f364cf937..0199cc553 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -576,6 +576,8 @@ LoadDLLfuncEx (CancelSynchronousIo, 4, kernel32, 1)
LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
LoadDLLfuncEx (GetNamedPipeClientProcessId, 8, kernel32, 1)
LoadDLLfunc (GetSystemTimePreciseAsFileTime, 4, kernel32)
+LoadDLLfuncEx2 (IdnToAscii, 20, kernel32, 1, 0)
+LoadDLLfuncEx2 (IdnToUnicode, 20, kernel32, 1, 0)
LoadDLLfunc (LocaleNameToLCID, 8, kernel32)
LoadDLLfunc (WNetCloseEnum, 4, mpr)
@@ -663,6 +665,9 @@ LoadDLLfunc (accept, 12, ws2_32)
LoadDLLfunc (bind, 12, ws2_32)
LoadDLLfunc (closesocket, 4, ws2_32)
LoadDLLfunc (connect, 12, ws2_32)
+LoadDLLfunc (FreeAddrInfoW, 4, ws2_32)
+LoadDLLfunc (GetAddrInfoW, 16, ws2_32)
+LoadDLLfunc (GetNameInfoW, 28, ws2_32)
LoadDLLfunc (gethostbyaddr, 12, ws2_32)
LoadDLLfunc (gethostbyname, 4, ws2_32)
LoadDLLfunc (gethostname, 8, ws2_32)