win: rename minimal_windows10_version1709() for libuv's convention

---------

Signed-off-by: Andy Pan <i@andypan.me>
This commit is contained in:
Andy Pan 2025-09-06 10:15:18 +08:00 committed by Saúl Ibarra Corretgé
parent 01250432eb
commit f6e19be743

View File

@ -52,7 +52,7 @@ static int uv__tcp_nodelay(uv_tcp_t* handle, SOCKET socket, int enable) {
/* /*
* Check if Windows version is 10.0.16299 (Windows 10, version 1709) or later. * Check if Windows version is 10.0.16299 (Windows 10, version 1709) or later.
*/ */
static int minimal_windows10_version1709(void) { static int uv__windows10_version1709(void) {
OSVERSIONINFOW os_info; OSVERSIONINFOW os_info;
if (!pRtlGetVersion) if (!pRtlGetVersion)
return 0; return 0;
@ -89,7 +89,7 @@ static int uv__tcp_keepalive(uv_tcp_t* handle,
/* Windows 10, version 1709 (build 10.0.16299) and later require second units /* Windows 10, version 1709 (build 10.0.16299) and later require second units
* for TCP keepalive options. */ * for TCP keepalive options. */
if (minimal_windows10_version1709()) { if (uv__windows10_version1709()) {
if (setsockopt(socket, if (setsockopt(socket,
IPPROTO_TCP, IPPROTO_TCP,
TCP_KEEPIDLE, TCP_KEEPIDLE,
@ -865,7 +865,7 @@ static int uv__tcp_try_connect(uv_connect_t* req,
* is not reachable, instead of waiting for 2s. We do not care if this fails. * is not reachable, instead of waiting for 2s. We do not care if this fails.
* This only works on Windows version 10.0.16299 and later. * This only works on Windows version 10.0.16299 and later.
*/ */
if (minimal_windows10_version1709() && uv__is_loopback(&converted)) { if (uv__windows10_version1709() && uv__is_loopback(&converted)) {
memset(&retransmit_ioctl, 0, sizeof(retransmit_ioctl)); memset(&retransmit_ioctl, 0, sizeof(retransmit_ioctl));
retransmit_ioctl.Rtt = TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS; retransmit_ioctl.Rtt = TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS;
retransmit_ioctl.MaxSynRetransmissions = TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS; retransmit_ioctl.MaxSynRetransmissions = TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS;