[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] inet_ntop() in mswindows.c
From: |
Gisle Vanem |
Subject: |
Re: [Bug-wget] inet_ntop() in mswindows.c |
Date: |
Wed, 8 Mar 2017 12:50:02 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
Tim Rühsen wrote:
> In src/hosts.c put it after
> #include <string.h>
>
> And also remove the
> # ifndef __BEOS__
> ...
> part.
>
> I guess we should do some more cleanups there.
For sure. IMHO the best place would be in mswindows.h.
(thus only 1 place). But I've so many private changes to mswindows.*
that it's hard for me to create a patch. But something like:
--- a/src/mswindows.h 2016-05-14 17:43:51
+++ b/src/mswindows.h 2017-03-08 10:43:33
@@ -57,6 +57,9 @@
/* Declares getpid(). */
#include <process.h>
+/* Declares inet_ntop() and inet_pton(). */
+#include <arpa/inet.h>
+
/* We have strcasecmp and strncasecmp, just under different names. */
#ifndef HAVE_STRCASECMP
# define strcasecmp stricmp
@@ -85,12 +88,8 @@
#define PATH_SEPARATOR '\\'
-/* Additional declarations needed for IPv6: */
-#ifdef ENABLE_IPV6
-const char *inet_ntop (int, const void *, char *, socklen_t);
-#endif
-
-/* ioctl needed by set_windows_fd_as_blocking_socket() */
+/* We need to include this header since Gnulib's unlink() could be defined as
+ rpl_unlink(). And because 'struct options' has no 'rpl_unlink' member. */
#include <sys/ioctl.h>
/* Public functions. */
----
(also explains why <sys/ioctl.h> is needed).
--
--gv