qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Avoid double definitions of PRI*


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] Avoid double definitions of PRI*64
Date: Fri, 24 Jun 2011 06:41:01 +0100

On Thu, Jun 23, 2011 at 3:32 PM, Stefan Weil <address@hidden> wrote:
> Am 23.06.2011 15:35, schrieb Stefan Hajnoczi:
>>
>> On Thu, Jun 23, 2011 at 10:15:58AM +0200, Jan Kiszka wrote:
>>>
>>> From: Jan Kiszka <address@hidden>
>>>
>>> Recent mingw32 provide those defines.
>
> ... and all of those defines are wrong, because QEMU does not use
> MS format specifiers. http://patchwork.ozlabs.org/patch/74276/
> tried to fix this. My preferred solution is removing those PRI*64 from
> qemu-common.h, because not only recent mingw32 versions provide
> the (wrong) definitions, but even the Debian version provides them
> (which is really old, but I use it for my regression tests).
>
> The wrong definitions do not allow using -Wformat for mingw32
> builds, but they work because (most?) relevant mingw32 functions
> accept both MS and standard format specifiers.
>
> Adding the correct definitions (to qemu-os-win32.h, not to qemu-common.h)
> would be another solution as long as mingw32 does not handle
> __USE_MINGW_ANSI_STDIO correctly.
>
>>>
>>> Signed-off-by: Jan Kiszka <address@hidden>
>>> ---
>>> qemu-common.h | 3 +++
>>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> It's never too late to implement C99!
>>
>> Thanks, applied to the trivial patches tree:
>> http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
>>
>> Stefan
>
> Stefan, the patch won't harm, but it's also unnecessary.
> So it's up to you whether you remove it from your queue,
> modify it as I suggested above or apply it as it is.

Keeping those #defines unconditional prevents new mingw builds from
working, according to the commit description.  So we have to either
remove them entirely or do them correctly.  Dropping this patch will
keep the build from working.

I suggest we keep this patch.  A follow-up patch can us MS format
specifiers or do any other adjustments that make this work better.
Stefan, would you be able to send that patch?

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]