Bugzilla – Bug 525
khrplatform.h incorrectly assumes sizeof(long int) == sizeof(intptr_t)
Last modified: 2013-04-23 04:17:44 PDT
krhplatform.h currently contains: /* * Types that are (so far) the same on all platforms */ typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; typedef signed long int khronos_intptr_t; typedef unsigned long int khronos_uintptr_t; typedef signed long int khronos_ssize_t; typedef unsigned long int khronos_usize_t; However, 64bit Windows uses an LLP64 model¹, where longs are 32bits and pointers are 64bits. Thus the definitions khronos_{u,}intptr_t and khronos_{s,u}size_t need to be specialised. For the C99 case this could just be to typedef the existing {u,}intptr_t, and for POSIX at least to typedef ssize_t to khronos_ssize_t and size_t to khronos_usize_t. 1: http://technet.microsoft.com/en-us/library/bb496995.aspx
Any update on this?
Created attachment 131 [details] Patch