From 0beb889fec44701079d546b73b252bdda5ba0379 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 27 Oct 2003 13:58:34 +0000 Subject: [PATCH] Improved support for BeOS: Avoid compilation error if is included after . --- lib/ChangeLog | 4 ++++ lib/stdbool_.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 2c3e1f0711..6733de4060 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2003-10-27 Bruno Haible + + * stdbool_.h: Better support for BeOS. + 2003-10-27 Paul Eggert * exclude.c (new_exclude): Use xzalloc rather than xmalloc diff --git a/lib/stdbool_.h b/lib/stdbool_.h index 3dbb51b24b..e33715a615 100644 --- a/lib/stdbool_.h +++ b/lib/stdbool_.h @@ -56,6 +56,7 @@ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #ifdef __BEOS__ +# include /* defines bool but not _Bool */ # undef false # undef true #endif @@ -69,7 +70,7 @@ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ -#ifndef __cplusplus +#if !(defined __cplusplus || defined __BEOS__) # if !@HAVE__BOOL@ # if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1) /* Avoid stupid "warning: _Bool is a keyword in ISO C99". */ -- 2.30.2