Index: gcc/system.h
===================================================================
--- gcc/system.h	(revision 164480)
+++ gcc/system.h	(working copy)
@@ -621,29 +621,29 @@
    This must be after all inclusion of system headers, as some of
    them will mess us up.  */
 
-#undef TRUE
-#undef FALSE
+#ifndef __cplusplus
+# undef bool
 
-#ifdef __cplusplus
-  /* Obsolete.  */
-# define TRUE true
-# define FALSE false
-#else /* !__cplusplus */
-# undef bool
+# if GCC_VERSION >= 4004
+#  define bool _Bool
+#  define BOOL_BITFIELD _Bool
+# else
+#  define bool unsigned char
+/* Some compilers do not allow the use of unsigned char in bitfields.  */
+#  define BOOL_BITFIELD unsigned int
+# endif
+
 # undef true
 # undef false
-
-# define bool unsigned char
 # define true 1
 # define false 0
-
-  /* Obsolete.  */
-# define TRUE true
-# define FALSE false
 #endif /* !__cplusplus */
 
-/* Some compilers do not allow the use of unsigned char in bitfields.  */
-#define BOOL_BITFIELD unsigned int
+/* Obsolete.  */
+#undef TRUE
+#undef FALSE
+#define TRUE true
+#define FALSE false
 
 /* As the last action in this file, we poison the identifiers that
    shouldn't be used.  Note, luckily gcc-3.0's token-based integrated
Index: libcpp/system.h
===================================================================
--- libcpp/system.h	(revision 164480)
+++ libcpp/system.h	(working copy)
@@ -379,24 +379,34 @@
 
 /* Provide a fake boolean type.  We make no attempt to use the
    C99 _Bool, as it may not be available in the bootstrap compiler,
-   and even if it is, it is liable to be buggy.  
+   and even if it is, it is liable to be buggy.
    This must be after all inclusion of system headers, as some of
    them will mess us up.  */
-#undef bool
-#undef true
-#undef false
-#undef TRUE
-#undef FALSE
 
 #ifndef __cplusplus
-#define bool unsigned char
-#endif
-#define true 1
-#define false 0
+# undef bool
 
+# if GCC_VERSION >= 4004
+#  define bool _Bool
+#  define BOOL_BITFIELD _Bool
+# else
+#  define bool unsigned char
 /* Some compilers do not allow the use of unsigned char in bitfields.  */
-#define BOOL_BITFIELD unsigned int
+#  define BOOL_BITFIELD unsigned int
+# endif
 
+# undef true
+# undef false
+# define true 1
+# define false 0
+#endif /* !__cplusplus */
+
+/* Obsolete.  */
+#undef TRUE
+#undef FALSE
+#define TRUE true
+#define FALSE false
+
 /* Poison identifiers we do not want to use.  */
 #if (GCC_VERSION >= 3000)
 #undef calloc
