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
authorJeff Walden <jwalden@mit.edu>
Wed, 07 Dec 2011 21:52:33 -0500
changeset 83920 be47924d7a08ec811a473e9a72edf585505c3879
parent 83919 00b0798600a6a9d838ae52c210258a644df14a7a
child 83921 76190177b149f7df0a7fb6a901b5a61956a47649
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersderf
bugs704313
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
media/libvpx/stdint.patch
media/libvpx/update.sh
media/libvpx/vpx/vpx_integer.h
new file mode 100644
--- /dev/null
+++ b/media/libvpx/stdint.patch
@@ -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
--- a/media/libvpx/update.sh
+++ b/media/libvpx/update.sh
@@ -436,8 +436,11 @@ done
 # Patch to compile with Sun Studio on Solaris
 patch -p3 < solaris.patch
 
 # Patch to fix errors including C headers in C++
 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
--- 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