I used #ifdef Win32 for safe calls alike sprintf_s but now I want to build project with MinGW and it\'s just wrong now. I need to use #ifdef
#ifdef Win32
sprintf_s
#ifdef
See the "Microsoft-Specific Predefined Macros" table of Visual C predefined macros
You could check for _MSC_VER.
_MSC_VER