From a1035276c1354a2161cfe6c3050d6059060ff8bb Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 14 Dec 2012 18:25:56 +0100 Subject: [PATCH] Header inclusion clean-up Remove header inclusions already done in setup_once.h --- acountry.c | 5 ----- adig.c | 8 -------- ahost.c | 7 ------- ares__close_sockets.c | 1 - ares__read_line.c | 4 +--- ares_cancel.c | 2 +- ares_create_query.c | 2 -- ares_destroy.c | 3 ++- ares_expand_name.c | 1 - ares_expand_string.c | 2 -- ares_fds.c | 4 ---- ares_free_hostent.c | 1 - ares_free_string.c | 2 +- ares_gethostbyaddr.c | 4 ---- ares_gethostbyname.c | 4 ---- ares_getnameinfo.c | 4 ---- ares_getsock.c | 4 ---- ares_init.c | 10 ---------- ares_parse_a_reply.c | 2 -- ares_parse_aaaa_reply.c | 2 -- ares_parse_mx_reply.c | 2 -- ares_parse_naptr_reply.c | 2 -- ares_parse_ns_reply.c | 2 -- ares_parse_ptr_reply.c | 2 -- ares_parse_soa_reply.c | 2 -- ares_parse_srv_reply.c | 2 -- ares_parse_txt_reply.c | 3 --- ares_private.h | 7 ------- ares_process.c | 7 ------- ares_query.c | 1 - ares_search.c | 5 ----- ares_send.c | 3 --- ares_timeout.c | 5 ----- inet_net_pton.c | 5 ----- inet_ntop.c | 5 ----- 35 files changed, 5 insertions(+), 120 deletions(-) diff --git a/acountry.c b/acountry.c index e33e0f83..6a203746 100644 --- a/acountry.c +++ b/acountry.c @@ -34,11 +34,6 @@ #include "ares_setup.h" -#include -#include -#include -#include -#include #ifdef HAVE_UNISTD_H #include #endif diff --git a/adig.c b/adig.c index 47fa5a43..19f6057d 100644 --- a/adig.c +++ b/adig.c @@ -37,9 +37,6 @@ # include #endif -#ifdef HAVE_SYS_TIME_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif @@ -47,11 +44,6 @@ # include #endif -#include -#include -#include -#include - #include "ares.h" #include "ares_dns.h" #include "inet_ntop.h" diff --git a/ahost.c b/ahost.c index fb67f1fc..d415964c 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 -#endif #include #include #include @@ -32,10 +29,6 @@ #include #endif -#include -#include -#include - #include "ares.h" #include "ares_dns.h" #include "inet_ntop.h" diff --git a/ares__close_sockets.c b/ares__close_sockets.c index 5d391a9e..e819e7db 100644 --- a/ares__close_sockets.c +++ b/ares__close_sockets.c @@ -16,7 +16,6 @@ #include "ares_setup.h" -#include #ifdef HAVE_UNISTD_H #include #endif diff --git a/ares__read_line.c b/ares__read_line.c index ca018035..bd9504fc 100644 --- a/ares__read_line.c +++ b/ares__read_line.c @@ -15,9 +15,7 @@ */ #include "ares_setup.h" -#include -#include -#include + #include "ares.h" #include "ares_nowarn.h" #include "ares_private.h" diff --git a/ares_cancel.c b/ares_cancel.c index eb790ae0..e5bb0507 100644 --- a/ares_cancel.c +++ b/ares_cancel.c @@ -14,7 +14,7 @@ #include "ares_setup.h" #include -#include + #include "ares.h" #include "ares_private.h" diff --git a/ares_create_query.c b/ares_create_query.c index 8ca9d6be..f41a0ef8 100644 --- a/ares_create_query.c +++ b/ares_create_query.c @@ -31,8 +31,6 @@ # include #endif -#include -#include #include "ares.h" #include "ares_dns.h" #include "ares_private.h" diff --git a/ares_destroy.c b/ares_destroy.c index a3f6ea20..6c1f3244 100644 --- a/ares_destroy.c +++ b/ares_destroy.c @@ -16,8 +16,9 @@ */ #include "ares_setup.h" + #include -#include + #include "ares.h" #include "ares_private.h" diff --git a/ares_expand_name.c b/ares_expand_name.c index 71ff0dae..e69f1afb 100644 --- a/ares_expand_name.c +++ b/ares_expand_name.c @@ -31,7 +31,6 @@ # include #endif -#include #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 f24cccf6..e55f53be 100644 --- a/ares_expand_string.c +++ b/ares_expand_string.c @@ -28,8 +28,6 @@ # include "nameser.h" #endif -#include -#include #include "ares.h" #include "ares_private.h" /* for the memdebug */ diff --git a/ares_fds.c b/ares_fds.c index ac5eedb3..f405fc04 100644 --- a/ares_fds.c +++ b/ares_fds.c @@ -16,10 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_TIME_H -#include -#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 349d379a..7f448828 100644 --- a/ares_free_hostent.c +++ b/ares_free_hostent.c @@ -15,7 +15,6 @@ */ #include "ares_setup.h" -#include #ifdef HAVE_NETDB_H #include diff --git a/ares_free_string.c b/ares_free_string.c index e0545c1d..94410890 100644 --- a/ares_free_string.c +++ b/ares_free_string.c @@ -15,7 +15,7 @@ */ #include "ares_setup.h" -#include + #include "ares.h" #include "ares_private.h" diff --git a/ares_gethostbyaddr.c b/ares_gethostbyaddr.c index 4b4c8a7d..9971c4f6 100644 --- a/ares_gethostbyaddr.c +++ b/ares_gethostbyaddr.c @@ -36,10 +36,6 @@ # include #endif -#include -#include -#include - #include "ares.h" #include "inet_net_pton.h" #include "ares_platform.h" diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c index 4869402b..90f03a23 100644 --- a/ares_gethostbyname.c +++ b/ares_gethostbyname.c @@ -37,10 +37,6 @@ # include #endif -#include -#include -#include -#include #ifdef HAVE_STRINGS_H #include #endif diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index cdcd5164..351fb08c 100644 --- a/ares_getnameinfo.c +++ b/ares_getnameinfo.c @@ -51,10 +51,6 @@ #include #endif -#include -#include -#include - #include "ares.h" #include "ares_ipv6.h" #include "inet_ntop.h" diff --git a/ares_getsock.c b/ares_getsock.c index 72e467f2..07d2854c 100644 --- a/ares_getsock.c +++ b/ares_getsock.c @@ -14,10 +14,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_TIME_H -#include -#endif - #include "ares.h" #include "ares_private.h" diff --git a/ares_init.c b/ares_init.c index 76b29617..15d2934f 100644 --- a/ares_init.c +++ b/ares_init.c @@ -21,10 +21,6 @@ #include #endif -#ifdef HAVE_SYS_TIME_H -#include -#endif - #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -54,12 +50,6 @@ #include #endif -#include -#include -#include -#include -#include - #if defined(ANDROID) || defined(__ANDROID__) #include /* From the Bionic sources */ diff --git a/ares_parse_a_reply.c b/ares_parse_a_reply.c index 4bd08458..641ae795 100644 --- a/ares_parse_a_reply.c +++ b/ares_parse_a_reply.c @@ -41,8 +41,6 @@ # include #endif -#include -#include #ifdef HAVE_LIMITS_H # include #endif diff --git a/ares_parse_aaaa_reply.c b/ares_parse_aaaa_reply.c index b11df524..d23676a0 100644 --- a/ares_parse_aaaa_reply.c +++ b/ares_parse_aaaa_reply.c @@ -42,8 +42,6 @@ # include #endif -#include -#include #ifdef HAVE_LIMITS_H # include #endif diff --git a/ares_parse_mx_reply.c b/ares_parse_mx_reply.c index 21800546..bc5e812d 100644 --- a/ares_parse_mx_reply.c +++ b/ares_parse_mx_reply.c @@ -38,8 +38,6 @@ # include #endif -#include -#include #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 6a9d09ec..73a57a04 100644 --- a/ares_parse_naptr_reply.c +++ b/ares_parse_naptr_reply.c @@ -38,8 +38,6 @@ # include #endif -#include -#include #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 5e9af71d..1a4e8012 100644 --- a/ares_parse_ns_reply.c +++ b/ares_parse_ns_reply.c @@ -41,8 +41,6 @@ # include #endif -#include -#include #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 ed4a405b..bb62b671 100644 --- a/ares_parse_ptr_reply.c +++ b/ares_parse_ptr_reply.c @@ -38,8 +38,6 @@ # include #endif -#include -#include #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 b8119544..611a2156 100644 --- a/ares_parse_soa_reply.c +++ b/ares_parse_soa_reply.c @@ -38,8 +38,6 @@ # include #endif -#include -#include #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 9c7eb6ee..6b2526ca 100644 --- a/ares_parse_srv_reply.c +++ b/ares_parse_srv_reply.c @@ -38,8 +38,6 @@ # include #endif -#include -#include #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 51653328..26737ed4 100644 --- a/ares_parse_txt_reply.c +++ b/ares_parse_txt_reply.c @@ -42,9 +42,6 @@ # include #endif -#include -#include - #include "ares.h" #include "ares_dns.h" #include "ares_data.h" diff --git a/ares_private.h b/ares_private.h index 8c8a08f0..99d47c6f 100644 --- a/ares_private.h +++ b/ares_private.h @@ -26,9 +26,6 @@ #define WIN32 #endif -#include -#include - #ifdef HAVE_NETINET_IN_H #include #endif @@ -40,10 +37,6 @@ #define HAVE_WRITEV 1 #endif -#ifdef NETWARE -#include -#endif - #define DEFAULT_TIMEOUT 5000 /* milliseconds */ #define DEFAULT_TRIES 4 #ifndef INADDR_NONE diff --git a/ares_process.c b/ares_process.c index b7c0bca2..25eb24c0 100644 --- a/ares_process.c +++ b/ares_process.c @@ -41,10 +41,6 @@ # include #endif -#ifdef HAVE_SYS_TIME_H -# include -#endif - #ifdef HAVE_STRINGS_H # include #endif @@ -59,10 +55,7 @@ #endif #include -#include -#include #include -#include #include "ares.h" #include "ares_dns.h" diff --git a/ares_query.c b/ares_query.c index ed6b6e87..6104128f 100644 --- a/ares_query.c +++ b/ares_query.c @@ -31,7 +31,6 @@ # include #endif -#include #include "ares.h" #include "ares_dns.h" #include "ares_private.h" diff --git a/ares_search.c b/ares_search.c index 1877c19f..ec076405 100644 --- a/ares_search.c +++ b/ares_search.c @@ -16,11 +16,6 @@ #include "ares_setup.h" -#include -#include -#include -#include - #ifdef HAVE_STRINGS_H # include #endif diff --git a/ares_send.c b/ares_send.c index d3f734fd..ab85a2d6 100644 --- a/ares_send.c +++ b/ares_send.c @@ -31,9 +31,6 @@ # include #endif -#include -#include -#include #include "ares.h" #include "ares_dns.h" #include "ares_private.h" diff --git a/ares_timeout.c b/ares_timeout.c index 1dc02831..0b5a435f 100644 --- a/ares_timeout.c +++ b/ares_timeout.c @@ -19,11 +19,6 @@ #ifdef HAVE_LIMITS_H #include #endif -#ifdef HAVE_SYS_TIME_H -#include -#endif - -#include #include "ares.h" #include "ares_private.h" diff --git a/inet_net_pton.c b/inet_net_pton.c index 45bb5d48..f4e58f9d 100644 --- a/inet_net_pton.c +++ b/inet_net_pton.c @@ -36,11 +36,6 @@ # include #endif -#include -#include -#include -#include - #include "ares.h" #include "ares_ipv6.h" #include "ares_nowarn.h" diff --git a/inet_ntop.c b/inet_ntop.c index 57e1146b..e5ffb107 100644 --- a/inet_ntop.c +++ b/inet_ntop.c @@ -35,11 +35,6 @@ # include #endif -#include -#include -#include -#include - #include "ares.h" #include "ares_ipv6.h" #include "inet_ntop.h"