From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33755 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjeoA-0006p4-Cu for qemu-devel@nongnu.org; Sun, 30 Jan 2011 16:27:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pjeo9-00039l-23 for qemu-devel@nongnu.org; Sun, 30 Jan 2011 16:27:42 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:57652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pjeo8-00039Z-Jy for qemu-devel@nongnu.org; Sun, 30 Jan 2011 16:27:41 -0500 Message-ID: <4D45D7C6.70706@mail.berlios.de> Date: Sun, 30 Jan 2011 22:27:34 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1291491689-11982-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <1291491689-11982-1-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] mingw32: Fix definitions for PRId64, PRIx64, PRIu64, PRIo64 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: QEMU Developers 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 > Signed-off-by: Stefan Weil > --- > 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