Rearrange curl_socklen_t tests to improve speed of usual results
This commit is contained in:
parent
0daeab3b8d
commit
1e5ed4fa33
71
acinclude.m4
71
acinclude.m4
@ -3101,39 +3101,44 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
|
|||||||
AC_MSG_CHECKING([size of curl_socklen_t])
|
AC_MSG_CHECKING([size of curl_socklen_t])
|
||||||
curl_sizeof_curl_socklen_t="unknown"
|
curl_sizeof_curl_socklen_t="unknown"
|
||||||
curl_pull_headers_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
|
||||||
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
tst_pull_header_checks='none ws2tcpip'
|
||||||
case $tst_pull_headers in
|
tst_size_checks='4'
|
||||||
none)
|
else
|
||||||
tmp_includes=""
|
tst_pull_header_checks='none systypes syssocket'
|
||||||
;;
|
tst_size_checks='4 8 2'
|
||||||
ws2tcpip)
|
fi
|
||||||
tmp_includes="$curl_includes_ws2tcpip"
|
for tst_size in $tst_size_checks; do
|
||||||
;;
|
for tst_pull_headers in $tst_pull_header_checks; do
|
||||||
systypes)
|
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
||||||
tmp_includes="$curl_includes_sys_types"
|
case $tst_pull_headers in
|
||||||
;;
|
ws2tcpip)
|
||||||
syssocket)
|
tmp_includes="$curl_includes_ws2tcpip"
|
||||||
tmp_includes="$curl_includes_sys_socket"
|
;;
|
||||||
;;
|
systypes)
|
||||||
esac
|
tmp_includes="$curl_includes_sys_types"
|
||||||
for tst_size in 8 4 2; do
|
;;
|
||||||
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
syssocket)
|
||||||
AC_COMPILE_IFELSE([
|
tmp_includes="$curl_includes_sys_socket"
|
||||||
AC_LANG_PROGRAM([[
|
;;
|
||||||
$tmp_includes
|
*)
|
||||||
typedef $curl_typeof_curl_socklen_t curl_socklen_t;
|
tmp_includes=""
|
||||||
typedef char dummy_arr[sizeof(curl_socklen_t) == $tst_size ? 1 : -1];
|
;;
|
||||||
]],[[
|
esac
|
||||||
curl_socklen_t dummy;
|
AC_COMPILE_IFELSE([
|
||||||
]])
|
AC_LANG_PROGRAM([[
|
||||||
],[
|
$tmp_includes
|
||||||
curl_sizeof_curl_socklen_t="$tst_size"
|
typedef $curl_typeof_curl_socklen_t curl_socklen_t;
|
||||||
curl_pull_headers_socklen_t="$tst_pull_headers"
|
typedef char dummy_arr[sizeof(curl_socklen_t) == $tst_size ? 1 : -1];
|
||||||
])
|
]],[[
|
||||||
fi
|
curl_socklen_t dummy;
|
||||||
done
|
]])
|
||||||
fi
|
],[
|
||||||
|
curl_sizeof_curl_socklen_t="$tst_size"
|
||||||
|
curl_pull_headers_socklen_t="$tst_pull_headers"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
AC_MSG_RESULT([$curl_sizeof_curl_socklen_t])
|
AC_MSG_RESULT([$curl_sizeof_curl_socklen_t])
|
||||||
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user