[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] inet_ntop() in mswindows.c
From: |
Gisle Vanem |
Subject: |
[Bug-wget] inet_ntop() in mswindows.c |
Date: |
Mon, 6 Mar 2017 16:45:57 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
Just a detail, but in src/mswindows.c, there is:
#ifdef ENABLE_IPV6
/* An inet_ntop implementation that uses WSAAddressToString.
Prototype complies with POSIX 1003.1-2004. This is only used under
IPv6 because Wget prints IPv4 addresses using inet_ntoa. */
This is wrong since 1) inet_ntoa() is no longer used. And 2) since
inet_ntop() is used for IPv4 too, 'ENABLE_IPV6' should then become
'!defined(HAVE_INET_NTOP)'. Thus:
@@ -572,10 +572,10 @@
}
-#ifdef ENABLE_IPV6
+#if !defined(HAVE_INET_NTOP)
/* An inet_ntop implementation that uses WSAAddressToString.
- Prototype complies with POSIX 1003.1-2004. This is only used under
- IPv6 because Wget prints IPv4 addresses using inet_ntoa. */
+ Prototype complies with POSIX 1003.1-2004. This is used
+ for both IPv4 and IPv6. */
const char *
inet_ntop (int af, const void *src, char *dst, socklen_t cnt)
--gv
- [Bug-wget] inet_ntop() in mswindows.c,
Gisle Vanem <=