diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-06-12 10:29:01 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-06-12 10:29:01 (GMT) |
| commit | 58a92afa78a27833f41e3adcd5399d25b40a2d48 (patch) | |
| tree | 05ba119e84dea62fd02d074c8e3e0e8650482c82 | |
| parent | d86daeacdd5263ac586f46f40c3ab28fd20f886b (diff) | |
| parent | 54c2c72784e51a1065fe5395429bc99b05cb62e8 (diff) | |
| download | tcl-58a92afa78a27833f41e3adcd5399d25b40a2d48.zip tcl-58a92afa78a27833f41e3adcd5399d25b40a2d48.tar.gz tcl-58a92afa78a27833f41e3adcd5399d25b40a2d48.tar.bz2 | |
Silence various warnings when doing a 64-bit build with MSVC: Those warnings can only _really_ be fixed in "novem" (so, don't silence them there).
Use vsnprintf (more portable) in stead of _vsnprintf, except on MSVC
| -rw-r--r-- | win/tclWinFile.c | 2 | ||||
| -rw-r--r-- | win/tclWinPort.h | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 8e517d1..1d9f93a 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -799,7 +799,7 @@ tclWinDebugPanic( WCHAR msgString[TCL_MAX_WARN_LEN]; va_start(argList, format); - _vsnprintf(buf, sizeof(buf), format, argList); + vsnprintf(buf, sizeof(buf), format, argList); msgString[TCL_MAX_WARN_LEN-1] = L'\0'; MultiByteToWideChar(CP_UTF8, 0, buf, -1, msgString, TCL_MAX_WARN_LEN); diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 457c838..ca35f38 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -468,8 +468,13 @@ typedef DWORD_PTR * PDWORD_PTR; * including the *printf family and others. Tell it to shut up. * (_MSC_VER is 1200 for VC6, 1300 or 1310 for vc7.net, 1400 for 8.0) */ -#if _MSC_VER >= 1400 -#pragma warning(disable:4996) +#if defined(_MSC_VER) +# if _MSC_VER >= 1400 +# pragma warning(disable:4244) +# pragma warning(disable:4267) +# pragma warning(disable:4996) +# endif +# define vsnprintf _vsnprintf #endif |
