[FFmpeg-cvslog] build: Define __printf__ to __gnu_printf__ on MinGW*/gcc
Diego Biurrun
git at videolan.org
Tue Dec 17 00:06:18 CET 2013
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Dec 13 23:19:55 2013 +0100| [11bb5e10c36539bcc303ceaac6f88d9ecb66e07f] | committer: Diego Biurrun
build: Define __printf__ to __gnu_printf__ on MinGW*/gcc
This is necessary to avoid GCC assuming MS style printf arguments.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11bb5e10c36539bcc303ceaac6f88d9ecb66e07f
---
configure | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure b/configure
index 910c47d..52993d7 100755
--- a/configure
+++ b/configure
@@ -3401,6 +3401,7 @@ esac
probe_libc(){
pfx=$1
+ pfx_no_=${pfx%_}
# uclibc defines __GLIBC__, so it needs to be checked before glibc.
if check_${pfx}cpp_condition features.h "defined __UCLIBC__"; then
eval ${pfx}libc_type=uclibc
@@ -3416,6 +3417,8 @@ probe_libc(){
elif check_${pfx}cpp_condition _mingw.h "defined __MINGW64_VERSION_MAJOR"; then
eval ${pfx}libc_type=mingw64
add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ eval test \$${pfx_no_}cc_type = "gcc" &&
+ add_${pfx}cppflags -D__printf__=__gnu_printf__
elif check_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION" ||
check_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
eval ${pfx}libc_type=mingw32
@@ -3423,6 +3426,8 @@ probe_libc(){
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW32 runtime version must be >= 3.15."
add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ eval test \$${pfx_no_}cc_type = "gcc" &&
+ 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
# The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to
More information about the ffmpeg-cvslog
mailing list