windows: _snprintf_s

https://github.com/warmcat/libwebsockets/issues/859
This commit is contained in:
Renyaow 2017-04-05 02:05:01 +08:00 committed by Andy Green
parent a36ca4dc08
commit 89ad5714d6

View file

@ -93,6 +93,10 @@ struct sockaddr_in;
#define __func__ __FUNCTION__
#endif
#if !defined(__MINGW32__) &&(!defined(_MSC_VER) || _MSC_VER < 1900) && !defined(snprintf)
#define snprintf(buf,len, format,...) _snprintf_s(buf, len,len, format, __VA_ARGS__)
#endif
#else /* NOT WIN32 */
#include <unistd.h>