1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Document that Winsock's gethostbyname might not grok numeric addresses.

This commit is contained in:
hniksic 2003-11-14 05:51:32 -08:00
parent 4e58524e8f
commit 4cef0cc3f9

View File

@ -488,10 +488,10 @@ lookup_host (const char *host, int silent)
struct address_list *al = NULL; struct address_list *al = NULL;
#ifndef ENABLE_IPV6 #ifndef ENABLE_IPV6
/* If we're not using getaddrinfo, first check if HOST names a /* If we're not using getaddrinfo, first check if HOST specifies a
numeric IPv4 address. gethostbyname is not required to accept numeric IPv4 address. gethostbyname is not required to accept
dotted-decimal IPv4 addresses, and some older implementations dotted-decimal IPv4 addresses, and some implementations (e.g. the
(e.g. the Ultrix one) indeed didn't. */ Ultrix one and possibly Winsock) indeed don't. */
{ {
uint32_t addr_ipv4 = (uint32_t)inet_addr (host); uint32_t addr_ipv4 = (uint32_t)inet_addr (host);
if (addr_ipv4 != (uint32_t) -1) if (addr_ipv4 != (uint32_t) -1)