mount.h/radix.h
David Cuthbert
dacut at kanga.org
Mon Jan 24 17:24:29 PST 2005
Jeffrey Hsu wrote:
Now that C99 defines a standard boolean type, _Bool, how about we just
change all the occurrences of boolean_t in the kernel to _Bool?
Ugh, please don't.
_Bool exists as a way of preventing clashes with existing typedefs; it
is not intended for use in new code.
The proper C99 way is to #include <stdbool.h>, which then performs:
#define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined 1
(or the equivalent -- it is guaranteed that all are usable in #if
preprocessor macros).
I believe that gcc may be out of compliance here, but I haven't peeked
at the latest versions. (gcc was also missing the complex and imaginary
types and associated #pragmas last I checked.)
More information about the Submit
mailing list