[PATCH] Introduce simple TRUE and FALSE boolean macros.

From: Robert P. J. Day
Date: Sun Jan 21 2007 - 05:10:36 EST



Introduce the TRUE and FALSE boolean macros so that everyone can
stop re-inventing them, and remove the one occurrence in the source
tree that clashes with that change.

Signed-off-by: Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>

---

once this patch is applied, others can remove all of the superfluous
macro definitions from the source tree at their convenience.

this was compile tested on x86 with "make allyesconfig".


drivers/net/wireless/strip.c | 2 --
include/linux/types.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index ce3a8ba..5e64ec1 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -177,8 +177,6 @@ typedef struct {
MetricomNode node[NODE_TABLE_SIZE];
} MetricomNodeTable;

-enum { FALSE = 0, TRUE = 1 };
-
/*
* Holds the radio's firmware version.
*/
diff --git a/include/linux/types.h b/include/linux/types.h
index 0351bf2..d988636 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -34,6 +34,8 @@ typedef __kernel_mqd_t mqd_t;

#ifdef __KERNEL__
typedef _Bool bool;
+#define TRUE 1
+#define FALSE 0

typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/