DragonFly BSD
DragonFly submit List (threaded) for 2005-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: mount.h/radix.h


From: David Cuthbert <dacut@xxxxxxxxx>
Date: Mon, 24 Jan 2005 20:24:29 -0500

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.)



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]