#ifdef usage (was Re: PPC32: Fix the floppy driver, on CONFIG_NOT_COHERENT_CACHE.

From: Valdis . Kletnieks
Date: Mon Jan 05 2004 - 12:06:15 EST


On Mon, 05 Jan 2004 17:07:23 +0100, Andreas Schwab said:
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:
>
> > On Fri, 2 Jan 2004, Linux Kernel Mailing List wrote:
> >> +#if CONFIG_NOT_COHERENT_CACHE
> > ^^^
> > Shouldn't this be #ifdef?
>
> Doesn't matter. Config variables are always either defined to 1 or not
> defined at all (which is equivalent to 0 in #if).

It makes life a lot simpler for those who compile with -Wundef, which is why
I did a bunch of cleanup back around 2.5.6mumble or so. It also found a real
bug where '#if A | B | C' and there was a typo in B. There's also a few
places where code used '#if LINUX_VERSION_CODE > NNNN' without
doing a #include of version.h - fortunately for us, all the cases of *that* happened
to do the right thing when using the implied zero.

Attachment: pgp00000.pgp
Description: PGP signature