2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
12 #ifndef VPX_VPX_INTEGER_H_
13 #define VPX_VPX_INTEGER_H_
15 /* get ptrdiff_t, size_t, wchar_t, NULL */
18 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
19 typedef signed char int8_t;
20 typedef signed short int16_t;
21 typedef signed int int32_t;
23 typedef unsigned char uint8_t;
24 typedef unsigned short uint16_t;
25 typedef unsigned int uint32_t;
27 #if (defined(_MSC_VER) && (_MSC_VER < 1600))
28 typedef signed __int64 int64_t;
29 typedef unsigned __int64 uint64_t;
30 #define INT64_MAX _I64_MAX
31 #define INT16_MAX _I16_MAX
32 #define INT16_MIN _I16_MIN
35 #ifndef _UINTPTR_T_DEFINED
36 typedef size_t uintptr_t;
41 /* Most platforms have the C99 standard integer types. */
43 #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
44 #define __STDC_FORMAT_MACROS
50 /* VS2010 defines stdint.h, but not inttypes.h */
57 #endif // VPX_VPX_INTEGER_H_