diff options
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 92af6ca..9fbde9d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -42,6 +42,7 @@ extern "C" { #include "ansidecl.h" #include "symcat.h" #include <stdint.h> +#include <stdbool.h> #include "diagnostics.h" #include <stdarg.h> #include <string.h> @@ -121,20 +122,19 @@ typedef BFD_HOSTPTR_T bfd_hostptr_t; /* Forward declaration. */ typedef struct bfd bfd; -/* Boolean type used in bfd. Too many systems define their own - versions of "boolean" for us to safely typedef a "boolean" of - our own. Using an enum for "bfd_boolean" has its own set of - problems, with strange looking casts required to avoid warnings - on some older compilers. Thus we just use an int. - +/* Boolean type used in bfd. General rule: Functions which are bfd_boolean return TRUE on success and FALSE on failure (unless they're a predicate). */ -typedef int bfd_boolean; -#undef FALSE -#undef TRUE -#define FALSE 0 -#define TRUE 1 +#ifdef POISON_BFD_BOOLEAN +# pragma GCC poison bfd_boolean FALSE TRUE +#else +# define bfd_boolean bool +# undef FALSE +# undef TRUE +# define FALSE 0 +# define TRUE 1 +#endif #ifdef BFD64 |