imgui_club
imgui_club copied to clipboard
MSYS UCRT64 compatibility
When using the UCRT64 environment of MSYS2 to make a build that links to the UCRT, instead of to the old msvcrt, stdio and snprintf()
work the way they do in MSVC, and expects the same modifiers. However, _MSC_VER
is not defined in the UCRT64 headers, and thus the current guard doesn't work. Checking for _UCRT
, which is defined, fixes this. Without this fix, it is necessary to define __USE_MINGW_ANSI_STDIO
at compile time so as to switch to its implementation of stdio, or compilation will fail if you set warning flags on (-Wall
, -Werror
, etc). One could ofc ignore this warning but that seems like a bad plan...