This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
stdbool doesn't work
- To: gcc at gcc dot gnu dot org, zackw at stanford dot edu
- Subject: stdbool doesn't work
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 7 Mar 2001 17:30:42 -0800 (PST)
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* configure.in: Detect stdbool.h.
* configure, config.in: Regenerate.
* system.h: Include stddef.h here if available.
Set HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__.
Then set up a sensible boolean type at the very end.
seems to cause me build problems, I have an older gcc on my system
from 20010108, that has stdbool.h, but no _Bool type (or has bugs in
it). I can use the below to work around the problem.
Doing diffs in system.h.~1~:
*** system.h.~1~ Mon Mar 5 14:26:43 2001
--- system.h Wed Mar 7 12:13:07 2001
*************** extern void *alloca (__SIZE_TYPE__);
*** 575,580 ****
--- 565,571 ----
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
+ #define _Bool char
#else
# if !HAVE__BOOL
typedef char _Bool;
--------------
:-(
The autoconf tests need to be better, and detect when HAVE_STDBOOL_H
is defined, but _Bool isn't.