diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index ee8050a6ba09eda4136df1be20dc16b970fb0aa1..44d00bdb060653e4229b3f351324d491512c33b1 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 b027144770d5c7a088c54e82a91512ccf70f0e33..0d29d58872fa1bdaffa2ef09054e1338fa519d6a 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 ea94c6cf9d453e52c235a41b7a20d777491214fb..19ed730919676bc993c171e81b16ddbea72d34b3 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 f615d81e9c802e74c56759e3aeff592837a4b1b6..19f5b2f5bc1d1edc5984897bfaaa6e82a0e8d337 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 bae403f95e45d5d0833da51090e5127a78bd9eef..815b4ae6442182a19f3bd228c734d61d6f5df71b 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 11c339474cfe5e6e343a16ea96b47404bc1e6c17..a5375cb33d9f17be521410660d02d317166dbbe0 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 3cc278a1f6cb5a6102f85f39b53be0f3870d32b8..8ea190ac830f469f9222e1480aa755e5e6fe5c47 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 aafa45b59ed25a6a070b8e68292a6b6a1cd1afab..ddee4ba1db7d9e77ab6e8ea534b4e77b42a5da11 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 18d0d13f8c80733c42f660b036c9d72fea0134d6..46a51c2c45af54bfa76adb22f945cdc7cdc7d1e2 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 3639532b2c444c972a0b25a73fdc0b3f9cda1f88..13c0d135d95b17f36c2b50b2a8ba0789253e1fa9 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 beebf4a235ab4b83f2d21eb46b366eee20f6cf93..ca5c362b18ca9a1102740e2c3414f71b1e36f531 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 100d003f38c90c1a61cee07e0f1833f8b9c3df47..b73bf6601885adefd43e1503cd898e13ed1c1d50 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 ebb08664d3aaf72fd5801b93752c8e2c6173cb8d..886a09e2498754f2c484404f588afb50a1c51409 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 8fd29b43706bc7f9c355b17a463df33eeb22aea3..dc24d0bb5da45bad66ae4b90194a44ecd1b305e2 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 2920ee2f92222e1ed0451191622c28f89c22e9b2..8c2a4a0c924d002d80a768bcf3874919ba904343 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 771562fd15ed5418cb1e817c3e6dc260b0956256..93e2c31cd0ede1a5f0a4663fda7b32274417bdaf 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 ef14ce863a3c62d5d753b761a5db52e29bc1e2d5..2bfb74b42727d2661d1bdd284138118ca0f17536 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 f68618c082cd50733e47b4f98ffa4fa071090cba..3babe72691bd29e2a6942a2f0ab13df86acba0ff 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 8241cb4bcac4cb8b43d61d5467e2bbaa1555ef16..5b25d6fc408b4bf92353c0bb60104ac7b2f9a50b 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 d1a9079245cd92bde779e8f27b3c510099992941..eff2efa7bf816737a69a2704cd8889d1cc021d25 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 0b6d7d4c5c9b3de5d4f26fbd4ec17352edd3b5e9..0013e50654d0a55cb3773a1542fbcc0d3708bd5d 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 245e1c1f662119daa87a9d64bbbc8d46b5e27013..d2e1aa199b86c0b8415f96723f36af0935a516d5 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 055ee7aa0c6fdeea970c745679c1c74adc826b18..c1905d1757d84b2bb56daf63498e3cd8f4da32df 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 99821b7c656551d4f984cecb9d30b44828efd55c..70842457cde772c54219ff9f3a95c536d0e633b4 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 01f81639cae7c687561c6709482ce9e06718b810..094a43794044aa52b794d5389684c9bcacfa2cbf 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 1bb97443b24e95c85b40310e23095fec4e5e700f..1ff975667805b85de11026cc2a77f7f07e8d38e1 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 021f48d52cee89ebf258539e426f7d8ae445bcd9..d7fbbe9574f422b788e686f4ccb9623cba25d56f 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 b53a6104c51d25a08028a77ead8d47cf09f04996..58354b602cdc9e2ac5067bbd51b6d0959ab01c4d 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 737847649c5c48d8539e6b08f867f38b752fc742..9ef31008c8308cd1c40e5484ab03cec620d35f2b 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 0b81621cb25258d1b29b2dff836b66b701c22ac6..c95f41fc5bd23bc00d92cae1b82f335a07c1589f 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 1e02645f96c8d0eb2d48b1bd471b9121a610fc73..1716e3598709261ab716d63979add81b3edb2910 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 e309c0d964d3be670eb14490e3800b0358b2a090..bab61578a13126193620201fdc968c15ef42d7ba 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 a9933516746eed95504ee7f656978eb9133d9bbe..162a86caa036a011c0c623d19bc528262660c76e 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 68ff2f3b5a1f7a5fba89755a8df2ef1d40aa17b8..a2722ed7fb4cd4821e36378eaa1a193dea36a15a 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 794eccbd4442c48fd8ae0fca6e444e036c548204..86ce6a6d5ff0b4bb305f7f6adf7a1b14dbdca1d5 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 b20b4a3979cbf33ccc81cabf1e6392cae3c7011c..ef074be13297d3d44c97f43710682a5b1fa0c7f0 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 c00fb62610cbbe97eb55f73ea3c0b88b7d78e8c5..391f4e7b1981a507c9277c8eab8abc3d4a89378c 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 6201c5566163f92f08c5d0e2ddb449e90961b581..b70310b89eaa454996ef4f72d37cfde9ba03d15a 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 1a9b63f397299d0d986537f75aef673698b56263..b45e43a3235154e26be912ea462116ba9512b945 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 0bf49b72e325de67e74c4c774b467284e9ae8a83..effe14bc3d962871f28f77a9ebc628fc43e7bfc3 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 b73bb2d890767f0061810f977db750a93c49db26..dd39b83b6762bfcfbe57e8a8d54e4afcdc56da52 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 d4b58f222b8619448f8f4524603e41b8dd72d78c..13a756a408f8c22044f8842d3633031fafc97a76 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 334e4b848a1b037493cc1cbbd346d5bb6d272eb6..3a9729975b2a0c62cdc7e64da230e5a22e35e15f 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 8408d58ee789c9876f008263df48b7fe74a89fb1..67dd71fa64277fbde05e2ea09e901351eda2b6bb 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 92ae2e3e9ce890d3058b8a5ff5605b014eb17568..8f9fce4c87b8eff1bcea1681fae8b189aa7125ad 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 1c294e2ab7c1fe7cc9487e79b2e40e3043b25e10..a64da090f2e071bc42ca580739a8e6dae5389814 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 3beabb4a194dd280bb0e9e16a1c1a1f68cd7192f..97276ea99ab3234d6c8948d111839a3e39ea8cfa 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 51b2f775cad8306cb72b1b079ea6914e9846b9fe..6194908d648c98ba268c7134cc13e88f297052ec 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 574751716f6231625912ff5d209731021b1b3a52..d93a0e9964ce6589329d7c90a3dd6051a217b088 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 aab95ab2bd1e595285a6ada70d77b262751f3421..f6213835679ef0405b1608f8371b0647b2c62eab 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 5320cdb304df3079ab731c8da096f4b1cf4be1ff..4565a15d6d67c695bf9c6eac03993c53f2d0217f 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 af33ad40b8206ac65a7ca1bed7a90b9f78e3c0c2..2f49e1d96d1440dc47af153ae0c06b810fed7a92 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 d21dc97c6f2b75d0aa7b6d66dc734c97125023d3..4ba1c437527dce779226134fe74cb8bf756c7917 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 a3fffa9b3e09123403bbe55edca1cda981d106d4..0ac7dcbe01eeda35d9e458de786aa0238a983b32 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 61cc02afb34cc81c15d5b2e9f5988dc47d696f3d..cb90095e515de615eeaddae6436cccecbeb81ce0 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 be1b3fcaa6601ea6ee52a30a4a09d98ae197baeb..9c0a19f3f1e1c57902518b2d1a5606331a64b23f 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 42b514ca3fc4ae3b42f9f499b1785de500086133..f9e9869b2d059ab48921ba0152a984209bf6f4ec 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 826b4a5da79bc966d0bbb7695f9a586c88f1cc28..bcbce2000c1218ad241d28603b0345f99cbdd51c 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 8354840258a451351863e5f8169488374ff5f404..49cdc71b81f351ea8c539e14027c69424741e487 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 bb008f17ccd0dce8a2d3091a5af0e956d940bb9d..1ded5ab7ccd87e586600a595dbccf3405d856f79 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 394131ebe263f9e6fd2bc24136e70a4400f7ced3..99b3a0afe60a4a0afc2f176acf5a42e178f7ec37 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 ffa4be166796b18aa5762ae360e8933b3d207c9f..fcc91ad8bfc82eae717803c2b1d5b86ce189554c 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 4af334d6e0695f8b4f25421fa1580ac2a61027c3..64f0675e7491f4e7749f9f766159b56ab554aa60 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 3237589730270eadbfb3792c7cc1ebcabdcf2925..d0609888a42e2ae6e103712cb5f8319d234e5d5d 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 e68c609436bd2725f39058ad301cfe379abcbd7f..3c55eff3527290f3582212f386d6d4879f4bada0 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 e04cd3356529b7996828f3dfb22663e89cfc9cb6..7a397687d52de5d9cf26c56e4395be20934f912d 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 29102748156325b66d788df485e82695a9f16529..44d899fd7e362dc3af59f7f0c02c4942f685767a 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 62c95e65dc6ec551d6d3e74993588df57b04491b..e8c3c2d8272c8c4f9c44979af29bdec9c98eee0e 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 c6a404bbb742b62fb5744483b8d68f1a70b85a34..30766d80f3df3ffc0d0bdf7b5a0d865980b4d5e9 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