IDN support in getaddrinfo/getnameinfo
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Nov 19 13:34:00 GMT 2013
On Nov 18 12:26, Yaakov (Cygwin/X) wrote:
> On 2013-11-18 05:05, Corinna Vinschen wrote:
> >My small fun-project is adding the AI_IDN* and NI_IDN* flags to Cygwin.
> >The required libidn functionality exists 100% identically in
> >kernel32.dll since Windows Vista(1) (IdnToAscii/IdnToUnicode) including
> >the modifier flags, so it's just a matter of calling the UNICODE
> >functions GetAddrInfoW/GetNameInfoW and calling these IdnToXXX
> >functions, just like glibc additionally calls idna_to_ascii_lz, etc. My
> >new getnameinfo already works with IDNs, the getaddrinfo isn't quite
> >finished yet.
> >
> >However, is that really worth the effort? A portable project won't
> >have a chance but to use libidn functions anyway. If it relies on
> >AI_IDN/NI_IDN, it will only run on Linux. Well, and on Cygwin in future.
> >But still, I'm not sure if we should really add this functionality.
> >
> >What's your stance? Yes or no?
>
> While the lack of this feature until now hasn't required me to patch
> around it, all that means is that any software using this
> functionality does so portably (only #ifdef [AN]I_IDN). So while I
> can't say how many packages could benefit from this, it's certainly
> possible that we'll see more of it going forward. If you're that
> close, I say go for it.
Thanks for your encouraging input. I applied my patch.
A neat side-effect of this work is that the net.cc source code got about
18K smaller: I realized that we dropped support for all systems which
didn't come with the getaddrinfo/getnameinfo/freeaddrinfo functions, so
I got rid of the weird autoload code of these functions and the entire
W. Richard Stevens implementation, which I only added as a replacement
for older systems.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20131119/c0aa8571/attachment.sig>
More information about the Cygwin-developers
mailing list