Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: chromium/include/win/stdint.h

Issue 9290059: Initial commit of all previous Chrome build scripts. (Closed) Base URL: http://git.chromium.org/chromium/third_party/ffmpeg.git@master
Patch Set: Drop deprecated subfolder. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromium/include/win/stdint.h
diff --git a/chromium/include/win/stdint.h b/chromium/include/win/stdint.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa178339ac4749be783433acd861d773060a3ca9
--- /dev/null
+++ b/chromium/include/win/stdint.h
@@ -0,0 +1,32 @@
+// 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
+#define UINT64_C(value) value##ULL
+
+#endif // THIRD_PARTY_FFMPEG_INCLUDE_WIN_STDINT_H_
« no previous file with comments | « chromium/include/win/inttypes.h ('k') | chromium/patches/README » ('j') | codereview.settings » ('J')

Powered by Google App Engine
This is Rietveld 408576698