From: Ozkan S. <se...@gm...> - 2009-09-18 05:47:57
|
On Fri, Sep 18, 2009 at 1:14 AM, Erik de Castro Lopo <ml...@me...> wrote: > Ozkan Sezer wrote: > >> I'm not sure whether msvcrt supports the %z size_t conversion. > > I'm pretty damn sure it doesn't :-). > >> You can, however, use the posix compliant mingw version. > > Its not POSIX, its ISO C99 :-). > >> You can do it by either of these two ways: >> >> 1. You can compile your source with the __USE_MINGW_ANSI_STDIO >> macro defined as 1, adding -D__USE_MINGW_ANSI_STDIO=1 to your >> gcc command line. This way, all printf family of functions will >> be relaced by __mingw_printf, __mingw_fprintf, etc. > > I tried putting: > > #define __USE_MINGW_ANSI_STDIO 1 > > as the very first non-comment line of the file in questions and I still > get: > > test_file_io.c:136: error: unknown conversion type character 'z' in format > test_file_io.c:136: error: too many arguments for format > > If I replace that printf with __mingw_printf I get: > > test_file_io.c:136: error: implicit declaration of function '__mingw_printf' > test_file_io.c:136: error: nested extern declaration of '__mingw_printf' > > Erik Do you #include <stdio.h> ? If you do, then I'm baffled.. -- Ozkan |