From patchwork Sat Dec 4 19:41:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 74276 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F0DB8B70D5 for ; Sun, 5 Dec 2010 06:42:31 +1100 (EST) Received: from localhost ([127.0.0.1]:41710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POy04-0000xT-8c for incoming@patchwork.ozlabs.org; Sat, 04 Dec 2010 14:42:28 -0500 Received: from [140.186.70.92] (port=54076 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POxzU-0000vk-Q2 for qemu-devel@nongnu.org; Sat, 04 Dec 2010 14:41:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POxzK-0000YK-79 for qemu-devel@nongnu.org; Sat, 04 Dec 2010 14:41:52 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:62177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POxzJ-0000VE-Rm for qemu-devel@nongnu.org; Sat, 04 Dec 2010 14:41:42 -0500 Received: from flocke.fritz.box (p54ADBF8F.dip.t-dialin.net [84.173.191.143]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MdqUD-1P2Bm427Lx-00PeQ7; Sat, 04 Dec 2010 20:41:33 +0100 Received: from stefan by flocke.fritz.box with local (Exim 4.72) (envelope-from ) id 1POxzA-00037n-6d; Sat, 04 Dec 2010 20:41:32 +0100 From: Stefan Weil To: QEMU Developers Date: Sat, 4 Dec 2010 20:41:29 +0100 Message-Id: <1291491689-11982-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.3 X-Provags-ID: V02:K0:DzeehlSQraLhy/JOIs4bHfe7uw6AEizp0jm3snhltVU iDoy2dOlo7x7+iqgJH2lbb3ZkGY4dZMZIq9FE4wcdt4UgrzJI+ 5lM7XQhfPzWzYmzueb9A2Z3saRnGd8TyRMKGtI5Z/FSst+fFZ6 HymQgNOUyzwFKVCgIDllRoK2oRKyb+CiBeX7ASHDsoiqLa9o++ 08JBvP9VrOf3olLGn7ndkuZhsoUHo2y3JUoW4i1NMN2dWjviz5 wgZKq26ezQBYB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Blue Swirl Subject: [Qemu-devel] [PATCH] mingw32: Fix definitions for PRId64, PRIx64, PRIu64, PRIo64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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. */