qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] mingw32: Fix definitions for PRId64, PRIx64, PRIu64, PRIo64
@ 2010-12-04 19:41 Stefan Weil
  2011-01-30 21:27 ` [Qemu-devel] " Stefan Weil
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Weil @ 2010-12-04 19:41 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Blue Swirl

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.  */
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-31 17:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-04 19:41 [Qemu-devel] [PATCH] mingw32: Fix definitions for PRId64, PRIx64, PRIu64, PRIo64 Stefan Weil
2011-01-30 21:27 ` [Qemu-devel] " Stefan Weil
2011-01-30 21:39   ` 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

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).