diff --git a/dll/win32/kernel32/wine/profile.c b/dll/win32/kernel32/wine/profile.c index 0cd9970a135..f89da3f2988 100644 --- a/dll/win32/kernel32/wine/profile.c +++ b/dll/win32/kernel32/wine/profile.c @@ -103,7 +103,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &PROFILE_CritSect, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, 0 + 0, 0, { 0 } }; static RTL_CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 }; diff --git a/dll/win32/kernel32/winnls/string/lcformat.c b/dll/win32/kernel32/winnls/string/lcformat.c index 5761035109f..25a5e4e3259 100644 --- a/dll/win32/kernel32/winnls/string/lcformat.c +++ b/dll/win32/kernel32/winnls/string/lcformat.c @@ -126,11 +126,7 @@ static CRITICAL_SECTION_DEBUG NLS_FormatsCS_debug = 0, 0, &NLS_FormatsCS, { &NLS_FormatsCS_debug.ProcessLocksList, &NLS_FormatsCS_debug.ProcessLocksList }, -#ifdef __REACTOS__ - 0, 0, 0 -#else 0, 0, { (DWORD_PTR)(__FILE__ ": NLS_Formats") } -#endif }; static CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 }; diff --git a/sdk/include/ndk/rtltypes.h b/sdk/include/ndk/rtltypes.h index 32bfb4fa486..94e19fc96e5 100644 --- a/sdk/include/ndk/rtltypes.h +++ b/sdk/include/ndk/rtltypes.h @@ -1423,9 +1423,25 @@ typedef struct _RTL_CRITICAL_SECTION_DEBUG LIST_ENTRY ProcessLocksList; ULONG EntryCount; ULONG ContentionCount; - ULONG Spare[2]; + union + { + ULONG_PTR WineDebugString; + ULONG_PTR Spare[1]; + struct + { + ULONG Flags; + USHORT CreatorBackTraceIndexHigh; + USHORT SpareWORD; + }; + }; } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG; +#ifdef _WIN64 +C_ASSERT(sizeof(RTL_CRITICAL_SECTION_DEBUG) == 0x30); +#else +C_ASSERT(sizeof(RTL_CRITICAL_SECTION_DEBUG) == 0x20); +#endif + typedef struct _RTL_CRITICAL_SECTION { PRTL_CRITICAL_SECTION_DEBUG DebugInfo; diff --git a/sdk/include/psdk/winbase.h b/sdk/include/psdk/winbase.h index 4ff919b83f1..42f98494d7d 100644 --- a/sdk/include/psdk/winbase.h +++ b/sdk/include/psdk/winbase.h @@ -908,11 +908,17 @@ typedef struct _CRITICAL_SECTION_DEBUG { LIST_ENTRY ProcessLocksList; DWORD EntryCount; DWORD ContentionCount; -//#ifdef __WINESRC__ //not all wine code is marked so - DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */ -//#else - //WORD SpareWORD; -//#endif + union + { + DWORD_PTR WineDebugString; + DWORD_PTR Spare[1]; + struct + { + DWORD Flags; + WORD CreatorBackTraceIndexHigh; + WORD SpareWORD; + }; + }; } CRITICAL_SECTION_DEBUG,*PCRITICAL_SECTION_DEBUG,*LPCRITICAL_SECTION_DEBUG; typedef struct _CRITICAL_SECTION { diff --git a/sdk/include/xdk/winnt_old.h b/sdk/include/xdk/winnt_old.h index 4f1f6a1fb81..4bb20fd72d8 100644 --- a/sdk/include/xdk/winnt_old.h +++ b/sdk/include/xdk/winnt_old.h @@ -2791,9 +2791,17 @@ typedef struct _RTL_CRITICAL_SECTION_DEBUG { LIST_ENTRY ProcessLocksList; DWORD EntryCount; DWORD ContentionCount; - DWORD Flags; - WORD CreatorBackTraceIndexHigh; - WORD SpareWORD; + union + { + DWORD_PTR WineDebugString; + DWORD_PTR Spare[1]; + struct + { + DWORD Flags; + WORD CreatorBackTraceIndexHigh; + WORD SpareWORD; + }; + }; } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG; #include "pshpack8.h"