1 /**************************************************************************
3 * Copyright 2007-2010 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 * USE OR OTHER DEALINGS IN THE SOFTWARE.
22 * The above copyright notice and this permission notice (including the
23 * next paragraph) shall be included in all copies or substantial portions
26 **************************************************************************/
31 * Portable subset of C99's stdint.h.
33 * At the moment it only supports MSVC, given all other mainstream compilers
34 * already support C99. If this is necessary for other compilers then it
35 * might be worth to replace this with
36 * http://www.azillionmonkeys.com/qed/pstdint.h.
53 #define INT16_MAX 32767
56 #define INT16_MIN -32768
59 #define UINT16_MAX 65535
62 #define INT32_MAX 2147483647
65 #define INT32_MIN -2147483648
68 #define UINT32_MAX 4294967295U
72 #define INT8_C(__val) __val
75 #define UINT8_C(__val) __val
78 #define INT16_C(__val) __val
81 #define UINT16_C(__val) __val
84 #define INT32_C(__val) __val
87 #define UINT32_C(__val) __val##U
93 typedef __int8 int8_t;
94 typedef unsigned __int8 uint8_t;
95 typedef __int16 int16_t;
96 typedef unsigned __int16 uint16_t;
97 #ifndef __eglplatform_h_
98 typedef __int32 int32_t;
100 typedef unsigned __int32 uint32_t;
101 typedef __int64 int64_t;
102 typedef unsigned __int64 uint64_t;
105 typedef __int64 intptr_t;
106 typedef unsigned __int64 uintptr_t;
108 typedef __int32 intptr_t;
109 typedef unsigned __int32 uintptr_t;
112 #define INT64_C(__val) __val##i64
113 #define UINT64_C(__val) __val##ui64
116 #error "Unsupported compiler"
119 #endif /* _STDINT_H_ */