By dropping the unused enum wrappers for `AF_*` macros.
Also fix `./configure` to apply `--enable-werror` options to
`tests/servers`, to catch this next time.
Seen with Intel C compiler:
```
socksd.c(184): warning #188: enumerated type mixed with another type
socksd.c(881): warning #188: enumerated type mixed with another type
[...]
sws.c(76): warning #188: enumerated type mixed with another type
sws.c(229): warning #188: enumerated type mixed with another type
[...]
```
Ref: https://github.com/curl/curl/actions/runs/13296520425/job/37129676921#step:40:338
Viktor Szakats [Thu, 13 Feb 2025 01:56:11 +0000 (02:56 +0100)]
cmake: fix `HAVE_ATOMIC`/`HAVE_STDATOMIC` pre-fill for clang-cl
`HAVE_ATOMIC` and `HAVE_STDATOMIC` is available in clang-cl builds.
Adjust the pre-filled values accordingly.
Detected by a temporary job comparing pre-filled and actual values
on AppVeyor CI:
https://ci.appveyor.com/project/curlorg/curl/builds/51506692/job/2v8qrytgdnlah348#L416
Viktor Szakats [Sun, 9 Feb 2025 04:12:24 +0000 (05:12 +0100)]
addrinfo: add curl macro to avoid redefining foreign symbols
Before this patch curl code was redefining `getaddrinfo` and
`freeaddrinfo` system symbols to plug in its debug wrappers. This was
causing pains to avoid applying the redefinitions to system headers
defining these functions, and to the local debug wrappers. Especially
in unity builds. It also required workarounds for systems where these
symbols are already macros.
Introduce curl-namespaced macros for these functions and use them.
This allows to drop all workarounds and makes it work in all envs,
local targets and unity/bundle combinations.
Viktor Szakats [Wed, 12 Feb 2025 09:35:39 +0000 (10:35 +0100)]
GHA/linux: drop Linux arm job for runner image flakiness with stunnel4
Since last week the Ubuntu arm runner became flaky while installing `stunnel`.
```
08:07:26 Setting up stunnel4 (3:5.72-1build2) ...
08:07:26 Failed to check if group stunnel4 already exists: Connection refused
08:07:26 Group stunnel4 not found.
08:07:28 Reload daemon failed: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
08:07:28 Created symlink /etc/systemd/system/multi-user.target.wants/stunnel.target -> /usr/lib/systemd/system/stunnel.target.
08:08:18 Failed to get unit file state for stunnel.target: Connection timed out
08:08:43 Failed to retrieve unit state: Connection timed out
08:08:43 stunnel.target is a disabled or a static unit, not starting it.
08:08:43 /bin/chown: invalid user: ‘stunnel4:stunnel4’
08:08:43 dpkg: error processing package stunnel4 (--configure):
08:08:43 installed stunnel4 package post-installation script subprocess returned error exit status 1
08:08:43 [...]
08:08:47 Errors were encountered while processing:
08:08:47 stunnel4
08:08:54 Error: Timeout was reached
08:08:55 E: Sub-process /usr/bin/dpkg returned an error code (1)
08:08:55 Error: Process completed with exit code 100.
```
Ref: https://github.com/curl/curl/actions/runs/13280736653/job/37078440398?pr=16300#step:2:94
Viktor Szakats [Wed, 12 Feb 2025 09:06:09 +0000 (10:06 +0100)]
GHA/non-native: drop cmake Xcode generator iOS job for poor performance
The Xcode configure phase is slow. In most cases it's >10x slower than
the GNU Makefile configuration. This is after days of attempts to make
it faster. With GNU Makefile it takes 20-30 seconds, while Xcode can
take 3 to 10 minutes, which sometimes makes the job run out of its time
limit and fail.
CMake recommends this generator, but with such poor, and inconsistent
performance, it isn't practical. It helped detecting an Xcode-specific
CMake script issue, but aside from that it's not adding much value.
Viktor Szakats [Sat, 8 Feb 2025 02:20:02 +0000 (03:20 +0100)]
cmake: fix/add missing feature detections for Windows/MS-DOS
Almost all feature detection results are pre-filled on Windows
for performance, so none of the issues fixed here affected builds.
For good measure, this patch add missing detections and fixes others
to make sure they work even when omitting the pre-fill.
It also fixes detecting IPv6 for MS-DOS.
- fix `HAVE_STRUCT_TIMEVAL` detection for MSVC.
Follow-up to c1bc090d65b8d7d14e811dd36f5e8674be43dff3 #12495
- add `HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID` detection for Windows.
- fix `HAVE_STRDUP` detection for MSVC.
- fix `HAVE_SNPRINTF` detection for Windows.
Regression from 8e345057761a8f796403923a96f2c8fd3edca647 #15164
- fix `HAVE_IOCTLSOCKET` detection for non-UWP MSVC.
- exclude `if_nametoindex` detection for Windows.
Although it exists on Windows, detection, usage and availability is
complicated, and curl doesn't use it on this platform.
Regression from 8e345057761a8f796403923a96f2c8fd3edca647 #15164
- move IPv6 detections so that pre-filling and MS-DOS Watt-32
configuration applies to them. This fixes
`HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID` detection with MS-DOS.
Ref: https://github.com/curl/curl/actions/runs/13260511764/job/37015877585#step:7:306
Follow-up to a3585c9576abccddbd27200058912cef900c3c0f #15543
Also:
- add debug option to test without pre-filling.
- replace `NOT LESS` with `GREATER_EQUAL`
Viktor Szakats [Mon, 10 Feb 2025 22:09:55 +0000 (23:09 +0100)]
libssh2: fix to use non-deprecated `libssh2_scp_send64()`
Seen in curl-for-win daily, building against libssh2 1.11.2_DEV:
```
curl-for-win/curl/lib/vssh/libssh2.c:2644:9: warning: 'libssh2_scp_send_ex' is deprecated:
since libssh2 1.2.6. Use libssh2_scp_send64() [-Wdeprecated-declarations]
2644 | SCP_SEND(sshc->ssh_session, sshp->path, data->set.new_file_perms,
```
Ref: https://github.com/curl/curl-for-win/actions/runs/13229370277/job/36924363438#step:3:5805
Viktor Szakats [Mon, 10 Feb 2025 18:39:41 +0000 (19:39 +0100)]
tests: fix test 558, 1330 for MSVC, allow TrackMemory with MSVC in cmake
Extend output filter to pick up backslashes. This makes them pass in CI
when run in the vcpkg MSVC job, for example.
Also:
- cmake: allow TrackMemory, aka `ENABLE_CURLDEBUG` again. Drop FIXME.
- cmake: drop stale TODO.
- runtests: include the word 'TrackMemory' in the message disabling it.
Viktor Szakats [Mon, 10 Feb 2025 04:57:49 +0000 (05:57 +0100)]
cmake: fix `HAVE_GETHOSTBYNAME_R_*` detections with `CURL_WERROR=ON`
Fix `HAVE_GETHOSTBYNAME_R_*` feature detections always failing with
`CURL_WERROR=ON` due to stripping a const.
Also fix the GHA/cmake-vs-configure to enable `CURL_WERROR=ON` to sync
this setting with `./configure` which enables it by default. With that,
CI detects this issue.
Viktor Szakats [Sat, 8 Feb 2025 23:50:07 +0000 (00:50 +0100)]
GHA/windows: improve build perf with cmake unity batches
Default curl unity builds make a single unit for each target. It means
all target sources are batched together and built in a single compiler
invocation. With multi-core CPUs this doesn't always result in the best
possible performance. This patch enables smaller batches for jobs where
this resulted in shorter build times. These jobs are Cygwin, MSYS2,
MinGW, running on the Windows runners.
Use batch of 30 (meaning 30 sources batched into units), and 32 for
Cygwin/MSYS2 to avoid a unity fallout that's subject to a different PR.
(CMake allows to set the number of sources per unit, not the number
of units, though the latter may be more practical to max out CPU cores.)
Also override to not batch the `curlu` target because batching lost
a little bit of time there, due to the already existing parallelism when
building the `testdeps` targets.
For jobs on the macOS and Linux runners jobs were already mostly single
digit or below teen seconds, and batching didn't improve on them
noticeably. On VM jobs, the virtual CPUs are limited, so I didn't
make a try. In AppVeyor and GHA vcpkg jobs (using msbuild), batching
didn't result in conclusive or any gains.
Daniel Stenberg [Mon, 10 Feb 2025 09:15:44 +0000 (10:15 +0100)]
tool_progress: fix percent output of large parallel transfers
When the total transfered amount (upload or download) for parallel
transfers was larger than 2^63/100 bytes (81 petabytes) the progress
percent counter would show wrong.
Jay Satiro [Sat, 8 Feb 2025 08:19:27 +0000 (03:19 -0500)]
curl_global_sslset.md: Add SSL backend names
- Add the names that can be used to select an SSL backend by name.
This change syncs the names in 3 places: curl_global_sslset
documentation, the curl tool environment variable documentation for
CURL_SSL_BACKEND and the libcurl environment variable documentation for
CURL_SSL_BACKEND.
Viktor Szakats [Sun, 9 Feb 2025 01:35:07 +0000 (02:35 +0100)]
lib: silence LibreSSL collision warning on non-MSVC Windows
LibreSSL headers emit this warning because we included `wincrypt.h`
before them. We have to include `wincrypt.h` before OpenSSL headers
to avoid symbol collisions when using other forks. LibreSSL 3.8.2+
offers a macro to silence its warnings to avoid this issue. This patch
sets it.
This allows to stop setting this macro in curl-for-win builds.
Warnings seen with MinGW with cmake non-unity (also unity batch=30):
```
[156/219] Building C object lib/CMakeFiles/libcurl_object.dir/vtls/openssl.c.obj
In file included from lib/vtls/openssl.h:35,
from lib/vtls/openssl.c:53:
dep/libressl-win-x64/include/openssl/ossl_typ.h:90:2: warning: #warning overriding WinCrypt defines [-Wcpp]
90 | #warning overriding WinCrypt defines
| ^~~~~~~
In file included from dep/libressl-win-x64/include/openssl/pem.h:71,
from dep/libressl-win-x64/include/openssl/ssl.h:151,
from lib/vtls/openssl.h:36:
dep/libressl-win-x64/include/openssl/x509.h:108:2: warning: #warning overriding WinCrypt defines [-Wcpp]
108 | #warning overriding WinCrypt defines
| ^~~~~~~
In file included from dep/libressl-win-x64/include/openssl/x509.h:319:
dep/libressl-win-x64/include/openssl/pkcs7.h:77:2: warning: #warning overriding WinCrypt defines [-Wcpp]
77 | #warning overriding WinCrypt defines
| ^~~~~~~
```
Viktor Szakats [Sat, 8 Feb 2025 12:51:59 +0000 (13:51 +0100)]
GHA/windows: restore runtests perf with last known good Git for Windows
Use the last known good release of Git for Windows by installing it
manually. It restores `runtests.pl` performance to the levels before
the October 2024 and this week's fallouts which gradually deployed
MSYS2 runtimes with pipe/signal/concurrency issues.
Also:
- restore vcpkg job's test parallelism to `-j8` (from `-j4`).
- keep using the default shell for jobs not running tests.
To avoid the unnecessary Git for Windows install overhead.
Upsides:
- good performance again.
- easy to experiment with any version.
Downsides:
- installing the Git for Windows package takes 15-30 seconds.
- we're pinned to an old package version.
- no canary to tell when the issue is fixed on the runner images.
Unknown:
- stability. (no MSYS2 runtimes were ever stable and it's difficult
to quantify if a version improves or worsens stability/flakiness, and
intermittent env failures.
Stefan Eissing [Sat, 8 Feb 2025 11:49:34 +0000 (12:49 +0100)]
vtsl: eliminate 'data->state.ssl_scache'
Keeping the relevant 'ssl_scache' in 'data->state' leads to problems
when the owner of the cache is cleaned up and this reference is left
dangling.
Remove the ref entirely and always find the ssl_scache at the current
share or multi.
Folded in #16260 (test 3208) to verify this fixes the bug with a
dangling reference when an easy handle is used with easy_perform first
and in a multi_perform after.
CURLSHOPT_SHARE.md: adjust for the new SSL session cache
curl 8.12.0 introduced an improved SSL session cache. All easy handles
that are added to the same multi handle automatically use the multi
handle's SSL session cache.
Stefan Eissing [Fri, 7 Feb 2025 10:03:18 +0000 (11:03 +0100)]
openssl-quic: ignore ciphers for h3
OpenSSL QUIC method errors on setting TLSv1.2 ciphers, where other
methods do not.
Refrain setting --ciphers when min TLS version is 1.3 or higher.
Refrain setting --tls13-ciphers when max TLS version is less than 1.3.
Add 2 test cases.
Fixes #16232 Reported-by: zzq1015 on github
Closes #16235
Viktor Szakats [Fri, 7 Feb 2025 01:53:15 +0000 (02:53 +0100)]
GHA/appveyor: add VS2019 job, merge two others, fix build fallout
- add VS2019 job, with Schannel + OpenSSL 1.0.2.
First MultiSSL job here and add the last missing modern VS version.
- fix builds with mixed ALPN capabilities in MultiSSL unity builds.
Caused by reusing `HAS_ALPN` between TLS modules without
resetting it. Fix it by using unique names for each backend.
- merge a VS2010 job into a VS2012. With MultiSSL and x86 OpenSSL.
Seen with VS2019 and older versions:
```
lib\vtls\wolfssl.c(773): warning C4706: assignment within conditional expression
```
Ref: https://github.com/curl/curl/actions/runs/13190321645/job/36821938202?pr=16217#step:9:30
Also replace pragma suppression with this simpler method, and silence
`checksrc` where it complains about the extra ` != NULL` this needs.
Viktor Szakats [Thu, 6 Feb 2025 23:46:35 +0000 (00:46 +0100)]
GHA/windows: mitigate drastic runtests perf drop under MSYS2
Today GHA Windows runner images (all versions) deployed an upgrade
(20250127.1.0 -> 20250203.1.0) that upgraded the default MSYS2, which
now seems to feature the October 2024 issue that caused curl runtests
run times increasing ~2.5x. It also causes test987 to fail, and vcpkg
jobs hitting their time limits and fail. Reliability also got a hit.
In October this issue came with a Git for Windows upgrade, and likely
the MSYS2 runtime update within it. It affected vcpkg jobs only, and
I mitigated it by switching them to use the default MSYS2 shell and
runtime (at `C:\msys64`):
After today's update this mitigation no longer works. The issue also
affects `dl-mingw` jobs now, though to a lesser extent than vcpkg ones.
Tried switching back to Git for Windows which received several updates
since October, but the performance issue is still present.
I managed to mitigate the slowdown in vcpkg by lowering test parallelism
to `-j4` (from `-j8`), after which the jobs are about *half the speed*
than before, and fit their time limits. `dl-mingw` builds run slower by
1-1.5 minutes per job, they were already using `-j4`.
Before and after (unused) Git for Windows (SLOW as tested in this PR):
C:\Program Files\Git
System: MINGW64_NT-10.0-20348 fv-az1760-186 3.5.4-395fda67.x86_64 2024-11-25 09:49 UTC x86_64 Msys
https://github.com/msys2/msys2-runtime/commit/395fda67 (fork)
Before and after (used) MSYS2 installed via msys2/setup-msys2 (OK):
D:\a\_temp\msys64
System: MINGW64_NT-10.0-20348 fv-az836-378 3.5.4-0bc1222b.x86_64 2024-12-05 09:27 UTC x86_64 Msys
Perl pipe issue report from October, still open:
https://github.com/msys2/msys2-runtime/issues/230
ARM deadlock fixed by GfW 2.47.1(1), but for x86_64, on a quick glance:
https://github.com/msys2/msys2-runtime/commit/290bea94d0d5c632c016f916a7b123a260fc02a8
Possibly interesting:
https://github.com/msys2/msys2-autobuild/issues/62
Viktor Szakats [Wed, 29 Jan 2025 13:18:35 +0000 (14:18 +0100)]
cmake: add integration tests, run them in CI
Add CMake test project consuming curl via these methods:
`FetchContent`, `add_subdirectory()`, `find_package()`.
Also:
- GHA/distcheck: run these tests in CI.
- cmakelint: exclude a warning for calling "wonky-cased" built-in
CMake functions, such as `FetchContent_Declare()`.
Viktor Szakats [Sun, 2 Feb 2025 13:45:21 +0000 (14:45 +0100)]
cmake/Find: set `<Modulename>_FOUND` for compatibility when found via `pkg-config`
For Find modules where `<Modulename>` is not fully uppercase.
`<Modulename>` is case-exact name used in the Find modules filename:
`CMake/Find<Moduleame>.cmake`.
`find_package_handle_standard_args()` sets both `<MODULENAME>_FOUND` and
`<Modulename>_FOUND` when detecting the dependency. Some CMake code
relies on this and 3rd-party code may rely on it too. Make sure to set
the latter variant when detecting the dependency via `pkg-config`, where
we don't call `find_package_handle_standard_args()`.
CMake sets these variable to `TRUE` (not `ON` or `1`). Replicate this
for compatibility.
Viktor Szakats [Sat, 1 Feb 2025 11:55:47 +0000 (12:55 +0100)]
cmake: drop `LDAP_DEPRECATED=1` macro, to sync with autotools
We set this macro to silence a warning inside `openldap.h`. With this
warning now silenced by using `-isystem`, we can drop it. Also it never
had to be set to `1`.
Viktor Szakats [Wed, 5 Feb 2025 00:29:08 +0000 (01:29 +0100)]
ldap: drop support for legacy Novell LDAP SDK
The latest copy I could find at:
https://beta.novell.com/developer/ndk/ldap_libraries_for_c.html
is from 2016-Feb-03, available for Linux and Windows.
I built curl against the Windows package with CMake:
https://sdk.suse.com/ndk/cldap/builds/2016/openldapsdk-devel-windows64-2016-01-28.zip
(It comes with OpenSSL 1.0.1q-fips (2015-Dec-03) binaries.)
CMake identified it as OpenLDAP and built with it as expected:
```
curl 8.12.0-DEV (x86_64-w64-mingw32) libcurl/8.12.0-DEV Schannel OpenLDAP/2.4.37
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI threadsafe UnixSockets
```
Since it identified it as OpenLDAP (`lib/openldap.c`), the branch
deleted in this PR (`lib/ldap.c`) wasn't reached. Thus, defining
the `CURL_HAS_NOVELL_LDAPSDK` also made no difference in the build.
This suggests the code guarded by it is now orphan and unnecessary.
Viktor Szakats [Wed, 5 Feb 2025 12:17:52 +0000 (13:17 +0100)]
cmake: lib order fixes for picky linkers (e.g. binutils `ld`)
This issue was not addressed with CMake builds so far. curl-for-win
worked thanks to its `-Wl,--start-group` workaround. It affects
binutils `ld` linking statically. Shared linking and llvm's `lld`
doesn't need strict lib order, and are not affected.
The solution is to pass libs in dependency order, with least dependent
(e.g. system) libs last. In case of cyclic dependency, may pass libs
twice.
Fix most issues by moving Windows system libs `ws2_32` and `bcrypt`
last, and move SSH libs first due to their dependence on crypto
backends and zlib compression.
Also:
- modify an existing Linux curl-for-win job to use gcc.
- add a specific Windows gcc job to test this. Make it use different
options than the default to extend build coverage too: `libssh`,
`zlib-ng`, 32-bit.
- prefer CMake imported targets for OpenSSL and ZLIB.
Examples of issues fixed:
Windows LibreSSL, libpsl vs. ws2_32:
```
x86_64-w64-mingw32-ld: curl/libressl/lib/libcrypto.a(bss_sock.c.obj):bss_sock.c:(.text$sock_ctrl[sock_ctrl]+0x59): undefined reference to `__imp_shutdown'
x86_64-w64-mingw32-ld: curl/libressl/lib/libcrypto.a(gcm128.c.obj):gcm128.c:(.text$CRYPTO_gcm128_init[CRYPTO_gcm128_init]+0x65): undefined reference to `__imp_ntohl'
x86_64-w64-mingw32-ld: curl/libpsl/_x64-win-ucrt/usr/lib/libpsl.a(psl.o):(.text$psl_is_cookie_domain_acceptable+0xef): undefined reference to `__imp_WSAStringToAddressW'
```
Ref: https://github.com/curl/curl/actions/runs/13157579253/job/36718144881?pr=16182#step:3:5354
Linux libssh2 vs. zlib:
```
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: curl/libssh2/_a64-linux-gnu-libressl/usr/lib/libssh2.a(unity_0_c.c.o): in function `comp_method_zlib_dtor':
(.text.comp_method_zlib_dtor+0x8c): undefined reference to `deflateEnd'
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: curl/libssh2/_a64-linux-gnu-libressl/usr/lib/libssh2.a(unity_0_c.c.o): in function `comp_method_zlib_comp':
(.text.comp_method_zlib_comp+0x50): undefined reference to `deflate'
/usr/lib/gcc-cross/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/bin/ld: curl/libssh2/_a64-linux-gnu-libressl/usr/lib/libssh2.a(unity_0_c.c.o): in function `comp_method_zlib_init':
(.text.comp_method_zlib_init+0x8c): undefined reference to `deflateInit_'
```
Ref: https://github.com/curl/curl/actions/runs/13157270420/job/36717189086?pr=16182#step:3:5285
Windows libssh vs. ws2_32 and LibreSSL:
```
/usr/bin/i686-w64-mingw32-ld: curl/libssh/_x86-win-ucrt-libressl/usr/lib/libssh.a(connect.c.obj):(.text$ssh_connect_host_nonblocking+0x92): undefined reference to `WspiapiGetAddrInfo@16'
/usr/bin/i686-w64-mingw32-ld: curl/libssh/_x86-win-ucrt-libressl/usr/lib/libssh.a(connect.c.obj):(.text$ssh_connect_host_nonblocking+0x3d9): undefined reference to `gai_strerrorA'
/usr/bin/i686-w64-mingw32-ld: curl/libssh/_x86-win-ucrt-libressl/usr/lib/libssh.a(kex.c.obj):(.text$ssh_client_select_hostkeys+0xd2): undefined reference to `FIPS_mode'
/usr/bin/i686-w64-mingw32-ld: curl/libssh/_x86-win-ucrt-libressl/usr/lib/libssh.a(options.c.obj):(.text$ssh_options_set+0x942): undefined reference to `FIPS_mode'
```
Ref: https://github.com/curl/curl/actions/runs/13163986294/job/36739557888?pr=16182#step:3:5127
Ref: https://github.com/curl/curl/actions/runs/13163986294/job/36739557888?pr=16182#step:3:5121
Viktor Szakats [Thu, 6 Feb 2025 00:22:22 +0000 (01:22 +0100)]
cmake: initialize variables where missing
As detected using `cmake --warn-uninitialized`.
It also lists:
- variables inherited from `Makefile.inc`, which this PR does not fix.
- a documented CMake global variable, which is unexpected:
`CMAKE_MODULE_PATH`.
I'd expect CMake to initialize its namespace.
- envs: `CI`, `CURL_CI` and `CURL_BUILDINFO`. Unexpected, as the manual
mentions variables only. As of August 2024, there is no solution to
silence them:
https://discourse.cmake.org/t/how-to-test-for-set-env-variables-without-getting-warnings/11401
Viktor Szakats [Sat, 1 Feb 2025 11:31:13 +0000 (12:31 +0100)]
cmake: tidy up string append and list prepend syntax
- `set(VAR "${VAR}<value>")` ->
`string(APPEND VAR "<value>")`
Available since CMake 3.4:
https://cmake.org/cmake/help/latest/command/string.html#append
Viktor Szakats [Thu, 6 Feb 2025 15:33:31 +0000 (16:33 +0100)]
runtests: quote commands to support paths with spaces
In certain Windows configurations, Perl resides under `C:/Program Files`
causing tests to fail when executing Perl. Fix by quoting the command.
Seen in `dl-mingw` jobs when switching to the default `bash` shell
offered by the `windows-latest` runner on GHA.
Also:
- apply the same fix for `valgrind` for consistency.
- make more use of `shell_quote()` when passing the `srcdir` directory
over the command-line. This doesn't come up in CI, but seems like
good practice. There are lots more unquoted arguments and possibly
also commands.
```
-------e--- OK (940 out of 1537, remaining: 00:32, took 0.217s, duration: 00:50)
test 1167...[Verify curl prefix of public symbols in header files]
/C/Program Files/Git/usr/bin/perl -I. -ID:/a/curl/curl/tests returned 127, when expecting 0
1167: exit FAILED
[...]
=== Start of file stderr1167
sh: line 1: /C/Program: No such file or directory
```
Ref: https://github.com/curl/curl/actions/runs/13181757313/job/36794072190?pr=16217#step:13:2107
Viktor Szakats [Thu, 6 Feb 2025 18:17:53 +0000 (19:17 +0100)]
test1516: avoid failure due to spaces in path
Sync the test path with test1515. If fixes the test when the perl tool
resides on a path with spaces in it. E.g. when using the perl from Git
for Windows. This is a workaround, there may be a better fix this
type of issue.
Failure:
```
test 1516...[caching of manual libcurl DNS entries after dead connection]
lib1515.exe returned 3, when expecting 0
1516: exit FAILED
=== Start of file stderr1516
Test: lib1515
[...]
17:59:32.390000 == Info: Expire cleared
request http://testserver.example.com:63621/C:/Program Files/Git/path/15160001 failed with 3
Test ended with result 3
=== End of file stderr1516
```
Ref: https://github.com/curl/curl/actions/runs/13184790755/job/36804217128?pr=16217#step:13:2805
Viktor Szakats [Thu, 6 Feb 2025 13:09:58 +0000 (14:09 +0100)]
GHA/windows: always pass `-A <arch>` to cmake in vcpkg jobs
Instead of relying on the default `-A x64` on `windows-latest` runners,
tell cmake the arch explicitly, to be in sync with `matrix.arch`. Also
add support for arm64 and x86.
`-DVCPKG_TARGET_TRIPLET=` isn't enough to select the platform, ref:
https://github.com/curl/curl/actions/runs/13179082565/job/36785363766?pr=16210