]> git.ipfire.org Git - thirdparty/curl.git/commit
build: make `CURL_FORMAT_CURL_OFF_T[U]` work with mingw-w64 <=7.0.0
authorViktor Szakats <commit@vsz.me>
Wed, 21 Aug 2024 22:21:51 +0000 (00:21 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 22 Aug 2024 08:45:04 +0000 (10:45 +0200)
commitc730c8549b5b67e7668ca5d2cd82c3cc183e125d
treed7f504020bdaa67d4b0f18645269a6d4b49f71da
parentc04504885d947c8e5756d450b93c2faaf9daa372
build: make `CURL_FORMAT_CURL_OFF_T[U]` work with mingw-w64 <=7.0.0

Add tweak for mingw-w64 when building tests/http/client programs to
avoid a bogus `-Wformat` warning when using mingw-w64 v7.0.0 or older.
The warning is bogus because these programs use curl's `printf()`
implementation that is guaranteed to support that format spec.

Add this for both CMake and autotools. (But only CMake is CI tested with
an old toolchain.)

Apply the workaround to `docs/examples`, and fix an example to use
curl's `printf()` with `CURL_FORMAT_CURL_OFF_T`.

Reintroduce curl `printf()` calls into `tests/http/client`, via #14625.
Also restore large number masks to a printf, changed earlier in #14382.

Follow-up to 232302f88a152a1d1722da9f69c383a766528918 #14382
Ref: https://github.com/curl/curl/pull/14625#issuecomment-2302361737

Closes #14640
12 files changed:
configure.ac
docs/examples/CMakeLists.txt
docs/examples/Makefile.am
docs/examples/ftpgetinfo.c
tests/http/clients/CMakeLists.txt
tests/http/clients/Makefile.am
tests/http/clients/h2-download.c
tests/http/clients/h2-pausing.c
tests/http/clients/h2-serverpush.c
tests/http/clients/h2-upgrade-extreme.c
tests/http/clients/tls-session-reuse.c
tests/http/clients/upload-pausing.c