[libav-bugs] [Bug 424] New: [MinGW-w64] Different behavior for %zu modifier

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Fri Jan 11 12:06:38 CET 2013


           Summary: [MinGW-w64] Different behavior for %zu modifier
           Product: Libav
           Version: git HEAD
          Platform: X86
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: libavcodec
        AssignedTo: bugzilla at libav.org
        ReportedBy: SpOeK at DistroBit.Net

Building libav with "--enable-hardcoded-tables" and MinGW-w64, a fork of MinGW,
fails with:

[build log]
-U__STRICT_ANSI__ -DHAVE_AV_CONFIG_H -O2 -march=athlon64-sse3
-DPTW32_STATIC_LIB -I/usr/local/include -I/usr/local/include/directx
-I/usr/local/include/dxva -march=athlon64-sse3 -std=c99 -fomit-frame-pointer
-Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch
-Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith
-Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits
-Wundef -Wmissing-prototypes -Wstrict-prototypes -flto -O3 -fno-math-errno
-fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration
-Werror=missing-prototypes -Werror=declaration-after-statement -Werror=vla 
-MMD -MF libavcodec/aacps.d -MT libavcodec/aacps.o -c -o libavcodec/aacps.o
In file included from libavcodec/cbrt_tablegen.h:31:0,
                 from libavcodec/aacdec.c:96:
./libavcodec/cbrt_tables.h:3:32: error: 'zu' undeclared here (not in a
[build log]

The first lines of file "cbrt_tables.h", generated by "cbrt_tablegen.exe", are:

/* This file was automatically generated. */
#include <stdint.h>
static const uint32_t cbrt_tab[zu] = {

As you can read in this thread[1], the %zu modifier is not recognized by MS'
printf. The proposed workaround of using "-D__USE_MINGW_ANSI_STDIO=1" works
fine and it's important to use it when building HOSTPROGS, like bug 414,
because the actual problem is the source file "tableprint.h" and not the
produced file "cbrt_tables.h".

There are also uses of this modifier in "libvpxenc.c" and some other files so
maybe it's a good idea to use "-D__USE_MINGW_ANSI_STDIO=1" with the normal
CPPFLAGS. Of course, this flags should only be added when building for MinGW.


Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list