From: Paul Eggert Date: Fri, 3 Jan 2003 14:15:16 +0000 (+0000) Subject: (_Bool, bool, false, true, __bool_true_false_are_defined): X-Git-Tag: BISON-2_0~452 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45aa0550a1af29ab39c005a956ca39223815df9b;p=platform%2Fupstream%2Fbison.git (_Bool, bool, false, true, __bool_true_false_are_defined): Use the pattern recommended by Autoconf 2.57, except also protect against double-definition. --- diff --git a/src/system.h b/src/system.h index bf1ef4c..068b308 100644 --- a/src/system.h +++ b/src/system.h @@ -1,5 +1,6 @@ /* System-dependent definitions for Bison. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -185,7 +186,19 @@ void *memrchr (const void *s, int c, size_t n); #if HAVE_STDBOOL_H # include #else -typedef enum {false = 0, true = 1} bool; +# ifndef __bool_true_false_are_defined +# if ! HAVE__BOOL +# ifdef __cplusplus +typedef bool _Bool; +# else +typedef unsigned char _Bool; +# endif +# endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +# endif #endif