Getting ready to land lots of stuff
davidsen at tmr.com
Tue Jun 13 11:07:17 UTC 2000
On 5 Jun 2000, Russ Allbery wrote:
> Aidan Cully <aidan at panix.com> writes:
> > I think that because bool is a standard C++ type, its definition doesn't
> > belong in an installed header file. The exported function prototypes,
> > declared variables, and structure definitions can all use 'int', or
> > 'char', or 'inn_bool', or something... Perl compatibility can be
> > allowed by defining a 'bool' type in a header file that *doesn't* get
> > installed.
> That's certainly another option. I was going for bool instead of int for
> the self-documenting properties and since innfeed is already using it.
> What do people think? Should we define a bool if the compiler doesn't
> have it (and define it in an installed header file so that we can write
> accurate prototypes for the functions), define a boolean type under some
> other name (and what name?), not use bool at all...?
It's not a part of C, but I guess it's possible a broken compiler might
not like us defining it, and it might get added to C in the future.
Neither of these is very likely, however.
I would say define it, unless there's a known C compiler which has a
problem with it. Using bool is fine since it will be familiar to some
bill davidsen <davidsen at tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
More information about the inn-workers