зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1119776, Part 2: Avoid defining snprintf when MSVC provides it (video), r=giles
--HG-- extra : rebase_source : 0ea7b0b1a65b31993df689784dd17e741a0c312e
This commit is contained in:
Родитель
6e127085a1
Коммит
02a7263b3f
|
@ -34,8 +34,10 @@
|
|||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#if _MSC_VER < 1900
|
||||
#include <nspr/prprf.h>
|
||||
#define snprintf PR_snprintf
|
||||
#endif
|
||||
|
||||
/* We don't want to indent large blocks because it causes unnecessary merge
|
||||
* conflicts */
|
||||
|
|
|
@ -34,8 +34,10 @@
|
|||
#define LOG_BUF_SIZE 1024
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER < 1900
|
||||
#include <nspr/prprf.h>
|
||||
#define snprintf PR_snprintf
|
||||
#endif
|
||||
#define __builtin_trap abort
|
||||
static int W_OK = 0;
|
||||
static int access(char* c, int i) { return -1; }
|
||||
|
|
|
@ -30,8 +30,10 @@
|
|||
#include <log/logprint.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER < 1900
|
||||
#include <nspr/prprf.h>
|
||||
#define snprintf PR_snprintf
|
||||
#endif
|
||||
#define inline
|
||||
/* We don't want to indent large blocks because it causes unnecessary merge
|
||||
* conflicts */
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/media/libvpx/vp9/common/vp9_systemdependent.h b/media/libvpx/vp9/common/vp9_systemdependent.h
|
||||
--- a/media/libvpx/vp9/common/vp9_systemdependent.h
|
||||
+++ b/media/libvpx/vp9/common/vp9_systemdependent.h
|
||||
@@ -12,17 +12,19 @@
|
||||
#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <math.h> // the ceil() definition must precede intrin.h
|
||||
# if _MSC_VER > 1310 && (defined(_M_X64) || defined(_M_IX86))
|
||||
# include <intrin.h>
|
||||
# define USE_MSC_INTRIN
|
||||
# endif
|
||||
-# define snprintf _snprintf
|
||||
+# if _MSC_VER < 1900
|
||||
+# define snprintf _snprintf
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "./vpx_config.h"
|
||||
#if ARCH_X86 || ARCH_X86_64
|
|
@ -532,6 +532,8 @@ def apply_patches():
|
|||
os.system("patch -p0 < stdint.patch")
|
||||
# Patch to allow older versions of Apple's clang to build libvpx.
|
||||
os.system("patch -p3 < apple-clang.patch")
|
||||
# Patch to allow MSVC 2015 to compile libvpx
|
||||
os.system("patch -p3 < msvc2015.patch")
|
||||
|
||||
def update_readme(commit):
|
||||
with open('README_MOZILLA') as f:
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
# include <intrin.h>
|
||||
# define USE_MSC_INTRIN
|
||||
# endif
|
||||
# define snprintf _snprintf
|
||||
# if _MSC_VER < 1900
|
||||
# define snprintf _snprintf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Загрузка…
Ссылка в новой задаче