OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 | 11 |
12 #ifndef VPX_VPX_INTEGER_H_ | 12 #ifndef VPX_VPX_INTEGER_H_ |
13 #define VPX_VPX_INTEGER_H_ | 13 #define VPX_VPX_INTEGER_H_ |
14 | 14 |
15 /* get ptrdiff_t, size_t, wchar_t, NULL */ | 15 /* get ptrdiff_t, size_t, wchar_t, NULL */ |
16 #include <stddef.h> | 16 #include <stddef.h> |
17 | 17 |
| 18 #if defined(_MSC_VER) |
| 19 #define VPX_FORCE_INLINE __forceinline |
| 20 #define VPX_INLINE __inline |
| 21 #else |
| 22 #define VPX_FORCE_INLINE __inline__ __attribute__(always_inline) |
| 23 // TODO(jbb): Allow a way to force inline off for older compilers. |
| 24 #define VPX_INLINE inline |
| 25 #endif |
| 26 |
18 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES) | 27 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES) |
19 typedef signed char int8_t; | 28 typedef signed char int8_t; |
20 typedef signed short int16_t; | 29 typedef signed short int16_t; |
21 typedef signed int int32_t; | 30 typedef signed int int32_t; |
22 | 31 |
23 typedef unsigned char uint8_t; | 32 typedef unsigned char uint8_t; |
24 typedef unsigned short uint16_t; | 33 typedef unsigned short uint16_t; |
25 typedef unsigned int uint32_t; | 34 typedef unsigned int uint32_t; |
26 | 35 |
27 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) | 36 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) |
(...skipping 20 matching lines...) Expand all Loading... |
48 #endif | 57 #endif |
49 | 58 |
50 /* VS2010 defines stdint.h, but not inttypes.h */ | 59 /* VS2010 defines stdint.h, but not inttypes.h */ |
51 #if defined(_MSC_VER) && _MSC_VER < 1800 | 60 #if defined(_MSC_VER) && _MSC_VER < 1800 |
52 #define PRId64 "I64d" | 61 #define PRId64 "I64d" |
53 #else | 62 #else |
54 #include <inttypes.h> | 63 #include <inttypes.h> |
55 #endif | 64 #endif |
56 | 65 |
57 #endif // VPX_VPX_INTEGER_H_ | 66 #endif // VPX_VPX_INTEGER_H_ |
OLD | NEW |