Fix Visual Studio 2015 and later compilation errors due to snprintf macro definition.

Closes #1508
This commit is contained in:
William S Fulton 2019-04-19 11:33:02 +01:00
commit 545ab8af08
3 changed files with 6 additions and 2 deletions

View file

@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.0.0 (in progress)
===========================
2019-04-19: pbecherer
[Tcl] Fix Visual Studio 2015 and later compilation errors due to snprintf macro
definition.
2019-04-09: wsfulton
[C#] Fix FxCop warning CA2002 in SWIGPendingException - a lock on a reference of
type 'Type'.

View file

@ -7,7 +7,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__BORLANDC__) || defined(_WATCOM)
# ifndef snprintf
# define snprintf _snprintf
# endif

View file

@ -35,7 +35,7 @@
%fragment("<stdio.h>", "header") %{
#include <stdio.h>
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__BORLANDC__) || defined(_WATCOM)
# ifndef snprintf
# define snprintf _snprintf
# endif