On Sat, Aug 14, 2010 at 2:27 PM, Andreas Färber <andreas.faer...@web.de> 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 fallocate(a,ignored,b,c) posix_fallocate(a,b,c) >>>> +#endif >> >> This one is new, current code doesn't use indentation. Maybe it's >> better to drop it. > > Yes, please. 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) > # define two > #endif > > #endif > > Here, adding four lines would require to reindent six lines otherwise not > changed, making merging and review harder.
I don't quite follow the example, but is the situation different from adding a C 'if' statement and adjusting the indentation? However, I'm not proposing this anymore.