From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na47m-0004c2-4n for qemu-devel@nongnu.org; Wed, 27 Jan 2010 04:23:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na47h-0004Ya-7Q for qemu-devel@nongnu.org; Wed, 27 Jan 2010 04:23:45 -0500 Received: from [199.232.76.173] (port=46760 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na47g-0004YS-WA for qemu-devel@nongnu.org; Wed, 27 Jan 2010 04:23:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56358) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Na418-0005T2-OM for qemu-devel@nongnu.org; Wed, 27 Jan 2010 04:16:54 -0500 Date: Wed, 27 Jan 2010 11:13:42 +0200 From: "Michael S. Tsirkin" Message-ID: <20100127091342.GB3476@redhat.com> References: <20100126160147.GA3460@redhat.com> <4B5F624C.7060402@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B5F624C.7060402@mail.berlios.de> Subject: [Qemu-devel] Re: [PATCHv2] configure: verify stdio.h List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org, Juan Quintela On Tue, Jan 26, 2010 at 10:44:44PM +0100, Stefan Weil wrote: > Michael S. Tsirkin schrieb: > > Verify that stdio.h supports %lld %zd. > > Some migw variants don't unless requested explicitly (see > > migw -> mingw > > I don't know any ming32 variant which supports %lld, %zd. > There is a new mingw-w64 were people are addressing the > problem, Did you try with -D__USE_MINGW_ANSI_STDIO=1 ? This is what the link below mentions. > but that variant is unsupported by qemu. What are the issues? > > > 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 > > +#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 < > #if !defined($1) > > > Tests of %lld must use a 64 bit pattern (ll = 0x0123456789abcdefLL). > Otherwise, %lld, %ld and %d with ll = 1 will all print 1 on little endian > machines, and the %lld test won't detect missing support. > > The problem is now several years old, it can be avoided for really > important output, so it seems acceptable to wait another period > of time until a working mingw is supported by qemu. > > A test which prevents qemu builds on windows with current mingw32 > or cross builds with current debian cross mingw32 would not help. > Both variants work for me even without full format support. > > Regards, > Stefan Weil