media/libvpx/vpx/vpx_integer.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /*
michael@0 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license
michael@0 5 * that can be found in the LICENSE file in the root of the source
michael@0 6 * tree. An additional intellectual property rights grant can be found
michael@0 7 * in the file PATENTS. All contributing project authors may
michael@0 8 * be found in the AUTHORS file in the root of the source tree.
michael@0 9 */
michael@0 10
michael@0 11
michael@0 12 #ifndef VPX_INTEGER_H
michael@0 13 #define VPX_INTEGER_H
michael@0 14
michael@0 15 /* get ptrdiff_t, size_t, wchar_t, NULL */
michael@0 16 #include <stddef.h>
michael@0 17
michael@0 18 #if !defined(VPX_DONT_DEFINE_STDINT_TYPES)
michael@0 19
michael@0 20 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
michael@0 21 typedef signed char int8_t;
michael@0 22 typedef signed short int16_t;
michael@0 23 typedef signed int int32_t;
michael@0 24
michael@0 25 typedef unsigned char uint8_t;
michael@0 26 typedef unsigned short uint16_t;
michael@0 27 typedef unsigned int uint32_t;
michael@0 28
michael@0 29 #if (defined(_MSC_VER) && (_MSC_VER < 1600))
michael@0 30 typedef signed __int64 int64_t;
michael@0 31 typedef unsigned __int64 uint64_t;
michael@0 32 #define INT64_MAX _I64_MAX
michael@0 33 #define INT16_MAX _I16_MAX
michael@0 34 #define INT16_MIN _I16_MIN
michael@0 35 #endif
michael@0 36
michael@0 37 #ifndef _UINTPTR_T_DEFINED
michael@0 38 typedef size_t uintptr_t;
michael@0 39 #endif
michael@0 40
michael@0 41 #else
michael@0 42
michael@0 43 /* Most platforms have the C99 standard integer types. */
michael@0 44
michael@0 45 #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
michael@0 46 #define __STDC_FORMAT_MACROS
michael@0 47 #endif
michael@0 48 #include <stdint.h>
michael@0 49
michael@0 50 #endif
michael@0 51
michael@0 52 #endif
michael@0 53
michael@0 54 /* VS2010 defines stdint.h, but not inttypes.h */
michael@0 55 #if defined(_MSC_VER)
michael@0 56 #define PRId64 "I64d"
michael@0 57 #else
michael@0 58 #include <inttypes.h>
michael@0 59 #endif
michael@0 60
michael@0 61 #endif

mercurial