diff options
author | Timo Rothenpieler <[email protected]> | 2025-09-02 01:00:24 +0200 |
---|---|---|
committer | Timo Rothenpieler <[email protected]> | 2025-09-14 11:45:11 +0000 |
commit | 5146b2fb8b700c5376244859dcd1731e4470e3b7 (patch) | |
tree | 8a43265d71170994e3d5d031c7049be31722ef75 | |
parent | 9c8a6ac85c3e56f8168a7813e4c825aff7044939 (diff) |
configure: don't use MinGW ANSI stdio when using UCRT
MinGWs ANSI stdio is quite slow, and when using UCRT, its extra features
are not needed.
The only troublesome part with ucrt printf is that is disagrees about
the size of "long double", but FFmpeg does not use that anywhere, let
alone prints it.
-rwxr-xr-x | configure | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -6200,7 +6200,9 @@ probe_libc(){ add_allcflags "-include $source_path/compat/msvcrt/snprintf.h" fi add_${pfx}cflags -U__STRICT_ANSI__ - add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1 + if ! test_${pfx}cpp_condition crtdefs.h "defined(_UCRT)"; then + add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1 + fi eval test \$${pfx_no_}cc_type = "gcc" && add_${pfx}cppflags -D__printf__=__gnu_printf__ test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" && @@ -6213,7 +6215,9 @@ probe_libc(){ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || die "ERROR: MinGW32 runtime version must be >= 3.15." add_${pfx}cflags -U__STRICT_ANSI__ - add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1 + if ! test_${pfx}cpp_condition crtdefs.h "defined(_UCRT)"; then + add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1 + fi test_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700" && add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700 test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" && |