diff options
author | Yang Tse <yangsita@gmail.com> | 2008-09-17 01:02:57 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-09-17 01:02:57 +0000 |
commit | 39de6c784cf6282b675250d521b79da5e010a412 (patch) | |
tree | 3c768e8568c696640a2019e32d2767c4db056d88 /ares | |
parent | e5c4482088f327043e59a516490fbb36c5df926a (diff) | |
download | curl-39de6c784cf6282b675250d521b79da5e010a412.tar.gz |
adjust inclusion of "nameser.h"
Diffstat (limited to 'ares')
-rw-r--r-- | ares/adig.c | 35 | ||||
-rw-r--r-- | ares/ares_expand_name.c | 12 | ||||
-rw-r--r-- | ares/ares_expand_string.c | 10 | ||||
-rw-r--r-- | ares/ares_gethostbyaddr.c | 18 | ||||
-rw-r--r-- | ares/ares_gethostbyname.c | 21 | ||||
-rw-r--r-- | ares/ares_getnameinfo.c | 18 | ||||
-rw-r--r-- | ares/ares_init.c | 12 | ||||
-rw-r--r-- | ares/ares_mkquery.c | 12 | ||||
-rw-r--r-- | ares/ares_parse_a_reply.c | 21 | ||||
-rw-r--r-- | ares/ares_parse_aaaa_reply.c | 21 | ||||
-rw-r--r-- | ares/ares_parse_ns_reply.c | 18 | ||||
-rw-r--r-- | ares/ares_parse_ptr_reply.c | 19 | ||||
-rw-r--r-- | ares/ares_process.c | 32 | ||||
-rw-r--r-- | ares/ares_query.c | 12 | ||||
-rw-r--r-- | ares/ares_search.c | 5 | ||||
-rw-r--r-- | ares/ares_send.c | 12 | ||||
-rw-r--r-- | ares/inet_net_pton.c | 21 | ||||
-rw-r--r-- | ares/inet_ntop.c | 19 | ||||
-rw-r--r-- | ares/nameser.h | 8 | ||||
-rw-r--r-- | ares/windows_port.c | 15 |
20 files changed, 153 insertions, 188 deletions
diff --git a/ares/adig.c b/ares/adig.c index 031ce8153..66b64a4ab 100644 --- a/ares/adig.c +++ b/ares/adig.c @@ -17,26 +17,35 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif +#ifdef HAVE_ARPA_INET_H +# include <arpa/inet.h> +#endif +#ifdef HAVE_NETDB_H +# include <netdb.h> +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> #else -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> +# include "nameser.h" #endif -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <arpa/nameser.h> #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> +# include <arpa/nameser_compat.h> #endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> + +#ifdef HAVE_SYS_TIME_H +# include <sys/time.h> #endif -#include <netdb.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> #endif #ifdef HAVE_STRINGS_H -#include <strings.h> +# include <strings.h> #endif #include <stdio.h> diff --git a/ares/ares_expand_name.c b/ares/ares_expand_name.c index 9c05546db..dc5b10753 100644 --- a/ares/ares_expand_name.c +++ b/ares/ares_expand_name.c @@ -17,18 +17,16 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdlib.h> diff --git a/ares/ares_expand_string.c b/ares/ares_expand_string.c index 5a3ae182c..ead60a407 100644 --- a/ares/ares_expand_string.c +++ b/ares/ares_expand_string.c @@ -17,15 +17,13 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> -#endif +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #include <string.h> diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c index 1274d5acc..85e2e39f4 100644 --- a/ares/ares_gethostbyaddr.c +++ b/ares/ares_gethostbyaddr.c @@ -16,27 +16,25 @@ */ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdio.h> diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c index 3048bb258..a32da8f60 100644 --- a/ares/ares_gethostbyname.c +++ b/ares/ares_gethostbyname.c @@ -17,30 +17,25 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/inet.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdio.h> diff --git a/ares/ares_getnameinfo.c b/ares/ares_getnameinfo.c index 8a6d4811e..99d3b87d9 100644 --- a/ares/ares_getnameinfo.c +++ b/ares/ares_getnameinfo.c @@ -16,27 +16,25 @@ */ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #ifdef HAVE_NET_IF_H diff --git a/ares/ares_init.c b/ares/ares_init.c index d4e15052b..4d4ba1ea5 100644 --- a/ares/ares_init.c +++ b/ares/ares_init.c @@ -19,11 +19,10 @@ #include "setup.h" #if defined(WIN32) && !defined(WATT32) -#include "nameser.h" #include <iphlpapi.h> #include <malloc.h> +#endif -#else #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif @@ -49,16 +48,17 @@ #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif - #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> +# include <arpa/nameser_compat.h> #endif + #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#endif #include <stdio.h> #include <stdlib.h> diff --git a/ares/ares_mkquery.c b/ares/ares_mkquery.c index 739e235b7..a9c9187f7 100644 --- a/ares/ares_mkquery.c +++ b/ares/ares_mkquery.c @@ -17,18 +17,16 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdlib.h> diff --git a/ares/ares_parse_a_reply.c b/ares/ares_parse_a_reply.c index 85af99643..6380f5bac 100644 --- a/ares/ares_parse_a_reply.c +++ b/ares/ares_parse_a_reply.c @@ -17,30 +17,29 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif + #ifdef HAVE_STRINGS_H -#include <strings.h> +# include <strings.h> #endif #include <stdlib.h> diff --git a/ares/ares_parse_aaaa_reply.c b/ares/ares_parse_aaaa_reply.c index 812694eb2..6a43f933c 100644 --- a/ares/ares_parse_aaaa_reply.c +++ b/ares/ares_parse_aaaa_reply.c @@ -17,30 +17,29 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif + #ifdef HAVE_STRINGS_H -#include <strings.h> +# include <strings.h> #endif #include <stdlib.h> diff --git a/ares/ares_parse_ns_reply.c b/ares/ares_parse_ns_reply.c index e3a89abb4..9eed3ebe4 100644 --- a/ares/ares_parse_ns_reply.c +++ b/ares/ares_parse_ns_reply.c @@ -20,27 +20,25 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdlib.h> diff --git a/ares/ares_parse_ptr_reply.c b/ares/ares_parse_ptr_reply.c index 4905e8457..13ff6521e 100644 --- a/ares/ares_parse_ptr_reply.c +++ b/ares/ares_parse_ptr_reply.c @@ -17,27 +17,26 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif + #ifdef HAVE_STRINGS_H -#include <strings.h> +# include <strings.h> #endif #include <stdlib.h> diff --git a/ares/ares_process.c b/ares/ares_process.c index 824640eae..798df7a21 100644 --- a/ares/ares_process.c +++ b/ares/ares_process.c @@ -18,47 +18,45 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" - -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_SYS_UIO_H -#include <sys/uio.h> +# include <sys/uio.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> /* <netinet/tcp.h> may need it */ +# include <netinet/in.h> #endif #ifdef HAVE_NETINET_TCP_H -#include <netinet/tcp.h> /* for TCP_NODELAY */ +# include <netinet/tcp.h> #endif #ifdef HAVE_NETDB_H -#include <netdb.h> +# include <netdb.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> +# include <arpa/nameser_compat.h> #endif + #ifdef HAVE_SYS_TIME_H -#include <sys/time.h> +# include <sys/time.h> #endif -#endif /* WIN32 && !WATT32 */ #ifdef HAVE_STRINGS_H -#include <strings.h> +# include <strings.h> #endif #ifdef HAVE_UNISTD_H -#include <unistd.h> +# include <unistd.h> #endif #ifdef HAVE_SYS_IOCTL_H -#include <sys/ioctl.h> +# include <sys/ioctl.h> #endif #ifdef NETWARE -#include <sys/filio.h> +# include <sys/filio.h> #endif #include <assert.h> diff --git a/ares/ares_query.c b/ares/ares_query.c index cc3b63af8..25824593c 100644 --- a/ares/ares_query.c +++ b/ares/ares_query.c @@ -17,18 +17,16 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdlib.h> diff --git a/ares/ares_search.c b/ares/ares_search.c index c65f70f0a..3ba26fe11 100644 --- a/ares/ares_search.c +++ b/ares/ares_search.c @@ -16,16 +16,13 @@ */ #include "setup.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <errno.h> -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#endif - #include "ares.h" #include "ares_private.h" diff --git a/ares/ares_send.c b/ares/ares_send.c index 6dc7b762b..a5811d36d 100644 --- a/ares/ares_send.c +++ b/ares/ares_send.c @@ -17,18 +17,16 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif #ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include <arpa/nameser_compat.h> -#endif +# include <arpa/nameser_compat.h> #endif #include <stdlib.h> diff --git a/ares/inet_net_pton.c b/ares/inet_net_pton.c index 487cd825d..0936aa143 100644 --- a/ares/inet_net_pton.c +++ b/ares/inet_net_pton.c @@ -19,23 +19,22 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else - #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> #endif - +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> +#else +# include "nameser.h" +#endif +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +# include <arpa/nameser_compat.h> #endif #include <ctype.h> diff --git a/ares/inet_ntop.c b/ares/inet_ntop.c index d07e19e3e..914576f5d 100644 --- a/ares/inet_ntop.c +++ b/ares/inet_ntop.c @@ -18,21 +18,22 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else #ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> +# include <sys/socket.h> #endif #ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include <arpa/nameser.h> +# include <netinet/in.h> #endif #ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> +# include <arpa/inet.h> +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include <arpa/nameser.h> +#else +# include "nameser.h" #endif +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +# include <arpa/nameser_compat.h> #endif #include <ctype.h> diff --git a/ares/nameser.h b/ares/nameser.h index 52c297232..3d8009647 100644 --- a/ares/nameser.h +++ b/ares/nameser.h @@ -5,7 +5,7 @@ /* header file provided by liren@vivisimo.com */ - +#ifndef HAVE_ARPA_NAMESER_H #define NS_PACKETSZ 512 /* maximum packet size */ #define NS_MAXDNAME 256 /* maximum domain name */ @@ -117,9 +117,9 @@ typedef enum __ns_rcode { ns_r_badtime = 18 } ns_rcode; +#endif /* HAVE_ARPA_NAMESER_H */ - - +#ifndef HAVE_ARPA_NAMESER_COMPAT_H #define PACKETSZ NS_PACKETSZ #define MAXDNAME NS_MAXDNAME @@ -189,6 +189,6 @@ typedef enum __ns_rcode { #define T_MAILA ns_t_maila #define T_ANY ns_t_any - +#endif /* HAVE_ARPA_NAMESER_COMPAT_H */ #endif /* ARES_NAMESER_H */ diff --git a/ares/windows_port.c b/ares/windows_port.c index cc31036a7..fd13b1485 100644 --- a/ares/windows_port.c +++ b/ares/windows_port.c @@ -5,20 +5,6 @@ /* only do the following on windows */ #if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS) -#include <stdio.h> -#include <stdlib.h> -#include <ctype.h> -#include <string.h> -#include <errno.h> -#include <malloc.h> - -#ifdef WATT32 -#include <sys/socket.h> -#else -#include "nameser.h" -#endif -#include "ares.h" -#include "ares_private.h" #ifdef __WATCOMC__ /* @@ -34,5 +20,4 @@ WINAPI DllMain (HINSTANCE hnd, DWORD reason, LPVOID reserved) } #endif - #endif /* WIN32 builds only */ |