]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
6 months agodocs/HTTPSRR.md: initial HTTPS RR documentation 16052/head
Daniel Stenberg [Sun, 19 Jan 2025 11:51:37 +0000 (12:51 +0100)] 
docs/HTTPSRR.md: initial HTTPS RR documentation

Closes #16052

6 months agoasyn-thread: use c-ares to resolve HTTPS RR
Daniel Stenberg [Tue, 21 Jan 2025 10:42:20 +0000 (11:42 +0100)] 
asyn-thread: use c-ares to resolve HTTPS RR

Allow building with c-ares and yet use threaded resolver for the main
host A/AAAA resolving:

  `--with-ares` provides the c-ares install path and defaults to use
  c-ares for name resolving

  `--with-threaded-resolver` still uses c-ares in the build (for HTTPS)
  but uses the threaded resolver for "normal" resolves.

It works similarly for cmake: ENABLE_ARES enables ares, and if
ENABLE_THREADED_RESOLVER also is set, c-ares is used for HTTPS RR and
the threaded resolver for "normal" resolves.

HTTPSRR and c-ares-rr are new features return by curl_version_info() and
thus shown by curl -V.

The c-ares-rr feature bit is there to make it possible to distinguish
between builds using c-ares for all name resolves and builds that use
the threaded resolves for the regular name resolves and c-ares for
HTTPSRR only. "c-ares-rr" means it does not use c-ares for "plain" name
resolves.

HTTPSRR support is EXPERIMENTAL only.

Closes #16054

6 months agoGHA/non-native: bump to NetBSD 10.1
Viktor Szakats [Sat, 25 Jan 2025 21:52:23 +0000 (22:52 +0100)] 
GHA/non-native: bump to NetBSD 10.1

Closes #16088

6 months agoGHA/non-native: update cross-platform-actions/action action to v0.27.0
renovate[bot] [Wed, 22 Jan 2025 10:22:36 +0000 (10:22 +0000)] 
GHA/non-native: update cross-platform-actions/action action to v0.27.0

Closes #16071

6 months agocmake: drop `CURL_USE_PKGCONFIG` from `curl-config.cmake.in`
Viktor Szakats [Sat, 25 Jan 2025 13:54:47 +0000 (14:54 +0100)] 
cmake: drop `CURL_USE_PKGCONFIG` from `curl-config.cmake.in`

This variable was meant to be used by curl Find modules, but it turns
out it makes no sense to use those from `curl-config.cmake.in`. It means
this variable was not used before and will not be used in the future,
and therefore safe to delete.

Also add missing macros passed to `curl-config.cmake` to comment.

Ref: https://github.com/curl/curl/pull/14930#discussion_r1929537797

Closes #16087

6 months agoci: update dependency cloudflare/quiche to v0.23.2
renovate[bot] [Fri, 24 Jan 2025 23:45:00 +0000 (23:45 +0000)] 
ci: update dependency cloudflare/quiche to v0.23.2

Closes #16082

6 months agoGHA/curl-for-win: fix `DOCKER_CONTENT_TRUST` for a job [ci skip]
Viktor Szakats [Fri, 24 Jan 2025 23:41:11 +0000 (00:41 +0100)] 
GHA/curl-for-win: fix `DOCKER_CONTENT_TRUST` for a job [ci skip]

Follow-up to 28230bec1ff32798a1daa1ad37ee0a43734b1d40 #15141

6 months agocontent_encoding: put the decomp buffers into the writer structs 16079/head
Daniel Stenberg [Fri, 24 Jan 2025 12:19:30 +0000 (13:19 +0100)] 
content_encoding: put the decomp buffers into the writer structs

- no more malloc/free per chunk
- removes the extra malloc entirely
- make the buffer (much) smaller (10MB => 16KB!)
- rename 'decomp' to 'buffer' to clarify purpose

Closes #16079

6 months agocontent_encoding: drop support for zlib before 1.2.0.4
Daniel Stenberg [Fri, 24 Jan 2025 10:13:24 +0000 (11:13 +0100)] 
content_encoding: drop support for zlib before 1.2.0.4

zlib 1.2.0.4 was released on 10 August 2003

Closes #16079

6 months agolib: redirect handling by protocol handler
Stefan Eissing [Thu, 23 Jan 2025 10:48:06 +0000 (11:48 +0100)] 
lib: redirect handling by protocol handler

Adds a `follow()` callback to protocol handlers, so they may decide how
to act on a `newurl` after a request has been done. This is optional.

This moves the HTTP code for handling redirects from multi.c to http.c
where it should be. If we ever add a protocol with its own logic, it
would install its own follow function.

Closes #16075

6 months agolib: clarify 'conn->httpversion'
Stefan Eissing [Wed, 22 Jan 2025 13:45:30 +0000 (14:45 +0100)] 
lib: clarify 'conn->httpversion'

The variable `conn->httpversion` was used for several purposes and it
was unclear at which time the value represents what.

- rename `conn->httpversion` to `conn->httpversion_seen`
  This makes clear that the variable only records the last
  HTTP version seen on the connection - if any. And that it
  no longer is an indication of what version to use.
- Change Alt-Svc handling to no longer modify `conn->httpversion`
  but set `data->state.httpwant` for influencing the HTTP version
  to use on a transfer.
- Add `data->req.httpversion_sent` to have a record of what
  HTTP version was sent in a request
- Add connection filter type CF_TYPE_HTTP
- Add filter query `CF_QUERY_HTTP_VERSION` to ask what HTTP
  filter version is in place
- Lookup filters HTTP version instead of using `conn->httpversion`

Test test_12_05 now switches to HTTP/1.1 correctly and the
expectations have been fixed.

Removed the connection fitler "is_httpN()" checks and using
the version query instead.

Closes #16073

6 months agobuild: fix compiling with GCC 4.x versions
Viktor Szakats [Sat, 11 Jan 2025 23:11:59 +0000 (00:11 +0100)] 
build: fix compiling with GCC 4.x versions

- silence false positive picky warnings.
- avoid "possible noreturn" warnings for standalone tests and examples.
- fix to compile without `#pragma GCC diagnostic push` support.
- fix "#pragma GCC diagnostic not allowed inside functions".

Prerequisite for #15975 that needs GCC 4.4 for the latest pre-built
CeGCC/mingw32ce toolchain for Windows CE.

Cherry-picked from #15975
Closes #16062

6 months agosrc: omit hugehelp and ca-embed from libcurltool
Viktor Szakats [Tue, 21 Jan 2025 16:11:45 +0000 (17:11 +0100)] 
src: omit hugehelp and ca-embed from libcurltool

CMake builds using the Xcode generator broke with an error saying it
doesn't support multiple targets depending on the same custom commands.
These custom commands are generating `tool_hugehelp.c` and
`tool_c_embed.c` for the curl tool and libcurltool.

`unit1394` and `unit1604` tests use libcurltool to test tool-specific
functions. They don't need hugehelp and ca-embed. It's thus safe to
disable and exclude them when compiling the sources for libcurltool.
Use the `UNITTESTS` macro to detect a libcurltool build within C.

After this patch these sources are solely used for building the curl
tool. Making the build compatible with the CMake Xcode generator.

Apply the change to autotools too to keep build systems synchronized.

Follow-up to 12a6de2f660dd692cce93cb65ce6e3ec126bb531 #16043
Closes #16068

6 months agocmake: prefer dash-style MSVC options
Viktor Szakats [Tue, 21 Jan 2025 10:30:52 +0000 (11:30 +0100)] 
cmake: prefer dash-style MSVC options

They play better with Unixy shells. The compiler has been supporting
dash options since its early versions.

Also fix to detect warnings options passed in dash-style.

Closes #16063

6 months agocfilters: kill connection filter events attach+detach
Stefan Eissing [Tue, 21 Jan 2025 13:47:29 +0000 (14:47 +0100)] 
cfilters: kill connection filter events attach+detach

Make transfer attach/detach to/from connections chepaer.

- the "attach" event was no longer implemented by any filter
- the "detach" did the same as the "done" event for the filters
  who still implemented it. It should be superfluous as the "done"
  must always happen.

Closes #16067

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 22 Jan 2025 07:08:47 +0000 (08:08 +0100)] 
RELEASE-NOTES: synced

6 months agocurl_multi_fdset: include the shutdown connections in the set
Daniel Stenberg [Sun, 19 Jan 2025 10:16:56 +0000 (11:16 +0100)] 
curl_multi_fdset: include the shutdown connections in the set

They were previously missing.

Follow-up from c9b95c0bb30f88bf00e1ac7e706c

Fixes #15156
Reported-by: Christopher Dannemiller
Closes #16049

6 months agocontent_encoding: support use of custom libzstd memory functions
Neil Johari [Fri, 17 Jan 2025 01:14:49 +0000 (17:14 -0800)] 
content_encoding: support use of custom libzstd memory functions

If ZSTD_STATIC_LINKING_ONLY is defined.

This functionality was introduced in zstd v0.8.1 in 2016 here:
facebook/zstd@be6180c

Closes #16028

6 months agoappveyor: bump to OpenSSL 3.4
Viktor Szakats [Tue, 21 Jan 2025 11:20:10 +0000 (12:20 +0100)] 
appveyor: bump to OpenSSL 3.4

Closes #16064

6 months agodocs/TLS-SESSIONS: fix typo, the->they
Yedaya Katsman [Mon, 20 Jan 2025 19:58:35 +0000 (21:58 +0200)] 
docs/TLS-SESSIONS: fix typo, the->they

Closes #16057

6 months agoeasy_lock: use Sleep(1) for thread yield on old Windows
Jay Satiro [Sun, 19 Jan 2025 06:18:23 +0000 (01:18 -0500)] 
easy_lock: use Sleep(1) for thread yield on old Windows

- Prefer Sleep(1) over sched_yield() for pre-Vista thread yield.

On Windows sched_yield is often implemented as Sleep(0) which only
yields to threads of highest priority to current priority. However,
during libcurl initialization if there is thread contention then it's
possible that there is a wait for a different library or OS thread of
a lesser priority and then the yield is not effective during that time.
On the other hand Sleep(1) will wait the minimum time slice which is
usually like 15ms or more.

Prior to this change 2c4bfef removed sched_yield detection on Windows,
which effectively removed the yield in the spin lock, and therefore this
change restores the yield but in a different way.

For Windows Vista and later we use SRW locks and do not have this issue.

Ref: https://github.com/curl/curl/pull/16037#issuecomment-2600161764
Ref: https://devblogs.microsoft.com/oldnewthing/20051004-09/?p=33923

Closes https://github.com/curl/curl/pull/16048

6 months agoGHA/non-native: fix TLS backend in Android job names
Viktor Szakats [Tue, 21 Jan 2025 00:05:56 +0000 (01:05 +0100)] 
GHA/non-native: fix TLS backend in Android job names

Also drop whitespaces/alignment.

Reported-by: Tal Regev
Follow-up to 12a6de2f660dd692cce93cb65ce6e3ec126bb531 #16043

6 months agoGHA: add iOS jobs with LibreSSL, enable dependencies for Android via vcpkg
Viktor Szakats [Sat, 18 Jan 2025 01:11:37 +0000 (02:11 +0100)] 
GHA: add iOS jobs with LibreSSL, enable dependencies for Android via vcpkg

iOS:

- add jobs with autotools, CMake, CMake Xcode generator.
  The Xcode generator is >10x slower than Unix Makefiles. Keep it
  because it's the one recommended by CMake and for having its own
  quirks we may want to know about.
- build, cache and use LibreSSL for these jobs.
  With workaround for an iOS build issue fixed in master.
- make Xcode generator work by explicitly disabling code signing.
- make tests and examples build with the Xcode generator by setting
  `-DMACOSX_BUNDLE_GUI_IDENTIFIER=se.curl`, to avoid
  "Bundle identifier is missing" errors.
- cmake: disable `CURL_USE_PKGCONFIG` by default for Apple device.
- cmake: add `stdc++` library for BoringSSL and AWS-LC, with
  `OPENSSL_USE_STATIC_LIBS=ON` set.
- cmake: add workaround for Xcode generator issue, where it cannot
  handle two targets depending on one custom command. A better fix may
  be dropping `tool_hugehelp.c` and `tool_ca_embed.c` from curltool
  library. For a future PR.

Android:

- add vcpkg to Android jobs, enable dependencies.
Assisted-by: Tal Regev via #16045
- make vcpkg work with autotools.
- pass `--with-brotli` to autotools to detect the vcpkg-supplied brotli.
- enable BoringSSL for Android and add a job with it.
- silence 457 CMake configure warnings about the Android NDK CMake
  scripts targeting freshly deprecated CMake versions.

These were much more involved than imagined. Basically nothing works out
of the box, and when combined, everything becomes a unique edge case.
autotools builds were a much easier to make work than CMake ones.

Also:

- GHA/non-native: re-sync names to be shorter and more aligned with
  other workflows.
- GHA: add `persist-credentials: false` where missing.

Unresolved issues:

- `OPENSSL_ROOT_DIR` ignored/mis-used when pointing it to LibreSSL.
  CMake seems to prepend the sysroot to the passed absolute directory.
  Found no workaround.
- CMake when combined with Android, both the Google-recommended method
  and the built-in CMake method fail to provide a way to avoid
  `pkg-config` packages at system directories. Failed to find a knob
  that can remove `/usr/include` from the search path. The workaround is
  to disable zstd. (I enabled it by default in this release, maybe
  premature?: f2adb3b6d73cad0c28ec8a32f5fa969d0f6378a0 #15431)
  Disabling `pkg-config` doesn't work because vcpkg dependencies do not
  link without it.
- CMake's Xcode generator is slow because each `try_compile()` feature
  check springs a new CMake + Xcode project taking a long time to run,
  just to compile single-liner C files. A known issue, with no solution.
  `-DCMAKE_MACOSX_BUNDLE=OFF` did not help, limiting build types to
  a single one (e.g. `Debug`) also had no effect.
   make | Xcode | GHA run
  :---- | :---- | :--------------------------------------------------------------------
    16s | 2m57s | https://github.com/curl/curl/actions/runs/12866334102/job/35868712426
    23s | 4m13s | https://github.com/curl/curl/actions/runs/12868128013/job/35874212461
    16s | 3m39s | https://github.com/curl/curl/actions/runs/12859073531/job/35849041880
    14s | 2m23s | https://github.com/curl/curl/actions/runs/12858298423/job/35847201313
    15s | 2m36s | https://github.com/curl/curl/actions/runs/12858058492/job/35846669761
    19s | 3m19s | https://github.com/curl/curl/actions/runs/12868919430/job/35876601168

Closes #16043

6 months agowindows: merge `config-win32ce.h` into `config-win32.h`
Viktor Szakats [Fri, 17 Jan 2025 20:33:12 +0000 (21:33 +0100)] 
windows: merge `config-win32ce.h` into `config-win32.h`

They were more or less the same, but each missed some things the other
had. Windows CE is a subset of Win32, make the headers reflect that and
avoid duplications.

Ref: #15975
Closes #16038

6 months agoGHA: replace hard-coded home dir in cache `path:` with `~`
Viktor Szakats [Mon, 20 Jan 2025 14:17:02 +0000 (15:17 +0100)] 
GHA: replace hard-coded home dir in cache `path:` with `~`

Closes #16056

6 months agodocs: document the behavior of -- in the curl command line
9cel [Mon, 20 Jan 2025 10:35:42 +0000 (06:35 -0400)] 
docs: document the behavior of -- in the curl command line

Closes #16053

6 months agolibcurl/opts: do not save files in dirs where attackers have access
Daniel Stenberg [Sun, 19 Jan 2025 11:35:39 +0000 (12:35 +0100)] 
libcurl/opts: do not save files in dirs where attackers have access

libcurl cannot fully protect against attacks where an attacker has write
access to the same directory where it is directed to save files. This is
particularly sensitive if you save files using elevated privileges.

Previously only mentioned in VULN-DISCLOSURE-POLICY.md.

Highlighted-by: Donguk Kim
Closes #16051

6 months agoGHA: tidy up quotes, checkout order, silence Android/CMake warnings
Viktor Szakats [Sat, 18 Jan 2025 01:30:08 +0000 (02:30 +0100)] 
GHA: tidy up quotes, checkout order, silence Android/CMake warnings

- move checkout step right before use.
- quotes in yaml and bash.
- unfold single-line run commands.
- set `CMAKE_WARN_DEPRECATED=OFF` for CMake with Android NDK to avoid
  a wall of useless deprecation warnings hiding useful output.
  These warnings happen in 3rd-party scripts, and unfixable in curl.

Closes #16042

6 months agocmake: drop `fseeko()` pre-fill and check for Windows
Viktor Szakats [Fri, 17 Jan 2025 23:07:16 +0000 (00:07 +0100)] 
cmake: drop `fseeko()` pre-fill and check for Windows

To sync detection code with autotools.

Closes #16041

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 19 Jan 2025 10:55:02 +0000 (11:55 +0100)] 
RELEASE-NOTES: synced

6 months agocurl_multi_waitfds.md: tidy up the example
Daniel Stenberg [Sun, 19 Jan 2025 10:27:53 +0000 (11:27 +0100)] 
curl_multi_waitfds.md: tidy up the example

- remove typecast
- shorten comment

Closes #16050

6 months agoasyn-ares: initial HTTPS resolve support
Daniel Stenberg [Sat, 18 Jan 2025 21:47:54 +0000 (22:47 +0100)] 
asyn-ares: initial HTTPS resolve support

Gets the ALPN list the same way DoH does. Needs c-ares 1.28.0 or later.

Thanks-to: Brad House
Closes #16039

6 months agombedtls: prefix our feature defines with HAS_
Daniel Stenberg [Sat, 18 Jan 2025 22:01:15 +0000 (23:01 +0100)] 
mbedtls: prefix our feature defines with HAS_

Consistent naming helps.

Closes #16046

6 months agochecksrc.bat: remove explicit SNPRINTF bypass
Jay Satiro [Fri, 17 Jan 2025 08:17:15 +0000 (03:17 -0500)] 
checksrc.bat: remove explicit SNPRINTF bypass

- Remove the command line argument passed to checksrc.pl that accepts
  SNPRINTF violations in docs/examples.

This is a follow-up to c445b742 which introduced a different management
of banned functions and removed the SNPRINTF rule in favor of banning
snprintf in lib. There's no longer a SNPRINTF warning to suppress.

Closes https://github.com/curl/curl/pull/16032

6 months agocmake: do not store `MINGW64_VERSION` in cache
Viktor Szakats [Fri, 17 Jan 2025 22:40:09 +0000 (23:40 +0100)] 
cmake: do not store `MINGW64_VERSION` in cache

Follow-up to e49797abc24b8e0ac652d7aa0ceec7d252f9a019 #16022
Closes #16040

6 months agobuild: stop detecting `sched_yield()` on Windows
Viktor Szakats [Thu, 16 Jan 2025 19:39:13 +0000 (20:39 +0100)] 
build: stop detecting `sched_yield()` on Windows

On Windows a successful `sched_yield()` detection requires mingw-w64
built with POSIX threads (not Win32 threads) and GCC (not llvm/clang).
(linking to `winpthread` via custom options may also work.)

In CMake builds, it was pre-cached as unavailable before this patch.

When detected (via autotools), it got only used for Windows XP or older
targets combined with a non-GCC, non-clang compiler that doesn't support
`__builtin_ia32_pause()`, or with the Intel C compiler. According to
`lib/easy_lock.h`.

mingw-w64 only supports GCC and clang, leaving a very narrow chance when
`shed_yield()` gets called on Windows. Even then, `sched_yield()` is
implemented in `winpthread` as `Sleep(0)`, which may or not be a useful.
It's also trivial to implement locally if it is, and such rare build
combination is also deemed useful.

Thus, this patch marks `sched_yields()` permanently unavailable on the
Windows platform also with autotools, and instead of pre-caching, skip
this feature check with CMake.

This syncs `HAVE_SCHED_YIELDS` between builds methods on Windows.

Follow-up to 9b517c8b69a1f365fdb6f54f7153561182285b6c #11973
Follow-up to 23af112f5556d6a785c17e09f2422ac931405f61 #8680

Closes #16037

6 months agocmake: detect mingw-w64 version, pre-fill `HAVE_STRTOK_R`
Viktor Szakats [Thu, 16 Jan 2025 17:10:31 +0000 (18:10 +0100)] 
cmake: detect mingw-w64 version, pre-fill `HAVE_STRTOK_R`

Replace `strtok_r()` detection with detection mingw-w64 version.
The use this version to pre-fill `HAVE_STRTOK_R`.

This gives use mingw-w64 version information for free.

Closes #16022

6 months agocmake: pre-fill `HAVE_STDATOMIC_H`, `HAVE_ATOMIC` for mingw-w64
Viktor Szakats [Thu, 16 Jan 2025 14:21:23 +0000 (15:21 +0100)] 
cmake: pre-fill `HAVE_STDATOMIC_H`, `HAVE_ATOMIC` for mingw-w64

`stdatomic.h` and `_Atomic` were first available in gcc 4.9.0 and
llvm/clang 3.6. Set detection values accordingly and save these two
detections on configure runs.

Closes #16036

6 months agoTLS: check connection for SSL use, not handler
Stefan Eissing [Fri, 17 Jan 2025 10:57:00 +0000 (11:57 +0100)] 
TLS: check connection for SSL use, not handler

Protocol handler option PROTOPT_SSL is used to setup a connection
filters. Once that is done, used `Curl_conn_is_ssl()` to check if
a connection uses SSL.

There may be other reasons to add SSL to a connection, e.g. starttls.

Closes #16034

6 months agopytest: remove 'repeat' parameter
Stefan Eissing [Fri, 17 Jan 2025 10:16:37 +0000 (11:16 +0100)] 
pytest: remove 'repeat' parameter

With the use of the pytest-repeat plugin, this parameter is no
longer necessary.

Closes #16033

6 months agowindows: drop dupe macros, detect `CURL_OS` for WinCE ARM, indentation
Viktor Szakats [Thu, 16 Jan 2025 14:31:54 +0000 (15:31 +0100)] 
windows: drop dupe macros, detect `CURL_OS` for WinCE ARM, indentation

- setup-win32: drop duplicate `WIN32_LEAN_AND_MEAN` and `NOGDI` macros
  (set earlier in `curl_setup.h`)

- config-win32ce: detect ARM for `CURL_OS` macro.
  Based on: https://cegcc.sourceforge.net/docs/details.html
  It should also apply to MSVC. (untested)

- indentation.

Closes #16029

6 months agoGHA: update `ubuntu-24.04` to `ubuntu-latest`
Viktor Szakats [Fri, 17 Jan 2025 02:29:26 +0000 (03:29 +0100)] 
GHA: update `ubuntu-24.04` to `ubuntu-latest`

`ubuntu-latest` is an alias for `ubuntu-24.04` now.

6 months agoconfigure: do not inline 'dnl' comments [ci skip]
Viktor Szakats [Fri, 17 Jan 2025 01:34:47 +0000 (02:34 +0100)] 
configure: do not inline 'dnl' comments [ci skip]

(Did not cause issues in this particular case.)

Follow-up to a1184525a6fc144cccf81cab406880519777bd21 #15971

6 months agoconfigure: UWP and Android follow-up fixes
Viktor Szakats [Fri, 17 Jan 2025 00:09:48 +0000 (01:09 +0100)] 
configure: UWP and Android follow-up fixes

- limit UWP detection to native Windows.
- add missing double-quotes to variable.
- drop interlock and sync order in buildinfo flags.

Follow-up to 56a74fac47a27cfbfe2f49976938dab7a1b9b4f2 #16014
Follow-up to f7bb6c1f64049dcdaee970de6759db6f8597879e #16020

Closes #16027

6 months agoandroid: add CI jobs, buildinfo, cmake docs, disable `CURL_USE_PKGCONFIG` by default
Viktor Szakats [Wed, 15 Jan 2025 14:46:32 +0000 (15:46 +0100)] 
android: add CI jobs, buildinfo, cmake docs, disable `CURL_USE_PKGCONFIG` by default

- GHA/non-native: add Android builds, both cmake and autotools,
  both NDK 21 (oldest available) and 35 (newest available)
  https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
  It comes with a maintenance burden to bump the oldest/latest values
  with CI runner updates.

- cmake: disable `CURL_USE_PKGCONFIG` by default for Android.
  To avoid picking up system package by default.

- build: add `ANDROID-<NDK-LEVEL>` flag to `buildinfo.txt`.
  Also detect NDK level with the CMake built-in build method:
  https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android

- INSTALL.md: add CMake build instructions for Android.

- INSTALL.md: make NDK levels consistent in `./configure` example.

Closes #16014

6 months agoGHA: start using ARM Linux runners
Viktor Szakats [Thu, 16 Jan 2025 18:12:02 +0000 (19:12 +0100)] 
GHA: start using ARM Linux runners

- GHA/linux: allow per-job runner image override.
- GHA/linux: add an arm version of an existing job.
  Add workaround for broken `PATH` in the arm runner image.
- GHA/non-native: add CPU arch to job name where missing.
- GHA/checkdocs: switch a linter job to arm.

Performance looks a little bit better than Intel
(presumably with lower power consumption).

Test jobs, with openssl, tests, pytests, examples:
- arm:
  - https://github.com/curl/curl/actions/runs/12816430794/job/35737374521 4m7s
  - https://github.com/curl/curl/actions/runs/12816201136/job/35736615144 4m5s
- Intel:
  - https://github.com/curl/curl/actions/runs/12816430794/job/35737374118 4m32s
  - https://github.com/curl/curl/actions/runs/12816201136/job/35736614764 4m13s

Ref: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

Closes #16023

6 months agoGHA/linux: enable wolfSSH in a wolfSSL job
Viktor Szakats [Thu, 16 Jan 2025 21:19:51 +0000 (22:19 +0100)] 
GHA/linux: enable wolfSSH in a wolfSSL job

With tests. (Most SFTP tests fail with wolfSSH.)

Also:
- disable pseudo-terminal in wolfSSH builds (also in CircleCI).
  Not needed for curl.
- test642: add "compressed" to the description.
  To avoid being the same as test600.
  Follow-up to b7b4dc0d49543175ab0d9bb1cdc257a2d7f7cf0a #1735

Closes #16025

6 months agowebsocket: fix message send corruption
Stefan Eissing [Thu, 2 Jan 2025 15:34:52 +0000 (16:34 +0100)] 
websocket: fix message send corruption

- Fix a bug in EAGAIN handling when sending frames that led to a
  corrupted last byte of the frame sent.

- Restore sanity to curl_ws_send() behaviour:

  - Partial writes are reported as OK with the actual number of
    payload bytes sent.

  - CURLE_AGAIN is only returned when none of the payload bytes
    (or for 0-length frames, not all of the frame header bytes)
    could be sent.

  - curl_ws_send() now behaves like a common send() call.

- Change 'ws-data' test client to allow concurrent send/recv
  operations and vary frame sizes and repeat count.

- Add DEBUG env var CURL_WS_CHUNK_EAGAIN to simulate blocking
  after a chunk of an encoded websocket frame has been sent.

- Add tests.

Prior to this change data corruption may occur when sending websocket
messages due to two bugs:

1) 3e64569a (precedes 8.10.0) caused a data corruption bug in the last
   byte of frame of large messages.

2) curl_ws_send had non-traditional send behavior and could return
   CURLE_AGAIN with bytes sent and expect the caller to adjust buffer
   and buflen in a subsequent call. That behavior was not documented.

Reported-by: na-trium-144@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/15865
Fixes https://github.com/curl/curl/issues/15865#issuecomment-2569870144
Closes https://github.com/curl/curl/pull/15901

6 months agoTODO: write an SMB test server to replace impacket
Daniel Stenberg [Thu, 16 Jan 2025 19:27:07 +0000 (20:27 +0100)] 
TODO: write an SMB test server to replace impacket

Closes #15697
Closes #16024

6 months agoasyn-ares: acknowledge CURLOPT_DNS_SERVERS set to NULL
Daniel Stenberg [Thu, 16 Jan 2025 07:45:45 +0000 (08:45 +0100)] 
asyn-ares: acknowledge CURLOPT_DNS_SERVERS set to NULL

Since c-ares has no function to restore this value to default, it
instead closes and re-inits the c-ares channel.

Reported-by: Deniz Sökmen
Fixes #16015
Closes #16016

6 months agoGHA/labeler: fix `INSTALL-CMAKE.md` references
Viktor Szakats [Thu, 16 Jan 2025 16:41:05 +0000 (17:41 +0100)] 
GHA/labeler: fix `INSTALL-CMAKE.md` references

Follow-up to 0f4c19b66ad5c646ebc3c4268a0f3ad9c15bf57c #12772

Closes #16021

6 months agoautotools: add support for mingw UWP builds
Viktor Szakats [Thu, 16 Jan 2025 15:47:15 +0000 (16:47 +0100)] 
autotools: add support for mingw UWP builds

To match cmake builds.

- GHA/windows: allow autotools UWP builds.
- detect UWP and add to `buildinfo.txt`.
  Consider it enabled if `CPPFLAGS` contains `-DWINSTORECOMPAT`.
- disable telnet with UWP.
- enable Unicode with UWP.
- do not use `wldap32` with UWP.
- do not enable `USE_WIN32_CRYPTO` with UWP.
- make sure to link to `ws2_32` in UWP builds.
  To fix `undefined reference to `in6addr_any'` when linking
  `tests/server` programs. More in the comment.

Closes #16020

6 months agodocs/EXPERIMENTAL.md: add a mention of HTTPSRR as experimental
Daniel Stenberg [Thu, 16 Jan 2025 09:52:39 +0000 (10:52 +0100)] 
docs/EXPERIMENTAL.md: add a mention of HTTPSRR as experimental

Closes #16017

6 months agocmake: move mingw UWP workaround from GHA to `CMakeLists.txt`
Viktor Szakats [Wed, 15 Jan 2025 13:28:19 +0000 (14:28 +0100)] 
cmake: move mingw UWP workaround from GHA to `CMakeLists.txt`

CMake (as of 3.31.2) doesn't fully recognize mingw-w64 with
`CMAKE_SYSTEM_NAME=WindowsStore`.
The manual logic works around it.

Also move existing DJGPP workaround to the same block.

Closes #16019

6 months agotidy-up: extend `CURL_O_BINARY` to lib and tests
Viktor Szakats [Wed, 15 Jan 2025 09:52:02 +0000 (10:52 +0100)] 
tidy-up: extend `CURL_O_BINARY` to lib and tests

Move `CURL_O_BINARY` definition from src to lib and use it from lib and
tests code.

Closes #16009

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 16 Jan 2025 08:27:49 +0000 (09:27 +0100)] 
RELEASE-NOTES: synced

6 months agotool_getparam: ECH param parsing refix
sftcd [Wed, 15 Jan 2025 12:47:41 +0000 (12:47 +0000)] 
tool_getparam: ECH param parsing refix

Regression.

Fixes #16006
Reported-by: Milon Renatus
Closes #16010

6 months agocf-https-connect: look into httpsrr alpns when available
Stefan Eissing [Wed, 15 Jan 2025 15:45:25 +0000 (16:45 +0100)] 
cf-https-connect: look into httpsrr alpns when available

Improved the filter implementation to be flexible in which order h3 and
h2/h1 are attempted. When HTTPSRR is enabled, look at the ALPNs it found
and use the order given for connecting in default setups.

Closes #16012

6 months agoGHA/non-native: lower job timeouts
Viktor Szakats [Wed, 15 Jan 2025 15:15:19 +0000 (16:15 +0100)] 
GHA/non-native: lower job timeouts

New values have a 2-3x headroom.

6 months agodoh: send HTTPS RR requests for all HTTP(S) transfers
Daniel Stenberg [Wed, 15 Jan 2025 10:04:46 +0000 (11:04 +0100)] 
doh: send HTTPS RR requests for all HTTP(S) transfers

When enabled in the build.

Update test2100: verify with HTTPS RR included

Adjust runtests and server/disabled.c to include "HTTPSRR" as a feature
in the test suite.

Also, decode the ALPN list in HTTPS records straight into IDs. There's
no point in storing everything in string format. Skip ALPNs we do not
support.

Closes #16007

6 months agodoh: cleanups and extended HTTPS RR code
Daniel Stenberg [Wed, 15 Jan 2025 08:03:47 +0000 (09:03 +0100)] 
doh: cleanups and extended HTTPS RR code

In preparation for using HTTPS outside of ECH, the parser now also
extracts the port number.

Plus other minor cleanups.

Closes #16007

6 months agoINSTALL.md: tweak to the MSVC version line [ci skip]
Viktor Szakats [Wed, 15 Jan 2025 01:33:36 +0000 (02:33 +0100)] 
INSTALL.md: tweak to the MSVC version line [ci skip]

Follow-up to 308437ac53a142be2c3470330e7de3737915bb23 #15992

6 months agoCI: add/extend curl binary info, VS2010 32-bit, misc improvements
Viktor Szakats [Sun, 12 Jan 2025 19:07:09 +0000 (20:07 +0100)] 
CI: add/extend curl binary info, VS2010 32-bit, misc improvements

- fix `find` commands to not miss items.

- call `file` on the built files in `curl -V` steps.
  To give more feedback on what was built.

- add `curl info` step for cross-jobs that can't do a `curl -V`.
  It lists the files built and calls `file` on them.

- appveyor: make a VS2010 32-bit to match the VS2008 job it replaced.
  Follow-up to d34aeecb08cdbb98cb81420605a78b83e4aee3c2 #15934

- GHA/windows: drop the word "old" from standalone mingw-w64 jobs to not
  conflate it with "old mingw" we no longer support (while also keeping
  it short).

Cherry-picked from #15975
Closes #16001

6 months agoeasy: make curl_easy_perform() return error if connection still there
Daniel Stenberg [Tue, 14 Jan 2025 14:47:21 +0000 (15:47 +0100)] 
easy: make curl_easy_perform() return error if connection still there

This typically happens if CURL_CONNECT_ONLY is used and a second
curl_easy_perform() is attempted.

A connection "taken over" with CURL_CONNECT_ONLY cannot be ended any
other way than a curl_easy_cleanup() on the easy handle that holds it.

Add test 696 to verify.

Closes #16003

6 months agoCURLOPT_CONNECT_ONLY.md: an easy handle with this option set cannot be reused
Daniel Stenberg [Tue, 14 Jan 2025 13:53:42 +0000 (14:53 +0100)] 
CURLOPT_CONNECT_ONLY.md: an easy handle with this option set cannot be reused

Closes #16002

6 months agoINSTALL.md: document VS2008 and mingw-w64
Viktor Szakats [Mon, 13 Jan 2025 18:52:50 +0000 (19:52 +0100)] 
INSTALL.md: document VS2008 and mingw-w64

Ref: #15972
Closes #15992

6 months agosha256/hmac: use these with TLS builds now
Daniel Stenberg [Mon, 13 Jan 2025 22:49:09 +0000 (23:49 +0100)] 
sha256/hmac: use these with TLS builds now

Used by the SSL session cache code.

Bug: https://curl.se/mail/lib-2025-01/0041.html
Reported-by: Aleksander Mazur
Closes #15994

6 months agotidy-up: drop parenthesis around `return` expression
Viktor Szakats [Mon, 13 Jan 2025 17:52:32 +0000 (18:52 +0100)] 
tidy-up: drop parenthesis around `return` expression

Closes #15990

6 months agoCI: run pytest in github CI colored
Stefan Eissing [Tue, 14 Jan 2025 09:27:05 +0000 (10:27 +0100)] 
CI: run pytest in github CI colored

Add colors to pytest runs in github workflows and see how test clutch
copes with it!

Closes #15998

6 months agopytest: use httpd/apache2 directly, no apachectl
Stefan Eissing [Tue, 14 Jan 2025 09:49:35 +0000 (10:49 +0100)] 
pytest: use httpd/apache2 directly, no apachectl

Since the script 'apachectl' from the httpd project is severly mutilated
on several distros, use the executable httpd/apache2 directly in pytest
runs.

Remove detection of apachectl form autoconf and cmake.

Closes #16000

6 months agocmdline-opts/version.md: describe multissl, mention SSLS-EXPORT
Daniel Stenberg [Tue, 14 Jan 2025 08:29:35 +0000 (09:29 +0100)] 
cmdline-opts/version.md: describe multissl, mention SSLS-EXPORT

Closes #15996

6 months agotransfer: fix CURLOPT_CURLU override logic
Jay Satiro [Mon, 13 Jan 2025 08:57:45 +0000 (03:57 -0500)] 
transfer: fix CURLOPT_CURLU override logic

- Change setopt and pretransfer to always reset URL related variables
  for a CURLU handle set CURLOPT_CURLU.

This change is to ensure we are in compliance with the doc which says
CURLU handles must be able to override a URL set via CURLOPT_URL and
that if the contents of the CURLU handle changes between transfers then
the updated contents must be used.

Prior to this change, although subsequent transfers appear to be
performed correctly in those cases, the work URL `data->state.url` was
not updated. CURLINFO_EFFECTIVE_URL returns data->state.url to the user
so it would return the URL from the initial transfer which was the wrong
URL. It's likely there are other cases as well.

Ref: https://curl.se/libcurl/c/CURLOPT_CURLU.html

Reported-by: Nicolás San Martín
Fixes https://github.com/curl/curl/issues/15984
Closes https://github.com/curl/curl/pull/15985

6 months agomprintf: terminate snprintf output on windows
Jay Satiro [Tue, 14 Jan 2025 09:21:38 +0000 (04:21 -0500)] 
mprintf: terminate snprintf output on windows

- Null terminate the end of the snprintf output buffer on Windows.

Old versions of the Windows CRT (which are often found on later versions
of Windows) do not terminate the snprintf output buffer if the output
reaches the max size.

This is a follow-up to parent 7e32f656 which made the same change but
limited it to mingw, however it is a CRT version issue irrespective of
compiler.

Ref: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=msvc-170#remarks

Closes https://github.com/curl/curl/pull/15997

6 months agomprintf: fix integer handling in float precision
Daniel Stenberg [Mon, 13 Jan 2025 12:24:31 +0000 (13:24 +0100)] 
mprintf: fix integer handling in float precision

In the double output function when an extremely large width and
precision is set that reaches the libcurl maximum (325), the handling of
the precision part would do wrong which could lead to bad output.

Also: work-around for single-byte buffer snprintf overflow with mingw.

Extend test 557 to verify.

Coverity CID 1638751.

Closes #15988

6 months agoGHA: enable the SSL session cache in a few builds
Daniel Stenberg [Mon, 13 Jan 2025 17:32:34 +0000 (18:32 +0100)] 
GHA: enable the SSL session cache in a few builds

Closes #15989

6 months agocurl_easy_ssls_export/import.md: made for TLS protocols
Daniel Stenberg [Mon, 13 Jan 2025 22:13:37 +0000 (23:13 +0100)] 
curl_easy_ssls_export/import.md: made for TLS protocols

Which then makes the generated man page also include details about the
specific backends that support this feature.

Follow-up to 515a21f350b89f0676e5df7f904c62c8f67be377

Closes #15993

6 months agocmake: enable SSLS-EXPORT in the build
Daniel Stenberg [Mon, 13 Jan 2025 18:32:53 +0000 (19:32 +0100)] 
cmake: enable SSLS-EXPORT in the build

Follow-up to 515a21f350b89f0676e5df7f904c62c8f67be377

Closes #15991

6 months agolib/easy.c: bring back the vtls/vtls_scache.h include
Daniel Stenberg [Mon, 13 Jan 2025 17:26:19 +0000 (18:26 +0100)] 
lib/easy.c: bring back the vtls/vtls_scache.h include

6 months agotelnet: handle single-byte input option
Daniel Stenberg [Mon, 13 Jan 2025 11:16:19 +0000 (12:16 +0100)] 
telnet: handle single-byte input option

Coverity CID 1638753 correctly identies this code misbehaved if the
passed in suboption is exactly one byte long by substracting two from
the unsigned size_t variable.

Closes #15987

6 months agoaltsvc: return error on dot-only name
Daniel Stenberg [Mon, 13 Jan 2025 11:05:02 +0000 (12:05 +0100)] 
altsvc: return error on dot-only name

Because it is a trailing dot that otherwise leads to a zero length name.

Coverity CID 1638755.

Closes #15986

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 13 Jan 2025 09:41:12 +0000 (10:41 +0100)] 
RELEASE-NOTES: synced

6 months agomultihandle: add an ssl_scache here
Daniel Stenberg [Sun, 12 Jan 2025 16:35:39 +0000 (17:35 +0100)] 
multihandle: add an ssl_scache here

The TLS session cache is now held by the multi handle unless it is
shared, so that all easy handles within a multi handle get the benefit
of sharing the same, larger, cache.

The multi handle session cache size is set to 25, unless it is the
internal one used for the easy interface - which still uses only 3.

Closes #15982

6 months agochecksrc: use 'banfunc' proper in more places
Daniel Stenberg [Mon, 13 Jan 2025 07:26:15 +0000 (08:26 +0100)] 
checksrc: use 'banfunc' proper in more places

6 months agoexamples: use return according to code style
Daniel Stenberg [Mon, 13 Jan 2025 07:24:00 +0000 (08:24 +0100)] 
examples: use return according to code style

6 months agochecksrc: check for return with parens around a value/name
Daniel Stenberg [Sun, 12 Jan 2025 21:52:13 +0000 (22:52 +0100)] 
checksrc: check for return with parens around a value/name

Ref: #15979
Closes #15983

6 months agocurl-functions.m4: fix indentation in `CURL_SIZEOF()`
Viktor Szakats [Sat, 11 Jan 2025 11:55:02 +0000 (12:55 +0100)] 
curl-functions.m4: fix indentation in `CURL_SIZEOF()`

Closes #15981

6 months agocmake: pick a better IPv6 feature flag when assembling the feature list
Viktor Szakats [Sat, 11 Jan 2025 12:27:51 +0000 (13:27 +0100)] 
cmake: pick a better IPv6 feature flag when assembling the feature list

Before this patch it used `ENABLE_IPV6`, the configuration intent.
Replace with `USE_IPV6` which is the actual setting passed to C.

The two can be different for targets without IPv6 support.

Closes #15980

6 months agotidy-up: drop parenthesis around `return` values
Viktor Szakats [Sat, 11 Jan 2025 17:46:39 +0000 (18:46 +0100)] 
tidy-up: drop parenthesis around `return` values

Closes #15979

6 months agoconfig: drop unused code and variables
Viktor Szakats [Sun, 12 Jan 2025 10:57:24 +0000 (11:57 +0100)] 
config: drop unused code and variables

- cmake, config-*: drop unused `PACKAGE*`, `VERSION` variables.
- config-win32: indentation
- config-win32ce: drop mingw-specific code.
  This header is not used with MinGW.
- config-win32ce: `_WIN64` is never true for Windows CE, drop.

Closes #15978

6 months agocmake: drop VS2010 "Dialog Hell" workaround added in 2013
Viktor Szakats [Sun, 12 Jan 2025 02:25:36 +0000 (03:25 +0100)] 
cmake: drop VS2010 "Dialog Hell" workaround added in 2013

Delete the workaround added via a94a68a3c1d04ccb53e46baa69753bbf6354ee14
(2013-02-04). The commit message has no details. The comment mentions
"Dialog Hell", and seems to fix CMake missing to regenerate `CURL.sln`
with VS2010. It also added a FIXME saying the workaround can be deleted
with future versions of CMake.

At the time CMake's latest version was v2.8.10.

curl now requires v3.7 (2018) minimum, and v3.24 (2022) was the
latest CMake natively supporting VS2010. Assume this has since been
fixed.

Also: format an MSVC version reference in comment.

Closes #15973

6 months agoconfigure: streamline Windows large file feature check
Viktor Szakats [Sat, 11 Jan 2025 23:55:32 +0000 (00:55 +0100)] 
configure: streamline Windows large file feature check

Before this patch the `CURL_CHECK_WIN32_LARGEFILE` feature check was
running an `AC_COMPILE` snippet that always succeeded. (except for
Windows CE, which isn't supported in other parts of `./configure` yet.)

The only Windows toolchain autotools supports is mingw. Of them, curl
only supports mingw-w64. All mingw-w64 versions support large files.
This allows to drop the check and assume it supported on Windows. To not
lose Windows CE support, rework that too, without using `AC_COMPILE`.

Drop the feature check altogether for non-Windows targets.

Ref: https://github.com/curl/curl/pull/15968#discussion_r1912158201
Follow-up to 7eb4ddb850d3757ac9e0b60b0198bbb11e83135e #15968

Closes #15971

6 months agosystem.h: fix indentation
Viktor Szakats [Sun, 12 Jan 2025 02:53:07 +0000 (03:53 +0100)] 
system.h: fix indentation

Closes #15974

6 months agomsvc: require VS2005 for large file support
Viktor Szakats [Thu, 9 Jan 2025 15:17:08 +0000 (16:17 +0100)] 
msvc: require VS2005 for large file support

Large file support requires `_fseeki64()`. This function is offered in
VS2005 and upper.

VS2003 has it in the static CRT only, with declaration missing from
headers, so it's not usable.

Ref: https://archive.org/details/X10-38445 (MS Visual Studio .NET 2003)
Ref: 8b76a8aeb21c8ae2261147af1bddd0d4637c252c #15526

Closes #15958

6 months agocurl_setup: fix missing `ADDRESS_FAMILY` type in rare build cases
Viktor Szakats [Fri, 10 Jan 2025 15:58:48 +0000 (16:58 +0100)] 
curl_setup: fix missing `ADDRESS_FAMILY` type in rare build cases

Build failed when both `ADDRESS_FAMILY` and `sockaddr_un` stuct were
missing from the Windows SDK, with UnixSockets enabled.

Seen with GNU 4.4.0 in CeGCC 0.59.1:
```
lib/curl_setup.h:983: error: expected specifier-qualifier-list before 'ADDRESS_FAMILY'
lib/curl_setup.h:985: warning: struct has no members
```

Also reported with VS2003:
https://datagirl.xyz/posts/wolfssl_curl_w2k.html

Closes #15969

6 months agowindows: drop redundant `USE_WIN32_SMALL_FILES` macro
Viktor Szakats [Sat, 11 Jan 2025 02:22:10 +0000 (03:22 +0100)] 
windows: drop redundant `USE_WIN32_SMALL_FILES` macro

In effect it meant `_WIN32 && !USE_WIN32_LARGE_FILES`.
Replace it with these macros.

Also:
- configure: delete tautological check for small file support.
- configure: delete stray `_MSC_VER` reference. autotools does not
  support MSVC.
- drop tautological checks for WinCE in `config-win32*.h` when setting
  `USE_WIN32_LARGE_FILES`.
- merge related PP logic.
- prefer `#ifdef`, fix whitespace.

Suggested-by: Marcel Raad
Report: https://github.com/curl/curl/pull/15952#issuecomment-2580092328

Closes #15968

6 months agotidy-up: `curl_setup.h`, `curl_setup_once.h`, `config-win32ce.h`
Viktor Szakats [Fri, 10 Jan 2025 23:36:10 +0000 (00:36 +0100)] 
tidy-up: `curl_setup.h`, `curl_setup_once.h`, `config-win32ce.h`

- drop unused `LIBIDN_REQUIRED_VERSION` macro.
  Unused since 9c91ec778104ae3b744b39444d544e82d5ee9ece

- drop compatibility error for `CURL_WANTS_CA_BUNDLE_ENV`.
  This macro was once set by `Makefile.mk` and Watcom makefiles.
  They are no longer supported, making the compatibility message moot.

  Follow-up to 7d7346519d8bff513f9ed9f0c5e709782b159e5a #1542 (2017)
  Follow-up to c2aeb1b3ba09af8b2e555eafa94dd9c534426bfb #1538 (2017)

- document last MSVC supporting the `!_MT` condition
  Ref: https://stackoverflow.com/questions/2278919/are-the-time-functions-of-msvc-thread-safe

- flatten an `#if` tree, prefer `#ifdef`.

- fix/adjust indentation, whitespace.

Closes #15967

6 months agomsvc: tidy up `_CRT_*_NO_DEPRECATE` definitions
Viktor Szakats [Thu, 9 Jan 2025 17:19:35 +0000 (18:19 +0100)] 
msvc: tidy up `_CRT_*_NO_DEPRECATE` definitions

Dedupe and migrate MSVC-specific warning suppressions to `curl_setup.h`.
Make cmake set `_CRT_SECURE_NO_DEPRECATE` for examples and standalone
tests, and stop setting `_CRT_NONSTDC_NO_DEPRECATE` for them.

Details:
- drop version guards. On ancient MSVC version these macro are a no-op.
- move to `curl_setup.h` from `config-win32*.h`.
- sync macro values with CMake.
- cmake: stop setting them globally in favour of `curl_setup.h`.
- cmake: re-add these macros to `docs/examples` and `tests/http/clients`,
  which do not use `curl_setup.h`.
- cmake: drop `_CRT_NONSTDC_NO_DEPRECATE` for examples and tests.
  They build fine without.
- update comments.

Closes #15960

6 months agocmake: formatting [ci skip]
Viktor Szakats [Sat, 11 Jan 2025 12:34:43 +0000 (13:34 +0100)] 
cmake: formatting [ci skip]

6 months agoci: update actions/upload-artifact digest to 65c4c4a
renovate[bot] [Fri, 10 Jan 2025 17:22:48 +0000 (17:22 +0000)] 
ci: update actions/upload-artifact digest to 65c4c4a

Closes #15964

6 months agoci: update rojopolis/spellcheck-github-actions digest to 9e0a5fb
renovate[bot] [Tue, 7 Jan 2025 19:14:48 +0000 (19:14 +0000)] 
ci: update rojopolis/spellcheck-github-actions digest to 9e0a5fb

Closes #15933