[PATCH] include stdbool.h for "bool" types

Mike Frysinger vapier at gentoo.org
Sun Dec 18 20:50:39 UTC 2011


On Sunday 18 December 2011 15:14:17 Dmitry V. Levin wrote:
> On Sat, Dec 10, 2011 at 03:54:00PM -0500, Mike Frysinger wrote:
> > Current build fails due to missing stdbool.h include:
> > strace.c:102:1: error: unknown type name 'bool'
> > strace.c: In function 'die_out_of_memory':
> > strace.c:269:2: error: unknown type name 'bool'
> > 
> > Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> > 
> > 	* strace.c: Include <stdbool.h>
> 
> Well, this is really odd because stdbool.h is already included via defs.h:
> 
> $ git grep -i stdbool
> ChangeLog-CVS:	* configure.ac: Add AC_HEADER_STDBOOL.
> ChangeLog-CVS:	* defs.h [HAVE_STDBOOL_H]: #include <stdbool.h>.
> configure.ac:AC_HEADER_STDBOOL
> defs.h:#ifdef HAVE_STDBOOL_H
> defs.h:#include <stdbool.h>
> 
> I wonder why it doesn't work for you.

good call.  i missed that.  short answer: drop my proposed patch.

seems gcc-4.7 barfs on the configure test code.  this would be something to 
bring up with the autoconf or gcc guys though.

configure:5302: checking for stdbool.h that conforms to C99
configure:5387: gcc-4.7.0-alpha20111126 -mx32 -c -O0 -g -ggdb -pipe  conftest.c
conftest.c:84:3: error: initializer element is not constant

and the comment in the conftest.c code specifically calls out known bugs in 
past gcc :) ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20111218/c0e3394f/attachment.bin>


More information about the Strace-devel mailing list