From e536fd63bfd3c4a57013fae84ad871179f8d8bc3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 13:17:39 +0100 Subject: [PATCH 01/10] always allow for UCRT --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7962d710a..dca9f62aae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -352,7 +352,7 @@ endif() if(WIN32) option(CURL_STATIC_CRT "Build libcurl with static CRT with MSVC (/MT)" OFF) if(CURL_STATIC_CRT AND MSVC) - if(BUILD_STATIC_CURL OR NOT BUILD_CURL_EXE) + if(MSVC_VERSION GREATER_EQUAL 1900 OR BUILD_STATIC_CURL OR NOT BUILD_CURL_EXE) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") string(APPEND CMAKE_C_FLAGS_RELEASE " -MT") string(APPEND CMAKE_C_FLAGS_DEBUG " -MTd") From 8ffa3089736466b65139da6c6fc5d65c031ea6d7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 13:24:37 +0100 Subject: [PATCH 02/10] try crash patch --- src/tool_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tool_main.c b/src/tool_main.c index 5910adeb3b..ba410acff0 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -242,6 +242,8 @@ int main(int argc, char *argv[]) struct GlobalConfig global; memset(&global, 0, sizeof(global)); +printf("trc-0\n"); + tool_init_stderr(); #if defined(_WIN32) && !defined(UNDER_CE) From e1cd6713b02b7039e1066c8f3ec507e1d8b2ec7e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 13:40:17 +0100 Subject: [PATCH 03/10] add VS2017 ENABLE_DEBUG=OFF job --- appveyor.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index ab8e993e1f..6719b2514c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -109,6 +109,15 @@ environment: OPENSSL: 'ON' SHARED: 'ON' TFLAGS: 'skipall' + - job_name: 'CMake, VS2017, Debug, ENABLE_DEBUG=OFF, x64, OpenSSL 1.1.1, Shared, Build-only' + APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + PRJ_GEN: 'Visual Studio 15 2017' + TARGET: '-A x64' + PRJ_CFG: Debug + OPENSSL: 'ON' + SHARED: 'ON' + TFLAGS: 'skipall' + DEBUG: 'OFF' - job_name: 'CMake, VS2019, Debug, x64, OpenSSL 1.1.0 + Schannel, Shared, Build-tests' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' PRJ_GEN: 'Visual Studio 16 2019' From d774b871e0e0ef0738ebcb099a06d15387c7bc02 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 13:49:59 +0100 Subject: [PATCH 04/10] add more test jobs --- appveyor.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 6719b2514c..46c8e023df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -109,6 +109,14 @@ environment: OPENSSL: 'ON' SHARED: 'ON' TFLAGS: 'skipall' + - job_name: 'CMake, VS2017, Release, x64, OpenSSL 1.1.1, Shared, Build-only' + APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + PRJ_GEN: 'Visual Studio 15 2017' + TARGET: '-A x64' + PRJ_CFG: Release + OPENSSL: 'ON' + SHARED: 'ON' + TFLAGS: 'skipall' - job_name: 'CMake, VS2017, Debug, ENABLE_DEBUG=OFF, x64, OpenSSL 1.1.1, Shared, Build-only' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' PRJ_GEN: 'Visual Studio 15 2017' @@ -118,6 +126,23 @@ environment: SHARED: 'ON' TFLAGS: 'skipall' DEBUG: 'OFF' + - job_name: 'CMake, VS2017, Debug, ENABLE_DEBUG=ON, CURLDEBUG=OFF, x64, OpenSSL 1.1.1, Shared, Build-only' + APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' + PRJ_GEN: 'Visual Studio 15 2017' + TARGET: '-A x64' + PRJ_CFG: Debug + OPENSSL: 'ON' + SHARED: 'ON' + TFLAGS: 'skipall' + CURLDEBUG: 'OFF' + - job_name: 'CMake, VS2022, Debug, x64, OpenSSL, Shared, Build-only' + APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' + PRJ_GEN: 'Visual Studio 17 2022' + TARGET: '-A x64' + PRJ_CFG: Debug + OPENSSL: 'ON' + SHARED: 'ON' + TFLAGS: 'skipall' - job_name: 'CMake, VS2019, Debug, x64, OpenSSL 1.1.0 + Schannel, Shared, Build-tests' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' PRJ_GEN: 'Visual Studio 16 2019' From a778861100d18217c8cc24be30cd318710024b37 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 14:15:27 +0100 Subject: [PATCH 05/10] add another 2019 job --- appveyor.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 46c8e023df..f68a7cb65a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -135,6 +135,14 @@ environment: SHARED: 'ON' TFLAGS: 'skipall' CURLDEBUG: 'OFF' + - job_name: 'CMake, VS2019, Debug, x64, OpenSSL, Shared, Build-only' + APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' + PRJ_GEN: 'Visual Studio 16 2019' + TARGET: '-A x64' + PRJ_CFG: Debug + OPENSSL: 'ON' + SHARED: 'ON' + TFLAGS: 'skipall' - job_name: 'CMake, VS2022, Debug, x64, OpenSSL, Shared, Build-only' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' PRJ_GEN: 'Visual Studio 17 2022' From d1d7a0a1e7bd609fced9b9652eabe1b4631b3851 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 14:30:04 +0100 Subject: [PATCH 06/10] try CRT printf() --- src/tool_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tool_main.c b/src/tool_main.c index ba410acff0..d9b5787c56 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -242,6 +242,7 @@ int main(int argc, char *argv[]) struct GlobalConfig global; memset(&global, 0, sizeof(global)); +#undef printf printf("trc-0\n"); tool_init_stderr(); From a5c7ce81b5e48c59c23cb5cef76f6a6fadd84115 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 14:45:47 +0100 Subject: [PATCH 07/10] update option docs --- CMakeLists.txt | 2 +- docs/INSTALL-CMAKE.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dca9f62aae..3bfea86fe5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -357,7 +357,7 @@ if(WIN32) string(APPEND CMAKE_C_FLAGS_RELEASE " -MT") string(APPEND CMAKE_C_FLAGS_DEBUG " -MTd") else() - message(WARNING "Static CRT requires static or no curl executable.") + message(WARNING "Static CRT requires UCRT, static libcurl or no curl executable.") endif() endif() endif() diff --git a/docs/INSTALL-CMAKE.md b/docs/INSTALL-CMAKE.md index d3439662e4..629118fdf6 100644 --- a/docs/INSTALL-CMAKE.md +++ b/docs/INSTALL-CMAKE.md @@ -238,7 +238,7 @@ target_link_libraries(my_target PRIVATE CURL::libcurl) - `CURL_LIBCURL_VERSIONED_SYMBOLS`: Enable libcurl versioned symbols. Default: `OFF` - `CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX`: Override default versioned symbol prefix. Default: `_` or `MULTISSL_` - `CURL_LTO`: Enable compiler Link Time Optimizations. Default: `OFF` -- `CURL_STATIC_CRT`: Build libcurl with static CRT with MSVC (`/MT`) (requires static or no curl executable). Default: `OFF` +- `CURL_STATIC_CRT`: Build libcurl with static CRT with MSVC (`/MT`) (requires UCRT, static libcurl or no curl executable). Default: `OFF` - `CURL_TARGET_WINDOWS_VERSION`: Minimum target Windows version as hex string. - `CURL_TEST_BUNDLES`: Bundle `libtest` and `unittest` tests into single binaries. Default: `OFF` - `CURL_WERROR`: Turn compiler warnings into errors. Default: `OFF` From abe7625a334df0cf5b4345a983c7de9db1fe822b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 15:29:54 +0100 Subject: [PATCH 08/10] drop main() trigger --- src/tool_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tool_main.c b/src/tool_main.c index d9b5787c56..5910adeb3b 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -242,9 +242,6 @@ int main(int argc, char *argv[]) struct GlobalConfig global; memset(&global, 0, sizeof(global)); -#undef printf -printf("trc-0\n"); - tool_init_stderr(); #if defined(_WIN32) && !defined(UNDER_CE) From b1629848be3bfceb2cd9134ae3fe6d60ba06b7a2 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 15:30:34 +0100 Subject: [PATCH 09/10] drop extra jobs --- appveyor.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f68a7cb65a..ab8e993e1f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -109,48 +109,6 @@ environment: OPENSSL: 'ON' SHARED: 'ON' TFLAGS: 'skipall' - - job_name: 'CMake, VS2017, Release, x64, OpenSSL 1.1.1, Shared, Build-only' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - PRJ_GEN: 'Visual Studio 15 2017' - TARGET: '-A x64' - PRJ_CFG: Release - OPENSSL: 'ON' - SHARED: 'ON' - TFLAGS: 'skipall' - - job_name: 'CMake, VS2017, Debug, ENABLE_DEBUG=OFF, x64, OpenSSL 1.1.1, Shared, Build-only' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - PRJ_GEN: 'Visual Studio 15 2017' - TARGET: '-A x64' - PRJ_CFG: Debug - OPENSSL: 'ON' - SHARED: 'ON' - TFLAGS: 'skipall' - DEBUG: 'OFF' - - job_name: 'CMake, VS2017, Debug, ENABLE_DEBUG=ON, CURLDEBUG=OFF, x64, OpenSSL 1.1.1, Shared, Build-only' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - PRJ_GEN: 'Visual Studio 15 2017' - TARGET: '-A x64' - PRJ_CFG: Debug - OPENSSL: 'ON' - SHARED: 'ON' - TFLAGS: 'skipall' - CURLDEBUG: 'OFF' - - job_name: 'CMake, VS2019, Debug, x64, OpenSSL, Shared, Build-only' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' - PRJ_GEN: 'Visual Studio 16 2019' - TARGET: '-A x64' - PRJ_CFG: Debug - OPENSSL: 'ON' - SHARED: 'ON' - TFLAGS: 'skipall' - - job_name: 'CMake, VS2022, Debug, x64, OpenSSL, Shared, Build-only' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - PRJ_GEN: 'Visual Studio 17 2022' - TARGET: '-A x64' - PRJ_CFG: Debug - OPENSSL: 'ON' - SHARED: 'ON' - TFLAGS: 'skipall' - job_name: 'CMake, VS2019, Debug, x64, OpenSSL 1.1.0 + Schannel, Shared, Build-tests' APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' PRJ_GEN: 'Visual Studio 16 2019' From 9b6cbe4c064dfd3bcafff42732682e049d16b3e7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 16:10:41 +0100 Subject: [PATCH 10/10] whitelist the word UCRT --- .github/scripts/spellcheck.words | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/spellcheck.words b/.github/scripts/spellcheck.words index 6838545cc7..7d2efbc547 100644 --- a/.github/scripts/spellcheck.words +++ b/.github/scripts/spellcheck.words @@ -868,6 +868,7 @@ typedef typedefed Ubuntu ucLinux +UCRT UDP UI UID