]> git.ipfire.org Git - thirdparty/xz.git/commit
Windows: Disable MinGW-w64's stdio functions in size-optimized builds
authorLasse Collin <lasse.collin@tukaani.org>
Wed, 22 Jan 2025 13:03:55 +0000 (15:03 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 22 Jan 2025 13:39:57 +0000 (15:39 +0200)
commit5ae7958dbcb194a3df745e4860f7fa902593c095
treee88a6ab6537a3581be5f7faed6166a090c9cfa46
parentc182b9c1b398582b40ee3f8db36f32a4bf5cfe20
Windows: Disable MinGW-w64's stdio functions in size-optimized builds

This only affects builds with UCRT. With legacy MSVCRT, the replacement
functions are always enabled.

Omitting the MinGW-w64 replacements saves over 20 KiB per executable.
The downside is that --enable-small or XZ_SMALL=ON disables thousand
separator support in xz messages. If someone is OK with the slower
speed of slightly smaller builds, lack of thousand separators won't
matter.

Don't override __USE_MINGW_ANSI_STDIO if it is already defined (via
CPPFLAGS or such method).

(cherry picked from commit 4eae859ae8ad7072eaa74aeaee79a2c3c12c55cb)
src/common/sysdefs.h
src/xz/util.c