From f1586cb4775681810afd8e6626e7842d459f3b85 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 26 Jul 2011 17:23:27 +0200 Subject: stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.h --- lib/asyn-ares.c | 6 ------ lib/asyn-thread.c | 6 ------ lib/axtls.c | 4 +--- lib/base64.c | 3 --- lib/connect.c | 6 ------ lib/content_encoding.c | 3 --- lib/cookie.c | 3 --- lib/curl_addrinfo.c | 1 - lib/curl_threads.c | 1 + lib/cyassl.c | 5 +---- lib/dict.c | 7 ------- lib/easy.c | 7 ------- lib/escape.c | 5 +---- lib/file.c | 6 ------ lib/fileinfo.c | 1 - lib/formdata.c | 5 +---- lib/ftp.c | 5 ----- lib/getenv.c | 4 ---- lib/getinfo.c | 4 ---- lib/gopher.c | 7 ------- lib/gtls.c | 5 ++--- lib/hash.c | 3 --- lib/hostasyn.c | 6 ------ lib/hostip.c | 6 ------ lib/hostip4.c | 6 ------ lib/hostip6.c | 6 ------ lib/hostsyn.c | 6 ------ lib/http.c | 6 ------ lib/http_chunks.c | 7 +------ lib/http_digest.c | 7 +------ lib/http_negotiate.c | 7 +------ lib/http_negotiate_sspi.c | 7 +------ lib/http_ntlm.c | 9 +-------- lib/http_proxy.c | 1 + lib/idn_win32.c | 22 +++++++++++----------- lib/imap.c | 5 ----- lib/inet_ntop.c | 1 - lib/inet_pton.c | 1 - lib/krb4.c | 2 -- lib/krb5.c | 2 -- lib/ldap.c | 7 ------- lib/llist.c | 3 --- lib/md4.c | 1 - lib/md5.c | 2 -- lib/memdebug.c | 4 ---- lib/memdebug.h | 7 +++---- lib/mprintf.c | 5 ----- lib/netrc.c | 4 ---- lib/nonblock.c | 3 --- lib/nss.c | 3 --- lib/nwlib.c | 6 ++---- lib/nwos.c | 13 +++---------- lib/parsedate.c | 8 +------- lib/pingpong.h | 10 ++++------ lib/polarssl.c | 4 +--- lib/pop3.c | 5 ----- lib/qssl.c | 3 ++- lib/security.c | 3 --- lib/sendf.c | 5 ----- lib/share.c | 4 +--- lib/slist.c | 5 ----- lib/smtp.c | 5 ----- lib/socks.c | 4 ---- lib/socks_gssapi.c | 5 ----- lib/socks_sspi.c | 7 ------- lib/speedcheck.c | 3 --- lib/ssh.c | 5 ----- lib/sslgen.c | 3 --- lib/ssluse.c | 3 --- lib/strdup.c | 1 + lib/strequal.c | 3 --- lib/strerror.c | 2 -- lib/strtok.c | 1 - lib/strtoofft.c | 4 +--- lib/telnet.c | 6 ------ lib/tftp.c | 5 ----- lib/transfer.c | 7 ------- lib/url.c | 8 -------- lib/url.h | 8 +++----- lib/version.c | 3 --- lib/wildcard.c | 1 + 81 files changed, 47 insertions(+), 346 deletions(-) (limited to 'lib') diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 4165a451d..7f3bdf8a2 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_LIMITS_H #include #endif @@ -39,16 +37,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #ifdef HAVE_PROCESS_H diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 0fcbc49ae..d2a6dde49 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -36,16 +34,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #if defined(USE_THREADS_POSIX) diff --git a/lib/axtls.c b/lib/axtls.c index 990264b93..e37aed50a 100644 --- a/lib/axtls.c +++ b/lib/axtls.c @@ -27,13 +27,11 @@ */ #include "setup.h" + #ifdef USE_AXTLS #include #include "axtls.h" -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/base64.c b/lib/base64.c index 0de1f0100..812fd67c2 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -24,9 +24,6 @@ #include "setup.h" -#include -#include - #define _MPRINTF_REPLACE /* use our functions only */ #include diff --git a/lib/connect.c b/lib/connect.c index adfdd712d..1f802bda8 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -49,9 +49,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include -#endif #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE)) #include @@ -65,9 +62,6 @@ #include #endif -#include -#include - #define _MPRINTF_REPLACE /* use our functions only */ #include diff --git a/lib/content_encoding.c b/lib/content_encoding.c index 876115a32..63bc2433c 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -24,9 +24,6 @@ #ifdef HAVE_LIBZ -#include -#include - #include "urldata.h" #include #include "sendf.h" diff --git a/lib/cookie.c b/lib/cookie.c index 7657da06e..86d264c45 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -81,9 +81,6 @@ Example set of cookies: #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) -#include -#include - #define _MPRINTF_REPLACE #include diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index 074bf17dc..bae403f95 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -40,7 +40,6 @@ #ifdef __VMS # include # include -# include #endif #if defined(NETWARE) && defined(__NOVELL_LIBC__) diff --git a/lib/curl_threads.c b/lib/curl_threads.c index e9636440f..411ccc81d 100644 --- a/lib/curl_threads.c +++ b/lib/curl_threads.c @@ -19,6 +19,7 @@ * KIND, either express or implied. * ***************************************************************************/ + #include "setup.h" #if defined(USE_THREADS_POSIX) diff --git a/lib/cyassl.c b/lib/cyassl.c index 81bcabaa1..6f15b8ebd 100644 --- a/lib/cyassl.c +++ b/lib/cyassl.c @@ -27,16 +27,13 @@ */ #include "setup.h" + #ifdef USE_CYASSL -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include #endif - #include "urldata.h" #include "sendf.h" #include "inet_pton.h" diff --git a/lib/dict.c b/lib/dict.c index 241781ab9..36bb28923 100644 --- a/lib/dict.c +++ b/lib/dict.c @@ -24,13 +24,6 @@ #ifndef CURL_DISABLE_DICT -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/easy.c b/lib/easy.c index 30daf1585..76ff702e3 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -22,13 +22,6 @@ #include "setup.h" -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/escape.c b/lib/escape.c index 5500a92bf..b0922bc93 100644 --- a/lib/escape.c +++ b/lib/escape.c @@ -24,12 +24,9 @@ * allocated string or NULL if an error occurred. */ #include "setup.h" -#include + #include -#include -#include -#include #include "curl_memory.h" #include "urldata.h" #include "warnless.h" diff --git a/lib/file.c b/lib/file.c index c29b0c9f8..610a3495b 100644 --- a/lib/file.c +++ b/lib/file.c @@ -23,12 +23,6 @@ #include "setup.h" #ifndef CURL_DISABLE_FILE -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/fileinfo.c b/lib/fileinfo.c index dbae7da51..16166687e 100644 --- a/lib/fileinfo.c +++ b/lib/fileinfo.c @@ -22,7 +22,6 @@ #include "setup.h" -#include #include "strdup.h" #include "fileinfo.h" diff --git a/lib/formdata.c b/lib/formdata.c index e6ab124aa..9e3ed08e5 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -21,6 +21,7 @@ ***************************************************************************/ #include "setup.h" + #include /* Length of the random boundary string. */ @@ -28,10 +29,6 @@ #if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) -#include -#include -#include -#include #if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME) #include #endif diff --git a/lib/ftp.c b/lib/ftp.c index bfc0a78a1..c30d809b0 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -23,11 +23,6 @@ #include "setup.h" #ifndef CURL_DISABLE_FTP -#include -#include -#include -#include -#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/getenv.c b/lib/getenv.c index 36fbb7583..6b40dd68d 100644 --- a/lib/getenv.c +++ b/lib/getenv.c @@ -22,10 +22,6 @@ #include "setup.h" -#include -#include -#include - #ifdef __VMS #include #endif diff --git a/lib/getinfo.c b/lib/getinfo.c index bb289741a..aa7af2c86 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -27,10 +27,6 @@ #include "urldata.h" #include "getinfo.h" -#include -#include -#include -#include #include "curl_memory.h" #include "sslgen.h" #include "connect.h" /* Curl_getconnectinfo() */ diff --git a/lib/gopher.c b/lib/gopher.c index dc9c134b5..38f1f64a9 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -24,13 +24,6 @@ #ifndef CURL_DISABLE_GOPHER -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/gtls.c b/lib/gtls.c index a376fb0b9..f75a81576 100644 --- a/lib/gtls.c +++ b/lib/gtls.c @@ -29,14 +29,13 @@ */ #include "setup.h" + #ifdef USE_GNUTLS + #include #include #include -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/hash.c b/lib/hash.c index 6c921e442..3a6e312a3 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -22,9 +22,6 @@ #include "setup.h" -#include -#include - #include "hash.h" #include "llist.h" diff --git a/lib/hostasyn.c b/lib/hostasyn.c index 50f6b01fb..771562fd1 100644 --- a/lib/hostasyn.c +++ b/lib/hostasyn.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -36,16 +34,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #ifdef HAVE_PROCESS_H diff --git a/lib/hostip.c b/lib/hostip.c index 084ee86ac..e857dced4 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -36,16 +34,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #ifdef HAVE_SETJMP_H diff --git a/lib/hostip4.c b/lib/hostip4.c index 5d8519818..1a5e26585 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -36,16 +34,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #ifdef HAVE_PROCESS_H diff --git a/lib/hostip6.c b/lib/hostip6.c index b944401c5..dae41e97f 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -36,16 +34,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #ifdef HAVE_PROCESS_H diff --git a/lib/hostsyn.c b/lib/hostsyn.c index a5e97658e..b60188708 100644 --- a/lib/hostsyn.c +++ b/lib/hostsyn.c @@ -22,8 +22,6 @@ #include "setup.h" -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -36,16 +34,12 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_STDLIB_H -#include /* required for free() prototypes */ -#endif #ifdef HAVE_UNISTD_H #include /* for the close() proto */ #endif #ifdef __VMS #include #include -#include #endif #ifdef HAVE_PROCESS_H diff --git a/lib/http.c b/lib/http.c index be0149cb9..bb4b38793 100644 --- a/lib/http.c +++ b/lib/http.c @@ -23,12 +23,6 @@ #include "setup.h" #ifndef CURL_DISABLE_HTTP -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/http_chunks.c b/lib/http_chunks.c index 93de1d968..d7a5cb48c 100644 --- a/lib/http_chunks.c +++ b/lib/http_chunks.c @@ -19,15 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ + #include "setup.h" #ifndef CURL_DISABLE_HTTP -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #include "urldata.h" /* it includes http_chunks.h */ #include "sendf.h" /* for the client write stuff */ diff --git a/lib/http_digest.c b/lib/http_digest.c index c3a39fcee..3ca0389e9 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -19,15 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ + #include "setup.h" #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH) -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #include "urldata.h" #include "sendf.h" diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c index 36823f8cf..d7bc67955 100644 --- a/lib/http_negotiate.c +++ b/lib/http_negotiate.c @@ -19,6 +19,7 @@ * KIND, either express or implied. * ***************************************************************************/ + #include "setup.h" #ifdef HAVE_GSSAPI @@ -27,12 +28,6 @@ #endif #ifndef CURL_DISABLE_HTTP - /* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #include "urldata.h" #include "sendf.h" diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c index 0f40bb584..10eca697c 100644 --- a/lib/http_negotiate_sspi.c +++ b/lib/http_negotiate_sspi.c @@ -19,17 +19,12 @@ * KIND, either express or implied. * ***************************************************************************/ + #include "setup.h" #ifdef USE_WINDOWS_SSPI #ifndef CURL_DISABLE_HTTP -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #include "urldata.h" #include "sendf.h" diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 166d169c9..dfd243030 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -19,6 +19,7 @@ * KIND, either express or implied. * ***************************************************************************/ + #include "setup.h" /* NTLM details: @@ -32,20 +33,12 @@ #define DEBUG_ME 0 -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include - #ifdef HAVE_UNISTD_H #include #endif #ifdef USE_NTLM_SSO #include -#include #include #include #include diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 9fa832e4d..f3b02c975 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -27,6 +27,7 @@ #ifdef HAVE_UNISTD_H #include #endif + #include "urldata.h" #include #include "http_proxy.h" diff --git a/lib/idn_win32.c b/lib/idn_win32.c index 96d3f0959..70286c0fd 100644 --- a/lib/idn_win32.c +++ b/lib/idn_win32.c @@ -19,13 +19,15 @@ * KIND, either express or implied. * ***************************************************************************/ -/*************************************************************************** - * IDN Implementation using windows native APIs - * Pierre Joye - ***************************************************************************/ -#if defined(WIN32) && defined(USE_WIN32_IDN) -#include -#include + + /* + * IDN conversions using Windows kernel32 and normaliz libraries. + */ + +#include "setup.h" + +#ifdef USE_WIN32_IDN + #include #ifdef WANT_IDN_PROTOTYPES @@ -121,7 +123,5 @@ int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8) } return 1; } -#else -typedef int dummy; /* because ISO C forbids an empty translation unit! */ -#endif - /* WIN32 */ + +#endif /* USE_WIN32_IDN */ diff --git a/lib/imap.c b/lib/imap.c index b135443d3..f414ee7bb 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -26,11 +26,6 @@ #include "setup.h" #ifndef CURL_DISABLE_IMAP -#include -#include -#include -#include -#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index bb175b417..1bb97443b 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -34,7 +34,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#include #define _MPRINTF_REPLACE /* use our functions only */ #include diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 5a781abf5..021f48d52 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -32,7 +32,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#include #include "inet_pton.h" diff --git a/lib/krb4.c b/lib/krb4.c index 0915b0248..30b1c664e 100644 --- a/lib/krb4.c +++ b/lib/krb4.c @@ -44,11 +44,9 @@ #ifndef CURL_DISABLE_FTP #ifdef HAVE_KRB4 -#include #ifdef HAVE_NETDB_H #include #endif -#include #include #include diff --git a/lib/krb5.c b/lib/krb5.c index 5c60c8dc4..c29f95be0 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -41,11 +41,9 @@ #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name #endif -#include #ifdef HAVE_NETDB_H #include #endif -#include #include "urldata.h" #include "curl_base64.h" diff --git a/lib/ldap.c b/lib/ldap.c index ccdd83e6b..9692ed9d7 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -35,13 +35,6 @@ * OpenLDAP library versions, USE_OPENLDAP shall not be defined. */ -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include - #ifdef CURL_LDAP_WIN /* Use Windows LDAP implementation. */ # include # ifndef LDAP_VENDOR_NAME diff --git a/lib/llist.c b/lib/llist.c index 8b4bc7f20..9ad1db59b 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -22,9 +22,6 @@ #include "setup.h" -#include -#include - #include "llist.h" #include "curl_memory.h" diff --git a/lib/md4.c b/lib/md4.c index 84c520210..828ce6277 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -27,7 +27,6 @@ #ifdef USE_NSS #include "curl_md4.h" -#include typedef unsigned int UINT4; diff --git a/lib/md5.c b/lib/md5.c index 8abcb2b1d..f26e02752 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -24,8 +24,6 @@ #ifndef CURL_DISABLE_CRYPTO_AUTH -#include - #include "curl_md5.h" #include "curl_hmac.h" diff --git a/lib/memdebug.c b/lib/memdebug.c index 69e204b6a..60d938ade 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -32,10 +32,6 @@ #define _MPRINTF_REPLACE #include #include "urldata.h" -#include -#include -#include -#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/memdebug.h b/lib/memdebug.h index 77a4f4774..3dc481577 100644 --- a/lib/memdebug.h +++ b/lib/memdebug.h @@ -1,6 +1,6 @@ #ifdef CURLDEBUG -#ifndef _CURL_MEMDEBUG_H -#define _CURL_MEMDEBUG_H +#ifndef HEADER_CURL_MEMDEBUG_H +#define HEADER_CURL_MEMDEBUG_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -39,7 +39,6 @@ #ifdef HAVE_SYS_SOCKET_H #include #endif -#include #define logfile curl_debuglogfile @@ -133,7 +132,7 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source); #endif /* MEMDEBUG_NODEFINES */ -#endif /* _CURL_MEMDEBUG_H */ +#endif /* HEADER_CURL_MEMDEBUG_H */ #endif /* CURLDEBUG */ #ifndef fake_sclose diff --git a/lib/mprintf.c b/lib/mprintf.c index dd7a1e09b..38732e099 100644 --- a/lib/mprintf.c +++ b/lib/mprintf.c @@ -36,11 +36,6 @@ */ #include "setup.h" -#include -#include -#include -#include -#include #if defined(DJGPP) && (DJGPP_MINOR < 4) #undef _MPRINTF_REPLACE /* don't use x_was_used() here */ diff --git a/lib/netrc.c b/lib/netrc.c index 5541a2f29..6764b974d 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -22,10 +22,6 @@ #include "setup.h" -#include -#include -#include - #ifdef HAVE_UNISTD_H #include #endif diff --git a/lib/nonblock.c b/lib/nonblock.c index cd819506c..6b023f812 100644 --- a/lib/nonblock.c +++ b/lib/nonblock.c @@ -34,9 +34,6 @@ #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_STDLIB_H -#include -#endif #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE)) #include diff --git a/lib/nss.c b/lib/nss.c index 3dc0ba61c..7f5acbc84 100644 --- a/lib/nss.c +++ b/lib/nss.c @@ -27,9 +27,6 @@ #include "setup.h" -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/nwlib.c b/lib/nwlib.c index f9c8a4298..c87ca0d29 100644 --- a/lib/nwlib.c +++ b/lib/nwlib.c @@ -20,14 +20,12 @@ * ***************************************************************************/ -#ifdef NETWARE /* Novell NetWare */ +#include "setup.h" -#include +#ifdef NETWARE /* Novell NetWare */ #ifdef __NOVELL_LIBC__ /* For native LibC-based NLM we need to register as a real lib. */ -#include -#include #include #include #include diff --git a/lib/nwos.c b/lib/nwos.c index ac365124f..bd695b3f9 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -5,7 +5,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 @@ -20,9 +20,9 @@ * ***************************************************************************/ -#ifdef NETWARE /* Novell NetWare */ +#include "setup.h" -#include +#ifdef NETWARE /* Novell NetWare */ #ifdef __NOVELL_LIBC__ /* For native LibC-based NLM we need to do nothing. */ @@ -34,7 +34,6 @@ int netware_init ( void ) #else /* __NOVELL_LIBC__ */ /* For native CLib-based NLM we need to initialize the LONG namespace. */ -#include #include #include #include @@ -86,10 +85,4 @@ int __deinit_environment ( void ) #endif /* __NOVELL_LIBC__ */ -#else /* NETWARE */ - -#ifdef __POCC__ -# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */ -#endif - #endif /* NETWARE */ diff --git a/lib/parsedate.c b/lib/parsedate.c index 62f1a4181..ec60e78e7 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -72,14 +72,8 @@ 20040911 +0200 */ -#include "setup.h" -#include -#include -#include -#ifdef HAVE_STDLIB_H -#include /* for strtol() */ -#endif +#include "setup.h" #include #include "rawstr.h" diff --git a/lib/pingpong.h b/lib/pingpong.h index cbbff8f3e..370fd7a76 100644 --- a/lib/pingpong.h +++ b/lib/pingpong.h @@ -1,5 +1,5 @@ -#ifndef __PINGPONG_H -#define __PINGPONG_H +#ifndef HEADER_CURL_PINGPONG_H +#define HEADER_CURL_PINGPONG_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,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 @@ -22,8 +22,6 @@ * ***************************************************************************/ -#include - #include "setup.h" #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \ @@ -144,4 +142,4 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp); int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks, int numsocks); -#endif /* __PINGPONG_H */ +#endif /* HEADER_CURL_PINGPONG_H */ diff --git a/lib/polarssl.c b/lib/polarssl.c index 2e70a28d5..023204420 100644 --- a/lib/polarssl.c +++ b/lib/polarssl.c @@ -27,11 +27,9 @@ */ #include "setup.h" + #ifdef USE_POLARSSL -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/pop3.c b/lib/pop3.c index dc5a1c2fa..30766711c 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -27,11 +27,6 @@ #include "setup.h" #ifndef CURL_DISABLE_POP3 -#include -#include -#include -#include -#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/qssl.c b/lib/qssl.c index 0e263ccd1..172df3141 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -23,8 +23,9 @@ #include "setup.h" #ifdef USE_QSOSSL + #include -#include + #ifdef HAVE_LIMITS_H # include #endif diff --git a/lib/security.c b/lib/security.c index 010a5504e..af61f3aed 100644 --- a/lib/security.c +++ b/lib/security.c @@ -46,9 +46,6 @@ #ifndef CURL_DISABLE_FTP #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI) -#include -#include - #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/sendf.c b/lib/sendf.c index 50b194b66..dd031133c 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -22,10 +22,6 @@ #include "setup.h" -#include -#include -#include - #ifdef HAVE_SYS_SOCKET_H #include /* required for send() & recv() prototypes */ #endif @@ -54,7 +50,6 @@ #define Curl_sec_read(a,b,c,d) -1 #endif -#include #include "curl_memory.h" #include "strerror.h" diff --git a/lib/share.c b/lib/share.c index 33dcecf4c..a3db4ded9 100644 --- a/lib/share.c +++ b/lib/share.c @@ -21,9 +21,7 @@ ***************************************************************************/ #include "setup.h" -#include -#include -#include + #include #include "urldata.h" #include "share.h" diff --git a/lib/slist.c b/lib/slist.c index e2006f4be..8b4bd9d6b 100644 --- a/lib/slist.c +++ b/lib/slist.c @@ -22,11 +22,6 @@ #include "setup.h" -#include -#include -#include - -#include #include "curl_memory.h" #include "slist.h" diff --git a/lib/smtp.c b/lib/smtp.c index 1626ae7da..aab4f80b4 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -29,11 +29,6 @@ #include "setup.h" #ifndef CURL_DISABLE_SMTP -#include -#include -#include -#include -#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/socks.c b/lib/socks.c index 82293019b..34de02865 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -23,11 +23,7 @@ #include "setup.h" #if !defined(CURL_DISABLE_PROXY) || defined(USE_WINDOWS_SSPI) -#include -#ifdef HAVE_STDLIB_H -#include -#endif #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 872efb0e1..de136b037 100644 --- a/lib/socks_gssapi.c +++ b/lib/socks_gssapi.c @@ -31,11 +31,6 @@ #ifndef gss_nt_service_name #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE #endif -#include - -#ifdef HAVE_STDLIB_H -#include -#endif #include "curl_gssapi.h" #include "urldata.h" diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index 5e1bcba8e..5b9376211 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -20,17 +20,10 @@ * ***************************************************************************/ - #include "setup.h" #ifdef USE_WINDOWS_SSPI -#include - -#ifdef HAVE_STDLIB_H -#include -#endif - #include "urldata.h" #include "sendf.h" #include "connect.h" diff --git a/lib/speedcheck.c b/lib/speedcheck.c index 56ac34aef..13d5d233e 100644 --- a/lib/speedcheck.c +++ b/lib/speedcheck.c @@ -22,9 +22,6 @@ #include "setup.h" -#include -#include - #include #include "urldata.h" #include "sendf.h" diff --git a/lib/ssh.c b/lib/ssh.c index dff1e1286..375093098 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -26,11 +26,6 @@ #ifdef USE_LIBSSH2 -#include -#include -#include -#include -#include #ifdef HAVE_LIMITS_H # include #endif diff --git a/lib/sslgen.c b/lib/sslgen.c index 779d9e9c3..fbdbeea9d 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -43,9 +43,6 @@ #include "setup.h" -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/ssluse.c b/lib/ssluse.c index 5bdc536a3..91ed93b2c 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -32,9 +32,6 @@ #include "setup.h" -#include -#include -#include #ifdef HAVE_LIMITS_H #include #endif diff --git a/lib/strdup.c b/lib/strdup.c index a3107cff7..02d480c26 100644 --- a/lib/strdup.c +++ b/lib/strdup.c @@ -21,6 +21,7 @@ ***************************************************************************/ #include "setup.h" + #include "strdup.h" #ifndef HAVE_STRDUP diff --git a/lib/strequal.c b/lib/strequal.c index 15896b9fd..89ad8a6e8 100644 --- a/lib/strequal.c +++ b/lib/strequal.c @@ -22,9 +22,6 @@ #include "setup.h" -#include -#include - #ifdef HAVE_STRINGS_H #include #endif diff --git a/lib/strerror.c b/lib/strerror.c index adee28891..f038f8ec0 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -34,8 +34,6 @@ #endif #include -#include -#include #ifdef USE_LIBIDN #include diff --git a/lib/strtok.c b/lib/strtok.c index 91c254156..94eac0e64 100644 --- a/lib/strtok.c +++ b/lib/strtok.c @@ -24,7 +24,6 @@ #ifndef HAVE_STRTOK_R #include -#include #include "strtok.h" diff --git a/lib/strtoofft.c b/lib/strtoofft.c index dd897cf16..c61459de8 100644 --- a/lib/strtoofft.c +++ b/lib/strtoofft.c @@ -21,6 +21,7 @@ ***************************************************************************/ #include "setup.h" + #include "strtoofft.h" /* @@ -32,14 +33,11 @@ */ #ifdef NEED_CURL_STRTOLL -#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. */ #if('9' - '0') != 9 || ('Z' - 'A') != 25 || ('z' - 'a') != 25 -#include #define NO_RANGE_TEST diff --git a/lib/telnet.c b/lib/telnet.c index 5835e00cb..91725a062 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -23,12 +23,6 @@ #include "setup.h" #ifndef CURL_DISABLE_TELNET -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/tftp.c b/lib/tftp.c index 73ce7aa08..f915e76e0 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -23,11 +23,6 @@ #include "setup.h" #ifndef CURL_DISABLE_TFTP -/* -- WIN32 approved -- */ -#include -#include -#include -#include #ifdef HAVE_SYS_SOCKET_H #include diff --git a/lib/transfer.c b/lib/transfer.c index 718507e1b..637fe7a48 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -22,13 +22,6 @@ #include "setup.h" -/* -- WIN32 approved -- */ -#include -#include -#include -#include -#include - #include "strtoofft.h" #include "strequal.h" #include "rawstr.h" diff --git a/lib/url.c b/lib/url.c index 39e9bab5d..aa1e6f8cb 100644 --- a/lib/url.c +++ b/lib/url.c @@ -20,16 +20,8 @@ * ***************************************************************************/ -/* -- WIN32 approved -- */ - #include "setup.h" -#include -#include -#include -#include -#include - #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/lib/url.h b/lib/url.h index 8a5434cef..677e63954 100644 --- a/lib/url.h +++ b/lib/url.h @@ -1,5 +1,5 @@ -#ifndef __URL_H -#define __URL_H +#ifndef HEADER_CURL_URL_H +#define HEADER_CURL_URL_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -22,8 +22,6 @@ * ***************************************************************************/ -#include /* to make sure we have ap_list */ - /* * Prototypes for library-wide functions provided by url.c */ @@ -94,4 +92,4 @@ void Curl_verboseconnect(struct connectdata *conn); #endif -#endif +#endif /* HEADER_CURL_URL_H */ diff --git a/lib/version.c b/lib/version.c index 6b9ff5070..f9ee479c8 100644 --- a/lib/version.c +++ b/lib/version.c @@ -22,9 +22,6 @@ #include "setup.h" -#include -#include - #include #include "urldata.h" #include "sslgen.h" diff --git a/lib/wildcard.c b/lib/wildcard.c index 9fe5d5135..6f4c7380c 100644 --- a/lib/wildcard.c +++ b/lib/wildcard.c @@ -21,6 +21,7 @@ ***************************************************************************/ #include "setup.h" + #include "wildcard.h" #include "llist.h" #include "fileinfo.h" -- cgit v1.2.3