]> sjero.net Git - wget/commitdiff
[svn] Include <netdb.h> where h_errno is used. Likewise for <errno.h> and errno.
authorhniksic <devnull@localhost>
Sun, 17 Dec 2000 18:12:02 +0000 (10:12 -0800)
committerhniksic <devnull@localhost>
Sun, 17 Dec 2000 18:12:02 +0000 (10:12 -0800)
From <sxsvgsi7wcw.fsf@florida.arsdigita.de>.

src/ChangeLog
src/ftp-basic.c
src/ftp.c
src/gen_sslfunc.c
src/http.c
src/main.c
src/mswindows.c
src/recur.c
src/retr.c

index a7181c0ca92288aa8e55d464eea2ac295e691d51..716a92d856e588735d10aba1c1ed51db54838dbf 100644 (file)
@@ -1,3 +1,18 @@
+2000-12-17  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * mswindows.c: Include <errno.h>.
+
+       * gen_sslfunc.c: Include <errno.h>.
+
+       * ftp-basic.c: Don't attempt to declare errno or h_errno because
+       they're not used.
+
+       * main.c: Include <errno.h> because errno is used.
+
+       * ftp.c: Ditto.
+
+       * http.c: Include <netdb.h> for h_errno.
+
 2000-12-13  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * html-parse.c (advance_declaration): MSVC assert() chokes on
index 8f6f25e1ba207a4fecf1165ed77c79b62df3a341..d6d7c5a96572ea9421238ccd3e92daf3af7d1fe8 100644 (file)
@@ -43,13 +43,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "host.h"
 #include "ftp.h"
 
-#ifndef errno
-extern int errno;
-#endif
-#ifndef h_errno
-extern int h_errno;
-#endif
-
 char ftp_last_respline[128];
 
 \f
index 2b9eb0f267e4b63a60db95ae19e7afe35990aebe..e28f4596299e903c21e5c80e4de778c211d8f324 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -33,6 +33,9 @@ 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"
index 44ff5022e8444c1437d7a5e98db44b753cfe9230..8b64b581e106945a1dad379a408c3eca178a699f 100644 (file)
@@ -18,19 +18,29 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <config.h>
+
 #ifdef HAVE_SSL
+
+#include <assert.h>
+#include <sys/time.h>
+#include <errno.h>
+
 #include <openssl/bio.h>
 #include <openssl/crypto.h>
 #include <openssl/x509.h>
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
-#include <assert.h>
+
 #define SSL_ERR_CTX_CREATION -2
-#include <sys/time.h>
+
 #include "wget.h"
 #include "connect.h"
 
+#ifndef errno
+extern int errno;
+#endif
+
 /* #### Shouldn't this be static?  --hniksic */
 int verify_callback PARAMS ((int, X509_STORE_CTX *));
 
index 676fef5b7db4a0845d5b7a75380e1aab58ede452..8f0e86d799076a2bedb3ebdf8075d007c9d3085a 100644 (file)
@@ -46,6 +46,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifdef WINDOWS
 # include <winsock.h>
+#else
+# include <netdb.h>            /* for h_errno */
 #endif
 
 #include "wget.h"
index 221ac5ae3d93824a0407d9112ca0c4f9053a8a24..7db0ba0288f076b3306ca28f6f837bc948d4de5c 100644 (file)
@@ -39,6 +39,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 # include <locale.h>
 #endif /* HAVE_LOCALE_H */
 #endif /* HAVE_NLS */
+#include <errno.h>
 
 #define OPTIONS_DEFINED_HERE   /* for options.h */
 
index bf09b095caecd8287eaf4af1aca79b086e75603a..e68d852204db74d197a6a7efcd9c054210f7c1b8 100644 (file)
@@ -26,10 +26,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <winsock.h>
 #include <string.h>
 #include <assert.h>
+#include <errno.h>
 
 #include "wget.h"
 #include "url.h"
 
+#ifndef errno
+extern int errno;
+#endif
+
 char *argv0;
 
 /* Defined in log.c.  */
index 98c5597035f9d6d29fa0c8f4bf51495db68b2b35..21bb40b09bb71f6463f52b09ed6a683be0a3d31a 100644 (file)
@@ -44,6 +44,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "host.h"
 #include "hash.h"
 
+#ifndef errno
+extern int errno;
+#endif
+
 extern char *version_string;
 
 #define ROBOTS_FILENAME "robots.txt"
index a334cea506e2f415c1a5ec26025cb1158778c746..3334ced804e4b0a030d861c856ec821abacc6c7b 100644 (file)
@@ -44,6 +44,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "connect.h"
 #include "hash.h"
 
+#ifndef errno
+extern int errno;
+#endif
+
 #ifdef WINDOWS
 LARGE_INTEGER internal_time;
 #else