summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tcl.h2
-rw-r--r--win/tclWinInt.h4
-rw-r--r--win/tclWinPort.h4
3 files changed, 9 insertions, 1 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 914f62b..a756a33 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -384,7 +384,7 @@ typedef long LONG;
*/
#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
-# if defined(_WIN32)
+# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO)
# define TCL_WIDE_INT_TYPE __int64
# ifdef __BORLANDC__
# define TCL_LL_MODIFIER "L"
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 5f532bc..a44abd9 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -54,7 +54,11 @@ MODULE_SCOPE TclWinProcs tclWinProcs;
#endif
#ifdef _WIN64
+#if defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
+# define TCL_I_MODIFIER "ll"
+#else
# define TCL_I_MODIFIER "I"
+#endif
#else
# define TCL_I_MODIFIER ""
#endif
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 8641e5e..6bfbf0c 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -18,6 +18,10 @@
/* See [Bug 3354324]: file mtime sets wrong time */
# define __MINGW_USE_VC2005_COMPAT
#endif
+#if !defined(__USE_MINGW_ANSI_STDIO)
+/* See [Bug c975939973]: Usage of gnu_printf in latest mingw-w64 */
+# define __USE_MINGW_ANSI_STDIO 0
+#endif
/*
* We must specify the lower version we intend to support.