From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33245 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5g1X-0003wd-Qe for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:40:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5g1W-0005Rx-P6 for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:40:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5g1W-0005Rr-IE for qemu-devel@nongnu.org; Tue, 12 Oct 2010 10:40:14 -0400 Message-ID: <4CB47348.1050700@redhat.com> Date: Tue, 12 Oct 2010 16:40:08 +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> <4CB47129.1090202@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 04:38 PM, malc wrote: > 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. Then it's not HOST_LONG_BITS, it's HOST_POINTER_BITS. Paolo