diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinButton.c | 8 | ||||
-rw-r--r-- | win/tkWinDialog.c | 8 | ||||
-rw-r--r-- | win/tkWinInt.h | 9 | ||||
-rw-r--r-- | win/tkWinMenu.c | 8 | ||||
-rw-r--r-- | win/tkWinScrlbr.c | 8 | ||||
-rw-r--r-- | win/tkWinSend.c | 9 | ||||
-rw-r--r-- | win/tkWinTest.c | 8 | ||||
-rw-r--r-- | win/tkWinWindow.c | 8 | ||||
-rw-r--r-- | win/tkWinWm.c | 8 | ||||
-rw-r--r-- | win/tkWinX.c | 8 |
10 files changed, 10 insertions, 72 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c index ebf0ec6..98ed69e 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -14,14 +14,6 @@ #include "tkWinInt.h" #include "tkButton.h" -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - /* * These macros define the base style flags for the different button types. */ diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 4ac8c12..ef3a5fb 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -25,14 +25,6 @@ # pragma comment (lib, "uuid.lib") #endif -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - /* These needed for compilation with VC++ 5.2 */ /* XXX - remove these since need at least VC 6 */ #ifndef BIF_EDITBOX 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 */ diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 4728e3e..7634147 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -15,14 +15,6 @@ #include "tkWinInt.h" #include "tkMenu.h" -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - /* * The class of the window for popup menus. */ diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c index 76c8419..4e1c733 100644 --- a/win/tkWinScrlbr.c +++ b/win/tkWinScrlbr.c @@ -13,14 +13,6 @@ #include "tkWinInt.h" #include "tkScrollbar.h" -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - /* * The following constant is used to specify the maximum scroll position. This * value is limited by the Win32 API to either 16-bits or 32-bits, depending diff --git a/win/tkWinSend.c b/win/tkWinSend.c index 7da614c..7d63cec 100644 --- a/win/tkWinSend.c +++ b/win/tkWinSend.c @@ -13,14 +13,7 @@ #include "tkInt.h" #include "tkWinSendCom.h" - -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif +#include "tkWinInt.h" /* * Should be defined in WTypes.h but mingw 1.0 is missing them. diff --git a/win/tkWinTest.c b/win/tkWinTest.c index d1bb00c..d4639d6 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -18,14 +18,6 @@ #define USE_TK_STUBS #include "tkWinInt.h" -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - HWND tkWinCurrentDialog; /* diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index 872ac40..01e43a6 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -13,14 +13,6 @@ #include "tkWinInt.h" #include "tkBusy.h" -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - typedef struct { int initialized; /* 0 means table below needs initializing. */ Tcl_HashTable windowTable; /* The windowTable maps from HWND to Tk_Window diff --git a/win/tkWinWm.c b/win/tkWinWm.c index c5b7e71..34ae154 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -16,14 +16,6 @@ #include "tkWinInt.h" #include <shellapi.h> -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - /* * These next two defines are only valid on Win2K/XP+. */ diff --git a/win/tkWinX.c b/win/tkWinX.c index 482a660..e7720ae 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -14,14 +14,6 @@ #define XLIB_ILLEGAL_ACCESS #include "tkWinInt.h" -#ifdef _MSC_VER -/* - * Earlier versions of MSVC don't know snprintf, but _snprintf is compatible. - * Note that sprintf is deprecated. - */ -# define snprintf _snprintf -#endif - /* * The w32api 1.1 package (included in Mingw 1.1) does not define _WIN32_IE by * default. Define it here to gain access to the InitCommonControlsEx API in |