[PATCH] msvcp: Fix the _Thrd_equal spec entry.
This fixes +relay logs in World of Warplanes. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> --- dlls/msvcp110/msvcp110.spec | 2 +- dlls/msvcp120/msvcp120.spec | 2 +- dlls/msvcp120_app/msvcp120_app.spec | 2 +- dlls/msvcp140/msvcp140.spec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 7cf350e0c0..c30b6b5412 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -3859,7 +3859,7 @@ @ cdecl _Thrd_create(ptr ptr ptr) @ cdecl _Thrd_current() @ cdecl _Thrd_detach(ptr) -@ cdecl _Thrd_equal(ptr ptr) +@ cdecl _Thrd_equal(ptr long ptr long) @ stub _Thrd_exit @ cdecl _Thrd_join(ptr long) @ cdecl _Thrd_lt(ptr ptr) diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index 5285adafb8..0f9d830795 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -3806,7 +3806,7 @@ @ cdecl _Thrd_create(ptr ptr ptr) @ cdecl _Thrd_current() @ cdecl _Thrd_detach(ptr) -@ cdecl _Thrd_equal(ptr ptr) +@ cdecl _Thrd_equal(ptr long ptr long) @ stub _Thrd_exit @ cdecl _Thrd_join(ptr long) @ cdecl _Thrd_lt(ptr ptr) diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index f33a2ec78e..3e269dd109 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -3806,7 +3806,7 @@ @ cdecl _Thrd_create(ptr ptr ptr) msvcp120._Thrd_create @ cdecl _Thrd_current() msvcp120._Thrd_current @ cdecl _Thrd_detach(ptr) msvcp120._Thrd_detach -@ cdecl _Thrd_equal(ptr ptr) msvcp120._Thrd_equal +@ cdecl _Thrd_equal(ptr long ptr long) msvcp120._Thrd_equal @ stub _Thrd_exit @ cdecl _Thrd_join(ptr long) msvcp120._Thrd_join @ cdecl _Thrd_lt(ptr ptr) msvcp120._Thrd_lt diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec index 1f61afb550..c05e9fd665 100644 --- a/dlls/msvcp140/msvcp140.spec +++ b/dlls/msvcp140/msvcp140.spec @@ -3723,7 +3723,7 @@ @ cdecl _Thrd_create(ptr ptr ptr) _Thrd_create @ cdecl _Thrd_current() _Thrd_current @ cdecl _Thrd_detach(ptr) _Thrd_detach -@ cdecl _Thrd_equal(ptr ptr) _Thrd_equal +@ cdecl _Thrd_equal(ptr long ptr long) _Thrd_equal @ stub _Thrd_exit @ cdecl _Thrd_hardware_concurrency() _Thrd_hardware_concurrency @ cdecl _Thrd_id() _Thrd_id -- 2.13.6
On 11/28/17 13:43, Stefan Dösinger wrote:
-@ cdecl _Thrd_equal(ptr ptr) +@ cdecl _Thrd_equal(ptr long ptr long) The spec entries should be different in arm, i386 and x86_64 case (current entry is correct for win64 case).
Could you please also fix _Thrd_detach, _Thrd_join, _Thrd_lt entries? Thanks, Piotr
Am 2017-11-28 um 13:53 schrieb Piotr Caban:
On 11/28/17 13:43, Stefan Dösinger wrote:
-@ cdecl _Thrd_equal(ptr ptr) +@ cdecl _Thrd_equal(ptr long ptr long) The spec entries should be different in arm, i386 and x86_64 case (current entry is correct for win64 case). Admittedly I haven't tested the non-i386 case, and I guess you are right, but I don't see what kind of magic makes the spec entry works on x86_64.
In _Thrd_current we have C_ASSERT(sizeof(_Thrd_t) <= sizeof(ULONGLONG)), but last time I checked a HANDLE was 64 bit long and the DWORD 32, so what am I missing here? And even less sure about plain old ARM which is 32 bit...
Could you please also fix _Thrd_detach, _Thrd_join, _Thrd_lt entries? Will do.
On 11/28/17 14:04, Stefan Dösinger wrote:
Am 2017-11-28 um 13:53 schrieb Piotr Caban:
On 11/28/17 13:43, Stefan Dösinger wrote:
-@ cdecl _Thrd_equal(ptr ptr) +@ cdecl _Thrd_equal(ptr long ptr long) The spec entries should be different in arm, i386 and x86_64 case (current entry is correct for win64 case). Admittedly I haven't tested the non-i386 case, and I guess you are right, but I don't see what kind of magic makes the spec entry works on x86_64. It's caused by ABI differences. The parameters are passed differently in i386 and x86_64 case (the structures are passed as pointer in x86_64 case).
In _Thrd_current we have C_ASSERT(sizeof(_Thrd_t) <= sizeof(ULONGLONG)), but last time I checked a HANDLE was 64 bit long and the DWORD 32, so what am I missing here? Because of a bug in mingw32-w64 there are 2 implementations of _Thrd_current. This C_ASSERT is inside of ifdef __i386__.
Piotr Caban <piotr.caban(a)gmail.com> writes:
On 11/28/17 14:04, Stefan Dösinger wrote:
Am 2017-11-28 um 13:53 schrieb Piotr Caban:
On 11/28/17 13:43, Stefan Dösinger wrote:
-@ cdecl _Thrd_equal(ptr ptr) +@ cdecl _Thrd_equal(ptr long ptr long) The spec entries should be different in arm, i386 and x86_64 case (current entry is correct for win64 case). Admittedly I haven't tested the non-i386 case, and I guess you are right, but I don't see what kind of magic makes the spec entry works on x86_64. It's caused by ABI differences. The parameters are passed differently in i386 and x86_64 case (the structures are passed as pointer in x86_64 case).
You could probably use int64, that should do the right thing for all platforms. -- Alexandre Julliard julliard(a)winehq.org
participants (3)
-
Alexandre Julliard -
Piotr Caban -
Stefan Dösinger