Bug 1186784 - Disable snprintf definition in libav on VC2015. r=glandium
authorXidorn Quan <quanxunzhen@gmail.com>
Fri, 24 Jul 2015 23:06:50 +1000
changeset 273444 24aec84025e9a22ece174b23256d8490dec68b7a
parent 273443 fedceb06f2e20749ed3d5260227d243bb14ab821
child 273445 ecfe46601d7f3ba3c3550e41463d9d3ab202d688
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-esr52@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1186784
milestone42.0a1
Bug 1186784 - Disable snprintf definition in libav on VC2015. r=glandium
media/libav/libavcommon.mozbuild
--- a/media/libav/libavcommon.mozbuild
+++ b/media/libav/libavcommon.mozbuild
@@ -7,18 +7,19 @@
 # Add assembler flags and includes
 ASFLAGS += CONFIG['LIBAV_FFT_ASFLAGS']
 ASFLAGS += ['-I%s/media/libav' % TOPSRCDIR]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     # Fix inline symbols and math defines for windows.
     DEFINES['_USE_MATH_DEFINES'] = True
     DEFINES['inline'] = "__inline"
-    # snprintf is prefixed with an underscore on windows.
-    DEFINES['snprintf'] = "_snprintf"
+    if CONFIG['_MSC_VER'] and CONFIG['_MSC_VER'] < 1900:
+        # snprintf is prefixed with an underscore on MSVC 2013.
+        DEFINES['snprintf'] = "_snprintf"
     ASFLAGS += ['-Pconfig_win.asm']
     # 32-bit windows need to prefix symbols with an underscore.
     if CONFIG['CPU_ARCH'] == 'x86':
         ASFLAGS += ['-DPREFIX']
 elif CONFIG['OS_ARCH'] == 'Darwin':
     # 32/64-bit macosx assemblers need to prefix symbols with an underscore.
     ASFLAGS += ['-Pconfig_darwin.asm', '-DPREFIX']
 else: