From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44960 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5g06-0003DE-Io for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:38:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5g05-0005FR-LX for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:38:46 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:56776 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5g05-0005FJ-Eg for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:38:45 -0400 Date: Tue, 12 Oct 2010 18:38:38 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test In-Reply-To: <4CB47129.1090202@redhat.com> Message-ID: References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> <1286888457-5033-9-git-send-email-pbonzini@redhat.com> <4CB47129.1090202@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Tue, 12 Oct 2010, Paolo Bonzini wrote: > On 10/12/2010 03:47 PM, malc wrote: > > > # host long bits test > > > -hostlongbits="32" > > > -case "$cpu" in > > > - x86_64|alpha|ia64|sparc64|ppc64|s390x) > > > - hostlongbits=64 > > > - ;; > > > -esac > > > +cat> $TMPC<< EOF > > > +int sizeof_long_is_8[sizeof(long) == 8 ? 1 : -1]; > > > +EOF > > > +if compile_object; then > > > +hostlongbits=64 > > > +else > > > +hostlongbits=32 > > > +fi > > > > This is wrong. > > Care to expand? Gives wrong results on Win64. > > $ grep LONG +build*/config-host.h > +build-32/config-host.h:#define HOST_LONG_BITS 32 > +build-64/config-host.h:#define HOST_LONG_BITS 64 > > Paolo > -- mailto:av1474@comtv.ru