From eebe9309ecd70f86f0a52f09712db833df589206 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 31 Jan 2012 08:31:04 +0100 Subject: configure: add __USE_MINGW_ANSI_STDIO on MinGW This makes MinGW redirect certain stdio functions (such as the sprintf family) from the MSVCRT libc to a standard compliant MinGW implementation. This fixes a crash in talloc.c when compiling mplayer with MinGW-w64. The problem is most likely with talloc_vasprintf(), which calls vsnprintf with a small buffer and checks its return value to find out how much space the formatted string requires. Without this commit, vsnprintf would always return -1, and then the code calls abort(). (lachs0r figured out this one.) --- configure | 1 + 1 file changed, 1 insertion(+) (limited to 'configure') diff --git a/configure b/configure index 1b66ca7b17..fd3bfc83bd 100755 --- a/configure +++ b/configure @@ -1397,6 +1397,7 @@ fi if mingw32 ; then _getch=getch2-win.c need_shmem=no + extra_cflags="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1" fi if amigaos ; then -- cgit v1.2.3