]> git.saurik.com Git - bison.git/blobdiff - src/system.h
(_Bool, bool, false, true, __bool_true_false_are_defined):
[bison.git] / src / system.h
index bf1ef4cc674c80b6464bc2dec86de58df338c211..068b308a8d8bb846b26fedde747a988262d95dc9 100644 (file)
@@ -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 <stdbool.h>
 #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