From 262ff45c9d82566ab8f69f8dcaf11584ceab20a0 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 14 Apr 2009 13:50:32 +0000 Subject: [PATCH] use HAVE_LIMITS_H symbol to protect limits.h inclusion --- ares_parse_a_reply.c | 5 ++++- ares_parse_aaaa_reply.c | 5 ++++- ares_writev.c | 5 ++++- config-win32.h | 3 +++ configure.ac | 1 + 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ares_parse_a_reply.c b/ares_parse_a_reply.c index b8d98d4..c2d809f 100644 --- a/ares_parse_a_reply.c +++ b/ares_parse_a_reply.c @@ -44,7 +44,10 @@ #include #include -#include +#ifdef HAVE_LIMITS_H +# include +#endif + #include "ares.h" #include "ares_dns.h" #include "ares_private.h" diff --git a/ares_parse_aaaa_reply.c b/ares_parse_aaaa_reply.c index 60f8f85..0624161 100644 --- a/ares_parse_aaaa_reply.c +++ b/ares_parse_aaaa_reply.c @@ -44,7 +44,10 @@ #include #include -#include +#ifdef HAVE_LIMITS_H +# include +#endif + #include "ares.h" #include "ares_dns.h" #include "inet_net_pton.h" diff --git a/ares_writev.c b/ares_writev.c index 045373b..96cf543 100644 --- a/ares_writev.c +++ b/ares_writev.c @@ -18,7 +18,10 @@ #include "setup.h" -#include +#ifdef HAVE_LIMITS_H +# include +#endif + #include "ares.h" #include "ares_private.h" diff --git a/config-win32.h b/config-win32.h index f281255..e8c5d72 100644 --- a/config-win32.h +++ b/config-win32.h @@ -29,6 +29,9 @@ #define HAVE_GETOPT_H 1 #endif +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + /* Define if you have the header file. */ #define HAVE_SIGNAL_H 1 diff --git a/configure.ac b/configure.ac index ce66b85..67dc007 100644 --- a/configure.ac +++ b/configure.ac @@ -448,6 +448,7 @@ AC_CHECK_HEADERS( strings.h \ stdbool.h \ time.h \ + limits.h \ arpa/nameser.h \ arpa/nameser_compat.h \ arpa/inet.h, -- 2.7.4