+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
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],
#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"
#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"
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"));
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. */
# endif
#endif
-#ifdef WINDOWS
-# include <winsock.h>
-#else
-# include <netdb.h> /* for h_errno */
-#endif
-
#include "wget.h"
#include "utils.h"
#include "url.h"
#ifndef errno
extern int errno;
#endif
-#ifndef h_errno
-# ifndef __CYGWIN__
-extern int h_errno;
-# endif
-#endif
\f
static int cookies_loaded_p;