On Wed, Nov 20, 2019 at 10:25:59AM -0700, Theo de Raadt wrote:
> Todd C. Miller <[email protected]> wrote:
> 
> > On Wed, 20 Nov 2019 10:17:09 -0700, "Theo de Raadt" wrote:
> > 
> > > Todd C. Miller <[email protected]> wrote:
> > >
> > > > On Wed, 20 Nov 2019 07:38:46 -0700, "Theo de Raadt" wrote:
> > > > 
> > > > > Kernel environment cannot use userland includes.
> > > > 
> > > > Some other systems have sys/stdbool.h, we could as well if we wanted
> > > > to.  The simplest approach is to move include/stdbool.h ->
> > > > sys/sys/stdbool.h and make /usr/include/stdbool.h a link to
> > > > sys/stdbool.h as we do for stdarg.h and stdint.h.
> > >
> > > But is it really neccessary?  Has int really caused everyone that
> > > much harm?
> > 
> > From a readability standpoint, it is nice to be able to use true
> > and false.  You can use those with int as well as with bool.
> 
> I don't think the type of readability stdbool.h brings results in 1
> fewer bug in the resulting code, also I think adding it to a body of
> code late risks introducing bugs.
> 
> More to the point, whenever I see codebases which mixes true/false,
> 0/-1, and 0/1, I don't pick up a vibe of "better readability".
> 
> And it gets even worse when one see that stdbool.h has 3 variations
> internally which are not 100.0% compatible.
> 
> I don't see any value bringing it to the kernel.

bool in the kernel is covered by /sys/sys/types.h not stdbool.h but is
really only for drm

revision 1.35
date: 2013/01/09 12:17:38;  author: jsg;  state: Exp;  lines: +28 -1;
add support for using c99 bool in the kernel based on our stdbool.h
ok deraadt@ millert@ espie@

Reply via email to