aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asyn-ares.c6
-rw-r--r--lib/asyn-thread.c6
-rw-r--r--lib/axtls.c4
-rw-r--r--lib/connect.c6
-rw-r--r--lib/curl_addrinfo.c5
-rw-r--r--lib/curl_addrinfo.h5
-rw-r--r--lib/curl_darwinssl.c3
-rw-r--r--lib/curl_gethostname.c6
-rw-r--r--lib/curl_ntlm_wb.c5
-rw-r--r--lib/cyassl.c4
-rw-r--r--lib/dict.c6
-rw-r--r--lib/easy.c6
-rw-r--r--lib/file.c6
-rw-r--r--lib/ftp.c7
-rw-r--r--lib/gtls.c5
-rw-r--r--lib/hostasyn.c8
-rw-r--r--lib/hostip.c6
-rw-r--r--lib/hostip4.c6
-rw-r--r--lib/hostip6.c8
-rw-r--r--lib/hostsyn.c8
-rw-r--r--lib/http.c6
-rw-r--r--lib/http_proxy.c4
-rw-r--r--lib/if2ip.c8
-rw-r--r--lib/if2ip.h6
-rw-r--r--lib/imap.c7
-rw-r--r--lib/inet_ntop.c3
-rw-r--r--lib/inet_pton.c3
-rw-r--r--lib/krb4.c4
-rw-r--r--lib/ldap.c6
-rw-r--r--lib/memdebug.c11
-rw-r--r--lib/memdebug.h6
-rw-r--r--lib/multi.c7
-rw-r--r--lib/netrc.c3
-rw-r--r--lib/nonblock.c6
-rw-r--r--lib/nss.c4
-rw-r--r--lib/polarssl.c4
-rw-r--r--lib/pop3.c7
-rw-r--r--lib/security.c4
-rw-r--r--lib/sendf.c11
-rw-r--r--lib/setup_once.h8
-rw-r--r--lib/smtp.c7
-rw-r--r--lib/socks.c5
-rw-r--r--lib/ssh.c7
-rw-r--r--lib/sslgen.c4
-rw-r--r--lib/ssluse.c3
-rw-r--r--lib/telnet.c6
-rw-r--r--lib/tftp.c6
-rw-r--r--lib/transfer.c6
-rw-r--r--lib/url.c6
-rw-r--r--lib/warnless.c3
-rw-r--r--src/tool_cb_rea.c4
-rw-r--r--src/tool_cb_see.c4
-rw-r--r--src/tool_dirhie.c4
-rw-r--r--src/tool_getpass.c4
-rw-r--r--src/tool_homedir.c3
-rw-r--r--src/tool_main.c4
-rw-r--r--src/tool_metalink.c4
-rw-r--r--src/tool_operate.c4
-rw-r--r--src/tool_sleep.c4
-rw-r--r--tests/libtest/lib1502.c7
-rw-r--r--tests/libtest/lib505.c9
-rw-r--r--tests/libtest/test.h10
-rw-r--r--tests/server/fake_ntlm.c4
-rw-r--r--tests/server/resolve.c9
-rw-r--r--tests/server/rtspd.c6
-rw-r--r--tests/server/sockfilt.c6
-rw-r--r--tests/server/sws.c6
-rw-r--r--tests/server/tftpd.c7
-rw-r--r--tests/server/util.c6
69 files changed, 29 insertions, 363 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index ee8050a6b..44d00bdb0 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -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>
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index b02714477..0d29d5887 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -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>
diff --git a/lib/axtls.c b/lib/axtls.c
index ea94c6cf9..19ed73091 100644
--- a/lib/axtls.c
+++ b/lib/axtls.c
@@ -32,10 +32,6 @@
#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"
diff --git a/lib/connect.c b/lib/connect.c
index f615d81e9..19f5b2f5b 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -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
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index bae403f95..815b4ae64 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -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
diff --git a/lib/curl_addrinfo.h b/lib/curl_addrinfo.h
index 11c339474..a5375cb33 100644
--- a/lib/curl_addrinfo.h
+++ b/lib/curl_addrinfo.h
@@ -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
diff --git a/lib/curl_darwinssl.c b/lib/curl_darwinssl.c
index 3cc278a1f..8ea190ac8 100644
--- a/lib/curl_darwinssl.c
+++ b/lib/curl_darwinssl.c
@@ -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>
diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c
index aafa45b59..ddee4ba1d 100644
--- a/lib/curl_gethostname.c
+++ b/lib/curl_gethostname.c
@@ -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
@@ -22,10 +22,6 @@
#include "setup.h"
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
#include "curl_gethostname.h"
/*
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index 18d0d13f8..46a51c2c4 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -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
diff --git a/lib/cyassl.c b/lib/cyassl.c
index 3639532b2..13c0d135d 100644
--- a/lib/cyassl.c
+++ b/lib/cyassl.c
@@ -34,10 +34,6 @@
#include <limits.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
#include "urldata.h"
#include "sendf.h"
#include "inet_pton.h"
diff --git a/lib/dict.c b/lib/dict.c
index beebf4a23..ca5c362b1 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -24,15 +24,9 @@
#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
diff --git a/lib/easy.c b/lib/easy.c
index 100d003f3..b73bf6601 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -22,15 +22,9 @@
#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
diff --git a/lib/file.c b/lib/file.c
index ebb08664d..886a09e24 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -24,15 +24,9 @@
#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
diff --git a/lib/ftp.c b/lib/ftp.c
index 8fd29b437..dc24d0bb5 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -24,13 +24,6 @@
#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
diff --git a/lib/gtls.c b/lib/gtls.c
index 2920ee2f9..8c2a4a0c9 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -34,6 +34,7 @@
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
+
#ifdef USE_GNUTLS_NETTLE
#include <gnutls/crypto.h>
#include <nettle/md5.h>
@@ -41,10 +42,6 @@
#include <gcrypt.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
#include "urldata.h"
#include "sendf.h"
#include "inet_pton.h"
diff --git a/lib/hostasyn.c b/lib/hostasyn.c
index 771562fd1..93e2c31cd 100644
--- a/lib/hostasyn.c
+++ b/lib/hostasyn.c
@@ -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>
diff --git a/lib/hostip.c b/lib/hostip.c
index ef14ce863..2bfb74b42 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -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>
diff --git a/lib/hostip4.c b/lib/hostip4.c
index f68618c08..3babe7269 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -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>
diff --git a/lib/hostip6.c b/lib/hostip6.c
index 8241cb4bc..5b25d6fc4 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -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>
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index d1a907924..eff2efa7b 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -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>
diff --git a/lib/http.c b/lib/http.c
index 0b6d7d4c5..0013e5065 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -24,16 +24,10 @@
#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
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 245e1c1f6..d2e1aa199 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 <unistd.h>
-#endif
-
#include "urldata.h"
#include <curl/curl.h>
#include "http_proxy.h"
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 055ee7aa0..c1905d175 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -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,12 +22,6 @@
#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
diff --git a/lib/if2ip.h b/lib/if2ip.h
index 99821b7c6..70842457c 100644
--- a/lib/if2ip.h
+++ b/lib/if2ip.h
@@ -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 */
diff --git a/lib/imap.c b/lib/imap.c
index 01f81639c..094a43794 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -27,13 +27,6 @@
#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
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index 1bb97443b..1ff975667 100644
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -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
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index 021f48d52..d7fbbe957 100644
--- a/lib/inet_pton.c
+++ b/lib/inet_pton.c
@@ -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
diff --git a/lib/krb4.c b/lib/krb4.c
index b53a6104c..58354b602 100644
--- a/lib/krb4.c
+++ b/lib/krb4.c
@@ -50,10 +50,6 @@
#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"
diff --git a/lib/ldap.c b/lib/ldap.c
index 737847649..9ef31008c 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -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
@@ -54,10 +54,6 @@
# 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"
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 0b81621cb..c95f41fc5 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -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
@@ -23,20 +23,13 @@
#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"
diff --git a/lib/memdebug.h b/lib/memdebug.h
index 1e02645f9..1716e3598 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -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
@@ -32,10 +32,6 @@
#include <curl/curl.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
#define CURL_MT_LOGFNAME_BUFSIZE 512
#define logfile curl_debuglogfile
diff --git a/lib/multi.c b/lib/multi.c
index e309c0d96..bab61578a 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -22,13 +22,6 @@
#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"
diff --git a/lib/netrc.c b/lib/netrc.c
index a99335167..162a86caa 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -22,9 +22,6 @@
#include "setup.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
diff --git a/lib/nonblock.c b/lib/nonblock.c
index 68ff2f3b5..a2722ed7f 100644
--- a/lib/nonblock.c
+++ b/lib/nonblock.c
@@ -22,15 +22,9 @@
#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
diff --git a/lib/nss.c b/lib/nss.c
index 794eccbd4..86ce6a6d5 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -29,10 +29,6 @@
#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 */
diff --git a/lib/polarssl.c b/lib/polarssl.c
index b20b4a397..ef074be13 100644
--- a/lib/polarssl.c
+++ b/lib/polarssl.c
@@ -31,10 +31,6 @@
#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>
diff --git a/lib/pop3.c b/lib/pop3.c
index c00fb6261..391f4e7b1 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -33,13 +33,6 @@
#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
diff --git a/lib/security.c b/lib/security.c
index 6201c5566..b70310b89 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -50,10 +50,6 @@
#include <netdb.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
diff --git a/lib/sendf.c b/lib/sendf.c
index 1a9b63f39..b45e43a32 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -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,15 +22,8 @@
#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"
diff --git a/lib/setup_once.h b/lib/setup_once.h
index 0bf49b72e..effe14bc3 100644
--- a/lib/setup_once.h
+++ b/lib/setup_once.h
@@ -83,6 +83,14 @@
#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.
diff --git a/lib/smtp.c b/lib/smtp.c
index b73bb2d89..dd39b83b6 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -31,13 +31,6 @@
#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
diff --git a/lib/socks.c b/lib/socks.c
index d4b58f222..13a756a40 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -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
diff --git a/lib/ssh.c b/lib/ssh.c
index 334e4b848..3a9729975 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -33,17 +33,10 @@
#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
diff --git a/lib/sslgen.c b/lib/sslgen.c
index 8408d58ee..67dd71fa6 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -45,10 +45,6 @@
#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 */
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 92ae2e3e9..8f9fce4c8 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -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"
diff --git a/lib/telnet.c b/lib/telnet.c
index 1c294e2ab..a64da090f 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -24,15 +24,9 @@
#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
diff --git a/lib/tftp.c b/lib/tftp.c
index 3beabb4a1..97276ea99 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -24,15 +24,9 @@
#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
diff --git a/lib/transfer.c b/lib/transfer.c
index 51b2f775c..6194908d6 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 <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
diff --git a/lib/url.c b/lib/url.c
index 574751716..d93a0e996 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -22,15 +22,9 @@
#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
diff --git a/lib/warnless.c b/lib/warnless.c
index aab95ab2b..f62138356 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 <sys/socket.h>
-#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c
index 5320cdb30..4565a15d6 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 <unistd.h>
-#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 af33ad40b..2f49e1d96 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 <unistd.h>
-#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 d21dc97c6..4ba1c4375 100644
--- a/src/tool_dirhie.c
+++ b/src/tool_dirhie.c
@@ -23,10 +23,6 @@
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
#ifdef WIN32
# include <direct.h>
#endif
diff --git a/src/tool_getpass.c b/src/tool_getpass.c
index a3fffa9b3..0ac7dcbe0 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 <unistd.h>
-#endif
-
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
diff --git a/src/tool_homedir.c b/src/tool_homedir.c
index 61cc02afb..cb90095e5 100644
--- a/src/tool_homedir.c
+++ b/src/tool_homedir.c
@@ -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
diff --git a/src/tool_main.c b/src/tool_main.c
index be1b3fcaa..9c0a19f3f 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -23,10 +23,6 @@
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#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 42b514ca3..f9e9869b2 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -23,10 +23,6 @@
#ifdef USE_METALINK
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
#include <sys/stat.h>
#ifdef HAVE_FCNTL_H
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 826b4a5da..bcbce2000 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -21,10 +21,6 @@
***************************************************************************/
#include "tool_setup.h"
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
diff --git a/src/tool_sleep.c b/src/tool_sleep.c
index 835484025..49cdc71b8 100644
--- a/src/tool_sleep.c
+++ b/src/tool_sleep.c
@@ -25,10 +25,6 @@
# 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)
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
index bb008f17c..1ded5ab7c 100644
--- a/tests/libtest/lib1502.c
+++ b/tests/libtest/lib1502.c
@@ -30,13 +30,6 @@
#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;
diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c
index 394131ebe..99b3a0afe 100644
--- a/tests/libtest/lib505.c
+++ b/tests/libtest/lib505.c
@@ -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
@@ -21,17 +21,10 @@
***************************************************************************/
#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"
/*
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index ffa4be166..fcc91ad8b 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -30,21 +30,11 @@
#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"
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
index 4af334d6e..64f0675e7 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 <unistd.h>
-#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 323758973..d0609888a 100644
--- a/tests/server/resolve.c
+++ b/tests/server/resolve.c
@@ -34,15 +34,6 @@
#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
diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c
index e68c60943..3c55eff35 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -30,12 +30,6 @@
#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
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index e04cd3356..7a397687d 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -83,12 +83,6 @@
#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
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 291027481..44d899fd7 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -31,12 +31,6 @@
#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
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 62c95e65d..e8c3c2d82 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -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
diff --git a/tests/server/util.c b/tests/server/util.c
index c6a404bbb..30766d80f 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -24,12 +24,6 @@
#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