From patchwork Fri Aug 10 19:45:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 176611 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9C1192C00C7 for ; Sat, 11 Aug 2012 05:45:34 +1000 (EST) Received: from localhost ([::1]:45009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szv9I-0005TV-OS for incoming@patchwork.ozlabs.org; Fri, 10 Aug 2012 15:45:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szv9B-0005TF-SE for qemu-devel@nongnu.org; Fri, 10 Aug 2012 15:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Szv99-0002D0-Eu for qemu-devel@nongnu.org; Fri, 10 Aug 2012 15:45:25 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:56822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szv99-0002Ch-9R for qemu-devel@nongnu.org; Fri, 10 Aug 2012 15:45:23 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 431747280031; Fri, 10 Aug 2012 21:45:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rleyvYciWvIL; Fri, 10 Aug 2012 21:45:17 +0200 (CEST) Received: by v220110690675601.yourvserver.net (Postfix, from userid 1000) id 0503D72800CC; Fri, 10 Aug 2012 21:45:17 +0200 (CEST) From: Stefan Weil To: Anthony Liguori Date: Fri, 10 Aug 2012 21:45:15 +0200 Message-Id: <1344627915-10971-1-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 78.47.199.172 Cc: Stefan Weil , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] w64: Fix compiler warning [-Wformat] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Glib2 uses __printf__ in macro G_GNUC_PRINTF for printf like functions. For MinGW, we want __gnu_printf__ because we use POSIX format specifiers instead of the MS format specifiers. Signed-off-by: Stefan Weil --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 7cbf4b4..7e69574 100755 --- a/configure +++ b/configure @@ -512,6 +512,8 @@ if test "$mingw32" = "yes" ; then QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS" # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS" + # GLIB2 and other libraries also support C99/POSIX format strings. + QEMU_CFLAGS="-D__printf__=__gnu_printf__ $QEMU_CFLAGS" LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS" cat > $TMPC << EOF int main(void) { return 0; }