Re: [Mingw-w64-public] stdio.h: redefinition issues with UCRT

2021-05-16 Thread Christoph Reiter
On Sun, May 16, 2021 at 11:58 AM Liu Hao wrote: > Who was it that added the `#define`? Users should have known that `_snprintf` > does not > null-terminate the output string if there is no enough room in the output > buffer, which is rather > dangerous. Some projects I've seen it in: gimp, silc

Re: [Mingw-w64-public] stdio.h: redefinition issues with UCRT

2021-05-16 Thread Liu Hao
在 2021-05-15 15:01, Christoph Reiter 写道: Hey, while trying to get everything to build with UCRT in MSYS2 we noticed quite a few errors that come down to the following: // gcc -D__USE_MINGW_ANSI_STDIO=1 a.c #define snprintf _snprintf #include int main (){return 0;} i.e. snprintf is defined bef

[Mingw-w64-public] stdio.h: redefinition issues with UCRT

2021-05-15 Thread Christoph Reiter
Hey, while trying to get everything to build with UCRT in MSYS2 we noticed quite a few errors that come down to the following: // gcc -D__USE_MINGW_ANSI_STDIO=1 a.c #define snprintf _snprintf #include int main (){return 0;} i.e. snprintf is defined before stdio.h, messing it up I see that stdi