[PATCH] msvcp: Fix the _Thrd_equal spec entry.

Piotr Caban piotr.caban at gmail.com
Tue Nov 28 07:22:03 CST 2017


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__.



More information about the wine-devel mailing list