svn commit: r228878 - head/include

Sean C. Farley scf at FreeBSD.org
Fri Dec 30 17:04:07 UTC 2011


On Fri, 30 Dec 2011, Ed Schouten wrote:

> Hello Sean,
>
> * Sean C. Farley <scf at FreeBSD.org>, 20111230 03:54:
>> I just thought of this while reviewing the change:  should
>> __bool_true_false_are_defined be set only if __cplusplus is not set?
>> It should be set for C99, but I wonder if it should be set for C++.
>
> Even if the C++ standard doesn't mention it at all, I think it doesn't
> mean it is forbidden to define it. It starts with __[a-z], so it is in
> the reserved namespace.

I am fine with it.  I found many variations of stdbool.h with some 
wrapping __bool_true_false_are_defined within the __cplusplus check 
(e.g., glibc) and some that did not.  glibc may have it because 
stdbool.h is included from cstdbool and stdbool.h in 
/usr/include/c++/4.2/tr1/.

>> Also, is there a style requirement that the guard for a header file
>> be based off of the name of the file?  I did not see anything obvious
>> for this within style(9), but I am curious.
>
> I am not aware of this.

I am not aware of it either, hence, my question.  It was just something 
to which I have grown accustomed.  Using __bool_true_false_are_defined 
as the guard works.

Sean
-- 
scf at FreeBSD.org


More information about the svn-src-head mailing list