summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-11-11 16:32:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-11-11 16:32:42 (GMT)
commite85c33074d52d9b69f1c521915615e8660f07d33 (patch)
treea77a55e72c4eb38b53133f32f5b359a93688fda4
parent41cd7b2754b0d81fb8fc35f0a3abaace7249471c (diff)
downloadtcl-e85c33074d52d9b69f1c521915615e8660f07d33.zip
tcl-e85c33074d52d9b69f1c521915615e8660f07d33.tar.gz
tcl-e85c33074d52d9b69f1c521915615e8660f07d33.tar.bz2
On win32, include <inttypes.h> if available, just as on UNIX.
Disable compiler warning C4244 on all Microsoft compiler versions, not just the latest ones.
-rw-r--r--win/tclWinPort.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index c30d346..e9ae9dc 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -14,6 +14,7 @@
#ifndef _TCLWINPORT
#define _TCLWINPORT
+
#if !defined(_WIN64) && !defined(__MINGW_USE_VC2005_COMPAT)
/* See [Bug 3354324]: file mtime sets wrong time */
# define __MINGW_USE_VC2005_COMPAT
@@ -62,6 +63,9 @@ typedef DWORD_PTR * PDWORD_PTR;
#include <process.h>
#include <signal.h>
#include <string.h>
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
#include <limits.h>
#ifndef __GNUC__
@@ -379,12 +383,14 @@ 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 defined(_MSC_VER) && (_MSC_VER >= 1400)
+#if defined(_MSC_VER)
# pragma warning(disable:4244)
-# pragma warning(disable:4267)
-# pragma warning(disable:4311)
-# pragma warning(disable:4312)
-# pragma warning(disable:4996)
+# if _MSC_VER >= 1400
+# pragma warning(disable:4267)
+# pragma warning(disable:4311)
+# pragma warning(disable:4312)
+# pragma warning(disable:4996)
+# endif
#endif