Hi, Le 13/12/2013 17:43, Diego Biurrun a écrit : > This is necessary to avoid GCC assuming MS style printf arguments. > --- > > Hopefully an acceptable solution now ...
This looks good to me, if cc_type = "gcc" does not match clang. That compiler supports neither ms_printf neither gnu_printf: http://llvm.org/bugs/show_bug.cgi?id=15848 Fortunately that means __printf__ attribute matches what we want (POSIX) even when targetting Windows, so this will work until clang people implement ms_printf attribute and default to it. > configure | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/configure b/configure > index 87ab32a..5841230 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 > _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
