Commit 5717562c authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c1fcfdec'

* commit 'c1fcfdec':
  rangecoder-test: Return in case of an error
  build: simplify enabling of compat objects

Conflicts:
	configure
	libavutil/Makefile
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 25f3827e c1fcfdec
...@@ -691,6 +691,12 @@ add_host_ldflags(){ ...@@ -691,6 +691,12 @@ add_host_ldflags(){
append host_ldflags $($host_ldflags_filter "$@") append host_ldflags $($host_ldflags_filter "$@")
} }
add_compat(){
append compat_objs $1
shift
map 'add_cppflags -D$v' "$@"
}
check_cmd(){ check_cmd(){
log "$@" log "$@"
"$@" >> $logfile 2>&1 "$@" >> $logfile 2>&1
...@@ -1272,7 +1278,6 @@ HAVE_LIST=" ...@@ -1272,7 +1278,6 @@ HAVE_LIST="
asm_types_h asm_types_h
attribute_may_alias attribute_may_alias
attribute_packed attribute_packed
broken_snprintf
cbrtf cbrtf
clock_gettime clock_gettime
closesocket closesocket
...@@ -3221,18 +3226,17 @@ elif check_header _mingw.h; then ...@@ -3221,18 +3226,17 @@ elif check_header _mingw.h; then
die "ERROR: MinGW runtime version must be >= 3.15." die "ERROR: MinGW runtime version must be >= 3.15."
if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \ if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \
__MINGW64_VERSION_MAJOR < 3"; then __MINGW64_VERSION_MAJOR < 3"; then
enable broken_snprintf add_compat msvcrt/snprintf.o
add_cflags "-include $source_path/compat/msvcrt/snprintf.h" add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
fi fi
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
libc_type=newlib libc_type=newlib
elif check_func_headers stdlib.h _get_doserrno; then elif check_func_headers stdlib.h _get_doserrno; then
libc_type=msvcrt libc_type=msvcrt
enable broken_snprintf add_compat strtod.o strtod=avpriv_strtod
add_cflags -Dstrtod=avpriv_strtod add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \
add_cflags -Dsnprintf=avpriv_snprintf \ _snprintf=avpriv_snprintf \
-D_snprintf=avpriv_snprintf \ vsnprintf=avpriv_vsnprintf
-Dvsnprintf=avpriv_vsnprintf
elif check_cpp_condition stddef.h "defined __KLIBC__"; then elif check_cpp_condition stddef.h "defined __KLIBC__"; then
libc_type=klibc libc_type=klibc
fi fi
...@@ -4242,6 +4246,7 @@ CFLAGS-ffplay=$sdl_cflags ...@@ -4242,6 +4246,7 @@ CFLAGS-ffplay=$sdl_cflags
ZLIB=$($ldflags_filter -lz) ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs EXTRALIBS=$extralibs
COMPAT_OBJS=$compat_objs
INSTALL=$install INSTALL=$install
LIBTARGET=${LIBTARGET} LIBTARGET=${LIBTARGET}
SLIBNAME=${SLIBNAME} SLIBNAME=${SLIBNAME}
......
...@@ -151,8 +151,10 @@ STOP_TIMER("put_rac") ...@@ -151,8 +151,10 @@ STOP_TIMER("put_rac")
for (i = 0; i < SIZE; i++) { for (i = 0; i < SIZE; i++) {
START_TIMER START_TIMER
if ((r[i] & 1) != get_rac(&c, state)) if ((r[i] & 1) != get_rac(&c, state)) {
av_log(NULL, AV_LOG_ERROR, "rac failure at %d\n", i); av_log(NULL, AV_LOG_ERROR, "rac failure at %d\n", i);
return 1;
}
STOP_TIMER("get_rac") STOP_TIMER("get_rac")
} }
......
...@@ -96,9 +96,8 @@ OBJS = adler32.o \ ...@@ -96,9 +96,8 @@ OBJS = adler32.o \
xga_font_data.o \ xga_font_data.o \
xtea.o \ xtea.o \
OBJS-$(HAVE_BROKEN_SNPRINTF) += ../compat/msvcrt/snprintf.o
OBJS-$(HAVE_MSVCRT) += ../compat/strtod.o OBJS += $(COMPAT_OBJS:%=../compat/%)
SKIPHEADERS = old_pix_fmts.h SKIPHEADERS = old_pix_fmts.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment