diff options
author | Yang Tse <yangsita@gmail.com> | 2008-07-26 01:24:50 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-07-26 01:24:50 +0000 |
commit | 9a806f667b92087662acdb2570e8aebb89009074 (patch) | |
tree | 08db9bc181cace26c454b1332db6a1b2cf0758f6 /m4 | |
parent | 979c9ce8e30a27c04a4ccc3f09cf3c3002e425bb (diff) |
Add a 3 argument check for getprotobyname_r
Diffstat (limited to 'm4')
-rw-r--r-- | m4/reentrant.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/m4/reentrant.m4 b/m4/reentrant.m4 index 8da25bae7..2e2033a2a 100644 --- a/m4/reentrant.m4 +++ b/m4/reentrant.m4 @@ -737,6 +737,28 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [ #include <sys/types.h> #include <netdb.h> ]],[[ + getprotobyname_r(0, 0, 0); + ]]) + ],[ + AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 3 args]) + tmp_getprotobyname_r="done" + ],[ + case $host in + *-*-osf* | *-*-aix*) + AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout fails... 3 args]) + echo "-------------------" >&6 + sed 's/^/| /' conftest.err >&6 + echo "-------------------" >&6 + ;; + esac + ]) + fi + if test "$tmp_getprotobyname_r" = "proto_wout_def"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include <sys/types.h> +#include <netdb.h> + ]],[[ getprotobyname_r(0, 0, 0, 0); ]]) ],[ @@ -783,6 +805,29 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [ #include <sys/types.h> #include <netdb.h> ]],[[ + getprotobyname_r(0, 0, 0); + ]]) + ],[ + AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 3 args]) + tmp_getprotobyname_r="needs_reentrant" + ],[ + case $host in + *-*-osf* | *-*-aix*) + AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with fails... 3 args]) + echo "-------------------" >&6 + sed 's/^/| /' conftest.err >&6 + echo "-------------------" >&6 + ;; + esac + ]) + fi + if test "$tmp_getprotobyname_r" = "proto_with_def"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define _REENTRANT +#include <sys/types.h> +#include <netdb.h> + ]],[[ getprotobyname_r(0, 0, 0, 0); ]]) ],[ |