getaddrinfo is fully thread safe on solaris versions which

implement the function even when h_errno is not a macro.

The h_errno macro test now only done on systems for which there
is no hard coded knowledge about getaddrinfo's thread safeness.
This commit is contained in:
Yang Tse
2009-11-15 13:43:15 +00:00
parent 3b8d7fddf7
commit 5b3be2ee35
2 changed files with 26 additions and 14 deletions

View File

@@ -1055,7 +1055,12 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
dnl All other bsd's dnl All other bsd's
tst_tsafe_getaddrinfo="no" tst_tsafe_getaddrinfo="no"
;; ;;
solaris2*)
dnl solaris which have it
tst_tsafe_getaddrinfo="yes"
;;
esac esac
if test "$tst_tsafe_getaddrinfo" = "unknown"; then
CURL_CHECK_DEF_CC([h_errno], [ CURL_CHECK_DEF_CC([h_errno], [
$curl_includes_ws2tcpip $curl_includes_ws2tcpip
$curl_includes_sys_socket $curl_includes_sys_socket
@@ -1064,6 +1069,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
if test "$curl_cv_have_def_h_errno" = "no"; then if test "$curl_cv_have_def_h_errno" = "no"; then
tst_tsafe_getaddrinfo="no" tst_tsafe_getaddrinfo="no"
fi fi
fi
if test "$tst_tsafe_getaddrinfo" = "unknown"; then if test "$tst_tsafe_getaddrinfo" = "unknown"; then
tst_tsafe_getaddrinfo="yes" tst_tsafe_getaddrinfo="yes"
fi fi

View File

@@ -1679,7 +1679,12 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
dnl All other bsd's dnl All other bsd's
tst_tsafe_getaddrinfo="no" tst_tsafe_getaddrinfo="no"
;; ;;
solaris2*)
dnl solaris which have it
tst_tsafe_getaddrinfo="yes"
;;
esac esac
if test "$tst_tsafe_getaddrinfo" = "unknown"; then
CURL_CHECK_DEF_CC([h_errno], [ CURL_CHECK_DEF_CC([h_errno], [
$curl_includes_ws2tcpip $curl_includes_ws2tcpip
$curl_includes_sys_socket $curl_includes_sys_socket
@@ -1688,6 +1693,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
if test "$curl_cv_have_def_h_errno" = "no"; then if test "$curl_cv_have_def_h_errno" = "no"; then
tst_tsafe_getaddrinfo="no" tst_tsafe_getaddrinfo="no"
fi fi
fi
if test "$tst_tsafe_getaddrinfo" = "unknown"; then if test "$tst_tsafe_getaddrinfo" = "unknown"; then
tst_tsafe_getaddrinfo="yes" tst_tsafe_getaddrinfo="yes"
fi fi