From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29393 invoked by alias); 5 Feb 2002 18:59:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29248 invoked from network); 5 Feb 2002 18:59:23 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 5 Feb 2002 18:59:23 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16YAoE-0000k5-00; Tue, 05 Feb 2002 13:59:14 -0500 Date: Tue, 05 Feb 2002 10:59:00 -0000 From: Daniel Jacobowitz To: Nick Clifton Cc: gdb-patches@sources.redhat.com Subject: Re: Confusion over the definition of 'bool' in rdi-share/host.h Message-ID: <20020205135914.A2825@nevyn.them.org> Mail-Followup-To: Nick Clifton , gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-02/txt/msg00122.txt.bz2 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