lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44CFC59A.5050609@zytor.com>
Date:	Tue, 01 Aug 2006 14:20:26 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	ricknu-0@...dent.ltu.se
CC:	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>,
	Jeff Garzik <jeff@...zik.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Vadim Lobanov <vlobanov@...akeasy.net>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Shorty Porty <getshorty_@...mail.com>,
	Peter Williams <pwil3058@...pond.net.au>,
	Michael Buesch <mb@...sch.de>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Stefan Richter <stefanr@...6.in-berlin.de>, larsbj@...lik.net,
	Paul Jackson <pj@....com>,
	Josef Sipek <jsipek@....cs.sunysb.edu>,
	Arnd Bergmann <arnd.bergmann@...ibm.com>,
	Nicholas Miell <nmiell@...cast.net>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Lars Noschinski <cebewee@....de>
Subject: Re: [PATCH 1/2] include/linux: Defining bool, false and true

ricknu-0@...dent.ltu.se wrote:
> Citerar "H. Peter Anvin" <hpa@...or.com>:
> 
>> ricknu-0@...dent.ltu.se wrote:
>>> 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@...dent.ltu.se>
>> Shouldn't this simply use _Bool?
> 
> Well, it is (now) just a typedef of it. :)
> 
> But I find it better, both because it is more similar to the common types:
> short, lowlettered words. But also because most editors with highlightning
> recognize "bool", but not "_Bool", as a type (as I found it).
> 

<stdbool.h> should include:

typedef _Bool bool;
#define true  1
#define false 0

There is no enum involved.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ