1/* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 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. 9 */ 10 11 12#ifndef VPX_INTEGER_H 13#define VPX_INTEGER_H 14 15/* get ptrdiff_t, size_t, wchar_t, NULL */ 16#include <stddef.h> 17 18#if defined(_MSC_VER) || defined(VPX_EMULATE_INTTYPES) 19typedef signed char int8_t; 20typedef signed short int16_t; 21typedef signed int int32_t; 22 23typedef unsigned char uint8_t; 24typedef unsigned short uint16_t; 25typedef unsigned int uint32_t; 26 27#if defined(_MSC_VER) 28typedef signed __int64 int64_t; 29typedef unsigned __int64 uint64_t; 30#define PRId64 "I64d" 31#endif 32 33#ifdef HAVE_ARMV6 34typedef unsigned int int_fast16_t; 35#else 36typedef signed short int_fast16_t; 37#endif 38typedef signed char int_fast8_t; 39typedef unsigned char uint_fast8_t; 40 41#ifndef _UINTPTR_T_DEFINED 42typedef unsigned int uintptr_t; 43#endif 44 45#else 46 47/* Most platforms have the C99 standard integer types. */ 48 49#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) 50#define __STDC_FORMAT_MACROS 51#endif 52#include <stdint.h> 53#include <inttypes.h> 54 55#endif 56 57#endif 58