Re: [PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-10 Thread Irina Tirdea
On Mon, Sep 10, 2012 at 5:44 PM, Peter Zijlstra wrote: > On Sun, 2012-09-09 at 01:19 +0300, Irina Tirdea wrote: >> >> +#ifndef __WORDSIZE >> >> +#if defined(__x86_64__) >> >> +# define __WORDSIZE 64 >> >> +#endif >> >> +#if defined(__i386__) || defined(__arm__) >> >> +# define __WORDSIZE 32 >> >>

Re: [PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-10 Thread Peter Zijlstra
On Sun, 2012-09-09 at 01:19 +0300, Irina Tirdea wrote: > >> +#ifndef __WORDSIZE > >> +#if defined(__x86_64__) > >> +# define __WORDSIZE 64 > >> +#endif > >> +#if defined(__i386__) || defined(__arm__) > >> +# define __WORDSIZE 32 > >> +#endif > >> +#endif > > > > Why not use "sizeof(unsigned long) *

Re: [PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-08 Thread Irina Tirdea
>> +#ifndef __WORDSIZE >> +#if defined(__x86_64__) >> +# define __WORDSIZE 64 >> +#endif >> +#if defined(__i386__) || defined(__arm__) >> +# define __WORDSIZE 32 >> +#endif >> +#endif > > Why not use "sizeof(unsigned long) * 8" ? I tried to do it this, but the compilation crashes because this valu

Re: [PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-08 Thread Pekka Enberg
On Sat, Sep 8, 2012 at 3:43 AM, Irina Tirdea wrote: > From: Irina Tirdea > > __WORDSIZE is GLibC-specific and is not defined on all systems or glibc > versions (e.g. Android's bionic does not define it). > > In file included from util/include/linux/bitmap.h:5:0, > from util/heade

[PATCH v2 03/12] perf tools: include __WORDSIZE definition

2012-09-07 Thread Irina Tirdea
From: Irina Tirdea __WORDSIZE is GLibC-specific and is not defined on all systems or glibc versions (e.g. Android's bionic does not define it). In file included from util/include/linux/bitmap.h:5:0, from util/header.h:10, from util/session.h:6,