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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 23 Jul 2006 17:44:38 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
CC:	ricknu-0@...dent.ltu.se, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...l.org>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Vadim Lobanov <vlobanov@...akeasy.net>,
	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
Subject: Re: [RFC][PATCH] A generic boolean (version 4)

Jan Engelhardt wrote:
>>>> +#define false false
>>>> +#define true true 
>>> Can someone please tell me what advantage 'define true true' is going to
>>> bring, besides than being able to '#ifdef true'?
>> It
>>
>> (a) makes type information available to the C compiler, where a plain #define
>> does not.
> 
> Do you mean preprocessor? C already knows about true from the enum.

I was describing the overall purpose of the enum + #define change, when 
you take my "(a)" and "(b)" in sum.


>> (b) handles all '#ifndef true' statements properly
> 
> Holy *, is there _really_ code in linux/ that depends on true being 
> [not] defined?

I suggest re-reading the boolean patches in this thread, to answer that 
question...

Programmer wanting to use boolean inevitably add an '#ifndef true' or 
'#ifndef TRUE' style statement to their code.

	Jeff



-
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