Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules

2010-08-15 Thread Andreas Färber
Am 15.08.2010 um 09:46 schrieb Blue Swirl: On Sat, Aug 14, 2010 at 2:27 PM, Andreas Färber > wrote: While indentation is nice to read, it is patch-unfriendly. Consider: #ifdef SOMETHINGNEW yay #else // previous stuff follows #if defined(OLDONE) # define one #endif foo bar #if defined(OLDTWO)

Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules

2010-08-15 Thread Blue Swirl
On Sat, Aug 14, 2010 at 2:27 PM, Andreas Färber wrote: > Am 13.08.2010 um 18:56 schrieb Blue Swirl: > +Use parenthesis when checking if a macro is defined, and use +indentation to track nesting: + +#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE) +# define fal

Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules

2010-08-14 Thread Andreas Färber
Am 13.08.2010 um 18:56 schrieb Blue Swirl: +Use parenthesis when checking if a macro is defined, and use +indentation to track nesting: + +#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE) +# define fallocate(a,ignored,b,c) posix_fallocate(a,b,c) +#endif This one is new, current co

Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules

2010-08-13 Thread Blue Swirl
On Thu, Aug 12, 2010 at 6:47 PM, malc wrote: > On Thu, 12 Aug 2010, Blue Swirl wrote: > >> Add preprocessor rules from libvirt HACKING. >> >> Signed-off-by: Blue Swirl >> --- >>  CODING_STYLE |   13 + >>  1 files changed, 13 insertions(+), 0 deletions(-) >> >> diff --git a/CODING_STYL

Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules

2010-08-12 Thread malc
On Thu, 12 Aug 2010, Blue Swirl wrote: > Add preprocessor rules from libvirt HACKING. > > Signed-off-by: Blue Swirl > --- > CODING_STYLE | 13 + > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/CODING_STYLE b/CODING_STYLE > index 92036f3..c4c09ab 100644 > ---

[Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules

2010-08-12 Thread Blue Swirl
Add preprocessor rules from libvirt HACKING. Signed-off-by: Blue Swirl --- CODING_STYLE | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/CODING_STYLE b/CODING_STYLE index 92036f3..c4c09ab 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -79,3 +79,16 @@ and cla