On Thu, Jan 19, 2017 at 06:09:35PM +0300, Alexander Monakov wrote: > > -#ifdef __LP64__ > > +#if defined(__LP64__) || defined(_WIN64) > > > > (is that the right define for 64-bit MingW, right?). > > Yes, _WIN64; libsanitizer has a similar test. Alternatively, I guess, > > #if __SIZEOF_POINTER__ == 8 > > > Otherwise, I think using uintptr_t is a problem, because we'd need to > > #include <stdint.h> (the header only includes <stdlib.h>). > > Note that plugin-nvptx.c already includes <stdint.h>. But, anyway, I agree > that > there's value in defining the exact type via the #if.
I've committed then. 2017-01-19 Jakub Jelinek <ja...@redhat.com> * plugin/cuda/cuda.h (CUdeviceptr): Typedef to unsigned long long even for _WIN64. --- libgomp/plugin/cuda/cuda.h (revision 244570) +++ libgomp/plugin/cuda/cuda.h (working copy) @@ -35,7 +35,7 @@ libcuda.so.1 are not available. */ typedef void *CUcontext; typedef int CUdevice; -#ifdef __LP64__ +#if defined(__LP64__) || defined(_WIN64) typedef unsigned long long CUdeviceptr; #else typedef unsigned CUdeviceptr; Jakub