vpx_integer.h revision 90d3ed91ae9228e1c8bab561b6138d4cb8c1e4fd
1/*
2 *  Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
3 *
4 *  Use of this source code is governed by a BSD-style license and patent
5 *  grant that can be found in the LICENSE file in the root of the source
6 *  tree. All contributing project authors may be found in the AUTHORS
7 *  file in the root of the source tree.
8 */
9
10
11#ifndef VPX_INTEGER_H
12#define VPX_INTEGER_H
13
14/* get ptrdiff_t, size_t, wchar_t, NULL */
15#include <stddef.h>
16
17#if defined(HAVE_STDINT_H) && HAVE_STDINT_H
18#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
19#define __STDC_FORMAT_MACROS
20#endif
21#include <stdint.h>
22#include <inttypes.h>
23#else
24typedef signed char  int8_t;
25typedef signed short int16_t;
26typedef signed int   int32_t;
27
28typedef unsigned char  uint8_t;
29typedef unsigned short uint16_t;
30typedef unsigned int   uint32_t;
31
32#if defined(_MSC_VER)
33typedef signed __int64   int64_t;
34typedef unsigned __int64 uint64_t;
35#define PRId64 "I64d"
36#endif
37
38#ifdef HAVE_ARMV6
39typedef unsigned int int_fast16_t;
40#else
41typedef signed short int_fast16_t;
42#endif
43typedef signed char int_fast8_t;
44typedef unsigned char uint_fast8_t;
45
46#ifndef _UINTPTR_T_DEFINED
47typedef unsigned int   uintptr_t;
48#endif
49
50#endif
51
52#endif
53