Make sure to call `curlx_now_init()` before the first call to
`curlx_now()`.
Before this patch the first `curlx_now()` used the non-Vista code path
calling `GetTickCount()` on Vista+. This is harmless, but the upcoming
PR #18009 is going to drop the non-Vista code path, causing a division
by zero at startup in test servers, without this fix.
Bug: https://github.com/curl/curl/pull/18009#issuecomment-
3652154307
Closes #19973
snprintf(loglockfile, sizeof(loglockfile), "%s/%s/dnsd-%s.lock",
logdir, SERVERLOGS_LOCKDIR, ipv_inuse);
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
#ifdef USE_IPV6
if(!use_ipv6)
#endif
return 99;
}
+#ifdef _WIN32
+ if(win32_init())
+ return 2;
+#endif
+
return entry_func(argc - 1, argv + 1);
}
snprintf(loglockfile, sizeof(loglockfile), "%s/%s/mqtt-%s.lock",
logdir, SERVERLOGS_LOCKDIR, ipv_inuse);
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
CURLX_SET_BINMODE(stdin);
CURLX_SET_BINMODE(stdout);
CURLX_SET_BINMODE(stderr);
return 1;
}
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
#ifdef CURLRES_IPV6
if(use_ipv6) {
/* Check that the system has IPv6 enabled before checking the resolver */
snprintf(loglockfile, sizeof(loglockfile), "%s/%s/rtsp-%s.lock",
logdir, SERVERLOGS_LOCKDIR, ipv_inuse);
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
install_signal_handlers(false);
#ifdef USE_IPV6
}
}
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
CURLX_SET_BINMODE(stdin);
CURLX_SET_BINMODE(stdout);
CURLX_SET_BINMODE(stderr);
}
}
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
CURLX_SET_BINMODE(stdin);
CURLX_SET_BINMODE(stdout);
CURLX_SET_BINMODE(stderr);
logdir, SERVERLOGS_LOCKDIR, protocol_type,
is_proxy ? "-proxy" : "", socket_type);
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
install_signal_handlers(false);
req = calloc(1, sizeof(*req));
snprintf(loglockfile, sizeof(loglockfile), "%s/%s/tftp-%s.lock",
logdir, SERVERLOGS_LOCKDIR, ipv_inuse);
-#ifdef _WIN32
- if(win32_init())
- return 2;
-#endif
-
install_signal_handlers(true);
#ifdef USE_IPV6