# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1333955705 0 # Node ID a7a24a3b889941279d557c48db6ec4ce8d20842a # Parent 202b1affc70685a3d323588e7dc2db874ea640cf Fixes for the latest MinGW (gcc 4.6.2). Only ANSI mode is currently supported. Was unable to get Unicode mode to work... added missing ANSI _tstol define.... Lots of other unicode related #defines also seem to be missing... MIM_MENUDATA is now defined in the latest headers so remove old fix for it. diff -r 202b1affc706 -r a7a24a3b8899 win/dw.c --- a/win/dw.c Sat Apr 07 20:51:40 2012 +0000 +++ b/win/dw.c Mon Apr 09 07:15:05 2012 +0000 @@ -220,8 +220,8 @@ * so #define them here... */ -#if !defined( MIM_MENUDATA ) -# define MIM_MENUDATA 0x00000008 +#if !defined( _tstol ) +# define _tstol atol #endif #if !defined(PBS_MARQUEE) # define PBS_MARQUEE 0x08 @@ -1768,7 +1768,6 @@ LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2) { int result = -1, taskbar = FALSE; - static int command_active = 0; SignalHandler *tmp = Root; void (*windowfunc)(PVOID); ULONG origmsg = msg; @@ -1790,9 +1789,6 @@ if (result == -1) { - /* Avoid infinite recursion */ - command_active = 1; - /* Find any callbacks for this function */ while (tmp) { @@ -2031,7 +2027,7 @@ if(tmp->window == tem->hdr.hwndFrom) { int (*containercontextfunc)(HWND, char *, int, int, void *, void *) = tmp->signalfunction; - HTREEITEM hti, last; + HTREEITEM hti; TVITEM tvi; TVHITTESTINFO thi; void **ptrs = NULL; @@ -2044,7 +2040,6 @@ MapWindowPoints(HWND_DESKTOP, tmp->window, &thi.pt, 1); - last = TreeView_GetSelection(tmp->window); hti = TreeView_HitTest(tmp->window, &thi); if(hti) @@ -2220,7 +2215,6 @@ if(tmp) tmp = tmp->next; } - command_active = 0; } /* Now that any handlers are done... do normal processing */