From ef2176109fca302ed89193716b62c3a7113552a3 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 24 Jul 2011 04:39:43 +0200 Subject: errno.h inclusion conditionally done in setup_once.h --- lib/Makefile.netware | 1 + lib/asyn-thread.c | 1 - lib/config-amigaos.h | 3 ++- lib/config-dos.h | 1 + lib/config-mac.h | 1 + lib/config-os400.h | 3 +++ lib/config-riscos.h | 3 +++ lib/config-vms.h | 3 +++ lib/config-win32.h | 3 +++ lib/config-win32ce.h | 3 +++ lib/connect.c | 1 - lib/easy.c | 1 - lib/hostip4.c | 3 +-- lib/http_ntlm.c | 1 - lib/inet_ntop.c | 1 - lib/inet_pton.c | 1 - lib/ldap.c | 1 - lib/qssl.c | 1 - lib/sendf.c | 1 - lib/setup.h | 1 - lib/setup_once.h | 3 +++ lib/strerror.c | 1 - lib/strtoofft.c | 1 - lib/transfer.c | 1 - lib/url.c | 1 - src/Makefile.netware | 1 + src/config-amigaos.h | 3 ++- src/config-mac.h | 1 + src/config-riscos.h | 3 +++ src/config-win32.h | 3 +++ src/main.c | 1 - tests/libtest/lib506.c | 1 - tests/libtest/test.h | 1 - 33 files changed, 34 insertions(+), 21 deletions(-) diff --git a/lib/Makefile.netware b/lib/Makefile.netware index 2cc7c9ecc..91c8ae7f1 100644 --- a/lib/Makefile.netware +++ b/lib/Makefile.netware @@ -498,6 +498,7 @@ endif @echo $(DL)#define USE_MANUAL 1$(DL) >> $@ @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@ @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@ @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@ diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 8cb92d76e..0fcbc49ae 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -23,7 +23,6 @@ #include "setup.h" #include -#include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/config-amigaos.h b/lib/config-amigaos.h index 99b96d656..1474ba915 100644 --- a/lib/config-amigaos.h +++ b/lib/config-amigaos.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,6 +26,7 @@ #define HAVE_ARPA_INET_H 1 #define HAVE_CLOSESOCKET_CAMEL 1 +#define HAVE_ERRNO_H 1 #define HAVE_GETHOSTBYADDR 1 #define HAVE_INET_ADDR 1 #define HAVE_INTTYPES_H 1 diff --git a/lib/config-dos.h b/lib/config-dos.h index 35d21aae2..694a30465 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -40,6 +40,7 @@ #define PACKAGE "curl" #define HAVE_ARPA_INET_H 1 +#define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_GETADDRINFO 1 #define HAVE_GETNAMEINFO 1 diff --git a/lib/config-mac.h b/lib/config-mac.h index 80af84e52..72e8260d1 100644 --- a/lib/config-mac.h +++ b/lib/config-mac.h @@ -30,6 +30,7 @@ #define OS "mac" +#define HAVE_ERRNO_H 1 #define HAVE_NETINET_IN_H 1 #define HAVE_SYS_SOCKET_H 1 #define HAVE_SYS_SELECT_H 1 diff --git a/lib/config-os400.h b/lib/config-os400.h index 8dba1e4cd..4d2730928 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -97,6 +97,9 @@ /* Define if you have the header file. */ #undef HAVE_DES_H +/* Define if you have the header file. */ +#define HAVE_ERRNO_H + /* Define if you have the header file. */ #undef HAVE_ERR_H diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 5ccf68124..127dbdb0a 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -92,6 +92,9 @@ /* Define if you have the header file. */ #undef HAVE_DES_H +/* Define if you have the header file. */ +#define HAVE_ERRNO_H + /* Define if you have the header file. */ #undef HAVE_ERR_H diff --git a/lib/config-vms.h b/lib/config-vms.h index e3844f83b..75c77d1b1 100644 --- a/lib/config-vms.h +++ b/lib/config-vms.h @@ -143,6 +143,9 @@ /* Define if you have the uname function. */ #define HAVE_UNAME 1 +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ #define HAVE_ERR_H 1 diff --git a/lib/config-win32.h b/lib/config-win32.h index 6768dda3c..c4fe1b391 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -39,6 +39,9 @@ /* Define if you have the header file. */ /* #define HAVE_CRYPTO_H 1 */ +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ /* #define HAVE_ERR_H 1 */ diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 872334286..93e3b8999 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -39,6 +39,9 @@ /* Define if you have the header file. */ /* #define HAVE_CRYPTO_H 1 */ +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ /* #define HAVE_ERR_H 1 */ diff --git a/lib/connect.c b/lib/connect.c index a9185978c..b9b6c7589 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -69,7 +69,6 @@ #endif #include -#include #include #define _MPRINTF_REPLACE /* use our functions only */ diff --git a/lib/easy.c b/lib/easy.c index ac037d266..657b04201 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "strequal.h" diff --git a/lib/hostip4.c b/lib/hostip4.c index 67aefda29..5d8519818 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,7 +23,6 @@ #include "setup.h" #include -#include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 189bb8af3..166d169c9 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -49,7 +49,6 @@ #include #include #include -#include #endif #if (defined(NETWARE) && !defined(__NOVELL_LIBC__)) diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index 34cae801a..bb175b417 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -35,7 +35,6 @@ #include #endif #include -#include #define _MPRINTF_REPLACE /* use our functions only */ #include diff --git a/lib/inet_pton.c b/lib/inet_pton.c index d08c7c666..5a781abf5 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -33,7 +33,6 @@ #include #endif #include -#include #include "inet_pton.h" diff --git a/lib/ldap.c b/lib/ldap.c index 62a9ffc19..ccdd83e6b 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -41,7 +41,6 @@ #include #include #include -#include #ifdef CURL_LDAP_WIN /* Use Windows LDAP implementation. */ # include diff --git a/lib/qssl.c b/lib/qssl.c index 60ea6da23..0e263ccd1 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -24,7 +24,6 @@ #ifdef USE_QSOSSL #include -#include #include #ifdef HAVE_LIMITS_H # include diff --git a/lib/sendf.c b/lib/sendf.c index 0172ae7c3..50b194b66 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -25,7 +25,6 @@ #include #include #include -#include #ifdef HAVE_SYS_SOCKET_H #include /* required for send() & recv() prototypes */ diff --git a/lib/setup.h b/lib/setup.h index 91a655713..2aaf564dc 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -279,7 +279,6 @@ #ifdef HAVE_ASSERT_H #include #endif -#include #ifdef __TANDEM /* for nsr-tandem-nsk systems */ #include diff --git a/lib/setup_once.h b/lib/setup_once.h index b449807db..751102bed 100644 --- a/lib/setup_once.h +++ b/lib/setup_once.h @@ -42,7 +42,10 @@ #include #include #include + +#ifdef HAVE_ERRNO_H #include +#endif #ifdef HAVE_SYS_TYPES_H #include diff --git a/lib/strerror.c b/lib/strerror.c index 0a883421e..adee28891 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -36,7 +36,6 @@ #include #include #include -#include #ifdef USE_LIBIDN #include diff --git a/lib/strtoofft.c b/lib/strtoofft.c index 55a6ffd0d..dd897cf16 100644 --- a/lib/strtoofft.c +++ b/lib/strtoofft.c @@ -34,7 +34,6 @@ #ifdef NEED_CURL_STRTOLL #include #include -#include /* Range tests can be used for alphanum decoding if characters are consecutive, like in ASCII. Else an array is scanned. Determine this condition now. */ diff --git a/lib/transfer.c b/lib/transfer.c index 1c2afc4a2..6889fa7c7 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "strtoofft.h" #include "strequal.h" diff --git a/lib/url.c b/lib/url.c index adb96c4cc..b28446c3b 100644 --- a/lib/url.c +++ b/lib/url.c @@ -29,7 +29,6 @@ #include #include #include -#include #ifdef WIN32 #include diff --git a/src/Makefile.netware b/src/Makefile.netware index 85e0c92ee..0b0e8355d 100644 --- a/src/Makefile.netware +++ b/src/Makefile.netware @@ -491,6 +491,7 @@ endif @echo $(DL)#define USE_MANUAL 1$(DL) >> $@ @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@ @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@ @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@ diff --git a/src/config-amigaos.h b/src/config-amigaos.h index fba875dab..7f8e0a869 100644 --- a/src/config-amigaos.h +++ b/src/config-amigaos.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -30,6 +30,7 @@ #define OS "AmigaOS" #define HAVE_CLOSESOCKET_CAMEL 1 +#define HAVE_ERRNO_H 1 #define HAVE_UNISTD_H 1 #define HAVE_STRDUP 1 #define HAVE_UTIME 1 diff --git a/src/config-mac.h b/src/config-mac.h index f8aeb7a66..19c24c760 100644 --- a/src/config-mac.h +++ b/src/config-mac.h @@ -32,6 +32,7 @@ #define USE_MANUAL 1 #define HAVE_UNISTD_H 1 +#define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_UTIME_H 1 #define HAVE_SYS_UTIME_H 1 diff --git a/src/config-riscos.h b/src/config-riscos.h index 7816bab13..c9aa7bcc0 100644 --- a/src/config-riscos.h +++ b/src/config-riscos.h @@ -91,6 +91,9 @@ /* Define if you have the header file. */ #undef HAVE_DES_H +/* Define if you have the header file. */ +#define HAVE_ERRNO_H + /* Define if you have the header file. */ #undef HAVE_ERR_H diff --git a/src/config-win32.h b/src/config-win32.h index 38a329826..e5cbcf0df 100644 --- a/src/config-win32.h +++ b/src/config-win32.h @@ -30,6 +30,9 @@ /* HEADER FILES */ /* ---------------------------------------------------------------- */ +/* Define if you have the header file. */ +#define HAVE_ERRNO_H 1 + /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 diff --git a/src/main.c b/src/main.c index a68963df0..db4405c4a 100644 --- a/src/main.c +++ b/src/main.c @@ -34,7 +34,6 @@ #include #include #include -#include #if defined(MSDOS) || defined(WIN32) # if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME) diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c index 6476b9546..f9d2efd08 100644 --- a/tests/libtest/lib506.c +++ b/tests/libtest/lib506.c @@ -22,7 +22,6 @@ #include "test.h" #include #include -#include #include diff --git a/tests/libtest/test.h b/tests/libtest/test.h index 33d7bed83..046b5504e 100644 --- a/tests/libtest/test.h +++ b/tests/libtest/test.h @@ -33,7 +33,6 @@ #include #include #include -#include #ifdef HAVE_SYS_SOCKET_H #include -- cgit v1.2.3