diff options
Diffstat (limited to 'make/stub_includes')
-rw-r--r-- | make/stub_includes/khr/KD/kd.h | 2 | ||||
-rw-r--r-- | make/stub_includes/khr/KD/kdplatform.h | 25 | ||||
-rw-r--r-- | make/stub_includes/khr/KHR/khrplatform.h | 30 |
3 files changed, 38 insertions, 19 deletions
diff --git a/make/stub_includes/khr/KD/kd.h b/make/stub_includes/khr/KD/kd.h index e2353eeb6..a87589aba 100644 --- a/make/stub_includes/khr/KD/kd.h +++ b/make/stub_includes/khr/KD/kd.h @@ -6,7 +6,7 @@ extern "C" { #endif -#include "kdplatform.h" +#include <KD/kdplatform.h> diff --git a/make/stub_includes/khr/KD/kdplatform.h b/make/stub_includes/khr/KD/kdplatform.h index 0357b1e2e..ff932fbb5 100644 --- a/make/stub_includes/khr/KD/kdplatform.h +++ b/make/stub_includes/khr/KD/kdplatform.h @@ -2,23 +2,20 @@ #ifndef __kdplatform_h_ #define __kdplatform_h_ +#include <KHR/khrplatform.h> + #define KD_API #define KD_APIENTRY -typedef int KDint32; -typedef unsigned int KDuint32; -#if defined(_MSC_VER) -typedef signed __int64 KDint64; -typedef unsigned __int64 KDuint64; -#else -typedef long long KDint64; -typedef unsigned long long KDuint64; -#endif -typedef short KDint16; -typedef unsigned short KDuint16; -typedef unsigned long KDuintptr; -typedef unsigned long KDsize; -typedef long KDssize; +typedef khronos_int32_t KDint32; +typedef khronos_uint32_t KDuint32; +typedef khronos_int64_t KDint64; +typedef khronos_uint64_t KDuint64; +typedef khronos_int16_t KDint16; +typedef khronos_uint16_t KDuint16; +typedef khronos_uintptr_t KDuintptr; +typedef khronos_usize_t KDsize; +typedef khronos_ssize_t KDssize; #define KDINT_MIN (-0x7fffffff-1) #define KDINT_MAX 0x7fffffff #define KDUINT_MAX 0xffffffffU diff --git a/make/stub_includes/khr/KHR/khrplatform.h b/make/stub_includes/khr/KHR/khrplatform.h index 8ec0d199f..644201c69 100644 --- a/make/stub_includes/khr/KHR/khrplatform.h +++ b/make/stub_includes/khr/KHR/khrplatform.h @@ -136,8 +136,11 @@ /* + * Using <stddef.h> * Using <stdint.h> */ +#include <stddef.h> +#define HAS_STDDEF 1 #include <stdint.h> typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; @@ -149,8 +152,11 @@ typedef uint64_t khronos_uint64_t; #elif defined(__VMS ) || defined(__sgi) /* + * Using <stddef.h> * Using <inttypes.h> */ +#include <stddef.h> +#define HAS_STDDEF 1 #include <inttypes.h> typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; @@ -185,6 +191,10 @@ typedef unsigned long int khronos_uint64_t; typedef long long int khronos_int64_t; typedef unsigned long long int khronos_uint64_t; #endif /* __arch64__ */ +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; #define KHRONOS_SUPPORT_INT64 1 #define KHRONOS_SUPPORT_FLOAT 1 @@ -202,7 +212,12 @@ typedef unsigned int khronos_uint32_t; /* * Generic fallback + * + * Using <stddef.h> + * Using <stdint.h> */ +#include <stddef.h> +#define HAS_STDDEF 1 #include <stdint.h> typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; @@ -221,10 +236,17 @@ 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; +#ifndef HAS_STDDEF + 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; +#else + typedef ptrdiff_t khronos_intptr_t; + typedef size_t khronos_uintptr_t; + typedef ptrdiff_t khronos_ssize_t; + typedef size_t khronos_usize_t; +#endif #if KHRONOS_SUPPORT_FLOAT /* |