public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v2] Introduce a global bool type
Date: Fri, 18 Jan 2013 20:47:40 -0800	[thread overview]
Message-ID: <20130119044740.GA19450@badger> (raw)
In-Reply-To: <1357602948-16848-1-git-send-email-yorksun@freescale.com>

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 <yorksun@freescale.com>
> ---
> 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

      parent reply	other threads:[~2013-01-19  4:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 23:55 [U-Boot] [Patch v2] Introduce a global bool type York Sun
2013-01-08  6:29 ` Wolfgang Denk
2013-01-19  4:58   ` Allen Martin
2013-01-19  4:47 ` Allen Martin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130119044740.GA19450@badger \
    --to=amartin@nvidia.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox