On Sun, Jan 30, 2011 at 9:50 PM, Stefan Weil <address@hidden> wrote:
Am 30.01.2011 22:39, schrieb Blue Swirl:
It would appear to suppress quite a few warnings about formats. But on
my version of inttypes.h there is the following comment:
/* 7.8.1 Macros for format specifiers
*
* MS runtime does not yet understand C9x standard "ll"
* length specifier. It appears to treat "ll" as "l".
* The non-standard I64 length specifier causes warning in GCC,
* but understood by MS runtime functions.
*/
So is this change OK after all?
Yes, it is. MS runtime indeed does not understand "%lld"
and similar format specifiers.
Mingw does, because it replaces the printf family functions
by inline functions which call __mingw_vfprintf as soon
as __USE_MINGW_ANSI_STDIO is defined. If your MinGW stdio.h
does not use __USE_MINGW_ANSI_STDIO, it is too old.
Well, mine doesn't. The change was introduced in mingw-runtime 3.15,
which was released in September 2008, but Debian still hasn't updated
from 3.13. Maybe other distros are not so lagging and someone who
wishes to build QEMU on Windows is not pampered with distro support
for MinGW anyway. Perhaps a configure time check should be added?
QEMU defines __USE_MINGW_ANSI_STDIO, and __mingw_vfprintf
understands C9x standard length specifiers.
BTW, MinGW FAQ page http://www.mingw.org/wiki/FAQ still mentions that
%ll formats are not supported.