[svn] Declare h_errno in host.c, but not elsewhere.

This commit is contained in:
hniksic 2001-12-03 09:22:06 -08:00
parent f5799945b0
commit 6d93a95e37
5 changed files with 18 additions and 29 deletions

View File

@ -1,3 +1,14 @@
2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
* ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
the socket data.
* ftp.c: Ditto.
* http.c: No need to declare h_errno.
* host.c: Declare h_errno.
2001-12-02 Hrvoje Niksic <hniksic@arsdigita.com>
* utils.c (file_merge): If BASE doesn't contain a slash, just

View File

@ -255,7 +255,7 @@ ftp_port (struct rbuf *rbuf)
return err;
/* Get the address of this side of the connection. */
if (!(in_addr = conaddr (RBUF_FD (rbuf))))
return HOSTERR;
return BINDERR;
/* Construct the argument of PORT (of the form a,b,c,d,e,f). */
bytes = (char *)alloca (6 * 4 + 1);
sprintf (bytes, "%d,%d,%d,%d,%d,%d", in_addr[0], in_addr[1],

View File

@ -33,9 +33,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#ifndef WINDOWS
# include <netdb.h> /* for h_errno */
#endif
#include "wget.h"
#include "utils.h"
@ -51,11 +48,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef errno
extern int errno;
#endif
#ifndef h_errno
# ifndef __CYGWIN__
extern int h_errno;
# endif
#endif
/* File where the "ls -al" listing will be saved. */
#define LIST_FILENAME ".listing"
@ -601,15 +593,6 @@ Error in server response, closing control connection.\n"));
closeport (dtsock);
return err;
break;
case HOSTERR:
logputs (LOG_VERBOSE, "\n");
logprintf (LOG_NOTQUIET, "%s: %s\n", u->host,
herrmsg (h_errno));
CLOSE (csock);
closeport (dtsock);
rbuf_uninitialize (&con->rbuf);
return HOSTERR;
break;
case FTPPORTERR:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("Invalid PORT.\n"));

View File

@ -59,6 +59,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
extern int errno;
#endif
#ifndef h_errno
# ifndef __CYGWIN__
extern int h_errno;
# endif
#endif
#define IP4_ADDRESS_LENGTH 4
/* Mapping between known hosts and to lists of their addresses. */

View File

@ -44,12 +44,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
# endif
#endif
#ifdef WINDOWS
# include <winsock.h>
#else
# include <netdb.h> /* for h_errno */
#endif
#include "wget.h"
#include "utils.h"
#include "url.h"
@ -73,11 +67,6 @@ extern char *version_string;
#ifndef errno
extern int errno;
#endif
#ifndef h_errno
# ifndef __CYGWIN__
extern int h_errno;
# endif
#endif
static int cookies_loaded_p;