From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41224 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5fsm-0007xz-2j for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:31:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5fsk-0003fS-NR for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:31:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5fsk-0003fM-GQ for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:31:10 -0400 Message-ID: <4CB47129.1090202@redhat.com> Date: Tue, 12 Oct 2010 16:31:05 +0200 From: Paolo Bonzini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> <1286888457-5033-9-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org 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? $ 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