From mboxrd@z Thu Jan 1 00:00:00 1970 From: compudj@krystal.dyndns.org (Mathieu Desnoyers) Date: Thu, 18 Feb 2010 08:46:00 -0500 Subject: [ltt-dev] [PATCH 12/12] centralize definition of BITS_PER_LONG In-Reply-To: <4B7CFE10.8070803@redhat.com> References: <1266260686-17588-1-git-send-email-pbonzini@redhat.com> <1266260686-17588-13-git-send-email-pbonzini@redhat.com> <20100218032554.GG11338@Krystal> <4B7CFE10.8070803@redhat.com> Message-ID: <20100218134600.GA5825@Krystal> * Paolo Bonzini (pbonzini at redhat.com) wrote: > On 02/18/2010 04:25 AM, Mathieu Desnoyers wrote: >>> > +#if defined(__SIZEOF_LONG__) >>> > +#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) >>> > +#elif defined(_LP64) >> How about _LLP64 and _ILP64 ? (not sure exactly which architectures >> would fit in this category nowadays though). > > They are not defined by GCC. Good to know. > > I32LLP64 is basically only Mingw64 and ia64-hpux. And anyway I32LLP64 have 4-byte longs, so they should work anyway with these tests. > They'd probably break > horribly because with 99% likelihood somewhere there is an assumption > that sizeof (long) == sizeof (void*). In the atomic ops headers possibly, yes. > > What used ILP64, maybe some Cray? Let's ask Paul to see what he knows about this. As I pointed out, it's not a show stopper not to support everything, but at least we should know what our limitations are. Thanks, Mathieu > > Paolo > -- Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68