From ac3f55fd92170848e1556023ec0423f9cf0ec013 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Mon, 6 Mar 2017 19:54:43 +0100 Subject: [PATCH] there is no snprintf before Visual C++ 2015 --- src/headers/tomcrypt_macros.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/headers/tomcrypt_macros.h b/src/headers/tomcrypt_macros.h index 39cf118..52ca940 100644 --- a/src/headers/tomcrypt_macros.h +++ b/src/headers/tomcrypt_macros.h @@ -430,6 +430,11 @@ static inline ulong64 ROR64(ulong64 word, int i) #define byte(x, n) (((x) >> (8 * (n))) & 255) #endif +/* there is no snprintf before Visual C++ 2015 */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +#define snprintf _snprintf +#endif + /* $Source$ */ /* $Revision$ */ /* $Date$ */