2#ifndef __khrplatform_h_
3#define __khrplatform_h_
94#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
95# define KHRONOS_STATIC 1
103#if defined(KHRONOS_STATIC)
106# define KHRONOS_APICALL
107#elif defined(___WIN32__)
108# define KHRONOS_APICALL __declspec(dllimport)
109#elif defined (__SYMBIAN32__)
110# define KHRONOS_APICALL IMPORT_C
111#elif defined(__ANDROID__)
112# define KHRONOS_APICALL __attribute__((visibility("default")))
114# define KHRONOS_APICALL
123#if defined(___WIN32__) && !defined(___WIN32___WCE) && !defined(__SCITECH_SNAP__)
125# define KHRONOS_APIENTRY __stdcall
127# define KHRONOS_APIENTRY
135#if defined (__ARMCC_2__)
136#define KHRONOS_APIATTRIBUTES __softfp
138#define KHRONOS_APIATTRIBUTES
144#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
151typedef int32_t khronos_int32_t;
152typedef uint32_t khronos_uint32_t;
153typedef int64_t khronos_int64_t;
154typedef uint64_t khronos_uint64_t;
155#define KHRONOS_SUPPORT_INT64 1
156#define KHRONOS_SUPPORT_FLOAT 1
166#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
167#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
168#define KHRONOS_USE_INTPTR_T
172#elif defined(__VMS ) || defined(__sgi)
178typedef int32_t khronos_int32_t;
179typedef uint32_t khronos_uint32_t;
180typedef int64_t khronos_int64_t;
181typedef uint64_t khronos_uint64_t;
182#define KHRONOS_SUPPORT_INT64 1
183#define KHRONOS_SUPPORT_FLOAT 1
185#elif defined(___WIN32__) && !defined(__SCITECH_SNAP__)
190typedef __int32 khronos_int32_t;
191typedef unsigned __int32 khronos_uint32_t;
192typedef __int64 khronos_int64_t;
193typedef unsigned __int64 khronos_uint64_t;
194#define KHRONOS_SUPPORT_INT64 1
195#define KHRONOS_SUPPORT_FLOAT 1
197#elif defined(__sun__) || defined(__digital__)
202typedef int khronos_int32_t;
203typedef unsigned int khronos_uint32_t;
204#if defined(__arch64__) || defined(_LP64)
205typedef long int khronos_int64_t;
206typedef unsigned long int khronos_uint64_t;
208typedef long long int khronos_int64_t;
209typedef unsigned long long int khronos_uint64_t;
211#define KHRONOS_SUPPORT_INT64 1
212#define KHRONOS_SUPPORT_FLOAT 1
219typedef int khronos_int32_t;
220typedef unsigned int khronos_uint32_t;
221#define KHRONOS_SUPPORT_INT64 0
222#define KHRONOS_SUPPORT_FLOAT 0
230typedef int32_t khronos_int32_t;
231typedef uint32_t khronos_uint32_t;
232typedef int64_t khronos_int64_t;
233typedef uint64_t khronos_uint64_t;
234#define KHRONOS_SUPPORT_INT64 1
235#define KHRONOS_SUPPORT_FLOAT 1
243typedef signed char khronos_int8_t;
244typedef unsigned char khronos_uint8_t;
245typedef signed short int khronos_int16_t;
246typedef unsigned short int khronos_uint16_t;
253#ifdef KHRONOS_USE_INTPTR_T
254typedef intptr_t khronos_intptr_t;
255typedef uintptr_t khronos_uintptr_t;
257typedef signed long long int khronos_intptr_t;
258typedef unsigned long long int khronos_uintptr_t;
260typedef signed long int khronos_intptr_t;
261typedef unsigned long int khronos_uintptr_t;
265typedef signed long long int khronos_ssize_t;
266typedef unsigned long long int khronos_usize_t;
268typedef signed long int khronos_ssize_t;
269typedef unsigned long int khronos_usize_t;
272#if KHRONOS_SUPPORT_FLOAT
276typedef float khronos_float_t;
279#if KHRONOS_SUPPORT_INT64
289typedef khronos_uint64_t khronos_utime_nanoseconds_t;
290typedef khronos_int64_t khronos_stime_nanoseconds_t;
296#ifndef KHRONOS_MAX_ENUM
297#define KHRONOS_MAX_ENUM 0x7FFFFFFF
309 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
310} khronos_boolean_enum_t;