]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 24 Sep 2023 13:32:32 +0000 (16:32 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 7 May 2024 13:03:09 +0000 (16:03 +0300)
(cherry picked from commit 4ae13cfe0dedb8ddc3cf9ded8cd1ac09361b3bd1)

src/common/sysdefs.h

index df7ecf400289a7a5fa62b2e6ef89f614dfda1100..7f98c55b347d5c80ce3e0c14b7bf7b74b2b70720 100644 (file)
 #      include <config.h>
 #endif
 
-// Get standard-compliant stdio functions under MinGW and MinGW-w64.
+// This #define ensures that C99 and POSIX compliant stdio functions are
+// available with MinGW-w64 (both 32-bit and 64-bit). Modern MinGW-w64 adds
+// this automatically, for example, when the compiler is in C99 (or later)
+// mode when building against msvcrt.dll. It still doesn't hurt to be explicit
+// that we always want this and #define this unconditionally.
+//
+// With Universal CRT (UCRT) this is less important because UCRT contains
+// C99-compatible stdio functions. It's still nice to #define this as UCRT
+// doesn't support the POSIX thousand separator flag in printf (like "%'u").
 #ifdef __MINGW32__
 #      define __USE_MINGW_ANSI_STDIO 1
 #endif