cmake for example doesn't use CPPFLAGS, so anything using cmake wont
get __USE_MINGW_ANSI_STDIO set, which is causing problems like
https://github.com/msys2/MINGW-packages/pull/21796
Instead move __USE_MINGW_ANSI_STDIO into CFLAGS and CXXFLAGS.
Uses "-Wp" because we already do that for _FORTIFY_SOURCE, not sure
if it helps with anything really, but why not.
See #4860