Re: [RFC][PATCH] A generic boolean (version 4)

From: Paul Jackson
Date: Mon Jul 24 2006 - 04:55:06 EST

Jan wrote:
> Can someone please tell me what advantage 'define true true' is going to
> bring, besides than being able to '#ifdef true'?

I think Jeff's replies to this are a tad confusing. He seems
to be answering in part with the broader point of the value of
increased type checking using enums, and not focusing on the
specific reason these two defines of true and false are there.

As best as I can tell, these two odd looking defines are just to
suppress #define alternative's to our enum based false and true
constructs, in the likely case that the alternatives are guarded
with the usual #ifndef logic.

In other words, their advantage is basically what you said, being
able to '#ifdef true' (or #ifndef).

As I recommend in another subthread, these two defines need a comment.

And since there is only one "#ifndef true" left in the entire kernel
source tree, in drivers/media/video/cpia2/cpia2.h, I would think it
would be better to just remove those lines from cpia2.h, and drop
these two odd looking defines.

I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.925.600.0401
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at