summaryrefslogtreecommitdiffstats
path: root/make/stub_includes/khr/KHR
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-06 06:29:09 +0100
committerSven Gothel <[email protected]>2010-11-06 06:29:09 +0100
commit3e7eed35ba0e63f93fbe45d7bb14abb0c1ff956f (patch)
tree295627ff9783e9cde49a708f934f8a1fc2b17d07 /make/stub_includes/khr/KHR
parentd1a03d19398960d6e34232f29a30f1d569fba2a7 (diff)
Fix khronos typedefs
- KD: use sys include - KD: use KHR/khrplatform.h - KHR/khrplatform.h: Use stddef.h ptrdiff_t and size_t if possible (fix)
Diffstat (limited to 'make/stub_includes/khr/KHR')
-rw-r--r--make/stub_includes/khr/KHR/khrplatform.h30
1 files changed, 26 insertions, 4 deletions
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
/*