Subject: RE: definition of TRUE and FALSE in system headers
To: Krister Walfridsson <>
From: De Zeurkous <>
List: tech-userlevel
Date: 07/23/2007 11:47:31

On Mon, July 23, 2007 11:41, Krister Walfridsson wrote:
> I have seen some problems with software failing to build on NetBSD
> 4.0_BETA2 because NetBSD now defines/redefines TRUE and FALSE when
> you include e.g. sys/ioctl.h (the definition/redefinition
>    #undef TRUE
>    #define TRUE    1
>    #undef FALSE
>    #define FALSE   0
> is in prop/prop_object.h that is included (via sys/dkio.h) from
> sys/ioctl.h)

Move 'em to stdbool.h -- that's where they belong.

> I assume the sys/ headers do not guarantee much about namespace
> protection, but I was a bit surprised that it redefined such common
> constants...  So I'd like check if this is the expected behavior or
> a bug before I send patches to other projects...

I would certainly consider it bad design.


De Zeurkous

Friggin' Machines!

>     /Krister