summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2007-02-26 04:24:26 +0000
committerGisle Vanem <gvanem@broadpark.no>2007-02-26 04:24:26 +0000
commitc514a2a89aa1c1e06b70405eedb4e1f70b27fd10 (patch)
treec685e0a7611170a72dfa9c9825f95fb2ee7be900
parente2f0580dfe45c9337394ecce74ca769a3d07635d (diff)
downloadcurl-c514a2a89aa1c1e06b70405eedb4e1f70b27fd10.tar.gz
Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-files
since they're already included through "setup.h".
-rw-r--r--lib/connect.c12
-rw-r--r--lib/dict.c6
-rw-r--r--lib/easy.c7
-rw-r--r--lib/file.c6
-rw-r--r--lib/formdata.c3
-rw-r--r--lib/ftp.c9
-rw-r--r--lib/gtls.c3
-rw-r--r--lib/hostares.c3
-rw-r--r--lib/hostasyn.c3
-rw-r--r--lib/hostip.c3
-rw-r--r--lib/hostip4.c3
-rw-r--r--lib/hostip6.c3
-rw-r--r--lib/hostsyn.c3
-rw-r--r--lib/hostthre.c3
-rw-r--r--lib/http.c6
-rw-r--r--lib/inet_ntop.c3
-rw-r--r--lib/inet_pton.c3
-rw-r--r--lib/ldap.c8
-rw-r--r--lib/mprintf.c1
-rw-r--r--lib/multi.c4
-rw-r--r--lib/netrc.c3
-rw-r--r--lib/nss.c3
-rw-r--r--lib/select.c3
-rw-r--r--lib/sendf.c4
-rw-r--r--lib/ssh.c14
-rw-r--r--lib/sslgen.c4
-rw-r--r--lib/ssluse.c3
-rw-r--r--lib/telnet.c9
-rw-r--r--lib/tftp.c9
-rw-r--r--lib/transfer.c9
-rw-r--r--lib/url.c9
31 files changed, 18 insertions, 144 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 14e2ff038..a18a335af 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -28,9 +28,6 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -59,9 +56,9 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* required for free() prototype, without it, this crashes
- on macos 68K */
-#endif
+#include <stdlib.h> /* required for free() prototype, without it, this crashes */
+#endif /* on macos 68K */
+
#if (defined(HAVE_FIONBIO) && defined(__NOVELL_LIBC__))
#include <sys/filio.h>
#endif
@@ -74,7 +71,8 @@
#include <inet.h>
#endif
-#endif
+#endif /* !WIN32 */
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
diff --git a/lib/dict.c b/lib/dict.c
index d6443f4b9..c302cd034 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -31,12 +31,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef WIN32
#include <time.h>
diff --git a/lib/easy.c b/lib/easy.c
index 1ada99c3d..d86f7cde5 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -29,13 +29,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
#include <errno.h>
#include "strequal.h"
diff --git a/lib/file.c b/lib/file.c
index b247a7736..3fc1663d1 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -30,12 +30,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef WIN32
#include <time.h>
diff --git a/lib/formdata.c b/lib/formdata.c
index f10c6c70e..a5118b389 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -112,9 +112,6 @@ Content-Disposition: form-data; name="FILECONTENT"
#include <string.h>
#include <stdarg.h>
#include <time.h>
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
#include <libgen.h>
#endif
diff --git a/lib/ftp.c b/lib/ftp.c
index 8328315dc..8c54f7274 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -34,13 +34,10 @@
#include <unistd.h>
#endif
-#ifdef WIN32
-
-#else /* probably some kind of unix */
+#ifndef WIN32
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -57,7 +54,7 @@
#include <in.h>
#include <inet.h>
#endif
-#endif
+#endif /* !WIN32 */
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
#undef in_addr_t
@@ -3024,7 +3021,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status, bool premature
ftpc->ctl_valid = was_ctl_valid;
break;
}
- /* until we cope better with prematurely ended requests, let them
+ /* until we cope better with prematurely ended requests, let them
* fallback as if in complete failure */
default: /* by default, an error means the control connection is
wedged and should not be used anymore */
diff --git a/lib/gtls.c b/lib/gtls.c
index f8c103450..3413a0709 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -37,9 +37,6 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostares.c b/lib/hostares.c
index 1eb2aea2b..c9fbcc6de 100644
--- a/lib/hostares.c
+++ b/lib/hostares.c
@@ -28,9 +28,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostasyn.c b/lib/hostasyn.c
index 3df147910..355638604 100644
--- a/lib/hostasyn.c
+++ b/lib/hostasyn.c
@@ -28,9 +28,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostip.c b/lib/hostip.c
index b27475188..399ac53e5 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -28,9 +28,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 5c0c8841d..3b040a48f 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -29,9 +29,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostip6.c b/lib/hostip6.c
index d69a4c658..777b1e319 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -28,9 +28,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index 2f816b858..dcca62e4e 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -28,9 +28,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/hostthre.c b/lib/hostthre.c
index 9c8942a28..bd7a483c2 100644
--- a/lib/hostthre.c
+++ b/lib/hostthre.c
@@ -29,9 +29,6 @@
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/http.c b/lib/http.c
index 16c59fb87..b4a62f496 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -30,12 +30,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef WIN32
#include <time.h>
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index 8ff428192..a05689adb 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_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index edffeabca..192d0624a 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_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/ldap.c b/lib/ldap.c
index 3e1144d4f..991204fd0 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -30,12 +30,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
@@ -115,7 +109,7 @@
#undef HAVE_LIBDL
#endif
-/*
+/*
* We use this ZERO_NULL to avoid picky compiler warnings,
* when assigning a NULL pointer to a function pointer var.
*/
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 3224521b0..55a6f6295 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -31,7 +31,6 @@
#include "setup.h"
-#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/lib/multi.c b/lib/multi.c
index e55cb6994..c04cad142 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -22,12 +22,10 @@
***************************************************************************/
#include "setup.h"
+
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/netrc.c b/lib/netrc.c
index 54d175989..da366fb6b 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -27,9 +27,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/lib/nss.c b/lib/nss.c
index afeb2ffb9..652d9f1f7 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -31,9 +31,6 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/select.c b/lib/select.c
index 12f34bcc8..4f8878401 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -25,9 +25,6 @@
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
diff --git a/lib/sendf.c b/lib/sendf.c
index 5d8c191d6..bf9ee490a 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -28,10 +28,6 @@
#include <stdlib.h>
#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h> /* required for send() & recv() prototypes */
#endif
diff --git a/lib/ssh.c b/lib/ssh.c
index d002173ab..1846945a7 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -44,24 +44,14 @@
#include <fcntl.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
#ifdef HAVE_TIME_H
#include <time.h>
#endif
-#ifdef WIN32
-
-#else /* probably some kind of unix */
+#ifndef WIN32
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -78,7 +68,7 @@
#include <in.h>
#include <inet.h>
#endif
-#endif
+#endif /* !WIN32 */
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
#undef in_addr_t
diff --git a/lib/sslgen.c b/lib/sslgen.c
index 6b1de1e3c..6bf240395 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -38,12 +38,10 @@
*/
#include "setup.h"
+
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 6ef57853a..5bcc3a1e3 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -36,9 +36,6 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/lib/telnet.c b/lib/telnet.c
index 74467ec86..756f358f4 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -30,12 +30,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#if defined(WIN32)
#include <time.h>
@@ -65,8 +59,7 @@
#include <sys/param.h>
#endif
-
-#endif
+#endif /* WIN32 */
#include "urldata.h"
#include <curl/curl.h>
diff --git a/lib/tftp.c b/lib/tftp.c
index 493725a23..bc17974ad 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -30,12 +30,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#if defined(WIN32)
#include <time.h>
@@ -65,8 +59,7 @@
#include <sys/param.h>
#endif
-
-#endif
+#endif /* WIN32 */
#include "urldata.h"
#include <curl/curl.h>
diff --git a/lib/transfer.c b/lib/transfer.c
index 324aba260..8e6f5e19f 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -29,13 +29,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
#include <errno.h>
#include "strtoofft.h"
@@ -81,7 +74,7 @@
#error "We can't compile without socket() support!"
#endif
-#endif
+#endif /* WIN32 */
#include "urldata.h"
#include <curl/curl.h>
diff --git a/lib/url.c b/lib/url.c
index e777d2a1f..64a145cdb 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -30,12 +30,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#include <errno.h>
#ifdef WIN32
@@ -78,7 +72,8 @@
#ifndef HAVE_SOCKET
#error "We can't compile without socket() support!"
#endif
-#endif
+
+#endif /* WIN32 */
#ifdef USE_LIBIDN
#include <idna.h>