w32: Use cast by uintptr_t for thread ID.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 8 Nov 2018 04:26:41 +0000 (13:26 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 8 Nov 2018 04:26:41 +0000 (13:26 +0900)
commit377c1b91e67af25613ccb72ee26449661cea8d8e
treee591be87e92321f87c6a5de23890ee7e0fabea5c
parentf8ceac80d9709f40358190d919b3215036a68ba1
w32: Use cast by uintptr_t for thread ID.

* w32/npth.c (npth_init): Cast with uintptr_t.
(npth_setname_np, npth_create, npth_self): Likewise.

--

In w32/npth.h, npth_t is unsigned long int type, which is 32-bit
for both of 32-bit machine and 64-bit machine.

We use TlsSetValue, TlsGetValue and CreateThread API to handle
thread ID, which uses void * type, which is 64-bit on 64-bit
machine.

Because the size is different on 64-bit machine, here, we use explicit
cast to integer type which has enough size to have pointer.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
w32/npth.c