From 9a7813b732497afc4aafb6d125894f10f11a0413 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Mon, 11 Nov 2013 18:54:29 -0500 Subject: [PATCH] Make sure MSVC is still OK with our MINGW changes --- IO/src/FileStreamWin32.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IO/src/FileStreamWin32.cpp b/IO/src/FileStreamWin32.cpp index 2fce0f5..5042eb6 100755 --- a/IO/src/FileStreamWin32.cpp +++ b/IO/src/FileStreamWin32.cpp @@ -61,6 +61,11 @@ #include #include +#ifdef _MSC_VER +#define snprintf(out, outSz, fmt, ...) _snprintf_s(out, outSz, _TRUNCATE, fmt, __VA_ARGS__) +#define strncpy(dst, src, dstSz) strncpy_s(dst, dstSz, src, _TRUNCATE) +#endif + void ErrorExit(LPCSTR lpszFunction) { // Retrieve the system error message for the last-error code