From 9a806f667b92087662acdb2570e8aebb89009074 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 26 Jul 2008 01:24:50 +0000 Subject: Add a 3 argument check for getprotobyname_r --- ares/m4/reentrant.m4 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'ares/m4') diff --git a/ares/m4/reentrant.m4 b/ares/m4/reentrant.m4 index 01d2136a7..8bffc9b1d 100644 --- a/ares/m4/reentrant.m4 +++ b/ares/m4/reentrant.m4 @@ -83,7 +83,6 @@ dnl makes function strtok_r compiler visible. AC_DEFUN([CHECK_NEED_REENTRANT_STRTOK_R], [ # AC_MSG_NOTICE([DEBUG:]) - AC_MSG_NOTICE([DEBUG:]) AC_LINK_IFELSE([ AC_LANG_FUNC_LINK_TRY([strtok_r]) ],[ @@ -714,6 +713,19 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include +#include + ]],[[ + getprotobyname_r(0, 0, 0); + ]]) + ],[ + AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 3 args]) + tmp_getprotobyname_r="done" + ]) + fi + if test "$tmp_getprotobyname_r" = "proto_wout_def"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include #include ]],[[ getprotobyname_r(0, 0, 0, 0); @@ -742,6 +754,20 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [ AC_LANG_PROGRAM([[ #define _REENTRANT #include +#include + ]],[[ + getprotobyname_r(0, 0, 0); + ]]) + ],[ + AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 3 args]) + tmp_getprotobyname_r="needs_reentrant" + ]) + fi + if test "$tmp_getprotobyname_r" = "proto_with_def"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define _REENTRANT +#include #include ]],[[ getprotobyname_r(0, 0, 0, 0); -- cgit v1.2.3