summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-01-15 09:47:29 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-01-15 09:47:29 (GMT)
commit958e264af4de5a4217a417a03a5afad507132caf (patch)
tree317fdd2bc90869de65e4cc503a57988932ed312d /win
parentcdc8d2fa8d71e9a6f9e452006cc7b10acc9ab930 (diff)
downloadtk-958e264af4de5a4217a417a03a5afad507132caf.zip
tk-958e264af4de5a4217a417a03a5afad507132caf.tar.gz
tk-958e264af4de5a4217a417a03a5afad507132caf.tar.bz2
Really use snprintf (and not _snprintf) when MSVC is at least 2015.
Diffstat (limited to 'win')
-rw-r--r--win/tkWinInt.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/win/tkWinInt.h b/win/tkWinInt.h
index 5801076..98c1a35 100644
--- a/win/tkWinInt.h
+++ b/win/tkWinInt.h
@@ -246,9 +246,8 @@ MODULE_SCOPE Tcl_Obj * TkWin32ErrorObj(HRESULT hrError);
* MSVC versions before 2015 don't know snprintf, but _snprintf is compatible.
* Note that sprintf is deprecated.
*/
-
-#ifdef _MSC_VER
-# define snprintf _snprintf
+#if defined(_MSC_VER) && _MSC_VER < 1900
+# define snprintf _snprintf
#endif
#endif /* _TKWININT */