Re: config.h.mingw changes
Hrvoje Niksic <[email protected]> Thu, 30 Jun 2005 02:22:42 +0200
| Newsgroups | gmane.comp.web.wget.patches |
|---|---|
| Message-ID | <[email protected]> |
Gisle Vanem <[email protected]> writes: >> What I don't understand is how Windows programs are *supposed* to >> print IPv6 addresses. Does every single IPv6-enabled program have a >> function like that one? > > Yes, I guess so (libcurl at least). The official method would > probably be to use WSAAddressToString(); http://tinyurl.com/8aojn > But this function is difficult to use right (the last time I tried). If I'm reading the documentation correctly, this looks like it should work: /* An IPv6-only interface to WSAAddressToString. (Wget uses inet_ntoa for IPv4 addresses.) Prototype conforming to POSIX. */ const char * inet_ntop (int af, const void *src, char *dst, socklen_t cnt) { struct sockaddr_in6 sin6; assert (af == AF_INET6); /* fine for Wget's usage */ xzero (sin6); sin6.sin6_family = AF_INET6; sin6.sin6_addr = *(struct in6_addr *) src; dst[0] = '\0'; /* just in case */ WSAAddressToString ((struct sockaddr *) &sin6, sizeof (sin6), NULL, dst, cnt); return dst; } >> What is the copyright status of that file? > > Some BSD licence (?). If that's a problem I'll try getting the above > function to work That would be great. I'd try it myself, but I can't boot to Windows right now and don't have another machine handy. As the licences go, the modern form of the BSD license is compatible with the GPL, but GNU programs still need the copyright assignment, so it's a hassle.