[PATCH v2 0/2] MR5544: Fixes for Wine tests compilation with Visual Studio 10.0
-- v2: include/winnt.h: Move InterlockedExchangeAdd64() definition before its first usage. include/sal.h: Add _Inout_cap_c_(count) macro. https://gitlab.winehq.org/wine/wine/-/merge_requests/5544
From: Dmitry Timoshkov <dmitry(a)baikal.ru> This fixes Wine tests compilation with Visual Studio 10.0 CRT headers. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- include/sal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sal.h b/include/sal.h index 72803a1be39..d49f6308327 100644 --- a/include/sal.h +++ b/include/sal.h @@ -89,6 +89,7 @@ #define _Inout_ #define _Inout_bytecap_x_(count) #define _Inout_cap_(count) +#define _Inout_cap_c_(count) #define _Inout_opt_ #define _Inout_opt_cap_c_(count) #define _Inout_opt_z_ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5544
From: Dmitry Timoshkov <dmitry(a)baikal.ru> This fixes Wine tests compilation with Visual Studio 10.0. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- include/winnt.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/winnt.h b/include/winnt.h index 1bf38616b87..b18d255a79c 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -6958,16 +6958,6 @@ static FORCEINLINE __int64 InterlockedAnd64( __int64 volatile *dest, __int64 val } #endif -#if !defined(__i386__) || __has_builtin(_InterlockedDecrement64) -#pragma intrinsic(_InterlockedDecrement64) -__int64 _InterlockedDecrement64(__int64 volatile *); -#else -static FORCEINLINE __int64 InterlockedDecrement64( __int64 volatile *dest ) -{ - return InterlockedExchangeAdd64( dest, -1 ) - 1; -} -#endif - #if !defined(__i386__) || __has_builtin(_InterlockedExchangeAdd64) #pragma intrinsic(_InterlockedExchangeAdd64) __int64 _InterlockedExchangeAdd64(__int64 volatile *, __int64); @@ -6980,6 +6970,16 @@ static FORCEINLINE __int64 InterlockedExchangeAdd64( __int64 volatile *dest, __i } #endif +#if !defined(__i386__) || __has_builtin(_InterlockedDecrement64) +#pragma intrinsic(_InterlockedDecrement64) +__int64 _InterlockedDecrement64(__int64 volatile *); +#else +static FORCEINLINE __int64 InterlockedDecrement64( __int64 volatile *dest ) +{ + return InterlockedExchangeAdd64( dest, -1 ) - 1; +} +#endif + #if !defined(__i386__) || __has_builtin(_InterlockedIncrement64) #pragma intrinsic(_InterlockedIncrement64) __int64 _InterlockedIncrement64(__int64 volatile *); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5544
On Sat Apr 27 09:24:35 2024 +0000, Dmitry Timoshkov wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/5544/diffs?diff_id=111550&start_sha=94d156f3f9613564f383de771d927dac3d14cad6#380b090c85ec3d245329091d41adf928416dac8f_6917_6922) Thanks for spotting this. Hopefully new version of the patch fixes real source of the problem.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5544#note_68995
participants (2)
-
Dmitry Timoshkov -
Dmitry Timoshkov (@dmitry)