Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Nov 2011 10:09:26 -0800
From:      mdf@FreeBSD.org
To:        FreeBSD Arch <freebsd-arch@freebsd.org>
Cc:        Zack Kirsch <zack@freebsd.org>
Subject:   Use of bool / stdbool.h in kernel
Message-ID:  <CAMBSHm_Be0hCimgg0KpCFs24MHOW=LBczJbFZ3F1cOaCgrS8LA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
At $WORK we have a hack in one of the *.mk files to allow including
stdbool.h in the kernel and we use it extensively.  This is not
allowed by style(9), as far as I can tell, because the file is in
include/stdbool.h and those files are not allowed to be included in
kernel sources.

What I want to check on is, would it be acceptable to move stdbool.h
from include/stdbool.h to sys/sys/stdbool.h (i.e. like errno.h) and
then include it in the kernel as <sys/stdbool.h>?  That is, is the
objection / non-use because of where the file is located in the
repository, or is there some other reason?  Note that the pre-C99
boolean_t and TRUE/FALSE are spread over the kernel, mostly in sys/vm
where I assume they come from old AT&T sources.

Thanks,
matthew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm_Be0hCimgg0KpCFs24MHOW=LBczJbFZ3F1cOaCgrS8LA>