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

Fix build under mingw.

This commit is contained in:
Giuseppe Scrivano 2010-05-07 12:28:26 +02:00
parent a8d87e175e
commit 78a1186f2d
7 changed files with 31 additions and 32 deletions

View File

@ -1,13 +1,16 @@
2010-05-07 Giuseppe Scrivano <gscrivano@gnu.org>
* po/wget.pot: Remove.
2010-05-07 Giuseppe Scrivano <gscrivano@gnu.org>
* configure.ac: Don't call macro WGET_SOCKLEN_T.
* Makefile.am (EXTRA_DIST): Remove autogen.sh.
* 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.

View 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

View 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

View 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.

View 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)
/* 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)
{

View 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"

View 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 */