From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4632 invoked by alias); 6 Feb 2002 10:57:08 -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 4521 invoked from network); 6 Feb 2002 10:57:06 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 6 Feb 2002 10:57:06 -0000 Received: by fw-cam.cambridge.arm.com; id KAA00943; Wed, 6 Feb 2002 10:57:04 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma029863; Wed, 6 Feb 02 10:55:56 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA11062; Wed, 6 Feb 2002 10:55:56 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA25668; Wed, 6 Feb 2002 10:55:55 GMT Message-Id: <200202061055.KAA25668@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Nick Clifton cc: gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: Confusion over the definition of 'bool' in rdi-share/host.h In-reply-to: Your message of "05 Feb 2002 18:12:16 GMT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 06 Feb 2002 02:57:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-02/txt/msg00160.txt.bz2 > 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.