From 108b414bb86022a419b9f0346477b8fe64cad646 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 2 Nov 2009 11:55:53 +0000 Subject: Renamed c-ares setup.h to ares_setup.h --- ares/CHANGES | 3 + ares/Makefile.am | 2 +- ares/Makefile.inc | 2 +- ares/Makefile.vc6 | 68 ++++++++-------- ares/acountry.c | 2 +- ares/adig.c | 2 +- ares/ahost.c | 2 +- ares/ares__close_sockets.c | 2 +- ares/ares__get_hostent.c | 2 +- ares/ares__read_line.c | 2 +- ares/ares__timeval.c | 2 +- ares/ares_cancel.c | 2 +- ares/ares_destroy.c | 2 +- ares/ares_expand_name.c | 2 +- ares/ares_expand_string.c | 2 +- ares/ares_fds.c | 2 +- ares/ares_free_hostent.c | 2 +- ares/ares_free_string.c | 2 +- ares/ares_gethostbyaddr.c | 2 +- ares/ares_gethostbyname.c | 2 +- ares/ares_getnameinfo.c | 2 +- ares/ares_getsock.c | 2 +- ares/ares_init.c | 2 +- ares/ares_library_init.c | 2 +- ares/ares_library_init.h | 2 +- ares/ares_llist.c | 2 +- ares/ares_mkquery.c | 2 +- ares/ares_parse_a_reply.c | 2 +- ares/ares_parse_aaaa_reply.c | 2 +- ares/ares_parse_ns_reply.c | 2 +- ares/ares_parse_ptr_reply.c | 2 +- ares/ares_parse_srv_reply.c | 2 +- ares/ares_parse_txt_reply.c | 2 +- ares/ares_process.c | 2 +- ares/ares_query.c | 2 +- ares/ares_search.c | 2 +- ares/ares_send.c | 2 +- ares/ares_setup.h | 187 +++++++++++++++++++++++++++++++++++++++++++ ares/ares_strcasecmp.c | 2 +- ares/ares_strcasecmp.h | 2 +- ares/ares_strdup.c | 2 +- ares/ares_strdup.h | 2 +- ares/ares_strerror.c | 2 +- ares/ares_timeout.c | 2 +- ares/ares_version.c | 2 +- ares/ares_writev.c | 2 +- ares/ares_writev.h | 2 +- ares/bitncmp.c | 2 +- ares/inet_net_pton.c | 2 +- ares/inet_ntop.c | 2 +- ares/setup.h | 187 ------------------------------------------- ares/windows_port.c | 2 +- 52 files changed, 272 insertions(+), 269 deletions(-) create mode 100644 ares/ares_setup.h delete mode 100644 ares/setup.h diff --git a/ares/CHANGES b/ares/CHANGES index 198beb8d9..798787421 100644 --- a/ares/CHANGES +++ b/ares/CHANGES @@ -1,5 +1,8 @@ Changelog for the c-ares project +* November 2, 2009 (Yang Tse) +- Renamed c-ares setup.h to ares_setup.h + * October 31, 2009 (Yang Tse) - Symbol hiding configure options are named now --enable-symbol-hiding and --disable-symbol-hiding in an attempt to make them less ambiguous. diff --git a/ares/Makefile.am b/ares/Makefile.am index 9a4925845..e8b702045 100644 --- a/ares/Makefile.am +++ b/ares/Makefile.am @@ -18,7 +18,7 @@ ACLOCAL_AMFLAGS = -I m4 # $(top_builddir)/../lib is for libcurl's generated lib/curl_config.h file # $(top_srcdir)/../lib is for libcurl's lib/setup.h and other "private" files # $(top_builddir) is for c-ares's generated ares_config.h file -# $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files +# $(top_srcdir) is for c-ares's ares_setup.h and other "c-ares-private" files if CURLDEBUG INCLUDES = -I$(top_builddir)/../include \ diff --git a/ares/Makefile.inc b/ares/Makefile.inc index e383ebb82..04ab7a12e 100644 --- a/ares/Makefile.inc +++ b/ares/Makefile.inc @@ -55,7 +55,7 @@ HHEADERS = ares.h \ inet_net_pton.h \ inet_ntop.h \ nameser.h \ - setup.h \ + ares_setup.h \ setup_once.h MANPAGES = ares_cancel.3 \ diff --git a/ares/Makefile.vc6 b/ares/Makefile.vc6 index b0af61310..4d68f3718 100644 --- a/ares/Makefile.vc6 +++ b/ares/Makefile.vc6 @@ -159,117 +159,117 @@ vclean realclean: clean # # Copyright "gcc -MM .." # -$(OBJ_DIR)\ares_fds.obj: ares_fds.c setup.h setup_once.h ares.h ares_private.h \ +$(OBJ_DIR)\ares_fds.obj: ares_fds.c ares_setup.h setup_once.h ares.h ares_private.h \ ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_process.obj: ares_process.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\ares_process.obj: ares_process.c ares_setup.h setup_once.h nameser.h \ ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c ares_setup.h setup_once.h \ ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_query.obj: ares_query.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\ares_query.obj: ares_query.c ares_setup.h setup_once.h nameser.h \ ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c setup.h setup_once.h \ +$(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c ares_setup.h setup_once.h \ ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c ares_setup.h setup_once.h \ ares.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_search.obj: ares_search.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\ares_search.obj: ares_search.c ares_setup.h setup_once.h nameser.h \ ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c setup.h setup_once.h \ +$(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c ares_setup.h setup_once.h \ ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c ares_setup.h setup_once.h \ nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h \ ares_rules.h -$(OBJ_DIR)\ares_send.obj: ares_send.c setup.h setup_once.h nameser.h ares.h \ +$(OBJ_DIR)\ares_send.obj: ares_send.c ares_setup.h setup_once.h nameser.h ares.h \ ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares__read_line.obj: ares__read_line.c ares_setup.h setup_once.h ares.h \ ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c ares_setup.h setup_once.h \ nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h \ ares_build.h ares_rules.h -$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c ares_setup.h setup_once.h ares.h \ ares_build.h ares_rules.h -$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c ares_setup.h setup_once.h ares.h \ ares_build.h ares_rules.h -$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c ares_setup.h setup_once.h ares.h \ ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \ +$(OBJ_DIR)\ares_init.obj: ares_init.c ares_setup.h setup_once.h nameser.h ares.h \ ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h \ ares_library_init.h -$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c ares_setup.h setup_once.h ares.h \ ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c ares_setup.h setup_once.h ares.h \ ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c ares_setup.h setup_once.h ares.h \ ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c ares_setup.h setup_once.h nameser.h \ ares.h ares_dns.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_version.obj: ares_version.c ares_setup.h setup_once.h ares.h \ ares_version.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c ares_setup.h setup_once.h \ nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c ares_setup.h setup_once.h \ nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h \ ares_rules.h -$(OBJ_DIR)\windows_port.obj: windows_port.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\windows_port.obj: windows_port.c ares_setup.h setup_once.h nameser.h \ ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c ares_setup.h setup_once.h \ nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c setup.h \ +$(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c ares_setup.h \ setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \ ares_build.h ares_rules.h -$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \ +$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c ares_setup.h \ setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \ ares_ipv6.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \ +$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c ares_setup.h \ setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \ ares_build.h ares_rules.h -$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c ares_setup.h setup_once.h \ nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h ares_build.h \ ares_rules.h -$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c ares_setup.h setup_once.h nameser.h \ ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h $(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h ares_build.h ares_rules.h -$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \ +$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c ares_setup.h setup_once.h nameser.h \ ares_ipv6.h inet_ntop.h ares_build.h ares_rules.h $(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h ares_build.h \ ares_rules.h -$(OBJ_DIR)\ares_library_init.obj: ares_library_init.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_library_init.obj: ares_library_init.c ares_setup.h setup_once.h \ ares.h ares_private.h ares_library_init.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_llist.obj: ares_llist.c ares_setup.h setup_once.h ares.h \ ares_private.h ares_llist.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_writev.obj: ares_writev.c setup.h setup_once.h ares.h \ +$(OBJ_DIR)\ares_writev.obj: ares_writev.c ares_setup.h setup_once.h ares.h \ ares_writev.h ares_build.h ares_rules.h diff --git a/ares/acountry.c b/ares/acountry.c index 92707f3a9..e61613c50 100644 --- a/ares/acountry.c +++ b/ares/acountry.c @@ -33,7 +33,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include diff --git a/ares/adig.c b/ares/adig.c index 3a5c3da9e..8488d97e9 100644 --- a/ares/adig.c +++ b/ares/adig.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ahost.c b/ares/ahost.c index 0e6797e11..4e2934057 100644 --- a/ares/ahost.c +++ b/ares/ahost.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #if !defined(WIN32) || defined(WATT32) #ifdef HAVE_SYS_TIME_H diff --git a/ares/ares__close_sockets.c b/ares/ares__close_sockets.c index 1becf9ab3..d2476fdbb 100644 --- a/ares/ares__close_sockets.c +++ b/ares/ares__close_sockets.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #ifdef HAVE_UNISTD_H diff --git a/ares/ares__get_hostent.c b/ares/ares__get_hostent.c index 9b1d4245f..18d300987 100644 --- a/ares/ares__get_hostent.c +++ b/ares/ares__get_hostent.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares__read_line.c b/ares/ares__read_line.c index d198b12a1..561b12e77 100644 --- a/ares/ares__read_line.c +++ b/ares/ares__read_line.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include #include diff --git a/ares/ares__timeval.c b/ares/ares__timeval.c index 7437b5a18..8cf37e91c 100644 --- a/ares/ares__timeval.c +++ b/ares/ares__timeval.c @@ -13,7 +13,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include "ares.h" #include "ares_private.h" diff --git a/ares/ares_cancel.c b/ares/ares_cancel.c index 63b1514e7..a730a651e 100644 --- a/ares/ares_cancel.c +++ b/ares/ares_cancel.c @@ -13,7 +13,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include #include "ares.h" diff --git a/ares/ares_destroy.c b/ares/ares_destroy.c index ef5cdb8bc..2dfb69445 100644 --- a/ares/ares_destroy.c +++ b/ares/ares_destroy.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include #include "ares.h" diff --git a/ares/ares_expand_name.c b/ares/ares_expand_name.c index a1556e937..5a48b4d59 100644 --- a/ares/ares_expand_name.c +++ b/ares/ares_expand_name.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_expand_string.c b/ares/ares_expand_string.c index f2d4f748a..6ab8a7752 100644 --- a/ares/ares_expand_string.c +++ b/ares/ares_expand_string.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_fds.c b/ares/ares_fds.c index 4c6299a48..bbf5c454a 100644 --- a/ares/ares_fds.c +++ b/ares/ares_fds.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_TIME_H #include diff --git a/ares/ares_free_hostent.c b/ares/ares_free_hostent.c index d76679565..623e1e247 100644 --- a/ares/ares_free_hostent.c +++ b/ares/ares_free_hostent.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #if !defined(WIN32) || defined(WATT32) diff --git a/ares/ares_free_string.c b/ares/ares_free_string.c index c5810b23a..dc27f5b34 100644 --- a/ares/ares_free_string.c +++ b/ares/ares_free_string.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include "ares.h" #include "ares_private.h" diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c index 63abc85e4..cafb15e1d 100644 --- a/ares/ares_gethostbyaddr.c +++ b/ares/ares_gethostbyaddr.c @@ -14,7 +14,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c index d708dfb14..acf1a44d9 100644 --- a/ares/ares_gethostbyname.c +++ b/ares/ares_gethostbyname.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c index 2c5cf0e08..ec0fac05d 100644 --- a/ares/ares_getnameinfo.c +++ b/ares/ares_getnameinfo.c @@ -14,7 +14,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_GETSERVBYPORT_R # if !defined(GETSERVBYPORT_R_ARGS) || \ diff --git a/ares/ares_getsock.c b/ares/ares_getsock.c index 38b8fefac..1c5e9ff26 100644 --- a/ares/ares_getsock.c +++ b/ares/ares_getsock.c @@ -13,7 +13,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_TIME_H #include diff --git a/ares/ares_init.c b/ares/ares_init.c index 9f90f9e20..f7973f14e 100644 --- a/ares/ares_init.c +++ b/ares/ares_init.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #if defined(WIN32) && !defined(WATT32) #include diff --git a/ares/ares_library_init.c b/ares/ares_library_init.c index f7286ad17..a2486ac70 100644 --- a/ares/ares_library_init.c +++ b/ares/ares_library_init.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include "ares.h" #include "ares_library_init.h" diff --git a/ares/ares_library_init.h b/ares/ares_library_init.h index 6c596ba03..d99a0bae1 100644 --- a/ares/ares_library_init.h +++ b/ares/ares_library_init.h @@ -19,7 +19,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef WIN32 diff --git a/ares/ares_llist.c b/ares/ares_llist.c index 77cbd4d07..f261dc73b 100644 --- a/ares/ares_llist.c +++ b/ares/ares_llist.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include "ares.h" #include "ares_private.h" diff --git a/ares/ares_mkquery.c b/ares/ares_mkquery.c index 27ec1ee1b..56571885c 100644 --- a/ares/ares_mkquery.c +++ b/ares/ares_mkquery.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_parse_a_reply.c b/ares/ares_parse_a_reply.c index c2d809f2c..3d59c8aa4 100644 --- a/ares/ares_parse_a_reply.c +++ b/ares/ares_parse_a_reply.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_parse_aaaa_reply.c b/ares/ares_parse_aaaa_reply.c index dd1d33b30..58c6b8ab8 100644 --- a/ares/ares_parse_aaaa_reply.c +++ b/ares/ares_parse_aaaa_reply.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_parse_ns_reply.c b/ares/ares_parse_ns_reply.c index a7f4543c4..25c632994 100644 --- a/ares/ares_parse_ns_reply.c +++ b/ares/ares_parse_ns_reply.c @@ -20,7 +20,7 @@ * on behalf of AVIRA Gmbh - http://www.avira.com */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_parse_ptr_reply.c b/ares/ares_parse_ptr_reply.c index b72f99521..9923a9da0 100644 --- a/ares/ares_parse_ptr_reply.c +++ b/ares/ares_parse_ptr_reply.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_parse_srv_reply.c b/ares/ares_parse_srv_reply.c index 9179d4d02..883331052 100644 --- a/ares/ares_parse_srv_reply.c +++ b/ares/ares_parse_srv_reply.c @@ -20,7 +20,7 @@ * on behalf of Red Hat - http://www.redhat.com */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_parse_txt_reply.c b/ares/ares_parse_txt_reply.c index 6a83b0709..583b64f1c 100644 --- a/ares/ares_parse_txt_reply.c +++ b/ares/ares_parse_txt_reply.c @@ -17,7 +17,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_process.c b/ares/ares_process.c index 41d181132..0bc3985d8 100644 --- a/ares/ares_process.c +++ b/ares/ares_process.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_query.c b/ares/ares_query.c index 0d1f03681..2a717fb3c 100644 --- a/ares/ares_query.c +++ b/ares/ares_query.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_search.c b/ares/ares_search.c index 9ab48e0e1..8673c289f 100644 --- a/ares/ares_search.c +++ b/ares/ares_search.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include diff --git a/ares/ares_send.c b/ares/ares_send.c index 54e486185..c2b006537 100644 --- a/ares/ares_send.c +++ b/ares/ares_send.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/ares_setup.h b/ares/ares_setup.h new file mode 100644 index 000000000..589643716 --- /dev/null +++ b/ares/ares_setup.h @@ -0,0 +1,187 @@ +#ifndef HEADER_CARES_SETUP_H +#define HEADER_CARES_SETUP_H + +/* $Id$ */ + +/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +/* + * Define WIN32 when build target is Win32 API + */ + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +#define WIN32 +#endif + +/* + * Include configuration script results or hand-crafted + * configuration file for platforms which lack config tool. + */ + +#ifdef HAVE_CONFIG_H +#include "ares_config.h" +#else + +#ifdef WIN32 +#include "config-win32.h" +#endif + +#endif /* HAVE_CONFIG_H */ + +/* ================================================================ */ +/* Definition of preprocessor macros/symbols which modify compiler */ +/* behaviour or generated code characteristics must be done here, */ +/* as appropriate, before any system header file is included. It is */ +/* also possible to have them defined in the config file included */ +/* before this point. As a result of all this we frown inclusion of */ +/* system header files in our config files, avoid this at any cost. */ +/* ================================================================ */ + +/* + * Tru64 needs _REENTRANT set for a few function prototypes and + * things to appear in the system header files. Unixware needs it + * to build proper reentrant code. Others may also need it. + */ + +#ifdef NEED_REENTRANT +# ifndef _REENTRANT +# define _REENTRANT +# endif +#endif + +/* ================================================================ */ +/* If you need to include a system header file for your platform, */ +/* please, do it beyond the point further indicated in this file. */ +/* ================================================================ */ + +/* + * c-ares external interface definitions are also used internally, + * and might also include required system header files to define them. + */ + +#include + +/* + * Compile time sanity checks must also be done when building the library. + */ + +#include + +/* ================================================================= */ +/* No system header file shall be included in this file before this */ +/* point. The only allowed ones are those included from ares_build.h */ +/* ================================================================= */ + +/* + * Include header files for windows builds before redefining anything. + * Use this preproessor block only to include or exclude windows.h, + * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs + * to any other further and independent block. Under Cygwin things work + * just as under linux (e.g. ) and the winsock headers should + * never be included when __CYGWIN__ is defined. configure script takes + * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H, + * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined. + */ + +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# ifdef HAVE_WS2TCPIP_H +# include +# endif +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif + +/* + * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else + * define USE_WINSOCK to 1 if we have and use WINSOCK API, else + * undefine USE_WINSOCK. + */ + +#undef USE_WINSOCK + +#ifdef HAVE_WINSOCK2_H +# define USE_WINSOCK 2 +#else +# ifdef HAVE_WINSOCK_H +# define USE_WINSOCK 1 +# endif +#endif + +/* + * Work-arounds for systems without configure support + */ + +#ifndef HAVE_CONFIG_H + +#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__) +#define HAVE_SYS_TIME_H +#endif + +#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER) +#define HAVE_UNISTD_H 1 +#endif + +#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) && !defined(MSDOS) +#define HAVE_SYS_UIO_H +#endif + +#endif /* HAVE_CONFIG_H */ + +#ifdef __POCC__ +# include +# include +# define ESRCH 3 +#endif + +/* + * Recent autoconf versions define these symbols in ares_config.h. We don't + * want them (since they collide with the libcurl ones when we build + * --enable-debug) so we undef them again here. + */ + +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef VERSION +#undef PACKAGE + +/* IPv6 compatibility */ +#if !defined(HAVE_AF_INET6) +#if defined(HAVE_PF_INET6) +#define AF_INET6 PF_INET6 +#else +#define AF_INET6 AF_MAX+1 +#endif +#endif + +/* + * Include macros and defines that should only be processed once. + */ + +#ifndef __SETUP_ONCE_H +#include "setup_once.h" +#endif + +#endif /* HEADER_CARES_SETUP_H */ diff --git a/ares/ares_strcasecmp.c b/ares/ares_strcasecmp.c index c3d1df9fc..30d64b911 100644 --- a/ares/ares_strcasecmp.c +++ b/ares/ares_strcasecmp.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include "ares_strcasecmp.h" #ifndef HAVE_STRCASECMP diff --git a/ares/ares_strcasecmp.h b/ares/ares_strcasecmp.h index 85b053a9b..28164d74b 100644 --- a/ares/ares_strcasecmp.h +++ b/ares/ares_strcasecmp.h @@ -18,7 +18,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifndef HAVE_STRCASECMP extern int ares_strcasecmp(const char *a, const char *b); diff --git a/ares/ares_strdup.c b/ares/ares_strdup.c index 31137a343..6742c6f6b 100644 --- a/ares/ares_strdup.c +++ b/ares/ares_strdup.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include "ares_strdup.h" #ifndef HAVE_STRDUP diff --git a/ares/ares_strdup.h b/ares/ares_strdup.h index 33df619bc..980da5263 100644 --- a/ares/ares_strdup.h +++ b/ares/ares_strdup.h @@ -18,7 +18,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifndef HAVE_STRDUP extern char *ares_strdup(const char *s1); diff --git a/ares/ares_strerror.c b/ares/ares_strerror.c index 1265cee09..70af5b68d 100644 --- a/ares/ares_strerror.c +++ b/ares/ares_strerror.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include #include "ares.h" diff --git a/ares/ares_timeout.c b/ares/ares_timeout.c index 18ef6e8ca..72ea0dc3f 100644 --- a/ares/ares_timeout.c +++ b/ares/ares_timeout.c @@ -15,7 +15,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_TIME_H #include diff --git a/ares/ares_version.c b/ares/ares_version.c index 25f8e77cb..0f7d03710 100644 --- a/ares/ares_version.c +++ b/ares/ares_version.c @@ -1,6 +1,6 @@ /* $Id$ */ -#include "setup.h" +#include "ares_setup.h" #include "ares.h" const char *ares_version(int *version) diff --git a/ares/ares_writev.c b/ares/ares_writev.c index 96cf543dc..4c12942d7 100644 --- a/ares/ares_writev.c +++ b/ares/ares_writev.c @@ -16,7 +16,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_LIMITS_H # include diff --git a/ares/ares_writev.h b/ares/ares_writev.h index f5850ef5a..860b2943f 100644 --- a/ares/ares_writev.h +++ b/ares/ares_writev.h @@ -18,7 +18,7 @@ * without express or implied warranty. */ -#include "setup.h" +#include "ares_setup.h" #include "ares.h" #ifndef HAVE_WRITEV diff --git a/ares/bitncmp.c b/ares/bitncmp.c index 30891861f..2ec8dc58b 100644 --- a/ares/bitncmp.c +++ b/ares/bitncmp.c @@ -19,7 +19,7 @@ #ifndef HAVE_BITNCMP -#include "setup.h" +#include "ares_setup.h" #include "bitncmp.h" /* diff --git a/ares/inet_net_pton.c b/ares/inet_net_pton.c index 84a1dc58f..1e278a793 100644 --- a/ares/inet_net_pton.c +++ b/ares/inet_net_pton.c @@ -17,7 +17,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/inet_ntop.c b/ares/inet_ntop.c index 7f43b5c03..b3061774e 100644 --- a/ares/inet_ntop.c +++ b/ares/inet_ntop.c @@ -16,7 +16,7 @@ * SOFTWARE. */ -#include "setup.h" +#include "ares_setup.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/ares/setup.h b/ares/setup.h deleted file mode 100644 index 6959fe7df..000000000 --- a/ares/setup.h +++ /dev/null @@ -1,187 +0,0 @@ -#ifndef __ARES_SETUP_H -#define __ARES_SETUP_H - -/* $Id$ */ - -/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* - * Define WIN32 when build target is Win32 API - */ - -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) -#define WIN32 -#endif - -/* - * Include configuration script results or hand-crafted - * configuration file for platforms which lack config tool. - */ - -#ifdef HAVE_CONFIG_H -#include "ares_config.h" -#else - -#ifdef WIN32 -#include "config-win32.h" -#endif - -#endif /* HAVE_CONFIG_H */ - -/* ================================================================ */ -/* Definition of preprocessor macros/symbols which modify compiler */ -/* behaviour or generated code characteristics must be done here, */ -/* as appropriate, before any system header file is included. It is */ -/* also possible to have them defined in the config file included */ -/* before this point. As a result of all this we frown inclusion of */ -/* system header files in our config files, avoid this at any cost. */ -/* ================================================================ */ - -/* - * Tru64 needs _REENTRANT set for a few function prototypes and - * things to appear in the system header files. Unixware needs it - * to build proper reentrant code. Others may also need it. - */ - -#ifdef NEED_REENTRANT -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -/* ================================================================ */ -/* If you need to include a system header file for your platform, */ -/* please, do it beyond the point further indicated in this file. */ -/* ================================================================ */ - -/* - * c-ares external interface definitions are also used internally, - * and might also include required system header files to define them. - */ - -#include - -/* - * Compile time sanity checks must also be done when building the library. - */ - -#include - -/* ================================================================= */ -/* No system header file shall be included in this file before this */ -/* point. The only allowed ones are those included from ares_build.h */ -/* ================================================================= */ - -/* - * Include header files for windows builds before redefining anything. - * Use this preproessor block only to include or exclude windows.h, - * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs - * to any other further and independent block. Under Cygwin things work - * just as under linux (e.g. ) and the winsock headers should - * never be included when __CYGWIN__ is defined. configure script takes - * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H, - * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined. - */ - -#ifdef HAVE_WINDOWS_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# ifdef HAVE_WINSOCK2_H -# include -# ifdef HAVE_WS2TCPIP_H -# include -# endif -# else -# ifdef HAVE_WINSOCK_H -# include -# endif -# endif -#endif - -/* - * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else - * define USE_WINSOCK to 1 if we have and use WINSOCK API, else - * undefine USE_WINSOCK. - */ - -#undef USE_WINSOCK - -#ifdef HAVE_WINSOCK2_H -# define USE_WINSOCK 2 -#else -# ifdef HAVE_WINSOCK_H -# define USE_WINSOCK 1 -# endif -#endif - -/* - * Work-arounds for systems without configure support - */ - -#ifndef HAVE_CONFIG_H - -#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__) -#define HAVE_SYS_TIME_H -#endif - -#if !defined(HAVE_UNISTD_H) && !defined(_MSC_VER) -#define HAVE_UNISTD_H 1 -#endif - -#if !defined(HAVE_SYS_UIO_H) && !defined(WIN32) && !defined(MSDOS) -#define HAVE_SYS_UIO_H -#endif - -#endif /* HAVE_CONFIG_H */ - -#ifdef __POCC__ -# include -# include -# define ESRCH 3 -#endif - -/* - * Recent autoconf versions define these symbols in ares_config.h. We don't - * want them (since they collide with the libcurl ones when we build - * --enable-debug) so we undef them again here. - */ - -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef VERSION -#undef PACKAGE - -/* IPv6 compatibility */ -#if !defined(HAVE_AF_INET6) -#if defined(HAVE_PF_INET6) -#define AF_INET6 PF_INET6 -#else -#define AF_INET6 AF_MAX+1 -#endif -#endif - -/* - * Include macros and defines that should only be processed once. - */ - -#ifndef __SETUP_ONCE_H -#include "setup_once.h" -#endif - -#endif /* __ARES_SETUP_H */ diff --git a/ares/windows_port.c b/ares/windows_port.c index fd13b1485..64096a5be 100644 --- a/ares/windows_port.c +++ b/ares/windows_port.c @@ -1,4 +1,4 @@ -#include "setup.h" +#include "ares_setup.h" /* $Id$ */ -- cgit v1.2.3