Conditionally define snprintf on Windows
snprintf is already defined in MSVC 2015. If you redefine it <stdio.h> will cry about it and abort the compilation.
This commit is contained in:
parent
c6496b2510
commit
1759e32c7b
1 changed files with 2 additions and 0 deletions
|
@ -146,7 +146,9 @@ struct sockaddr_in;
|
|||
#define LWS_INVALID_FILE INVALID_HANDLE_VALUE
|
||||
#define LWS_O_RDONLY _O_RDONLY
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER < 1900 /* Visual Studio 2015 already defines this in <stdio.h> */
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#else /* NOT WIN32 */
|
||||
#include <unistd.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue