Commit 5e75817d authored by Yang Tse's avatar Yang Tse
Browse files

Assume that getaddrinfo is thread safe, unless hard coded

knowledge says the contrary or h_errno is not defined.
parent a7e4022d
Loading
Loading
Loading
Loading
+10 −12
Original line number Original line Diff line number Diff line
@@ -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 36
# serial 37




dnl CARES_INCLUDES_ARPA_INET
dnl CARES_INCLUDES_ARPA_INET
@@ -1027,10 +1027,6 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
        dnl darwin 6.0 and mac os x 10.2.X and newer
        dnl darwin 6.0 and mac os x 10.2.X and newer
        tst_tsafe_getaddrinfo="yes"
        tst_tsafe_getaddrinfo="yes"
        ;;
        ;;
      dragonfly*)
        dnl dragonfly bsd any version
        tst_tsafe_getaddrinfo="yes"
        ;;
      freebsd[[1234]].* | freebsd5.[[1234]]*)
      freebsd[[1234]].* | freebsd5.[[1234]]*)
        dnl freebsd 5.4 and older
        dnl freebsd 5.4 and older
        tst_tsafe_getaddrinfo="no"
        tst_tsafe_getaddrinfo="no"
@@ -1047,10 +1043,6 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
        dnl hpux 11.11 and newer
        dnl hpux 11.11 and newer
        tst_tsafe_getaddrinfo="yes"
        tst_tsafe_getaddrinfo="yes"
        ;;
        ;;
      linux*)
        dnl linux any version
        tst_tsafe_getaddrinfo="yes"
        ;;
      netbsd[[123]].*)
      netbsd[[123]].*)
        dnl netbsd 3.X and older
        dnl netbsd 3.X and older
        tst_tsafe_getaddrinfo="no"
        tst_tsafe_getaddrinfo="no"
@@ -1059,16 +1051,22 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
        dnl netbsd 4.X and newer
        dnl netbsd 4.X and newer
        tst_tsafe_getaddrinfo="yes"
        tst_tsafe_getaddrinfo="yes"
        ;;
        ;;
      *bsd*)
        dnl All other bsd's
        tst_tsafe_getaddrinfo="no"
        ;;
    esac
    esac
    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
      $curl_includes_netdb
      $curl_includes_netdb
      ], [silent])
      ], [silent])
    if test "$tst_tsafe_getaddrinfo" = "yes" &&
    if test "$curl_cv_have_def_h_errno" = "no"; then
       test "$curl_cv_have_def_h_errno" = "no"; then
      tst_tsafe_getaddrinfo="no"
      tst_tsafe_getaddrinfo="no"
    fi
    fi
    if test "$tst_tsafe_getaddrinfo" = "unknown"; then
      tst_tsafe_getaddrinfo="yes"
    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,
+10 −12
Original line number Original line Diff line number Diff line
@@ -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 58
# serial 59




dnl CURL_INCLUDES_ARPA_INET
dnl CURL_INCLUDES_ARPA_INET
@@ -1651,10 +1651,6 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
        dnl darwin 6.0 and mac os x 10.2.X and newer
        dnl darwin 6.0 and mac os x 10.2.X and newer
        tst_tsafe_getaddrinfo="yes"
        tst_tsafe_getaddrinfo="yes"
        ;;
        ;;
      dragonfly*)
        dnl dragonfly bsd any version
        tst_tsafe_getaddrinfo="yes"
        ;;
      freebsd[[1234]].* | freebsd5.[[1234]]*)
      freebsd[[1234]].* | freebsd5.[[1234]]*)
        dnl freebsd 5.4 and older
        dnl freebsd 5.4 and older
        tst_tsafe_getaddrinfo="no"
        tst_tsafe_getaddrinfo="no"
@@ -1671,10 +1667,6 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
        dnl hpux 11.11 and newer
        dnl hpux 11.11 and newer
        tst_tsafe_getaddrinfo="yes"
        tst_tsafe_getaddrinfo="yes"
        ;;
        ;;
      linux*)
        dnl linux any version
        tst_tsafe_getaddrinfo="yes"
        ;;
      netbsd[[123]].*)
      netbsd[[123]].*)
        dnl netbsd 3.X and older
        dnl netbsd 3.X and older
        tst_tsafe_getaddrinfo="no"
        tst_tsafe_getaddrinfo="no"
@@ -1683,16 +1675,22 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
        dnl netbsd 4.X and newer
        dnl netbsd 4.X and newer
        tst_tsafe_getaddrinfo="yes"
        tst_tsafe_getaddrinfo="yes"
        ;;
        ;;
      *bsd*)
        dnl All other bsd's
        tst_tsafe_getaddrinfo="no"
        ;;
    esac
    esac
    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
      $curl_includes_netdb
      $curl_includes_netdb
      ], [silent])
      ], [silent])
    if test "$tst_tsafe_getaddrinfo" = "yes" &&
    if test "$curl_cv_have_def_h_errno" = "no"; then
       test "$curl_cv_have_def_h_errno" = "no"; then
      tst_tsafe_getaddrinfo="no"
      tst_tsafe_getaddrinfo="no"
    fi
    fi
    if test "$tst_tsafe_getaddrinfo" = "unknown"; then
      tst_tsafe_getaddrinfo="yes"
    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,