configure: add __USE_MINGW_ANSI_STDIO on MinGW
commiteebe9309ecd70f86f0a52f09712db833df589206
authorwm4 <wm4@mplayer2.org>
Tue, 31 Jan 2012 07:31:04 +0000 (31 08:31 +0100)
committerUoti Urpala <uau@mplayer2.org>
Wed, 29 Feb 2012 22:22:29 +0000 (1 00:22 +0200)
treee7c41b0a5f2f6df9b2d5c7acd74c44c9d390dbf5
parent3dbb18d91a0d4b17f0187e3b5faa3b6f3cd1b31e
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