bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] inet_ntop() in mswindows.c


From: Tim Rühsen
Subject: Re: [Bug-wget] inet_ntop() in mswindows.c
Date: Mon, 06 Mar 2017 20:35:18 +0100
User-agent: KMail/5.2.3 (Linux/4.9.0-2-amd64; KDE/5.28.0; x86_64; ; )

On Montag, 6. März 2017 16:45:57 CET Gisle Vanem wrote:
> 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)

inet_ntop should be covered by gnulib, also for mswindows. What about removing 
inet_ntop from mswindows.c ? Does it compile and work ?

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]