build: Do not add -g to HOSTCFLAGS

The flag is not unconditionally added to CFLAGS either and the
programs built on the host do not get habitually fed to a debugger.
configure: Detect newer (>=4.1) versions of MinGW32

The MinGW32 project is deprecating its old version macros.
configure: Add -D__USE_MINGW_ANSI_STDIO=1 to CPPFLAGS on MinGW32

This enables a more C99-compliant implementation of printf et al.
build: Merge pthreads/w32threads OBJS declarations
configure: remove redundant definition of __USE_MINGW_ANSI_STDIO

No need to define it twice on mingw-w64 >= v3.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Merge commit 'a1d7d5524799bd90bc5d12e8b3063238cc0c02dd'

* commit 'a1d7d5524799bd90bc5d12e8b3063238cc0c02dd':
  build: Do not add -g to HOSTCFLAGS

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'bdc111a162094c14660d1e88839d103a4d79e42a'

* commit 'bdc111a162094c14660d1e88839d103a4d79e42a':
  configure: Detect newer (>=4.1) versions of MinGW32

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '7c3388711b7243d059db39aa04b754baf2156934'

* commit '7c3388711b7243d059db39aa04b754baf2156934':
  configure: Add -D__USE_MINGW_ANSI_STDIO=1 to CPPFLAGS on MinGW32

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  build: Merge pthreads/w32threads OBJS declarations

Conflicts:
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/asf: clear uninitialized areas of packets before returning them

Fixes use of uninitialized variables
Fixes msan_uninit-mem_7f839282b6ce_7273_msn08_VBRq70_800x600.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1dec: dont calculate unused values from uninitialized sprites

Fixes use of uninitialized data
Fixes part of msan_uninit-mem_7f51a8b0b3b0_1009_Arlington.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1dec: zero SpriteData struct

Fixes use of uninitialized data, as alternative alpha could be
calculated conditionally

Fixes part of msan_uninit-mem_7f51a8b0b3b0_1009_Arlington.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1dec: propagate errors from vc1_parse_sprites()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>