From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Martin Date: Fri, 18 Jan 2013 20:58:10 -0800 Subject: [U-Boot] [Patch v2] Introduce a global bool type In-Reply-To: <20130108062928.BA9B1200732@gemini.denx.de> References: <1357602948-16848-1-git-send-email-yorksun@freescale.com> <20130108062928.BA9B1200732@gemini.denx.de> Message-ID: <20130119045810.GB19450@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 10:29:28PM -0800, Wolfgang Denk wrote: > Dear York Sun, > > In message <1357602948-16848-1-git-send-email-yorksun@freescale.com> you 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. > > Please see M?ns Rullg?rd's comment about using stdbool.h instead. > Isn't stdbool.h more for backward compatability for user space programs, so only newer C99 aware programs can opt-in to the new data type? Linux for example doesn't use stdbool.h, it puts the definition of "bool" in types.h, and true/false in stddef.h. Since, like Linux, u-boot is a single codebase, all the data types can go in a common place and not have to worry about breaking old programs with new types. > Then please make sure that a sufficient number of tool chains as well > as configurations using USE_PRIVATE_LIBGCC continue to work, i. e. in > a first step verify that these are still compile-clean. If you cc me on newer versions of the patch I can help verify on tegra, which uses USE_PRIVATE_LIBGCC. -Allen -- nvpublic