From: Stefan Weil <weil@mail.berlios.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] mingw32: Fix definitions for PRId64, PRIx64, PRIu64, PRIo64
Date: Sun, 30 Jan 2011 22:27:34 +0100 [thread overview]
Message-ID: <4D45D7C6.70706@mail.berlios.de> (raw)
In-Reply-To: <1291491689-11982-1-git-send-email-weil@mail.berlios.de>
Am 04.12.2010 20:41, schrieb Stefan Weil:
> QEMU always uses POSIX format specifiers, even with mingw32.
>
> Therefore the old definitions of the PRI*64 macros were wrong.
> They should be removed, but as long as the mingw32 system
> include inttypes.h provides wrong definitions, too,
> we correct them here.
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> qemu-common.h | 16 ++++++++++++----
> 1 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/qemu-common.h b/qemu-common.h
> index de82c2e..c739f45 100644
> --- a/qemu-common.h
> +++ b/qemu-common.h
> @@ -96,10 +96,18 @@ static inline char *realpath(const char *path,
> char *resolved_path)
> return resolved_path;
> }
>
> -#define PRId64 "I64d"
> -#define PRIx64 "I64x"
> -#define PRIu64 "I64u"
> -#define PRIo64 "I64o"
> +/* inttypes.h (mingw32) provides wrong definitions, so fix them here. */
> +/* TODO: remove this workaround as soon as mingw32 is fixed. */
> +
> +#undef PRId64
> +#undef PRIx64
> +#undef PRIu64
> +#undef PRIo64
> +
> +#define PRId64 "lld"
> +#define PRIx64 "llx"
> +#define PRIu64 "llu"
> +#define PRIo64 "llo"
> #endif
>
> /* FIXME: Remove NEED_CPU_H. */
What about this patch? It is still missing in QEMU git master.
Kind regards,
Stefan
next prev parent reply other threads:[~2011-01-30 21:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-04 19:41 [Qemu-devel] [PATCH] mingw32: Fix definitions for PRId64, PRIx64, PRIu64, PRIo64 Stefan Weil
2011-01-30 21:27 ` Stefan Weil [this message]
2011-01-30 21:39 ` [Qemu-devel] " Blue Swirl
2011-01-30 21:50 ` Stefan Weil
2011-01-30 22:14 ` Blue Swirl
2011-01-31 10:39 ` Mark Cave-Ayland
2011-01-31 17:25 ` Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D45D7C6.70706@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).