Skip to content

Commit

Permalink
sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO.
Browse files Browse the repository at this point in the history
  • Loading branch information
Larhzu committed Sep 24, 2023
1 parent 2a9929a commit 7d73d1f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/common/sysdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
# 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
Expand Down

0 comments on commit 7d73d1f

Please sign in to comment.