From: Yang Tse Date: Fri, 14 Dec 2012 16:38:18 +0000 (+0100) Subject: setup_once.h: refactor inclusion of and X-Git-Tag: curl-7_29_0~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0b207164c6c943adb8b3bf89b375a491b41806a;p=thirdparty%2Fcurl.git setup_once.h: refactor inclusion of and Inclusion of top two most included header files now done in setup_once.h --- diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index ee8050a6ba..44d00bdb06 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -25,9 +25,6 @@ #ifdef HAVE_LIMITS_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -37,9 +34,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index b027144770..0d29d58872 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -22,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -34,9 +31,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/axtls.c b/lib/axtls.c index ea94c6cf9d..19ed730919 100644 --- a/lib/axtls.c +++ b/lib/axtls.c @@ -32,10 +32,6 @@ #include #include "axtls.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #include "sendf.h" #include "inet_pton.h" #include "sslgen.h" diff --git a/lib/connect.c b/lib/connect.c index f615d81e9c..19f5b2f5bc 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -22,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include /* may need it */ #endif @@ -37,9 +34,6 @@ #ifdef HAVE_SYS_IOCTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index bae403f95e..815b4ae644 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -24,9 +24,6 @@ #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/lib/curl_addrinfo.h b/lib/curl_addrinfo.h index 11c339474c..a5375cb33d 100644 --- a/lib/curl_addrinfo.h +++ b/lib/curl_addrinfo.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -24,9 +24,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/lib/curl_darwinssl.c b/lib/curl_darwinssl.c index 3cc278a1f6..8ea190ac83 100644 --- a/lib/curl_darwinssl.c +++ b/lib/curl_darwinssl.c @@ -33,9 +33,6 @@ #ifdef HAVE_LIMITS_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #include #include diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c index aafa45b59e..ddee4ba1db 100644 --- a/lib/curl_gethostname.c +++ b/lib/curl_gethostname.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,10 +22,6 @@ #include "setup.h" -#ifdef HAVE_UNISTD_H -# include -#endif - #include "curl_gethostname.h" /* diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c index 18d0d13f8c..46a51c2c45 100644 --- a/lib/curl_ntlm_wb.c +++ b/lib/curl_ntlm_wb.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -33,9 +33,6 @@ #define DEBUG_ME 0 -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_SYS_WAIT_H #include #endif diff --git a/lib/cyassl.c b/lib/cyassl.c index 3639532b2c..13c0d135d9 100644 --- a/lib/cyassl.c +++ b/lib/cyassl.c @@ -34,10 +34,6 @@ #include #endif -#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 beebf4a235..ca5c362b18 100644 --- a/lib/dict.c +++ b/lib/dict.c @@ -24,15 +24,9 @@ #ifndef CURL_DISABLE_DICT -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/easy.c b/lib/easy.c index 100d003f38..b73bf66018 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -22,15 +22,9 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/file.c b/lib/file.c index ebb08664d3..886a09e249 100644 --- a/lib/file.c +++ b/lib/file.c @@ -24,15 +24,9 @@ #ifndef CURL_DISABLE_FILE -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/ftp.c b/lib/ftp.c index 8fd29b4370..dc24d0bb5d 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -24,13 +24,6 @@ #ifndef CURL_DISABLE_FTP -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/gtls.c b/lib/gtls.c index 2920ee2f92..8c2a4a0c92 100644 --- a/lib/gtls.c +++ b/lib/gtls.c @@ -34,6 +34,7 @@ #include #include + #ifdef USE_GNUTLS_NETTLE #include #include @@ -41,10 +42,6 @@ #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #include "urldata.h" #include "sendf.h" #include "inet_pton.h" diff --git a/lib/hostasyn.c b/lib/hostasyn.c index 771562fd15..93e2c31cd0 100644 --- a/lib/hostasyn.c +++ b/lib/hostasyn.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -34,9 +31,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/hostip.c b/lib/hostip.c index ef14ce863a..2bfb74b427 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -22,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -34,9 +31,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/hostip4.c b/lib/hostip4.c index f68618c082..3babe72691 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -22,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -34,9 +31,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/hostip6.c b/lib/hostip6.c index 8241cb4bca..5b25d6fc40 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -34,9 +31,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/hostsyn.c b/lib/hostsyn.c index d1a9079245..eff2efa7bf 100644 --- a/lib/hostsyn.c +++ b/lib/hostsyn.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -34,9 +31,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_UNISTD_H -#include /* for the close() proto */ -#endif #ifdef __VMS #include #include diff --git a/lib/http.c b/lib/http.c index 0b6d7d4c5c..0013e50654 100644 --- a/lib/http.c +++ b/lib/http.c @@ -24,16 +24,10 @@ #ifndef CURL_DISABLE_HTTP -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 245e1c1f66..d2e1aa199b 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -24,10 +24,6 @@ #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) -#ifdef HAVE_UNISTD_H -#include -#endif - #include "urldata.h" #include #include "http_proxy.h" diff --git a/lib/if2ip.c b/lib/if2ip.c index 055ee7aa0c..c1905d1757 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,12 +22,6 @@ #include "setup.h" -#ifdef HAVE_UNISTD_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/lib/if2ip.h b/lib/if2ip.h index 99821b7c65..70842457cd 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -27,7 +27,6 @@ bool Curl_if_is_interface_name(const char *interf); char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size); #ifdef __INTERIX -#include /* Nedelcho Stanev's work-around for SFU 3.0 */ struct ifreq { @@ -61,6 +60,7 @@ struct ifreq { #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ -#endif /* interix */ + +#endif /* __INTERIX */ #endif /* HEADER_CURL_IF2IP_H */ diff --git a/lib/imap.c b/lib/imap.c index 01f81639ca..094a437940 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -27,13 +27,6 @@ #ifndef CURL_DISABLE_IMAP -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index 1bb97443b2..1ff9756678 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -25,9 +25,6 @@ #ifdef HAVE_SYS_PARAM_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 021f48d52c..d7fbbe9574 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -23,9 +23,6 @@ #ifdef HAVE_SYS_PARAM_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/krb4.c b/lib/krb4.c index b53a6104c5..58354b602c 100644 --- a/lib/krb4.c +++ b/lib/krb4.c @@ -50,10 +50,6 @@ #include #include -#ifdef HAVE_UNISTD_H -#include /* for getpid() */ -#endif - #include "urldata.h" #include "curl_base64.h" #include "ftp.h" diff --git a/lib/ldap.c b/lib/ldap.c index 737847649c..9ef31008c8 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -54,10 +54,6 @@ # endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */ #endif -#ifdef HAVE_UNISTD_H -# include -#endif - #include "urldata.h" #include #include "sendf.h" diff --git a/lib/memdebug.c b/lib/memdebug.c index 0b81621cb2..c95f41fc5b 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,20 +23,13 @@ #include "setup.h" #ifdef CURLDEBUG -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +#include #define _MPRINTF_REPLACE #include #include "urldata.h" -#ifdef HAVE_UNISTD_H -#include -#endif - #define MEMDEBUG_NODEFINES /* don't redefine the standard functions */ #include "curl_memory.h" #include "memdebug.h" diff --git a/lib/memdebug.h b/lib/memdebug.h index 1e02645f96..1716e35987 100644 --- a/lib/memdebug.h +++ b/lib/memdebug.h @@ -8,7 +8,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -32,10 +32,6 @@ #include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #define CURL_MT_LOGFNAME_BUFSIZE 512 #define logfile curl_debuglogfile diff --git a/lib/multi.c b/lib/multi.c index e309c0d964..bab61578a1 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -22,13 +22,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - #include #include "urldata.h" diff --git a/lib/netrc.c b/lib/netrc.c index a993351674..162a86caa0 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -22,9 +22,6 @@ #include "setup.h" -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_PWD_H #include #endif diff --git a/lib/nonblock.c b/lib/nonblock.c index 68ff2f3b5a..a2722ed7fb 100644 --- a/lib/nonblock.c +++ b/lib/nonblock.c @@ -22,15 +22,9 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_SYS_IOCTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/lib/nss.c b/lib/nss.c index 794eccbd44..86ce6a6d5f 100644 --- a/lib/nss.c +++ b/lib/nss.c @@ -29,10 +29,6 @@ #ifdef USE_NSS -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #include "urldata.h" #include "sendf.h" #include "formdata.h" /* for the boundary function */ diff --git a/lib/polarssl.c b/lib/polarssl.c index b20b4a3979..ef074be132 100644 --- a/lib/polarssl.c +++ b/lib/polarssl.c @@ -31,10 +31,6 @@ #ifdef USE_POLARSSL -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #include #include #include diff --git a/lib/pop3.c b/lib/pop3.c index c00fb62610..391f4e7b19 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -33,13 +33,6 @@ #ifndef CURL_DISABLE_POP3 -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/security.c b/lib/security.c index 6201c55661..b70310b89e 100644 --- a/lib/security.c +++ b/lib/security.c @@ -50,10 +50,6 @@ #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - #ifdef HAVE_LIMITS_H #include #endif diff --git a/lib/sendf.c b/lib/sendf.c index 1a9b63f397..b45e43a323 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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,15 +22,8 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include /* required for send() & recv() prototypes */ -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - #include + #include "urldata.h" #include "sendf.h" #include "connect.h" diff --git a/lib/setup_once.h b/lib/setup_once.h index 0bf49b72e3..effe14bc3d 100644 --- a/lib/setup_once.h +++ b/lib/setup_once.h @@ -83,6 +83,14 @@ #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + /* * Definition of timeval struct for platforms that don't have it. diff --git a/lib/smtp.c b/lib/smtp.c index b73bb2d890..dd39b83b67 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -31,13 +31,6 @@ #ifndef CURL_DISABLE_SMTP -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/socks.c b/lib/socks.c index d4b58f222b..13a756a408 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -24,9 +24,6 @@ #if !defined(CURL_DISABLE_PROXY) -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/ssh.c b/lib/ssh.c index 334e4b848a..3a9729975b 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -33,17 +33,10 @@ #include #include -#ifdef HAVE_UNISTD_H -#include -#endif - #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/lib/sslgen.c b/lib/sslgen.c index 8408d58ee7..67dd71fa64 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -45,10 +45,6 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - #include "urldata.h" #define SSLGEN_C #include "sslgen.h" /* generic SSL protos etc */ diff --git a/lib/ssluse.c b/lib/ssluse.c index 92ae2e3e9c..8f9fce4c87 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -35,9 +35,6 @@ #ifdef HAVE_LIMITS_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #include "urldata.h" #include "sendf.h" diff --git a/lib/telnet.c b/lib/telnet.c index 1c294e2ab7..a64da090f2 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -24,15 +24,9 @@ #ifndef CURL_DISABLE_TELNET -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/tftp.c b/lib/tftp.c index 3beabb4a19..97276ea99a 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -24,15 +24,9 @@ #ifndef CURL_DISABLE_TFTP -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/transfer.c b/lib/transfer.c index 51b2f775ca..6194908d64 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -26,15 +26,9 @@ #include "strequal.h" #include "rawstr.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/url.c b/lib/url.c index 574751716f..d93a0e9964 100644 --- a/lib/url.c +++ b/lib/url.c @@ -22,15 +22,9 @@ #include "setup.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/lib/warnless.c b/lib/warnless.c index aab95ab2bd..f621383567 100644 --- a/lib/warnless.c +++ b/lib/warnless.c @@ -24,9 +24,6 @@ #if defined(__INTEL_COMPILER) && defined(__unix__) -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #ifdef HAVE_NETINET_IN_H # include #endif diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c index 5320cdb304..4565a15d6d 100644 --- a/src/tool_cb_rea.c +++ b/src/tool_cb_rea.c @@ -21,10 +21,6 @@ ***************************************************************************/ #include "tool_setup.h" -#ifdef HAVE_UNISTD_H -# include -#endif - #define ENABLE_CURLX_PRINTF /* use our own printf() functions */ #include "curlx.h" diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c index af33ad40b8..2f49e1d96d 100644 --- a/src/tool_cb_see.c +++ b/src/tool_cb_see.c @@ -21,10 +21,6 @@ ***************************************************************************/ #include "tool_setup.h" -#ifdef HAVE_UNISTD_H -# include -#endif - #define ENABLE_CURLX_PRINTF /* use our own printf() functions */ #include "curlx.h" diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c index d21dc97c6f..4ba1c43752 100644 --- a/src/tool_dirhie.c +++ b/src/tool_dirhie.c @@ -23,10 +23,6 @@ #include -#ifdef HAVE_UNISTD_H -# include -#endif - #ifdef WIN32 # include #endif diff --git a/src/tool_getpass.c b/src/tool_getpass.c index a3fffa9b3e..0ac7dcbe01 100644 --- a/src/tool_getpass.c +++ b/src/tool_getpass.c @@ -24,10 +24,6 @@ #ifndef HAVE_GETPASS_R /* this file is only for systems without getpass_r() */ -#ifdef HAVE_UNISTD_H -# include -#endif - #ifdef HAVE_FCNTL_H # include #endif diff --git a/src/tool_homedir.c b/src/tool_homedir.c index 61cc02afb3..cb90095e51 100644 --- a/src/tool_homedir.c +++ b/src/tool_homedir.c @@ -24,9 +24,6 @@ #ifdef HAVE_PWD_H # include #endif -#ifdef HAVE_UNISTD_H -# include -#endif #ifdef __VMS # include #endif diff --git a/src/tool_main.c b/src/tool_main.c index be1b3fcaa6..9c0a19f3f1 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -23,10 +23,6 @@ #include -#ifdef HAVE_UNISTD_H -# include -#endif - #define ENABLE_CURLX_PRINTF /* use our own printf() functions */ #include "curlx.h" diff --git a/src/tool_metalink.c b/src/tool_metalink.c index 42b514ca3f..f9e9869b2d 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -23,10 +23,6 @@ #ifdef USE_METALINK -#ifdef HAVE_UNISTD_H -# include -#endif - #include #ifdef HAVE_FCNTL_H diff --git a/src/tool_operate.c b/src/tool_operate.c index 826b4a5da7..bcbce2000c 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -21,10 +21,6 @@ ***************************************************************************/ #include "tool_setup.h" -#ifdef HAVE_UNISTD_H -# include -#endif - #ifdef HAVE_FCNTL_H # include #endif diff --git a/src/tool_sleep.c b/src/tool_sleep.c index 8354840258..49cdc71b81 100644 --- a/src/tool_sleep.c +++ b/src/tool_sleep.c @@ -25,10 +25,6 @@ # include #endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - #ifdef HAVE_SYS_POLL_H # include #elif defined(HAVE_POLL_H) diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c index bb008f17cc..1ded5ab7cc 100644 --- a/tests/libtest/lib1502.c +++ b/tests/libtest/lib1502.c @@ -30,13 +30,6 @@ #include #endif -#include -#include - -/* somewhat unix-specific */ -#include -#include - int test(char *URL) { CURL *ehandle; diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c index 394131ebe2..99b3a0afe6 100644 --- a/tests/libtest/lib505.c +++ b/tests/libtest/lib505.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, 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 @@ -21,17 +21,10 @@ ***************************************************************************/ #include "test.h" -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - #include "memdebug.h" /* diff --git a/tests/libtest/test.h b/tests/libtest/test.h index ffa4be1667..fcc91ad8bf 100644 --- a/tests/libtest/test.h +++ b/tests/libtest/test.h @@ -30,21 +30,11 @@ #include "setup.h" #include -#include -#include -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_SYS_SELECT_H /* since so many tests use select(), we can just as well include it here */ #include #endif -#ifdef HAVE_UNISTD_H -/* at least somewhat oldish FreeBSD systems need this for select() */ -#include -#endif #ifdef TPF # include "select.h" diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c index 4af334d6e0..64f0675e74 100644 --- a/tests/server/fake_ntlm.c +++ b/tests/server/fake_ntlm.c @@ -29,10 +29,6 @@ * responses with a pre-written string saved in test case test2005. */ -#ifdef HAVE_UNISTD_H -#include -#endif - #define ENABLE_CURLX_PRINTF #include "curlx.h" /* from the private lib dir */ #include "getpart.h" diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 3237589730..d0609888a4 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -34,15 +34,6 @@ #ifdef HAVE_SIGNAL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c index e68c609436..3c55eff352 100644 --- a/tests/server/rtspd.c +++ b/tests/server/rtspd.c @@ -30,12 +30,6 @@ #ifdef HAVE_SIGNAL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index e04cd33565..7a397687d5 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -83,12 +83,6 @@ #ifdef HAVE_SIGNAL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/sws.c b/tests/server/sws.c index 2910274815..44d899fd7e 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -31,12 +31,6 @@ #ifdef HAVE_SIGNAL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 62c95e65dc..e8c3c2d827 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -58,9 +58,6 @@ #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif @@ -81,9 +78,7 @@ #endif #include -#ifdef HAVE_UNISTD_H -#include -#endif + #ifdef HAVE_PWD_H #include #endif diff --git a/tests/server/util.c b/tests/server/util.c index c6a404bbb7..30766d80f3 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -24,12 +24,6 @@ #ifdef HAVE_SIGNAL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETINET_IN_H #include #endif