aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-15 13:43:15 +0000
committerYang Tse <yangsita@gmail.com>2009-11-15 13:43:15 +0000
commit5b3be2ee354ff497f4c41bafae485ddd754ff3aa (patch)
treecf06341bac9aa8c6dfccf38b25af81e1929de547
parent3b8d7fddf7c3ada9d63acde216731c695f726c27 (diff)
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.
-rw-r--r--ares/m4/cares-functions.m420
-rw-r--r--m4/curl-functions.m420
2 files changed, 26 insertions, 14 deletions
diff --git a/ares/m4/cares-functions.m4 b/ares/m4/cares-functions.m4
index 8d174d8aa..72d878449 100644
--- a/ares/m4/cares-functions.m4
+++ b/ares/m4/cares-functions.m4
@@ -1055,14 +1055,20 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
dnl All other bsd's
tst_tsafe_getaddrinfo="no"
;;
+ solaris2*)
+ dnl solaris which have it
+ tst_tsafe_getaddrinfo="yes"
+ ;;
esac
- CURL_CHECK_DEF_CC([h_errno], [
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
- ], [silent])
- if test "$curl_cv_have_def_h_errno" = "no"; then
- tst_tsafe_getaddrinfo="no"
+ if test "$tst_tsafe_getaddrinfo" = "unknown"; then
+ CURL_CHECK_DEF_CC([h_errno], [
+ $curl_includes_ws2tcpip
+ $curl_includes_sys_socket
+ $curl_includes_netdb
+ ], [silent])
+ if test "$curl_cv_have_def_h_errno" = "no"; then
+ tst_tsafe_getaddrinfo="no"
+ fi
fi
if test "$tst_tsafe_getaddrinfo" = "unknown"; then
tst_tsafe_getaddrinfo="yes"
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index df3a5850c..48d32b10a 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -1679,14 +1679,20 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
dnl All other bsd's
tst_tsafe_getaddrinfo="no"
;;
+ solaris2*)
+ dnl solaris which have it
+ tst_tsafe_getaddrinfo="yes"
+ ;;
esac
- CURL_CHECK_DEF_CC([h_errno], [
- $curl_includes_ws2tcpip
- $curl_includes_sys_socket
- $curl_includes_netdb
- ], [silent])
- if test "$curl_cv_have_def_h_errno" = "no"; then
- tst_tsafe_getaddrinfo="no"
+ if test "$tst_tsafe_getaddrinfo" = "unknown"; then
+ CURL_CHECK_DEF_CC([h_errno], [
+ $curl_includes_ws2tcpip
+ $curl_includes_sys_socket
+ $curl_includes_netdb
+ ], [silent])
+ if test "$curl_cv_have_def_h_errno" = "no"; then
+ tst_tsafe_getaddrinfo="no"
+ fi
fi
if test "$tst_tsafe_getaddrinfo" = "unknown"; then
tst_tsafe_getaddrinfo="yes"