1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vpx/vpx_integer.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,61 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#ifndef VPX_INTEGER_H 1.16 +#define VPX_INTEGER_H 1.17 + 1.18 +/* get ptrdiff_t, size_t, wchar_t, NULL */ 1.19 +#include <stddef.h> 1.20 + 1.21 +#if !defined(VPX_DONT_DEFINE_STDINT_TYPES) 1.22 + 1.23 +#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES) 1.24 +typedef signed char int8_t; 1.25 +typedef signed short int16_t; 1.26 +typedef signed int int32_t; 1.27 + 1.28 +typedef unsigned char uint8_t; 1.29 +typedef unsigned short uint16_t; 1.30 +typedef unsigned int uint32_t; 1.31 + 1.32 +#if (defined(_MSC_VER) && (_MSC_VER < 1600)) 1.33 +typedef signed __int64 int64_t; 1.34 +typedef unsigned __int64 uint64_t; 1.35 +#define INT64_MAX _I64_MAX 1.36 +#define INT16_MAX _I16_MAX 1.37 +#define INT16_MIN _I16_MIN 1.38 +#endif 1.39 + 1.40 +#ifndef _UINTPTR_T_DEFINED 1.41 +typedef size_t uintptr_t; 1.42 +#endif 1.43 + 1.44 +#else 1.45 + 1.46 +/* Most platforms have the C99 standard integer types. */ 1.47 + 1.48 +#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) 1.49 +#define __STDC_FORMAT_MACROS 1.50 +#endif 1.51 +#include <stdint.h> 1.52 + 1.53 +#endif 1.54 + 1.55 +#endif 1.56 + 1.57 +/* VS2010 defines stdint.h, but not inttypes.h */ 1.58 +#if defined(_MSC_VER) 1.59 +#define PRId64 "I64d" 1.60 +#else 1.61 +#include <inttypes.h> 1.62 +#endif 1.63 + 1.64 +#endif