]> sjero.net Git - wget/commitdiff
Fix build under mingw.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 7 May 2010 10:28:26 +0000 (12:28 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 7 May 2010 10:28:26 +0000 (12:28 +0200)
ChangeLog
Makefile.am
bootstrap.conf
src/ChangeLog
src/connect.c
src/host.h
src/mswindows.h

index ffb4414739c377257f505c48bb3502c3c48b498f..6a13c87b4a9e221f71d30b3ad957ebc5d3fd54de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,16 @@
 2010-05-07  Giuseppe Scrivano  <gscrivano@gnu.org>
 
-       * po/wget.pot: Remove.
+       * configure.ac: Don't call macro WGET_SOCKLEN_T.
 
-2010-05-07  Giuseppe Scrivano  <gscrivano@gnu.org>
+       * Makefile.am (EXTRA_DIST): Remove autogen.sh.
 
-       * configure.ac: Don't call macro WGET_SOCKLEN_T.
+       * bootstrap.conf (gnulib_modules): Use new modules from gnulib: accept,
+       bind, close, connect, getpeername, getsockname, listen, setsockopt.
 
        * m4/wget.m4 (WGET_SOCKLEN_T): Remove macro.
 
+       * po/wget.pot: Remove.
+
 2010-05-07  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * configure.ac (ALL_LINGUAS): Remove.
index 27b43549046187e8c306286d0787d79eb57e5fae..7324ade7da34755c3190f301502abcc7d04273f8 100644 (file)
@@ -45,7 +45,7 @@ SUBDIRS = lib md5 src doc po tests util windows
 
 EXTRA_DIST = ChangeLog.README configure.bat MAILING-LIST \
              msdos/ChangeLog msdos/config.h msdos/Makefile.DJ \
-             msdos/Makefile.WC ABOUT-NLS autogen.sh \
+             msdos/Makefile.WC ABOUT-NLS \
              build-aux/build_info.pl
 
 CLEANFILES = *~ *.bak $(DISTNAME).tar.gz
index 32495d2e972af3d51382bc916cf130377d3ff55b..484b2262263325b2dc5c9d0d66fbdaf74e9f7e61 100644 (file)
@@ -24,19 +24,26 @@ checkout_only_file=
 
 # gnulib modules used by this package.
 gnulib_modules="
+accept
 alloca
 announce-gen
+bind
 c-ctype
+close
+connect
 getopt
 getpass-gnu
+getpeername
+getsockname
 gnupload
+listen
 maintainer-makefile
 quote
 quotearg
-read
 recv
 select
 send
+setsockopt
 socket
 stdbool
 strcasestr
index 9265d5f48dfe0dbdf10df3fb5dd85ce16e051d3c..83baa58f1c97f12e22199ba94d4fef43dcbcca4c 100644 (file)
@@ -1,5 +1,13 @@
 2010-05-07  Giuseppe Scrivano  <gscrivano@gnu.org>
 
+       * mswindows.h: Always include <winsock2.h> and <ws2tcpip.h>.  Do not
+       include <winsock.h>.
+
+       * host.h [WINDOWS]: Include <winsock2.h> not <winsock.h>.
+
+       * connect.c: Include <sys/socket.h> and <sys/select.h> on any platform,
+       gnulib ensures they exist.  Remove `read', `write', `close' macros.
+
        * Makefile.am: Copy build_info.c.in only if we are working in a VPATH.
        (AM_CPPFLAGS): Add directory with generated gnulib files.
 
index 604e7a11948989cc6a9cba350ecbc221021f8c4f..22fccb5901440be0b59f69e094dfe253b7e919d2 100644 (file)
@@ -1,6 +1,6 @@
 /* Establishing and handling network connections.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -37,8 +37,10 @@ as that of the covered work.  */
 #endif
 #include <assert.h>
 
+#include <sys/socket.h>
+#include <sys/select.h>
+
 #ifndef WINDOWS
-# include <sys/socket.h>
 # ifdef __VMS
 #  include "vms_ip.h"
 # else /* def __VMS */
@@ -52,9 +54,6 @@ as that of the covered work.  */
 
 #include <errno.h>
 #include <string.h>
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif /* HAVE_SYS_SELECT_H */
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
@@ -701,17 +700,6 @@ test_socket_open (int sock)
 \f
 /* Basic socket operations, mostly EINTR wrappers.  */
 
-#if defined(WINDOWS) || defined(USE_WATT32)
-# define read(fd, buf, cnt) recv (fd, buf, cnt, 0)
-# define write(fd, buf, cnt) send (fd, buf, cnt, 0)
-# define close(fd) closesocket (fd)
-#endif
-
-#ifdef __BEOS__
-# define read(fd, buf, cnt) recv (fd, buf, cnt, 0)
-# define write(fd, buf, cnt) send (fd, buf, cnt, 0)
-#endif
-
 static int
 sock_read (int fd, char *buf, int bufsize)
 {
index ae997177985f13b15568607a7882cdbeb988b7b5..cefbb4f4f0d3709d63d6cdc0caa3c2c8379f7261 100644 (file)
@@ -32,7 +32,7 @@ as that of the covered work.  */
 #define HOST_H
 
 #ifdef WINDOWS
-# include <winsock.h>
+# include <winsock2.h>
 #else
 # ifdef __VMS
 #  include "vms_ip.h"
index 241c0016e324cc4fac62dc83f124ebb046fc9216..bb72a2823e8c9ee8bddb620159b2f4a6094735ae 100644 (file)
@@ -42,15 +42,8 @@ as that of the covered work.  */
 
 #include <windows.h>
 
-/* We need winsock2.h for IPv6 and ws2tcpip.h for getaddrinfo, so
-  include both in ENABLE_IPV6 case.  (ws2tcpip.h includes winsock2.h
-  only on MinGW.) */
-#ifdef ENABLE_IPV6
-# include <winsock2.h>
-# include <ws2tcpip.h>
-#else
-# include <winsock.h>
-#endif
+#include <winsock2.h>
+#include <ws2tcpip.h>
 
 #ifndef EAI_SYSTEM
 # define EAI_SYSTEM -1   /* value doesn't matter */