From: ricknu-0@student.ltu.se
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>, Jeff Garzik <jeff@garzik.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
Vadim Lobanov <vlobanov@speakeasy.net>,
Jan Engelhardt <jengelh@linux01.gwdg.de>,
Shorty Porty <getshorty_@hotmail.com>,
Peter Williams <pwil3058@bigpond.net.au>,
Michael Buesch <mb@bu3sch.de>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
larsbj@gullik.net, Paul Jackson <pj@sgi.com>,
Josef Sipek <jsipek@fsl.cs.sunysb.edu>,
Arnd Bergmann <arnd.bergmann@de.ibm.com>,
Nicholas Miell <nmiell@comcast.net>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Lars Noschinski <cebewee@gmx.de>
Subject: [PATCH 1/2] include/linux: Defining bool, false and true
Date: Sat, 29 Jul 2006 14:32:11 +0200 [thread overview]
Message-ID: <1154176331.44cb554b633ef@portal.student.luth.se> (raw)
In-Reply-To: <1154175570.44cb5252d3f09@portal.student.luth.se>
This patch defines:
* a generic boolean-type, named "bool"
* aliases to 0 and 1, named "false" and "true"
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
stddef.h | 5 +++++
types.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index b3a2cad..0382065 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -10,6 +10,11 @@ #else
#define NULL ((void *)0)
#endif
+enum {
+ false = 0,
+ true = 1
+};
+
#undef offsetof
#ifdef __compiler_offsetof
#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
diff --git a/include/linux/types.h b/include/linux/types.h
index 3f23566..406d4ae 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -33,6 +33,8 @@ typedef __kernel_clockid_t clockid_t;
typedef __kernel_mqd_t mqd_t;
#ifdef __KERNEL__
+typedef _Bool bool;
+
typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
next prev parent reply other threads:[~2006-07-29 12:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-29 12:19 [PATCH 0/2] A generic boolean-type ricknu-0
2006-07-29 12:32 ` ricknu-0 [this message]
2006-08-01 19:19 ` [PATCH 1/2] include/linux: Defining bool, false and true H. Peter Anvin
2006-08-01 21:12 ` ricknu-0
2006-08-01 21:20 ` H. Peter Anvin
2006-08-01 21:31 ` Jeff Garzik
2006-08-01 21:42 ` H. Peter Anvin
2006-08-01 21:48 ` Jeff Garzik
2006-08-01 21:52 ` H. Peter Anvin
2006-08-01 21:23 ` Jeff Garzik
2006-08-01 21:41 ` H. Peter Anvin
2006-08-01 21:47 ` Jeff Garzik
2006-07-29 12:36 ` [PATCH 2/2] drivers: Removes colliding boolean definitions ricknu-0
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1154176331.44cb554b633ef@portal.student.luth.se \
--to=ricknu-0@student.ltu.se \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd.bergmann@de.ibm.com \
--cc=cebewee@gmx.de \
--cc=getshorty_@hotmail.com \
--cc=jeff@garzik.org \
--cc=jengelh@linux01.gwdg.de \
--cc=jsipek@fsl.cs.sunysb.edu \
--cc=larsbj@gullik.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@bu3sch.de \
--cc=nmiell@comcast.net \
--cc=penberg@cs.helsinki.fi \
--cc=pj@sgi.com \
--cc=pwil3058@bigpond.net.au \
--cc=stefanr@s5r6.in-berlin.de \
--cc=vlobanov@speakeasy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®