[ltt-dev] [PATCH 12/12] centralize definition of BITS_PER_LONG

Mathieu Desnoyers compudj at krystal.dyndns.org
Thu Feb 18 08:46:00 EST 2010


* 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




More information about the lttng-dev mailing list