From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Date: Mon, 07 Jan 2013 22:54:31 +0000 Subject: [U-Boot] [PATCH] Introduce a global bool type References: <1357596628-27501-1-git-send-email-yorksun@freescale.com> <20130107223942.94BED20DA7E@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk writes: > Dear York Sun, > > In message <1357596628-27501-1-git-send-email-yorksun@freescale.com> you wrote: >> 'bool' is defined in random places. This patch consolidates them into a >> single typedef. > > Has this been actually compile tested? > > ... >> --- a/include/linux/types.h >> +++ b/include/linux/types.h >> @@ -113,6 +113,8 @@ typedef __u64 u_int64_t; >> typedef __s64 int64_t; >> #endif >> >> +typedef _Bool bool; > > And what exactly would "_Bool" be? _Bool is a C99 type (though I fail to imagine why). If using this, one might as well use the C99 header stdbool.h providing macros for 'bool', 'true' and 'false' instead of this. > Can we rather try and get rid of all this "bool" stuff instead? It's > just obfuscating the code... Indeed. -- M?ns Rullg?rd mans at mansr.com