[Freeciv-Dev] Re: (PR#2461) bool type already exists
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 1 Dec 2002, Jason Short via RT wrote:
> Indicating that 'bool' was already defined in the system headers. It is
> typedefed as unsigned char.
>
> I see two choices:
>
> - Use fc_bool instead of bool.That way we don't interfere with anyone
> else.But people will forget to use it. And IMO it is less readable.
>
> - Check for the 'bool' type in configure, and define HAVE_BOOL based on
> this.The downside here is that the check may not be trivial, since we
> don't know what header it might be in.
The solution to such problems is for configure to compile a very tiny
program that uses bool, and if this works, define HAVE_BOOL.
The bigger problem may be that bool is typedef'ed to char instead of int.
Wouldn't this cause some problems somewhere? Or at least lots of warnings?
- Per
- [Freeciv-Dev] Re: (PR#2461) bool type already exists,
Per I. Mathisen via RT <=
|
|