]> granicus.if.org Git - curl/commitdiff
setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
authorYang Tse <yangsita@gmail.com>
Fri, 14 Dec 2012 16:38:18 +0000 (17:38 +0100)
committerYang Tse <yangsita@gmail.com>
Fri, 14 Dec 2012 16:38:18 +0000 (17:38 +0100)
Inclusion of top two most included header files now done in setup_once.h

69 files changed:
lib/asyn-ares.c
lib/asyn-thread.c
lib/axtls.c
lib/connect.c
lib/curl_addrinfo.c
lib/curl_addrinfo.h
lib/curl_darwinssl.c
lib/curl_gethostname.c
lib/curl_ntlm_wb.c
lib/cyassl.c
lib/dict.c
lib/easy.c
lib/file.c
lib/ftp.c
lib/gtls.c
lib/hostasyn.c
lib/hostip.c
lib/hostip4.c
lib/hostip6.c
lib/hostsyn.c
lib/http.c
lib/http_proxy.c
lib/if2ip.c
lib/if2ip.h
lib/imap.c
lib/inet_ntop.c
lib/inet_pton.c
lib/krb4.c
lib/ldap.c
lib/memdebug.c
lib/memdebug.h
lib/multi.c
lib/netrc.c
lib/nonblock.c
lib/nss.c
lib/polarssl.c
lib/pop3.c
lib/security.c
lib/sendf.c
lib/setup_once.h
lib/smtp.c
lib/socks.c
lib/ssh.c
lib/sslgen.c
lib/ssluse.c
lib/telnet.c
lib/tftp.c
lib/transfer.c
lib/url.c
lib/warnless.c
src/tool_cb_rea.c
src/tool_cb_see.c
src/tool_dirhie.c
src/tool_getpass.c
src/tool_homedir.c
src/tool_main.c
src/tool_metalink.c
src/tool_operate.c
src/tool_sleep.c
tests/libtest/lib1502.c
tests/libtest/lib505.c
tests/libtest/test.h
tests/server/fake_ntlm.c
tests/server/resolve.c
tests/server/rtspd.c
tests/server/sockfilt.c
tests/server/sws.c
tests/server/tftpd.c
tests/server/util.c

index ee8050a6ba09eda4136df1be20dc16b970fb0aa1..44d00bdb060653e4229b3f351324d491512c33b1 100644 (file)
@@ -25,9 +25,6 @@
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -37,9 +34,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index b027144770d5c7a088c54e82a91512ccf70f0e33..0d29d58872fa1bdaffa2ef09054e1338fa519d6a 100644 (file)
@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -34,9 +31,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index ea94c6cf9d453e52c235a41b7a20d777491214fb..19ed730919676bc993c171e81b16ddbea72d34b3 100644 (file)
 #include <axTLS/ssl.h>
 #include "axtls.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #include "sendf.h"
 #include "inet_pton.h"
 #include "sslgen.h"
index f615d81e9c802e74c56759e3aeff592837a4b1b6..19f5b2f5bc1d1edc5984897bfaaa6e82a0e8d337 100644 (file)
@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h> /* <netinet/tcp.h> may need it */
 #endif
@@ -37,9 +34,6 @@
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index bae403f95e45d5d0833da51090e5127a78bd9eef..815b4ae6442182a19f3bd228c734d61d6f5df71b 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <curl/curl.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 11c339474cfe5e6e343a16ea96b47404bc1e6c17..a5375cb33d9f17be521410660d02d317166dbbe0 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 3cc278a1f6cb5a6102f85f39b53be0f3870d32b8..8ea190ac830f469f9222e1480aa755e5e6fe5c47 100644 (file)
@@ -33,9 +33,6 @@
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 
 #include <Security/Security.h>
 #include <Security/SecureTransport.h>
index aafa45b59ed25a6a070b8e68292a6b6a1cd1afab..ddee4ba1db7d9e77ab6e8ea534b4e77b42a5da11 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 #include "setup.h"
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #include "curl_gethostname.h"
 
 /*
index 18d0d13f8c80733c42f660b036c9d72fea0134d6..46a51c2c45af54bfa76adb22f945cdc7cdc7d1e2 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <unistd.h>
-#endif
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
index 3639532b2c444c972a0b25a73fdc0b3f9cda1f88..13c0d135d95b17f36c2b50b2a8ba0789253e1fa9 100644 (file)
 #include <limits.h>
 #endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #include "urldata.h"
 #include "sendf.h"
 #include "inet_pton.h"
index beebf4a235ab4b83f2d21eb46b366eee20f6cf93..ca5c362b18ca9a1102740e2c3414f71b1e36f531 100644 (file)
 
 #ifndef CURL_DISABLE_DICT
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 100d003f38c90c1a61cee07e0f1833f8b9c3df47..b73bf6601885adefd43e1503cd898e13ed1c1d50 100644 (file)
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index ebb08664d3aaf72fd5801b93752c8e2c6173cb8d..886a09e2498754f2c484404f588afb50a1c51409 100644 (file)
 
 #ifndef CURL_DISABLE_FILE
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 8fd29b43706bc7f9c355b17a463df33eeb22aea3..dc24d0bb5da45bad66ae4b90194a44ecd1b305e2 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
 
 #ifndef CURL_DISABLE_FTP
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 2920ee2f92222e1ed0451191622c28f89c22e9b2..8c2a4a0c924d002d80a768bcf3874919ba904343 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
+
 #ifdef USE_GNUTLS_NETTLE
 #include <gnutls/crypto.h>
 #include <nettle/md5.h>
 #include <gcrypt.h>
 #endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #include "urldata.h"
 #include "sendf.h"
 #include "inet_pton.h"
index 771562fd15ed5418cb1e817c3e6dc260b0956256..93e2c31cd0ede1a5f0a4663fda7b32274417bdaf 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -34,9 +31,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index ef14ce863a3c62d5d753b761a5db52e29bc1e2d5..2bfb74b42727d2661d1bdd284138118ca0f17536 100644 (file)
@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -34,9 +31,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index f68618c082cd50733e47b4f98ffa4fa071090cba..3babe72691bd29e2a6942a2f0ab13df86acba0ff 100644 (file)
@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -34,9 +31,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index 8241cb4bcac4cb8b43d61d5467e2bbaa1555ef16..5b25d6fc408b4bf92353c0bb60104ac7b2f9a50b 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -34,9 +31,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index d1a9079245cd92bde779e8f27b3c510099992941..eff2efa7bf816737a69a2704cd8889d1cc021d25 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -34,9 +31,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
index 0b6d7d4c5c9b3de5d4f26fbd4ec17352edd3b5e9..0013e50654d0a55cb3773a1542fbcc0d3708bd5d 100644 (file)
 
 #ifndef CURL_DISABLE_HTTP
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 245e1c1f662119daa87a9d64bbbc8d46b5e27013..d2e1aa199b86c0b8415f96723f36af0935a516d5 100644 (file)
 
 #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "http_proxy.h"
index 055ee7aa0c6fdeea970c745679c1c74adc826b18..c1905d1757d84b2bb56daf63498e3cd8f4da32df 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 #include "setup.h"
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 99821b7c656551d4f984cecb9d30b44828efd55c..70842457cde772c54219ff9f3a95c536d0e633b4 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/socket.h>
 
 /* 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 */
index 01f81639cae7c687561c6709482ce9e06718b810..094a43794044aa52b794d5389684c9bcacfa2cbf 100644 (file)
 
 #ifndef CURL_DISABLE_IMAP
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 1bb97443b24e95c85b40310e23095fec4e5e700f..1ff975667805b85de11026cc2a77f7f07e8d38e1 100644 (file)
@@ -25,9 +25,6 @@
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 021f48d52cee89ebf258539e426f7d8ae445bcd9..d7fbbe9574f422b788e686f4ccb9623cba25d56f 100644 (file)
@@ -23,9 +23,6 @@
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index b53a6104c51d25a08028a77ead8d47cf09f04996..58354b602cdc9e2ac5067bbd51b6d0959ab01c4d 100644 (file)
 #include <krb.h>
 #include <des.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for getpid() */
-#endif
-
 #include "urldata.h"
 #include "curl_base64.h"
 #include "ftp.h"
index 737847649c5c48d8539e6b08f867f38b752fc742..9ef31008c8308cd1c40e5484ab03cec620d35f2b 100644 (file)
@@ -5,7 +5,7 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 # endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
 #endif
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "sendf.h"
index 0b81621cb25258d1b29b2dff836b66b701c22ac6..c95f41fc5bd23bc00d92cae1b82f335a07c1589f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "setup.h"
 
 #ifdef CURLDEBUG
-#include <curl/curl.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#include <curl/curl.h>
 
 #define _MPRINTF_REPLACE
 #include <curl/mprintf.h>
 #include "urldata.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #define MEMDEBUG_NODEFINES /* don't redefine the standard functions */
 #include "curl_memory.h"
 #include "memdebug.h"
index 1e02645f96c8d0eb2d48b1bd471b9121a610fc73..1716e3598709261ab716d63979add81b3edb2910 100644 (file)
@@ -8,7 +8,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 #include <curl/curl.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #define CURL_MT_LOGFNAME_BUFSIZE 512
 
 #define logfile curl_debuglogfile
index e309c0d964d3be670eb14490e3800b0358b2a090..bab61578a13126193620201fdc968c15ef42d7ba 100644 (file)
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <curl/curl.h>
 
 #include "urldata.h"
index a9933516746eed95504ee7f656978eb9133d9bbe..162a86caa036a011c0c623d19bc528262660c76e 100644 (file)
@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
index 68ff2f3b5a1f7a5fba89755a8df2ef1d40aa17b8..a2722ed7fb4cd4821e36378eaa1a193dea36a15a 100644 (file)
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 794eccbd4442c48fd8ae0fca6e444e036c548204..86ce6a6d5ff0b4bb305f7f6adf7a1b14dbdca1d5 100644 (file)
--- a/lib/nss.c
+++ b/lib/nss.c
 
 #ifdef USE_NSS
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #include "urldata.h"
 #include "sendf.h"
 #include "formdata.h" /* for the boundary function */
index b20b4a3979cbf33ccc81cabf1e6392cae3c7011c..ef074be13297d3d44c97f43710682a5b1fa0c7f0 100644 (file)
 
 #ifdef USE_POLARSSL
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #include <polarssl/net.h>
 #include <polarssl/ssl.h>
 #include <polarssl/havege.h>
index c00fb62610cbbe97eb55f73ea3c0b88b7d78e8c5..391f4e7b1981a507c9277c8eab8abc3d4a89378c 100644 (file)
 
 #ifndef CURL_DISABLE_POP3
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 6201c5566163f92f08c5d0e2ddb449e90961b581..b70310b89eaa454996ef4f72d37cfde9ba03d15a 100644 (file)
 #include <netdb.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
index 1a9b63f397299d0d986537f75aef673698b56263..b45e43a3235154e26be912ea462116ba9512b945 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h> /* required for send() & recv() prototypes */
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <curl/curl.h>
+
 #include "urldata.h"
 #include "sendf.h"
 #include "connect.h"
index 0bf49b72e325de67e74c4c774b467284e9ae8a83..effe14bc3d962871f28f77a9ebc628fc43e7bfc3 100644 (file)
 #include <stdbool.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 
 /*
  * Definition of timeval struct for platforms that don't have it.
index b73bb2d890767f0061810f977db750a93c49db26..dd39b83b6762bfcfbe57e8a8d54e4afcdc56da52 100644 (file)
 
 #ifndef CURL_DISABLE_SMTP
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index d4b58f222b8619448f8f4524603e41b8dd72d78c..13a756a408f8c22044f8842d3633031fafc97a76 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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 <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 334e4b848a1b037493cc1cbbd346d5bb6d272eb6..3a9729975b2a0c62cdc7e64da230e5a22e35e15f 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
 #include <libssh2.h>
 #include <libssh2_sftp.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 8408d58ee789c9876f008263df48b7fe74a89fb1..67dd71fa64277fbde05e2ea09e901351eda2b6bb 100644 (file)
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
 #include "urldata.h"
 #define SSLGEN_C
 #include "sslgen.h" /* generic SSL protos etc */
index 92ae2e3e9ce890d3058b8a5ff5605b014eb17568..8f9fce4c87b8eff1bcea1681fae8b189aa7125ad 100644 (file)
@@ -35,9 +35,6 @@
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 
 #include "urldata.h"
 #include "sendf.h"
index 1c294e2ab7c1fe7cc9487e79b2e40e3043b25e10..a64da090f2e071bc42ca580739a8e6dae5389814 100644 (file)
 
 #ifndef CURL_DISABLE_TELNET
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 3beabb4a194dd280bb0e9e16a1c1a1f68cd7192f..97276ea99ab3234d6c8948d111839a3e39ea8cfa 100644 (file)
 
 #ifndef CURL_DISABLE_TFTP
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 51b2f775cad8306cb72b1b079ea6914e9846b9fe..6194908d648c98ba268c7134cc13e88f297052ec 100644 (file)
 #include "strequal.h"
 #include "rawstr.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index 574751716f6231625912ff5d209731021b1b3a52..d93a0e9964ce6589329d7c90a3dd6051a217b088 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
index aab95ab2bd1e595285a6ada70d77b262751f3421..f6213835679ef0405b1608f8371b0647b2c62eab 100644 (file)
@@ -24,9 +24,6 @@
 
 #if defined(__INTEL_COMPILER) && defined(__unix__)
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 5320cdb304df3079ab731c8da096f4b1cf4be1ff..4565a15d6d67c695bf9c6eac03993c53f2d0217f 100644 (file)
  ***************************************************************************/
 #include "tool_setup.h"
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #define ENABLE_CURLX_PRINTF
 /* use our own printf() functions */
 #include "curlx.h"
index af33ad40b8206ac65a7ca1bed7a90b9f78e3c0c2..2f49e1d96d1440dc47af153ae0c06b810fed7a92 100644 (file)
  ***************************************************************************/
 #include "tool_setup.h"
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #define ENABLE_CURLX_PRINTF
 /* use our own printf() functions */
 #include "curlx.h"
index d21dc97c6f2b75d0aa7b6d66dc734c97125023d3..4ba1c437527dce779226134fe74cb8bf756c7917 100644 (file)
 
 #include <sys/stat.h>
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #ifdef WIN32
 #  include <direct.h>
 #endif
index a3fffa9b3e09123403bbe55edca1cda981d106d4..0ac7dcbe01eeda35d9e458de786aa0238a983b32 100644 (file)
 #ifndef HAVE_GETPASS_R
 /* this file is only for systems without getpass_r() */
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #  include <fcntl.h>
 #endif
index 61cc02afb34cc81c15d5b2e9f5988dc47d696f3d..cb90095e515de615eeaddae6436cccecbeb81ce0 100644 (file)
@@ -24,9 +24,6 @@
 #ifdef HAVE_PWD_H
 #  include <pwd.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
 #ifdef __VMS
 #  include <unixlib.h>
 #endif
index be1b3fcaa6601ea6ee52a30a4a09d98ae197baeb..9c0a19f3f1e1c57902518b2d1a5606331a64b23f 100644 (file)
 
 #include <sys/stat.h>
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #define ENABLE_CURLX_PRINTF
 /* use our own printf() functions */
 #include "curlx.h"
index 42b514ca3fc4ae3b42f9f499b1785de500086133..f9e9869b2d059ab48921ba0152a984209bf6f4ec 100644 (file)
 
 #ifdef USE_METALINK
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #include <sys/stat.h>
 
 #ifdef HAVE_FCNTL_H
index 826b4a5da79bc966d0bbb7695f9a586c88f1cc28..bcbce2000c1218ad241d28603b0345f99cbdd51c 100644 (file)
  ***************************************************************************/
 #include "tool_setup.h"
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #  include <fcntl.h>
 #endif
index 8354840258a451351863e5f8169488374ff5f404..49cdc71b81f351ea8c539e14027c69424741e487 100644 (file)
 #  include <sys/select.h>
 #endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
-
 #ifdef HAVE_SYS_POLL_H
 #  include <sys/poll.h>
 #elif defined(HAVE_POLL_H)
index bb008f17ccd0dce8a2d3091a5af0e956d940bb9d..1ded5ab7ccd87e586600a595dbccf3405d856f79 100644 (file)
 #include <limits.h>
 #endif
 
-#include <stdio.h>
-#include <string.h>
-
-/* somewhat unix-specific */
-#include <sys/time.h>
-#include <unistd.h>
-
 int test(char *URL)
 {
   CURL *ehandle;
index 394131ebe263f9e6fd2bc24136e70a4400f7ced3..99b3a0afe60a4a0afc2f176acf5a42e178f7ec37 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
  ***************************************************************************/
 #include "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "memdebug.h"
 
 /*
index ffa4be166796b18aa5762ae360e8933b3d207c9f..fcc91ad8bfc82eae717803c2b1d5b86ce189554c 100644 (file)
 #include "setup.h"
 
 #include <curl/curl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_SYS_SELECT_H
 /* since so many tests use select(), we can just as well include it here */
 #include <sys/select.h>
 #endif
-#ifdef HAVE_UNISTD_H
-/* at least somewhat oldish FreeBSD systems need this for select() */
-#include <unistd.h>
-#endif
 
 #ifdef TPF
 #  include "select.h"
index 4af334d6e0695f8b4f25421fa1580ac2a61027c3..64f0675e7491f4e7749f9f766159b56ab554aa60 100644 (file)
  * responses with a pre-written string saved in test case test2005.
  */
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #define ENABLE_CURLX_PRINTF
 #include "curlx.h" /* from the private lib dir */
 #include "getpart.h"
index 3237589730270eadbfb3792c7cc1ebcabdcf2925..d0609888a42e2ae6e103712cb5f8319d234e5d5d 100644 (file)
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index e68c609436bd2725f39058ad301cfe379abcbd7f..3c55eff3527290f3582212f386d6d4879f4bada0 100644 (file)
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index e04cd3356529b7996828f3dfb22663e89cfc9cb6..7a397687d52de5d9cf26c56e4395be20934f912d 100644 (file)
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 29102748156325b66d788df485e82695a9f16529..44d899fd7e362dc3af59f7f0c02c4942f685767a 100644 (file)
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 62c95e65dc6ec551d6d3e74993588df57b04491b..e8c3c2d8272c8c4f9c44979af29bdec9c98eee0e 100644 (file)
@@ -58,9 +58,6 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -81,9 +78,7 @@
 #endif
 
 #include <setjmp.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
index c6a404bbb742b62fb5744483b8d68f1a70b85a34..30766d80f3df3ffc0d0bdf7b5a0d865980b4d5e9 100644 (file)
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif