Bug 704313 - Add a don't-define-stdint-types frob to vpx (encapsulated in a custom downstream patch, until this makes its way upstream). r=derf

--HG--
extra : rebase_source : cbc11a1b3ac02897d38553093dc52f4a3eef0bf6
This commit is contained in:
Jeff Walden 2011-12-07 21:52:33 -05:00
Родитель 6f053b870e
Коммит 635fa33408
3 изменённых файлов: 50 добавлений и 0 удалений

43
media/libvpx/stdint.patch Normal file
Просмотреть файл

@ -0,0 +1,43 @@
diff --git a/media/libvpx/stdint.patch b/media/libvpx/stdint.patch
new file mode 100644
diff --git a/media/libvpx/vpx/vpx_integer.h b/media/libvpx/vpx/vpx_integer.h
--- a/media/libvpx/vpx/vpx_integer.h
+++ b/media/libvpx/vpx/vpx_integer.h
@@ -10,16 +10,18 @@
#ifndef VPX_INTEGER_H
#define VPX_INTEGER_H
/* get ptrdiff_t, size_t, wchar_t, NULL */
#include <stddef.h>
+#if !defined(VPX_DONT_DEFINE_STDINT_TYPES)
+
#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
@@ -47,16 +49,18 @@ typedef unsigned int uintptr_t;
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
#define __STDC_FORMAT_MACROS
#endif
#include <stdint.h>
#endif
+#endif
+
/* VS2010 defines stdint.h, but not inttypes.h */
#if defined(_MSC_VER)
#define PRId64 "I64d"
#else
#include <inttypes.h>
#endif
#endif

Просмотреть файл

@ -441,3 +441,6 @@ patch -p3 < compile_errors.patch
# Patch to fix MV clamping in the v0.9.7-p1 release.
patch -p3 < bug696390.patch
# Patch to permit vpx users to specify their own <stdint.h> types.
patch -p3 < stdint.patch

Просмотреть файл

@ -15,6 +15,8 @@
/* get ptrdiff_t, size_t, wchar_t, NULL */
#include <stddef.h>
#if !defined(VPX_DONT_DEFINE_STDINT_TYPES)
#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
typedef signed char int8_t;
typedef signed short int16_t;
@ -52,6 +54,8 @@ typedef unsigned int uintptr_t;
#endif
#endif
/* VS2010 defines stdint.h, but not inttypes.h */
#if defined(_MSC_VER)
#define PRId64 "I64d"