summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-12-14 18:25:56 +0100
committerYang Tse <yangsita@gmail.com>2012-12-14 18:25:56 +0100
commita1035276c1354a2161cfe6c3050d6059060ff8bb (patch)
tree5a50dd1fb9276ab1c7a08050de7e0fda374f6379
parentbceb40095af4d8a62d7faec00006a51b870d9062 (diff)
downloadc-ares-a1035276c1354a2161cfe6c3050d6059060ff8bb.tar.gz
c-ares-a1035276c1354a2161cfe6c3050d6059060ff8bb.tar.bz2
c-ares-a1035276c1354a2161cfe6c3050d6059060ff8bb.zip
Header inclusion clean-up
Remove header inclusions already done in setup_once.h
-rw-r--r--acountry.c5
-rw-r--r--adig.c8
-rw-r--r--ahost.c7
-rw-r--r--ares__close_sockets.c1
-rw-r--r--ares__read_line.c4
-rw-r--r--ares_cancel.c2
-rw-r--r--ares_create_query.c2
-rw-r--r--ares_destroy.c3
-rw-r--r--ares_expand_name.c1
-rw-r--r--ares_expand_string.c2
-rw-r--r--ares_fds.c4
-rw-r--r--ares_free_hostent.c1
-rw-r--r--ares_free_string.c2
-rw-r--r--ares_gethostbyaddr.c4
-rw-r--r--ares_gethostbyname.c4
-rw-r--r--ares_getnameinfo.c4
-rw-r--r--ares_getsock.c4
-rw-r--r--ares_init.c10
-rw-r--r--ares_parse_a_reply.c2
-rw-r--r--ares_parse_aaaa_reply.c2
-rw-r--r--ares_parse_mx_reply.c2
-rw-r--r--ares_parse_naptr_reply.c2
-rw-r--r--ares_parse_ns_reply.c2
-rw-r--r--ares_parse_ptr_reply.c2
-rw-r--r--ares_parse_soa_reply.c2
-rw-r--r--ares_parse_srv_reply.c2
-rw-r--r--ares_parse_txt_reply.c3
-rw-r--r--ares_private.h7
-rw-r--r--ares_process.c7
-rw-r--r--ares_query.c1
-rw-r--r--ares_search.c5
-rw-r--r--ares_send.c3
-rw-r--r--ares_timeout.c5
-rw-r--r--inet_net_pton.c5
-rw-r--r--inet_ntop.c5
35 files changed, 5 insertions, 120 deletions
diff --git a/acountry.c b/acountry.c
index e33e0f8..6a20374 100644
--- a/acountry.c
+++ b/acountry.c
@@ -34,11 +34,6 @@
#include "ares_setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <ctype.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/adig.c b/adig.c
index 47fa5a4..19f6057 100644
--- a/adig.c
+++ b/adig.c
@@ -37,9 +37,6 @@
# include <arpa/nameser_compat.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -47,11 +44,6 @@
# include <strings.h>
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
#include "ares.h"
#include "ares_dns.h"
#include "inet_ntop.h"
diff --git a/ahost.c b/ahost.c
index fb67f1f..d415964 100644
--- a/ahost.c
+++ b/ahost.c
@@ -17,9 +17,6 @@
#include "ares_setup.h"
#if !defined(WIN32) || defined(WATT32)
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -32,10 +29,6 @@
#include <strings.h>
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "ares.h"
#include "ares_dns.h"
#include "inet_ntop.h"
diff --git a/ares__close_sockets.c b/ares__close_sockets.c
index 5d391a9..e819e7d 100644
--- a/ares__close_sockets.c
+++ b/ares__close_sockets.c
@@ -16,7 +16,6 @@
#include "ares_setup.h"
-#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/ares__read_line.c b/ares__read_line.c
index ca01803..bd9504f 100644
--- a/ares__read_line.c
+++ b/ares__read_line.c
@@ -15,9 +15,7 @@
*/
#include "ares_setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+
#include "ares.h"
#include "ares_nowarn.h"
#include "ares_private.h"
diff --git a/ares_cancel.c b/ares_cancel.c
index eb790ae..e5bb050 100644
--- a/ares_cancel.c
+++ b/ares_cancel.c
@@ -14,7 +14,7 @@
#include "ares_setup.h"
#include <assert.h>
-#include <stdlib.h>
+
#include "ares.h"
#include "ares_private.h"
diff --git a/ares_create_query.c b/ares_create_query.c
index 8ca9d6b..f41a0ef 100644
--- a/ares_create_query.c
+++ b/ares_create_query.c
@@ -31,8 +31,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_private.h"
diff --git a/ares_destroy.c b/ares_destroy.c
index a3f6ea2..6c1f324 100644
--- a/ares_destroy.c
+++ b/ares_destroy.c
@@ -16,8 +16,9 @@
*/
#include "ares_setup.h"
+
#include <assert.h>
-#include <stdlib.h>
+
#include "ares.h"
#include "ares_private.h"
diff --git a/ares_expand_name.c b/ares_expand_name.c
index 71ff0da..e69f1af 100644
--- a/ares_expand_name.c
+++ b/ares_expand_name.c
@@ -31,7 +31,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
#include "ares.h"
#include "ares_nowarn.h"
#include "ares_private.h" /* for the memdebug */
diff --git a/ares_expand_string.c b/ares_expand_string.c
index f24cccf..e55f53b 100644
--- a/ares_expand_string.c
+++ b/ares_expand_string.c
@@ -28,8 +28,6 @@
# include "nameser.h"
#endif
-#include <string.h>
-#include <stdlib.h>
#include "ares.h"
#include "ares_private.h" /* for the memdebug */
diff --git a/ares_fds.c b/ares_fds.c
index ac5eedb..f405fc0 100644
--- a/ares_fds.c
+++ b/ares_fds.c
@@ -16,10 +16,6 @@
#include "ares_setup.h"
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
#include "ares.h"
#include "ares_nowarn.h"
#include "ares_private.h"
diff --git a/ares_free_hostent.c b/ares_free_hostent.c
index 349d379..7f44882 100644
--- a/ares_free_hostent.c
+++ b/ares_free_hostent.c
@@ -15,7 +15,6 @@
*/
#include "ares_setup.h"
-#include <stdlib.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
diff --git a/ares_free_string.c b/ares_free_string.c
index e0545c1..9441089 100644
--- a/ares_free_string.c
+++ b/ares_free_string.c
@@ -15,7 +15,7 @@
*/
#include "ares_setup.h"
-#include <stdlib.h>
+
#include "ares.h"
#include "ares_private.h"
diff --git a/ares_gethostbyaddr.c b/ares_gethostbyaddr.c
index 4b4c8a7..9971c4f 100644
--- a/ares_gethostbyaddr.c
+++ b/ares_gethostbyaddr.c
@@ -36,10 +36,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "ares.h"
#include "inet_net_pton.h"
#include "ares_platform.h"
diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c
index 4869402..90f03a2 100644
--- a/ares_gethostbyname.c
+++ b/ares_gethostbyname.c
@@ -37,10 +37,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c
index cdcd516..351fb08 100644
--- a/ares_getnameinfo.c
+++ b/ares_getnameinfo.c
@@ -51,10 +51,6 @@
#include <unistd.h>
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "ares.h"
#include "ares_ipv6.h"
#include "inet_ntop.h"
diff --git a/ares_getsock.c b/ares_getsock.c
index 72e467f..07d2854 100644
--- a/ares_getsock.c
+++ b/ares_getsock.c
@@ -14,10 +14,6 @@
#include "ares_setup.h"
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
#include "ares.h"
#include "ares_private.h"
diff --git a/ares_init.c b/ares_init.c
index 76b2961..15d2934 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -21,10 +21,6 @@
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -54,12 +50,6 @@
#include <unistd.h>
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <time.h>
-
#if defined(ANDROID) || defined(__ANDROID__)
#include <sys/system_properties.h>
/* From the Bionic sources */
diff --git a/ares_parse_a_reply.c b/ares_parse_a_reply.c
index 4bd0845..641ae79 100644
--- a/ares_parse_a_reply.c
+++ b/ares_parse_a_reply.c
@@ -41,8 +41,6 @@
# include <strings.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
diff --git a/ares_parse_aaaa_reply.c b/ares_parse_aaaa_reply.c
index b11df52..d23676a 100644
--- a/ares_parse_aaaa_reply.c
+++ b/ares_parse_aaaa_reply.c
@@ -42,8 +42,6 @@
# include <strings.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
diff --git a/ares_parse_mx_reply.c b/ares_parse_mx_reply.c
index 2180054..bc5e812 100644
--- a/ares_parse_mx_reply.c
+++ b/ares_parse_mx_reply.c
@@ -38,8 +38,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_data.h"
diff --git a/ares_parse_naptr_reply.c b/ares_parse_naptr_reply.c
index 6a9d09e..73a57a0 100644
--- a/ares_parse_naptr_reply.c
+++ b/ares_parse_naptr_reply.c
@@ -38,8 +38,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_data.h"
diff --git a/ares_parse_ns_reply.c b/ares_parse_ns_reply.c
index 5e9af71..1a4e801 100644
--- a/ares_parse_ns_reply.c
+++ b/ares_parse_ns_reply.c
@@ -41,8 +41,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_private.h"
diff --git a/ares_parse_ptr_reply.c b/ares_parse_ptr_reply.c
index ed4a405..bb62b67 100644
--- a/ares_parse_ptr_reply.c
+++ b/ares_parse_ptr_reply.c
@@ -38,8 +38,6 @@
# include <strings.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_nowarn.h"
diff --git a/ares_parse_soa_reply.c b/ares_parse_soa_reply.c
index b811954..611a215 100644
--- a/ares_parse_soa_reply.c
+++ b/ares_parse_soa_reply.c
@@ -38,8 +38,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_data.h"
diff --git a/ares_parse_srv_reply.c b/ares_parse_srv_reply.c
index 9c7eb6e..6b2526c 100644
--- a/ares_parse_srv_reply.c
+++ b/ares_parse_srv_reply.c
@@ -38,8 +38,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_data.h"
diff --git a/ares_parse_txt_reply.c b/ares_parse_txt_reply.c
index 5165332..26737ed 100644
--- a/ares_parse_txt_reply.c
+++ b/ares_parse_txt_reply.c
@@ -42,9 +42,6 @@
# include <strings.h>
#endif
-#include <stdlib.h>
-#include <string.h>
-
#include "ares.h"
#include "ares_dns.h"
#include "ares_data.h"
diff --git a/ares_private.h b/ares_private.h
index 8c8a08f..99d47c6 100644
--- a/ares_private.h
+++ b/ares_private.h
@@ -26,9 +26,6 @@
#define WIN32
#endif
-#include <stdio.h>
-#include <sys/types.h>
-
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -40,10 +37,6 @@
#define HAVE_WRITEV 1
#endif
-#ifdef NETWARE
-#include <time.h>
-#endif
-
#define DEFAULT_TIMEOUT 5000 /* milliseconds */
#define DEFAULT_TRIES 4
#ifndef INADDR_NONE
diff --git a/ares_process.c b/ares_process.c
index b7c0bca..25eb24c 100644
--- a/ares_process.c
+++ b/ares_process.c
@@ -41,10 +41,6 @@
# include <arpa/nameser_compat.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
@@ -59,10 +55,7 @@
#endif
#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
#include <fcntl.h>
-#include <time.h>
#include "ares.h"
#include "ares_dns.h"
diff --git a/ares_query.c b/ares_query.c
index ed6b6e8..6104128 100644
--- a/ares_query.c
+++ b/ares_query.c
@@ -31,7 +31,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_private.h"
diff --git a/ares_search.c b/ares_search.c
index 1877c19..ec07640 100644
--- a/ares_search.c
+++ b/ares_search.c
@@ -16,11 +16,6 @@
#include "ares_setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
diff --git a/ares_send.c b/ares_send.c
index d3f734f..ab85a2d 100644
--- a/ares_send.c
+++ b/ares_send.c
@@ -31,9 +31,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_private.h"
diff --git a/ares_timeout.c b/ares_timeout.c
index 1dc0283..0b5a435 100644
--- a/ares_timeout.c
+++ b/ares_timeout.c
@@ -19,11 +19,6 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#include <time.h>
#include "ares.h"
#include "ares_private.h"
diff --git a/inet_net_pton.c b/inet_net_pton.c
index 45bb5d4..f4e58f9 100644
--- a/inet_net_pton.c
+++ b/inet_net_pton.c
@@ -36,11 +36,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "ares.h"
#include "ares_ipv6.h"
#include "ares_nowarn.h"
diff --git a/inet_ntop.c b/inet_ntop.c
index 57e1146..e5ffb10 100644
--- a/inet_ntop.c
+++ b/inet_ntop.c
@@ -35,11 +35,6 @@
# include <arpa/nameser_compat.h>
#endif
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "ares.h"
#include "ares_ipv6.h"
#include "inet_ntop.h"