Diffusion nPth 377c1b91e67a

w32: Use cast by uintptr_t for thread ID.

Authored by gniibe on Nov 8 2018, 5:26 AM.

Description

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>

Details

Committed
gniibeNov 8 2018, 5:26 AM
Parents
rPTHf8ceac80d970: npth.m4: Emit message when using gpgrt-config.
Branches
Unknown
Tags
Unknown