On 6/4/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:
> Ari Johnson schreef:
> > Reverted changes from r1417 and r1421 that used 'bool' instead of
> > 'BOOL' and thereby prevented the code from building
> >
> Does this really _not_ compile ? Because it _should_ compile. (Even with
> a non-C99 compatible compiler).
>
> Just look at lib/framework/types.h:
> > // If we are C99 compatible, the "bool" macro will be defined in
> > <stdbool.h> (as _Bool)
> > #if defined(WZ_C99)
> > # include <stdbool.h>
> > #else
> > // Pretend we are C99 compatible (well, for the bool type then)
> > # ifndef bool
> > #  define bool BOOL
> > # endif
> > # ifndef true
> > #  define true (1)
> > # endif
> > # ifndef false
> > #  define false (0)
> > # endif
> > # ifndef __bool_true_false_are_defined
> > #  define __bool_true_false_are_defined (1)
> > # endif
> > #endif /* WZ_C99 */
> So if that code doesn't compile when using "bool", please fix the above
> code in types.h instead of reverting back to "BOOL".
>
> The only scenario I can think of is that the compiler you use claims to
> be C99 compatible, but doesn't provide macros: "bool", "true", "false"
> and "__bool_true_false_are_defined" (which it _should_ provide if it
> claims C99 compatibility). Although I might look over something.

Every other place in the code uses BOOL.  Only these two lines used
bool.  Lines immediately above and below each of them used BOOL.

C99 also provides <stdbool.h>, which on my system defines 'bool'.
Have you read the standard?  See
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf p. 253,
which says that stdbool.h defines the bool type.

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to