]> sjero.net Git - wget/commitdiff
[svn] Declare h_errno in host.c, but not elsewhere.
authorhniksic <devnull@localhost>
Mon, 3 Dec 2001 17:22:06 +0000 (09:22 -0800)
committerhniksic <devnull@localhost>
Mon, 3 Dec 2001 17:22:06 +0000 (09:22 -0800)
src/ChangeLog
src/ftp-basic.c
src/ftp.c
src/host.c
src/http.c

index 08d3733e7c371804c625827fafdf22bf93b196b0..3f6c3bee2eee002f57acd40a00b0581a743875d4 100644 (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
index bd8c25bf77d62a2b1325333636167b6dde6794e2..096010c373f2d16da090b6dd961db5e589731123 100644 (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],
index 00b0b638581d179af406e199964de4a259c7e685..1b78fd333f9bfe7159599de469e1e2c6bf31b90e 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -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"));
index 77984722e7044233f8a98f738cc6b23b8c9c0c82..a769fd9725d5d99470320526442790fc5ba9d0ae 100644 (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. */
index 261b51e4cf980ad50c0e6fbc8dfc3241d8e86900..16f5dc2da082a920f2a94b6386203456146d5824 100644 (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
 \f
 static int cookies_loaded_p;