lkml.org 
[lkml]   [2006]   [Jul]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 23 Jul 2006 16:25:12 -0400
FromJeff Garzik <>
SubjectRe: [RFC][PATCH] A generic boolean (version 4)
Jan Engelhardt wrote:
>> +#undef false
>> +#undef true
>> +
>> +enum {
>> +	false	= 0,
>> +	true	= 1
>> +};
>> +
>> +#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.
(b) handles all '#ifndef true' statements properly

	Jeff


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

\
 
 \ /
  Last update: 2006-07-23 22:27    [from the cache]
©2003-2008