summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-11-17 14:31:40 (GMT)
committernijtmans <nijtmans>2010-11-17 14:31:40 (GMT)
commit0485d0e4befaf40133b0b75778a5a40500bcf1b5 (patch)
tree386e13e982157b4a0de2f1793f76e2e2c59b9b9d
parent87808d4f02e46dccd7c59cddd4d48eaf7a4af3d6 (diff)
downloadtk-0485d0e4befaf40133b0b75778a5a40500bcf1b5.zip
tk-0485d0e4befaf40133b0b75778a5a40500bcf1b5.tar.gz
tk-0485d0e4befaf40133b0b75778a5a40500bcf1b5.tar.bz2
Workaround for bug in some versions of mingw-w64
-rw-r--r--ChangeLog4
-rw-r--r--win/winMain.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e8d0b70..e2f7484 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-17 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/winMain.c Workaround for bug in some versions of mingw-w64
+
2010-11-16 Jan Nijtmans <nijtmans@users.sf.net>
* win/winMain.c Bring compilation under mingw-w64 a bit closer
diff --git a/win/winMain.c b/win/winMain.c
index 4f1b6a6..67ca692 100644
--- a/win/winMain.c
+++ b/win/winMain.c
@@ -11,13 +11,19 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: winMain.c,v 1.36 2010/11/17 10:37:45 nijtmans Exp $
+ * RCS: @(#) $Id: winMain.c,v 1.37 2010/11/17 14:31:40 nijtmans Exp $
*/
#ifdef TCL_BROKEN_MAINARGS
/* On mingw32 and cygwin this doesn't work */
# undef UNICODE
# undef _UNICODE
+#elif defined(UNICODE)
+/* workaround for bug in some versions of mingw32-w64 */
+# undef _tWinMain
+# define _tWinMain wWinMain
+# undef __targv
+# define __targv __wargv
#endif
#include "tk.h"
@@ -85,7 +91,7 @@ int APIENTRY
_tWinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
- LPWSTR lpszCmdLine,
+ LPTSTR lpszCmdLine,
int nCmdShow)
{
TCHAR **argv;