summaryrefslogtreecommitdiffstats
path: root/third_party/ffmpeg/include/win/stdint.h
blob: 90bb02918cdfa6c9c97831a952194ef325a1d83d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// FFmpeg is written in C99 and requires <stdint.h> and <inttypes.h>.
// Since MSVC doesn't include these headers, we have to write our own version
// to provide a compatibility layer between MSVC and the FFmpeg headers.

#ifndef THIRD_PARTY_FFMPEG_INCLUDE_WIN_STDINT_H_
#define THIRD_PARTY_FFMPEG_INCLUDE_WIN_STDINT_H_

#if !defined(_MSC_VER)
#error This file should only be included when compiling with MSVC.
#endif

// Define C99 equivalent types.
typedef signed char           int8_t;
typedef signed short          int16_t;
typedef signed int            int32_t;
typedef signed long long      int64_t;
typedef unsigned char         uint8_t;
typedef unsigned short        uint16_t;
typedef unsigned int          uint32_t;
typedef unsigned long long    uint64_t;

// Define the C99 INT64_C macro that is used for declaring 64-bit literals.
// Technically, these should only be definied when __STDC_CONSTANT_MACROS
// is defined.
#define INT64_C(value) value##LL

#endif  // THIRD_PARTY_FFMPEG_INCLUDE_WIN_STDINT_H_