From mboxrd@z Thu Jan 1 00:00:00 1970 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 Date: Tue, 26 Jan 2010 18:01:47 +0200 From: "Michael S. Tsirkin" Message-ID: <20100126160147.GA3460@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCHv2] configure: verify stdio.h List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: weil@mail.berlios.de, hpoussin@reactos.org, lcapitulino@redhat.com, Anthony Liguori , qemu-devel@nongnu.org, berrange@redhat.com, Juan Quintela 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 <