aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-12-13 23:19:55 +0100
committerDiego Biurrun <diego@biurrun.de>2013-12-16 15:21:42 +0100
commit11bb5e10c36539bcc303ceaac6f88d9ecb66e07f (patch)
tree1b030bab3a8add36d18488c52318dc95235bba30 /configure
parent6d3ea1957f681b3bf9c752e6d21a501cc8d4180d (diff)
downloadffmpeg-11bb5e10c36539bcc303ceaac6f88d9ecb66e07f.tar.gz
build: Define __printf__ to __gnu_printf__ on MinGW*/gcc
This is necessary to avoid GCC assuming MS style printf arguments.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure b/configure
index 910c47d834..52993d71ec 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