setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
authorYang Tse <yangsita@gmail.com>
Fri, 14 Dec 2012 17:36:59 +0000 (18:36 +0100)
committerYang Tse <yangsita@gmail.com>
Fri, 14 Dec 2012 17:36:59 +0000 (18:36 +0100)
Inclusion of these two header files now done in setup_once.h

28 files changed:
acountry.c
adig.c
ahost.c
ares__close_sockets.c
ares__get_hostent.c
ares_create_query.c
ares_expand_name.c
ares_expand_string.c
ares_gethostbyaddr.c
ares_gethostbyname.c
ares_getnameinfo.c
ares_init.c
ares_nowarn.c
ares_parse_a_reply.c
ares_parse_aaaa_reply.c
ares_parse_mx_reply.c
ares_parse_naptr_reply.c
ares_parse_ns_reply.c
ares_parse_ptr_reply.c
ares_parse_soa_reply.c
ares_parse_srv_reply.c
ares_parse_txt_reply.c
ares_process.c
ares_query.c
ares_send.c
inet_net_pton.c
inet_ntop.c
setup_once.h

index 6a20374..7a855c0 100644 (file)
@@ -34,9 +34,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
@@ -44,7 +41,6 @@
 #if defined(WIN32) && !defined(WATT32)
   #include <winsock.h>
 #else
-  #include <sys/socket.h>
   #include <arpa/inet.h>
   #include <netinet/in.h>
   #include <netdb.h>
diff --git a/adig.c b/adig.c
index 19f6057..4783101 100644 (file)
--- a/adig.c
+++ b/adig.c
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
@@ -37,9 +34,6 @@
 #  include <arpa/nameser_compat.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
 #ifdef HAVE_STRINGS_H
 #  include <strings.h>
 #endif
diff --git a/ahost.c b/ahost.c
index d415964..cb2bea1 100644 (file)
--- a/ahost.c
+++ b/ahost.c
 #include "ares_setup.h"
 
 #if !defined(WIN32) || defined(WATT32)
-#include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #endif
+
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
index e819e7d..d3d85ff 100644 (file)
 
 #include "ares_setup.h"
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "ares.h"
 #include "ares_private.h"
 
index 94428ee..a9a80ef 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index f41a0ef..8624e2f 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index e69f1af..a66dfa9 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index e55f53b..96d1be3 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 9971c4f..669a29d 100644 (file)
@@ -15,9 +15,6 @@
  */
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 90f03a2..428b1ee 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 351fb08..75cb7ed 100644 (file)
@@ -22,9 +22,6 @@
 #  endif
 #endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
 #include <net/if.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "ares.h"
 #include "ares_ipv6.h"
 #include "inet_ntop.h"
index 15d2934..aab1a50 100644 (file)
 #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
 #  include <arpa/nameser_compat.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #if defined(ANDROID) || defined(__ANDROID__)
 #include <sys/system_properties.h>
 /* From the Bionic sources */
index dc33bcf..a4dce89 100644 (file)
@@ -23,9 +23,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 641ae79..9683ef5 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index d23676a..f5b6eae 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index bc5e812..32d3af4 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 73a57a0..9315df7 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 1a4e801..553f253 100644 (file)
@@ -20,9 +20,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index bb62b67..b505b92 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 611a215..da1c6dc 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 6b2526c..9f61f19 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 26737ed..dcc6473 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 25eb24c..2a02f16 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_SYS_UIO_H
 #  include <sys/uio.h>
 #endif
@@ -44,9 +41,6 @@
 #ifdef HAVE_STRINGS_H
 #  include <strings.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 #  include <sys/ioctl.h>
 #endif
index 6104128..31084da 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index ab85a2d..1a450b1 100644 (file)
@@ -16,9 +16,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index f4e58f9..8199934 100644 (file)
@@ -18,9 +18,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index e5ffb10..ea1ebb8 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "ares_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index bb261e7..3dad534 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.