Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Nick Clifton <nickc@cambridge.redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Confusion over the definition of 'bool' in rdi-share/host.h
Date: Tue, 05 Feb 2002 10:59:00 -0000	[thread overview]
Message-ID: <20020205135914.A2825@nevyn.them.org> (raw)
In-Reply-To: <m3vgdbdchr.fsf@north-pole.nickc.cambridge.redhat.com>

On Tue, Feb 05, 2002 at 06:12:16PM +0000, Nick Clifton wrote:
> Hi Guys,
> 
>   The ARM port of GDB is currently failing to build for me because of
>   this problem:
> 
> In file included from /home/nickc/work/sources/egcs/gdb/rdi-share/ardi.h:17,
>                  from /home/nickc/work/sources/egcs/gdb/remote-rdi.c:46:
> /home/nickc/work/sources/egcs/gdb/rdi-share/host.h:123: conflicting types for `_Bool'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdbool.h:41: previous declaration of `_Bool'
> 
>   It seems that host.h has code that looks like this (trimmed a little):
> 
>     #  define _bool int
> 
>     #ifdef _bool
>        typedef _bool bool;
>     #endif
> 
>   And stdbool.h has:
> 
>     typedef enum
>     {
>       false = 0,
>       true = 1
>     } _Bool;
> 
>     #define bool _Bool
> 
>   So the typedef in host.h becomes, effectively  "typedef int enum _Bool".
> 
>   I am not sure if we are allowed to modify rdi-share/host.h, it
>   appears to be copyright to ARM, but if we are, then may I submit the
>   following patch to undefine bool before it is used ?

(Ew on all counts)

Does not defining bool if it is already defined also work?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-02-05 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05 10:11 Nick Clifton
2002-02-05 10:59 ` Daniel Jacobowitz [this message]
2002-02-05 11:38 ` Stan Shebs
2002-02-05 19:29   ` Andrew Cagney
2002-02-06 13:02     ` Grant Edwards
2002-02-06 21:36       ` Stan Shebs
2002-02-14  8:09         ` Grant Edwards
2002-02-06  2:57 ` Richard Earnshaw
2002-02-06  6:13   ` Fernando Nasser
2002-02-06 13:06     ` Grant Edwards

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=20020205135914.A2825@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=nickc@cambridge.redhat.com \
    /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