Skip to content

Commit 727f1d3

Browse files
author
Miklos Vajna
committed
Fix Visual Studio 2015 build
The error is: c:\Program Files\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition ..\apps\xmlsec.c(13): note: see previous definition of 'snprintf' c:\Program Files\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration 1900 is from <http://stackoverflow.com/questions/70013/how-to-detect-if-im-compiling-code-with-visual-studio-2008>.
1 parent 5d6e81a commit 727f1d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/cmdline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
99
*/
10-
#if defined(_MSC_VER)
10+
#if defined(_MSC_VER) && _MSC_VER < 1900
1111
#define snprintf _snprintf
1212
#endif
1313

apps/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
99
*/
10-
#if defined(_MSC_VER)
10+
#if defined(_MSC_VER) && _MSC_VER < 1900
1111
#define snprintf _snprintf
1212
#endif
1313

apps/xmlsec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <string.h>
1010
#include <time.h>
1111

12-
#if defined(_MSC_VER)
12+
#if defined(_MSC_VER) && _MSC_VER < 1900
1313
#define snprintf _snprintf
1414
#endif
1515

0 commit comments

Comments
 (0)