programs: Fix broken compilation on win64
Rob Shearman
robertshearman at gmail.com
Thu Nov 27 08:42:51 CST 2008
2008/11/27 Maarten Lankhorst <maarten at codeweavers.com>:
> ---
> Set the Spare[0] at runtime after a critical section is entered. :-)
>
> I'm not testing Spare[0] at all calls to EnterCriticalSection, but if this
> is a problem I will send a revised patch
IMHO, this is too fragile. My solution would be two macros: one for
declaring a variable storing the name for a critical section, and a
second for putting that name into the critical section structure. The
latter would be something like the following for 64-bit:
#define WINE_DEBUG_USE_CRIT_SECT_NAME(name) { (DWORD)(DWORD_PTR)name,
(DWORD)((DWORD_PTR)name >> 32) }
It might even be better to let the macro fill in / declare the entire
CRITICAL_SECTION_DEBUG stucture.
--
Rob Shearman
More information about the wine-devel
mailing list