From: Yang Tse Date: Tue, 14 Apr 2009 13:50:32 +0000 (+0000) Subject: use HAVE_LIMITS_H symbol to protect limits.h inclusion X-Git-Tag: curl-7_19_5~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cc6ab39220c60ee59eaae8b207216c0a319d384;p=thirdparty%2Fcurl.git use HAVE_LIMITS_H symbol to protect limits.h inclusion --- diff --git a/ares/ares_parse_a_reply.c b/ares/ares_parse_a_reply.c index b8d98d43c0..c2d809f2c6 100644 --- a/ares/ares_parse_a_reply.c +++ b/ares/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/ares_parse_aaaa_reply.c b/ares/ares_parse_aaaa_reply.c index 60f8f851b0..0624161a27 100644 --- a/ares/ares_parse_aaaa_reply.c +++ b/ares/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/ares_writev.c b/ares/ares_writev.c index 045373b638..96cf543dc2 100644 --- a/ares/ares_writev.c +++ b/ares/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/ares/config-win32.h b/ares/config-win32.h index f281255812..e8c5d72a42 100644 --- a/ares/config-win32.h +++ b/ares/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/ares/configure.ac b/ares/configure.ac index ce66b85301..67dc007717 100644 --- a/ares/configure.ac +++ b/ares/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, diff --git a/lib/config-win32.h b/lib/config-win32.h index 6e37a3c759..1318d29787 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -30,6 +30,9 @@ /* Define if you have the header file. */ #define HAVE_IO_H 1 +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + /* Define if you need the malloc.h header file even with stdlib.h */ #ifndef __SALFORDC__ #define NEED_MALLOC_H 1 diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h index 69caa46669..57571b51ff 100644 --- a/lib/config-win32ce.h +++ b/lib/config-win32ce.h @@ -30,6 +30,9 @@ /* Define if you have the header file. */ #define HAVE_IO_H 1 +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + /* Define if you need the malloc.h header header file even with stdlib.h */ #define NEED_MALLOC_H 1 diff --git a/lib/hostares.c b/lib/hostares.c index b6af96f83f..1198ac7d9c 100644 --- a/lib/hostares.c +++ b/lib/hostares.c @@ -24,8 +24,10 @@ #include "setup.h" #include -#include +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef NEED_MALLOC_H #include #endif diff --git a/lib/qssl.c b/lib/qssl.c index f2de800c54..a855f4a0cc 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -27,7 +27,9 @@ #include #include #include -#include +#ifdef HAVE_LIMITS_H +# include +#endif #include #include "urldata.h" diff --git a/lib/ssh.c b/lib/ssh.c index 6980c81b56..142da39bd2 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -31,7 +31,9 @@ #include #include #include -#include +#ifdef HAVE_LIMITS_H +# include +#endif #include #include diff --git a/lib/ssluse.c b/lib/ssluse.c index 3887f95028..821ec420ce 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -36,7 +36,9 @@ #include #include #include +#ifdef HAVE_LIMITS_H #include +#endif #ifdef HAVE_SYS_SOCKET_H #include #endif