fix win32 build with vs2019, snprintf not rdefine to _snprintf

This commit is contained in:
u0u0
2022-03-01 18:33:19 +08:00
parent d5f985b115
commit 4da53803d2

View File

@@ -47,12 +47,6 @@ typedef SSIZE_T ssize_t;
#endif
#endif
#if _MSC_VER < 1900
#ifndef snprintf
#define snprintf _snprintf
#endif
#endif
#endif // __MINGW32__
#include <math.h>
@@ -62,6 +56,12 @@ typedef SSIZE_T ssize_t;
#include <stdlib.h>
#include <time.h>
#ifndef __MINGW32__
#ifndef snprintf
#define snprintf _snprintf // must after #include <stdio.h>, _snprintf is safty
#endif
#endif // __MINGW32__
#ifndef M_PI
#define M_PI 3.14159265358
#endif