Skip to content

Commit 545ab8a

Browse files
committed
Fix Visual Studio 2015 and later compilation errors due to snprintf macro definition.
Closes swig#1508
1 parent f87182a commit 545ab8a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGES.current

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
77
Version 4.0.0 (in progress)
88
===========================
99

10+
2019-04-19: pbecherer
11+
[Tcl] Fix Visual Studio 2015 and later compilation errors due to snprintf macro
12+
definition.
13+
1014
2019-04-09: wsfulton
1115
[C#] Fix FxCop warning CA2002 in SWIGPendingException - a lock on a reference of
1216
type 'Type'.

Lib/chicken/chickenrun.swg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <stdio.h>
88
#include <string.h>
99
#include <stdlib.h>
10-
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
10+
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__BORLANDC__) || defined(_WATCOM)
1111
# ifndef snprintf
1212
# define snprintf _snprintf
1313
# endif

Lib/swigfragments.swg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
%fragment("<stdio.h>", "header") %{
3737
#include <stdio.h>
38-
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
38+
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__BORLANDC__) || defined(_WATCOM)
3939
# ifndef snprintf
4040
# define snprintf _snprintf
4141
# endif

0 commit comments

Comments
 (0)