mirror of
https://github.com/curl/curl.git
synced 2026-08-06 01:36:13 +03:00
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 232302f88a #14382
Ref: https://github.com/curl/curl/pull/14625#issuecomment-2302361737
Closes #14640
This commit is contained in:
parent
c04504885d
commit
c730c8549b
12 changed files with 60 additions and 43 deletions
|
|
@ -46,6 +46,11 @@ if USE_CPPFLAG_CURL_STATICLIB
|
|||
AM_CPPFLAGS += -DCURL_STATICLIB
|
||||
endif
|
||||
|
||||
if HAVE_MINGW
|
||||
# For mingw-w64 7.0.0 and earlier to avoid '-Wformat='
|
||||
AM_CPPFLAGS += -D__USE_MINGW_ANSI_STDIO=1
|
||||
endif
|
||||
|
||||
# Prevent LIBS from being used for all link targets
|
||||
LIBS = $(BLANK_AT_MAKETIME)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue