Hi,
On Thu, 16 Mar 2006, [email protected] wrote:
> From: Andrew Morton <[email protected]>
>
> We have no less than 65 implementations of TRUE and FALSE in the tree, so the
> inevitable happened:
[snip
>
> The patch implements TRUE and FALSE in include/linux/kernel.h and removes all
> the private versions.
Great! That has really been long overdue.
> Various places are doing things like
>
> typedef {
> FALSE,
> TRUE
> } my_fave_name_for_a_bool;
>
> These are converted to
>
> typedef int my_fave_name_for_a_bool;
Given that the kernel now requires gcc 3.2 or later, that already includes
a native boolean type (_Bool)? Why not use that instead of "int"?
Also <stdbool.h> contains:
#define bool _Bool
#define true 1
#define false 0
So we could take the bool rather than _Bool, too given _Bool looks
rather ugly...
We could even go as far as removing all those typedefs and replacing all
their uses with the native boolean type (or the "bool" define or
whatever). Seems like the perfect janitorial task to me. (-;
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]