media/libvpx/vpx/vpx_integer.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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  */
    12 #ifndef VPX_INTEGER_H
    13 #define VPX_INTEGER_H
    15 /* get ptrdiff_t, size_t, wchar_t, NULL */
    16 #include <stddef.h>
    18 #if !defined(VPX_DONT_DEFINE_STDINT_TYPES)
    20 #if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
    21 typedef signed char  int8_t;
    22 typedef signed short int16_t;
    23 typedef signed int   int32_t;
    25 typedef unsigned char  uint8_t;
    26 typedef unsigned short uint16_t;
    27 typedef unsigned int   uint32_t;
    29 #if (defined(_MSC_VER) && (_MSC_VER < 1600))
    30 typedef signed __int64   int64_t;
    31 typedef unsigned __int64 uint64_t;
    32 #define INT64_MAX _I64_MAX
    33 #define INT16_MAX _I16_MAX
    34 #define INT16_MIN _I16_MIN
    35 #endif
    37 #ifndef _UINTPTR_T_DEFINED
    38 typedef size_t uintptr_t;
    39 #endif
    41 #else
    43 /* Most platforms have the C99 standard integer types. */
    45 #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
    46 #define __STDC_FORMAT_MACROS
    47 #endif
    48 #include <stdint.h>
    50 #endif
    52 #endif
    54 /* VS2010 defines stdint.h, but not inttypes.h */
    55 #if defined(_MSC_VER)
    56 #define PRId64 "I64d"
    57 #else
    58 #include <inttypes.h>
    59 #endif
    61 #endif

mercurial