]> 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:05 +0000 (15:39 +0200)
commit4eae859ae8ad7072eaa74aeaee79a2c3c12c55cb
tree2c901e153fa087eafa7499a0c2516440ba884e62
parenta831bc185bdd44c06847eae8df2d35cc281f65da
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).
src/common/sysdefs.h
src/xz/util.c