mirror of
https://github.com/u0u0/Cocos2d-Lua-Community.git
synced 2026-05-06 22:01:44 +08:00
fix win32 build with vs2019, snprintf not rdefine to _snprintf
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user