diff options
Diffstat (limited to 'src/gen_dispatch.py')
-rwxr-xr-x | src/gen_dispatch.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gen_dispatch.py b/src/gen_dispatch.py index faa55da..b686824 100755 --- a/src/gen_dispatch.py +++ b/src/gen_dispatch.py @@ -516,9 +516,17 @@ class Generator(object): self.outln('typedef uint32_t khronos_uint32_t;') self.outln('typedef uint64_t khronos_uint64_t;') self.outln('typedef float khronos_float_t;') - self.outln('typedef long khronos_intptr_t;') - self.outln('typedef long khronos_ssize_t;') - self.outln('typedef unsigned long khronos_usize_t;') + self.outln('#ifdef _WIN64') + self.outln('typedef signed long long int khronos_intptr_t;') + self.outln('typedef unsigned long long int khronos_uintptr_t;') + self.outln('typedef signed long long int khronos_ssize_t;') + self.outln('typedef unsigned long long int khronos_usize_t;') + self.outln('#else') + self.outln('typedef signed long int khronos_intptr_t;') + self.outln('typedef unsigned long int khronos_uintptr_t;') + self.outln('typedef signed long int khronos_ssize_t;') + self.outln('typedef unsigned long int khronos_usize_t;') + self.outln('#endif') self.outln('typedef uint64_t khronos_utime_nanoseconds_t;') self.outln('typedef int64_t khronos_stime_nanoseconds_t;') self.outln('#define KHRONOS_MAX_ENUM 0x7FFFFFFF') |