OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_C_PP_STDINT_H_ | 5 #ifndef PPAPI_C_PP_STDINT_H_ |
6 #define PPAPI_C_PP_STDINT_H_ | 6 #define PPAPI_C_PP_STDINT_H_ |
7 | 7 |
8 /** | 8 /** |
9 * @file | 9 * @file |
10 * Provides a definition of C99 sized types | 10 * Provides a definition of C99 sized types |
11 * across different compilers. | 11 * across different compilers. |
12 * | 12 * |
13 * @addtogroup PP | 13 * @addtogroup PP |
14 * @{ | 14 * @{ |
15 */ | 15 */ |
16 #if defined(_MSC_VER) | 16 #if defined(_MSC_VER) |
17 | 17 |
18 typedef unsigned char uint8_t; | 18 typedef unsigned char uint8_t; |
19 typedef signed char int8_t; | 19 typedef signed char int8_t; |
20 typedef unsigned short uint16_t; | 20 typedef unsigned short uint16_t; |
21 typedef short int16_t; | 21 typedef short int16_t; |
22 typedef unsigned int uint32_t; | 22 typedef unsigned int uint32_t; |
23 typedef int int32_t; | 23 typedef int int32_t; |
24 typedef __int64 int64_t; | 24 typedef __int64 int64_t; |
25 typedef unsigned __int64 uint64_t; | 25 typedef unsigned __int64 uint64_t; |
26 | 26 |
27 #else | 27 #else |
28 #include <stdint.h> | 28 #include <stdint.h> |
| 29 #endif |
| 30 |
29 #include <stddef.h> // Needed for size_t. | 31 #include <stddef.h> // Needed for size_t. |
30 #endif | |
31 | 32 |
32 /** | 33 /** |
33 * @} | 34 * @} |
34 * End addtogroup PP | 35 * End addtogroup PP |
35 */ | 36 */ |
36 #endif // PPAPI_C_PP_STDINT_H_ | 37 #endif // PPAPI_C_PP_STDINT_H_ |
OLD | NEW |