From 0485d0e4befaf40133b0b75778a5a40500bcf1b5 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 17 Nov 2010 14:31:40 +0000 Subject: Workaround for bug in some versions of mingw-w64 --- ChangeLog | 4 ++++ win/winMain.c | 10 ++++++++-- 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 + + * win/winMain.c Workaround for bug in some versions of mingw-w64 + 2010-11-16 Jan Nijtmans * 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; -- cgit v0.12