* bfd.h's true/false vs stdbool.h
@ 2002-01-03 14:07 Daniel Jacobowitz
0 siblings, 0 replies; only message in thread
From: Daniel Jacobowitz @ 2002-01-03 14:07 UTC (permalink / raw)
To: binutils
As of (at least) recent 2.95 snapshots, GCC includes a standard header
<stdbool.h>. As of recent versions of ncurses (post-5.2), curses.h
includes this header if available. The definitions are compatible with the
ones chosen by BFD on my system, AFAICT (x86-linux):
/* The type `bool' must promote to `int' or `unsigned int'. The constants
`true' and `false' must have the value 0 and 1 respectively. */
typedef enum
{
false = 0,
true = 1
} bool;
/* The names `true' and `false' must also be made available as macros. */
#define false false
#define true true
/* Signal that all the definitions are present. */
#define __bool_true_false_are_defined 1
Should we autoconf for the presence of this header and use it?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-03 22:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-03 14:07 bfd.h's true/false vs stdbool.h Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).