diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-08 20:39:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-08 20:39:38 +0200 |
commit | a4557b7a98f78222d9616fb36cb8073cd16f11ff (patch) | |
tree | 458602df0a2d7566f5f5f541e4cd40335729cbba | |
parent | 56f0fe6b8434d25917c41a343323950291d8db21 (diff) | |
parent | a6f19d6a9f8d1e08653d9d77581e8c823f4955c2 (diff) | |
download | ffmpeg-a4557b7a98f78222d9616fb36cb8073cd16f11ff.tar.gz |
Merge commit 'a6f19d6a9f8d1e08653d9d77581e8c823f4955c2'
* commit 'a6f19d6a9f8d1e08653d9d77581e8c823f4955c2':
configure: Support MSVC 2015
Conflicts:
configure
libavutil/internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-x | configure | 26 | ||||
-rw-r--r-- | libavutil/internal.h | 11 |
2 files changed, 16 insertions, 21 deletions
@@ -3596,9 +3596,6 @@ probe_cc(){ # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency # with MSVC which enables it by default. _cflags='-D_USE_MATH_DEFINES -FIstdlib.h -Dstrtoll=_strtoi64 -Qms0 -Qvec- -Qsimd- -GS -fp:precise' - if [ $pfx = hostcc ]; then - append _cflags -Dsnprintf=_snprintf - fi disable stripping elif $_cc 2>&1 | grep -q Microsoft; then _type=msvc @@ -3619,11 +3616,6 @@ probe_cc(){ _ld_path='-libpath:' _flags='-nologo' _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64' - if [ $pfx = hostcc ]; then - if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then - append _cflags -Dsnprintf=_snprintf - fi - fi disable stripping elif $_cc --version 2>/dev/null | grep -q ^cparser; then _type=cparser @@ -4438,6 +4430,16 @@ probe_libc(){ add_${pfx}cppflags -D__printf__=__gnu_printf__ elif check_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then eval ${pfx}libc_type=msvcrt + if check_${pfx}cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION < 14"; then + if [ "$pfx" = host_ ]; then + add_host_cppflags -Dsnprintf=_snprintf + else + add_compat strtod.o strtod=avpriv_strtod + add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \ + _snprintf=avpriv_snprintf \ + vsnprintf=avpriv_vsnprintf + fi + fi # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to # 0x601 by default unless something else is set by the user. # This can easily lead to us detecting functions only present @@ -4474,14 +4476,6 @@ case $libc_type in bionic) add_compat strtod.o strtod=avpriv_strtod ;; - msvcrt) - if [ -z "$cl_major_ver" ] || [ $cl_major_ver -le 18 ]; then - add_compat strtod.o strtod=avpriv_strtod - add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \ - _snprintf=avpriv_snprintf \ - vsnprintf=avpriv_vsnprintf - fi - ;; esac # hacks for compiler/libc/os combinations diff --git a/libavutil/internal.h b/libavutil/internal.h index 61bc027630..8817ec3b0e 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -164,11 +164,6 @@ #include "libm.h" -#if defined(_MSC_VER) && _MSC_VER < 1900 -#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod") -#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf") -#endif - /** * Return NULL if CONFIG_SMALL is true, otherwise the argument * without modification. Used to disable the definition of strings @@ -241,6 +236,12 @@ void avpriv_request_sample(void *avc, const char *msg, ...) av_printf_format(2, 3); #if HAVE_LIBC_MSVCRT +#include <crtversion.h> +#if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14 +#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod") +#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf") +#endif + #define avpriv_open ff_open #define PTRDIFF_SPECIFIER "Id" #define SIZE_SPECIFIER "Iu" |