Re: [PATCH] Check for the appropriate condition in types.h

2009-07-25 Thread Javier Martín
El jue, 23-07-2009 a las 16:57 -0400, Pavel Roskin escribió: > On Thu, 2009-07-23 at 22:30 +0200, Vladimir 'phcoder' Serbinenko wrote: > > >> > [GRUB_CPU_SIZEOF_VOID_P == 8]: Changed to ... > > >> > [GRUB_CPU_SIZEOF_LONG == 8]: ... this. > > >> Ok, let's adopt this form instead. The proposed Change

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 22:30 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> > [GRUB_CPU_SIZEOF_VOID_P == 8]: Changed to ... > >> > [GRUB_CPU_SIZEOF_LONG == 8]: ... this. > >> Ok, let's adopt this form instead. The proposed ChangeLog would now be: > > > > >From the GNU Coding Standards: > > > > "C

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
>> > [GRUB_CPU_SIZEOF_VOID_P == 8]: Changed to ... >> > [GRUB_CPU_SIZEOF_LONG == 8]: ... this. >> Ok, let's adopt this form instead. The proposed ChangeLog would now be: > > >From the GNU Coding Standards: > > "C programs often contain compile-time `#if' conditionals.  Many changes > are conditiona

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 20:11 +0200, Javier Martín wrote: > El jue, 23-07-2009 a las 17:40 +0200, Vladimir 'phcoder' Serbinenko > escribió: > > Actualy I should have used ALIGN_UP here > It's just a random sample of code, brought up by a search for (long). > I'm pretty sure more examples abound. > >

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Javier Martín
El jue, 23-07-2009 a las 17:40 +0200, Vladimir 'phcoder' Serbinenko escribió: > Actualy I should have used ALIGN_UP here It's just a random sample of code, brought up by a search for (long). I'm pretty sure more examples abound. > > Regarding the ChangeLog entry, I always have problems with them.

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Vladimir 'phcoder' Serbinenko
> Thanks. I have though of an additional change: if it seems acceptable, > apply the "new" version of the patch that I attach with this message. If > it is not, just use the old version in the original post and I'll send > the new change as another patch. > > The additional change is the refactorin

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Javier Martín
El jue, 23-07-2009 a las 10:37 -0400, Pavel Roskin escribió: > On Thu, 2009-07-23 at 13:10 +0200, Javier Martín wrote: > > Currently verifies that sizeof(void*)==sizeof(long) and > > then proceeds to define most fixed-length types based on sizeof(void*). > > While simplification seems a good idea

Re: [PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Pavel Roskin
On Thu, 2009-07-23 at 13:10 +0200, Javier Martín wrote: > Currently verifies that sizeof(void*)==sizeof(long) and > then proceeds to define most fixed-length types based on sizeof(void*). > While simplification seems a good idea on paper, it is always good > practice to check specifically for what

[PATCH] Check for the appropriate condition in types.h

2009-07-23 Thread Javier Martín
Currently verifies that sizeof(void*)==sizeof(long) and then proceeds to define most fixed-length types based on sizeof(void*). While simplification seems a good idea on paper, it is always good practice to check specifically for what we want to know. In particular, the assumption that long can ho