From patchwork Tue Jan 26 16:01:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 43715 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 9326BB7E7F for ; Wed, 27 Jan 2010 03:17:51 +1100 (EST) Received: from localhost ([127.0.0.1]:59113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZo6u-0000cM-OI for incoming@patchwork.ozlabs.org; Tue, 26 Jan 2010 11:17:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZnub-0005Ft-5J for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:05:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZnuW-0005A1-DY for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:05:04 -0500 Received: from [199.232.76.173] (port=51514 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZnuW-00059m-2Q for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:05:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31691) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZnuV-00023N-Gc for qemu-devel@nongnu.org; Tue, 26 Jan 2010 11:04:59 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0QG4txo020629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Jan 2010 11:04:55 -0500 Received: from redhat.com (dhcp-0-94.tlv.redhat.com [10.35.0.94]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o0QG4qcG030863; Tue, 26 Jan 2010 11:04:53 -0500 Date: Tue, 26 Jan 2010 18:01:47 +0200 From: "Michael S. Tsirkin" To: weil@mail.berlios.de, hpoussin@reactos.org, lcapitulino@redhat.com, Anthony Liguori , qemu-devel@nongnu.org, berrange@redhat.com, Juan Quintela Message-ID: <20100126160147.GA3460@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCHv2] configure: verify stdio.h 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 Verify that stdio.h supports %lld %zd. Some migw variants don't unless requested explicitly (see http://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg00417.html) ), detect them early. Signed-off-by: Michael S. Tsirkin Acked-by: Juan Quintela --- changes from v1: removed leftover chunk configure | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 5631bbb..6ba06d6 100755 --- a/configure +++ b/configure @@ -123,6 +123,26 @@ else exit 1 fi +# Check that stdio.h compiler is sane: some +# mingw variants do not support %z %l that we rely on +cat > $TMPC < +#include +size_t z = 1; +long long ll = 2; +int main(void) { + printf("z=%zd;ll=%lld;\n", z, ll); + return 0; +} +EOF + +if compile_prog && ($TMPE | grep "z=1;ll=2;" > /dev/null); then + : C compiler works ok +else + echo "ERROR: \"$cc\" does not have a working stdio.h" + exit 1 +fi + check_define() { cat > $TMPC <