From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26539 invoked by alias); 6 Feb 2002 14:13:21 -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 26399 invoked from network); 6 Feb 2002 14:13:15 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 6 Feb 2002 14:13:15 -0000 Received: from redhat.com (rtl.sfbay.redhat.com [205.180.230.21]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id GAA07482; Wed, 6 Feb 2002 06:12:56 -0800 (PST) Message-ID: <3C6139CC.274DFEA5@redhat.com> Date: Wed, 06 Feb 2002 06:13:00 -0000 From: Fernando Nasser Organization: Red Hat Canada X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.9-21 i686) X-Accept-Language: en MIME-Version: 1.0 To: Richard.Earnshaw@arm.com CC: Nick Clifton , gdb-patches@sources.redhat.com Subject: Re: Confusion over the definition of 'bool' in rdi-share/host.h References: <200202061055.KAA25668@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00168.txt.bz2 Richard Earnshaw 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 ? > > > > Cheers > > Nick > > the rdi's host.h is really a non-autoconf approach to generating host > definitions. It's contents should really be replaced with an include of > the standard autoconf generated definitions followed by some cleanups (ie > defining the types that the rdi code need in terms of what autoconf has > provided) to make the rest of the rdi files compile cleanly. > > R. Yes. But until someone finds the time to do that I guess we must apply Nick's patch. Regards to all, Fernando -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9