use HAVE_LIMITS_H symbol to protect limits.h inclusion
authorYang Tse <yangsita@gmail.com>
Tue, 14 Apr 2009 13:50:32 +0000 (13:50 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 14 Apr 2009 13:50:32 +0000 (13:50 +0000)
ares_parse_a_reply.c
ares_parse_aaaa_reply.c
ares_writev.c
config-win32.h
configure.ac

index b8d98d4..c2d809f 100644 (file)
 
 #include <stdlib.h>
 #include <string.h>
-#include <limits.h>
+#ifdef HAVE_LIMITS_H
+#  include <limits.h>
+#endif
+
 #include "ares.h"
 #include "ares_dns.h"
 #include "ares_private.h"
index 60f8f85..0624161 100644 (file)
 
 #include <stdlib.h>
 #include <string.h>
-#include <limits.h>
+#ifdef HAVE_LIMITS_H
+#  include <limits.h>
+#endif
+
 #include "ares.h"
 #include "ares_dns.h"
 #include "inet_net_pton.h"
index 045373b..96cf543 100644 (file)
 
 #include "setup.h"
 
-#include <limits.h>
+#ifdef HAVE_LIMITS_H
+#  include <limits.h>
+#endif
+
 #include "ares.h"
 #include "ares_private.h"
 
index f281255..e8c5d72 100644 (file)
@@ -29,6 +29,9 @@
 #define HAVE_GETOPT_H 1
 #endif
 
+/* Define if you have the <limits.h> header file.  */
+#define HAVE_LIMITS_H 1
+
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
index ce66b85..67dc007 100644 (file)
@@ -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,