Related with the threadsafe capability of getaddrinfo:
- Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2 and newer have a threadsafe getaddrinfo. - Fix Dragonfly BSD triplet detection. - In case the hard-coded knowledge says that getaddrinfo is threadsafe, an additional check is done to verify that h_errno is also defined. If h_errno isn't defined, we finally assume that it isn't threadsafe. Jamie Lokier provided the inspiration for this extra check.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 35
|
# serial 36
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_INCLUDES_ARPA_INET
|
dnl CARES_INCLUDES_ARPA_INET
|
||||||
@@ -1019,16 +1019,16 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
|
|||||||
dnl aix 5.2 and newer
|
dnl aix 5.2 and newer
|
||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
darwin[[12354678]].*)
|
darwin[[12345]].*)
|
||||||
dnl darwin 8.X and older
|
dnl darwin 5.0 and mac os x 10.1.X and older
|
||||||
tst_tsafe_getaddrinfo="no"
|
tst_tsafe_getaddrinfo="no"
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
dnl darwin 9.X and newer
|
dnl darwin 6.0 and mac os x 10.2.X and newer
|
||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
dragonflybsd*)
|
dragonfly*)
|
||||||
dnl dragonflybsd any version
|
dnl dragonfly bsd any version
|
||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
freebsd[[1234]].* | freebsd5.[[1234]]*)
|
freebsd[[1234]].* | freebsd5.[[1234]]*)
|
||||||
@@ -1060,6 +1060,15 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
|
|||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
CURL_CHECK_DEF_CC([h_errno], [
|
||||||
|
$curl_includes_ws2tcpip
|
||||||
|
$curl_includes_sys_socket
|
||||||
|
$curl_includes_netdb
|
||||||
|
], [silent])
|
||||||
|
if test "$tst_tsafe_getaddrinfo" = "yes" &&
|
||||||
|
test "$curl_cv_have_def_h_errno" = "no"; then
|
||||||
|
tst_tsafe_getaddrinfo="no"
|
||||||
|
fi
|
||||||
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
|
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
|
||||||
if test "$tst_tsafe_getaddrinfo" = "yes"; then
|
if test "$tst_tsafe_getaddrinfo" = "yes"; then
|
||||||
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
|
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 57
|
# serial 58
|
||||||
|
|
||||||
|
|
||||||
dnl CURL_INCLUDES_ARPA_INET
|
dnl CURL_INCLUDES_ARPA_INET
|
||||||
@@ -1643,16 +1643,16 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
|
|||||||
dnl aix 5.2 and newer
|
dnl aix 5.2 and newer
|
||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
darwin[[12354678]].*)
|
darwin[[12345]].*)
|
||||||
dnl darwin 8.X and older
|
dnl darwin 5.0 and mac os x 10.1.X and older
|
||||||
tst_tsafe_getaddrinfo="no"
|
tst_tsafe_getaddrinfo="no"
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
dnl darwin 9.X and newer
|
dnl darwin 6.0 and mac os x 10.2.X and newer
|
||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
dragonflybsd*)
|
dragonfly*)
|
||||||
dnl dragonflybsd any version
|
dnl dragonfly bsd any version
|
||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
freebsd[[1234]].* | freebsd5.[[1234]]*)
|
freebsd[[1234]].* | freebsd5.[[1234]]*)
|
||||||
@@ -1684,6 +1684,15 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
|
|||||||
tst_tsafe_getaddrinfo="yes"
|
tst_tsafe_getaddrinfo="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
CURL_CHECK_DEF_CC([h_errno], [
|
||||||
|
$curl_includes_ws2tcpip
|
||||||
|
$curl_includes_sys_socket
|
||||||
|
$curl_includes_netdb
|
||||||
|
], [silent])
|
||||||
|
if test "$tst_tsafe_getaddrinfo" = "yes" &&
|
||||||
|
test "$curl_cv_have_def_h_errno" = "no"; then
|
||||||
|
tst_tsafe_getaddrinfo="no"
|
||||||
|
fi
|
||||||
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
|
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
|
||||||
if test "$tst_tsafe_getaddrinfo" = "yes"; then
|
if test "$tst_tsafe_getaddrinfo" = "yes"; then
|
||||||
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
|
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user