summaryrefslogtreecommitdiffstats
path: root/win/tkWinInt.h
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinInt.h')
-rw-r--r--win/tkWinInt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/win/tkWinInt.h b/win/tkWinInt.h
index ccc57db..5801076 100644
--- a/win/tkWinInt.h
+++ b/win/tkWinInt.h
@@ -242,4 +242,13 @@ MODULE_SCOPE Tcl_Obj * TkWin32ErrorObj(HRESULT hrError);
#define GWLP_ID GWL_ID
#endif /* !GWLP_WNDPROC */
+/*
+ * MSVC versions before 2015 don't know snprintf, but _snprintf is compatible.
+ * Note that sprintf is deprecated.
+ */
+
+#ifdef _MSC_VER
+# define snprintf _snprintf
+#endif
+
#endif /* _TKWININT */