Commit 1e5ed4fa authored by Yang Tse's avatar Yang Tse
Browse files

Rearrange curl_socklen_t tests to improve speed of usual results

parent 0daeab3b
Loading
Loading
Loading
Loading
+38 −33
Original line number Diff line number Diff line
@@ -3101,12 +3101,17 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
  AC_MSG_CHECKING([size of curl_socklen_t])
  curl_sizeof_curl_socklen_t="unknown"
  curl_pull_headers_socklen_t="unknown"
  for tst_pull_headers in 'none' 'ws2tcpip' 'systypes' 'syssocket'; do
  if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
    tst_pull_header_checks='none ws2tcpip'
    tst_size_checks='4'
  else
    tst_pull_header_checks='none systypes syssocket'
    tst_size_checks='4 8 2'
  fi
  for tst_size in $tst_size_checks; do
    for tst_pull_headers in $tst_pull_header_checks; do
      if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
        case $tst_pull_headers in
        none)
          tmp_includes=""
          ;;
          ws2tcpip)
            tmp_includes="$curl_includes_ws2tcpip"
            ;;
@@ -3116,9 +3121,10 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
          syssocket)
            tmp_includes="$curl_includes_sys_socket"
            ;;
          *)
            tmp_includes=""
            ;;
        esac
      for tst_size in 8 4 2; do
        if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
        AC_COMPILE_IFELSE([
          AC_LANG_PROGRAM([[
            $tmp_includes
@@ -3133,7 +3139,6 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
        ])
      fi
    done
    fi
  done
  AC_MSG_RESULT([$curl_sizeof_curl_socklen_t])
  if test "$curl_sizeof_curl_socklen_t" = "unknown"; then