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

From: Paul Jackson
Date: Sun Jul 23 2006 - 17:15:53 EST

The defines of false and true to be themselves are going to cause a
thousand code readers to say "wtf?". How about a comment, as in:

enum {
false = 0,
true = 1
+/* Let any other #if[n]def's on false/true presume they're defined */
#define false false
#define true true


On second thought, I just grep'd the entire kernel with:
grep -E '#ifn*def.*(false|true)'
and only found exactly one other such #ifdef construct:

#ifndef true
#define true 1
#define false 0

Perhaps we should just drop the cpia2.h defines, and drop
the defines of false/true to be themselves. And drop my
comment ;).

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