From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Martin Date: Fri, 18 Jan 2013 20:47:40 -0800 Subject: [U-Boot] [Patch v2] Introduce a global bool type In-Reply-To: <1357602948-16848-1-git-send-email-yorksun@freescale.com> References: <1357602948-16848-1-git-send-email-yorksun@freescale.com> Message-ID: <20130119044740.GA19450@badger> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jan 07, 2013 at 03:55:48PM -0800, York Sun wrote: > 'bool' is defined in random places. This patch consolidates them into a > single typedef, using _Bool introduced in C99. > > Signed-off-by: York Sun > --- > Change since v1: > Move 'false' and 'true' to the common header file. > > Need help from other arch maintainers to test it. I could only test powerpc. > Thank you for taking this on, it's definately in need of cleanup. There are also many duplicate definitions of the upper case variants (BOOL/TRUE/FALSE). Those should get fixed too. > +typedef _Bool bool; > +#define false 0 > +#define true 1 > + Linux defines true/false as an enum type in stddef.h, since u-boot already has a copy of this Linux header, shouldn't it go in there? -Allen -- nvpublic