From 0abaf2246777df3b06abc3430315d704c808ef4e Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 23 Oct 2008 00:38:23 +0000 Subject: #include for exit() prototype --- ares/acinclude.m4 | 6 ++++++ ares/m4/cares-functions.m4 | 27 ++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'ares') diff --git a/ares/acinclude.m4 b/ares/acinclude.m4 index 0225f9ba7..abe10d78f 100644 --- a/ares/acinclude.m4 +++ b/ares/acinclude.m4 @@ -702,6 +702,9 @@ AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID], [ [ac_cv_working_ni_withscopeid], [ AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ +#ifdef HAVE_STDLIB_H +#include +#endif #ifdef HAVE_STDIO_H #include #endif @@ -1785,6 +1788,9 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ AC_MSG_CHECKING([if monotonic clock_gettime works]) AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ +#ifdef HAVE_STDLIB_H +#include +#endif #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/ares/m4/cares-functions.m4 b/ares/m4/cares-functions.m4 index 520e99a29..0aa51f60f 100644 --- a/ares/m4/cares-functions.m4 +++ b/ares/m4/cares-functions.m4 @@ -16,7 +16,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 8 +# serial 10 dnl CARES_INCLUDES_ARPA_INET @@ -67,6 +67,27 @@ cares_includes_netdb="\ ]) +dnl CARES_INCLUDES_STDLIB +dnl ------------------------------------------------- +dnl Set up variable with list of headers that must be +dnl included when stdlib.h is to be included. + +AC_DEFUN([CARES_INCLUDES_STDLIB], [ +cares_includes_stdlib="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +/* includes end */" + AC_CHECK_HEADERS( + sys/types.h stdlib.h, + [], [], [$cares_includes_stdlib]) +]) + + dnl CARES_INCLUDES_STRING dnl ------------------------------------------------- dnl Set up variable with list of headers that must be @@ -404,6 +425,7 @@ dnl with shell variable cares_disallow_inet_ntop, then dnl HAVE_INET_NTOP will be defined. AC_DEFUN([CARES_CHECK_FUNC_INET_NTOP], [ + AC_REQUIRE([CARES_INCLUDES_STDLIB])dnl AC_REQUIRE([CARES_INCLUDES_ARPA_INET])dnl AC_REQUIRE([CARES_INCLUDES_STRING])dnl # @@ -461,6 +483,7 @@ AC_DEFUN([CARES_CHECK_FUNC_INET_NTOP], [ AC_MSG_CHECKING([if inet_ntop seems to work]) AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ + $cares_includes_stdlib $cares_includes_arpa_inet $cares_includes_string ]],[[ @@ -561,6 +584,7 @@ dnl with shell variable cares_disallow_inet_pton, then dnl HAVE_INET_PTON will be defined. AC_DEFUN([CARES_CHECK_FUNC_INET_PTON], [ + AC_REQUIRE([CARES_INCLUDES_STDLIB])dnl AC_REQUIRE([CARES_INCLUDES_ARPA_INET])dnl AC_REQUIRE([CARES_INCLUDES_STRING])dnl # @@ -618,6 +642,7 @@ AC_DEFUN([CARES_CHECK_FUNC_INET_PTON], [ AC_MSG_CHECKING([if inet_pton seems to work]) AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ + $cares_includes_stdlib $cares_includes_arpa_inet $cares_includes_string ]],[[ -- cgit v1.2.3