1#ifndef __khrplatform_h_
2#define __khrplatform_h_
93#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
94# define KHRONOS_STATIC 1
102#if defined(KHRONOS_STATIC)
105# define KHRONOS_APICALL
107# define KHRONOS_APICALL __declspec(dllimport)
108#elif defined (__SYMBIAN32__)
109# define KHRONOS_APICALL IMPORT_C
110#elif defined(__ANDROID__)
111# define KHRONOS_APICALL __attribute__((visibility("default")))
113# define KHRONOS_APICALL
122#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
124# define KHRONOS_APIENTRY __stdcall
126# define KHRONOS_APIENTRY
134#if defined (__ARMCC_2__)
135#define KHRONOS_APIATTRIBUTES __softfp
137#define KHRONOS_APIATTRIBUTES
143#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
150typedef int32_t khronos_int32_t;
151typedef uint32_t khronos_uint32_t;
152typedef int64_t khronos_int64_t;
153typedef uint64_t khronos_uint64_t;
154#define KHRONOS_SUPPORT_INT64 1
155#define KHRONOS_SUPPORT_FLOAT 1
165#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
166#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
167#define KHRONOS_USE_INTPTR_T
171#elif defined(__VMS ) || defined(__sgi)
177typedef int32_t khronos_int32_t;
178typedef uint32_t khronos_uint32_t;
179typedef int64_t khronos_int64_t;
180typedef uint64_t khronos_uint64_t;
181#define KHRONOS_SUPPORT_INT64 1
182#define KHRONOS_SUPPORT_FLOAT 1
184#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
189typedef __int32 khronos_int32_t;
190typedef unsigned __int32 khronos_uint32_t;
191typedef __int64 khronos_int64_t;
192typedef unsigned __int64 khronos_uint64_t;
193#define KHRONOS_SUPPORT_INT64 1
194#define KHRONOS_SUPPORT_FLOAT 1
196#elif defined(__sun__) || defined(__digital__)
201typedef int khronos_int32_t;
202typedef unsigned int khronos_uint32_t;
203#if defined(__arch64__) || defined(_LP64)
204typedef long int khronos_int64_t;
205typedef unsigned long int khronos_uint64_t;
207typedef long long int khronos_int64_t;
208typedef unsigned long long int khronos_uint64_t;
210#define KHRONOS_SUPPORT_INT64 1
211#define KHRONOS_SUPPORT_FLOAT 1
218typedef int khronos_int32_t;
219typedef unsigned int khronos_uint32_t;
220#define KHRONOS_SUPPORT_INT64 0
221#define KHRONOS_SUPPORT_FLOAT 0
229typedef int32_t khronos_int32_t;
230typedef uint32_t khronos_uint32_t;
231typedef int64_t khronos_int64_t;
232typedef uint64_t khronos_uint64_t;
233#define KHRONOS_SUPPORT_INT64 1
234#define KHRONOS_SUPPORT_FLOAT 1
242typedef signed char khronos_int8_t;
243typedef unsigned char khronos_uint8_t;
244typedef signed short int khronos_int16_t;
245typedef unsigned short int khronos_uint16_t;
252#ifdef KHRONOS_USE_INTPTR_T
253typedef intptr_t khronos_intptr_t;
254typedef uintptr_t khronos_uintptr_t;
256typedef signed long long int khronos_intptr_t;
257typedef unsigned long long int khronos_uintptr_t;
259typedef signed long int khronos_intptr_t;
260typedef unsigned long int khronos_uintptr_t;
264typedef signed long long int khronos_ssize_t;
265typedef unsigned long long int khronos_usize_t;
267typedef signed long int khronos_ssize_t;
268typedef unsigned long int khronos_usize_t;
271#if KHRONOS_SUPPORT_FLOAT
275typedef float khronos_float_t;
278#if KHRONOS_SUPPORT_INT64
288typedef khronos_uint64_t khronos_utime_nanoseconds_t;
289typedef khronos_int64_t khronos_stime_nanoseconds_t;
295#ifndef KHRONOS_MAX_ENUM
296#define KHRONOS_MAX_ENUM 0x7FFFFFFF
308 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
309} khronos_boolean_enum_t;