From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12578 invoked by alias); 17 Oct 2011 20:58:31 -0000 Received: (qmail 12570 invoked by uid 22791); 17 Oct 2011 20:58:30 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Oct 2011 20:58:12 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9HKv11F005006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Oct 2011 16:57:01 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9HKv11B018250; Mon, 17 Oct 2011 16:57:01 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p9HKuwul021234; Mon, 17 Oct 2011 16:56:59 -0400 From: Tom Tromey To: Joel Brobecker Cc: Mike Frysinger , gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Subject: Re: [PATCH] sim: dv-cfi: include stdbool.h References: <1310410693-20883-1-git-send-email-vapier@gentoo.org> <201110171306.34450.vapier@gentoo.org> <20111017172603.GY19246@adacore.com> <201110171423.17537.vapier@gentoo.org> <20111017202717.GB19246@adacore.com> Date: Mon, 17 Oct 2011 21:11:00 -0000 In-Reply-To: <20111017202717.GB19246@adacore.com> (Joel Brobecker's message of "Mon, 17 Oct 2011 13:27:17 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00486.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: >> #ifdef HAVE_STDBOOL_H >> # include >> #else >> # define bool int >> # define true 1 >> # define false 0 >> #endif Joel> I don't know what the others feel about this, I'm always wary of Joel> this, but maybe I'm too paranoid. I remember using these sorts of Joel> defines, and getting into portability issues, but that was a very Joel> long time ago, and I don't remember the details. Perhaps I didn't Joel> do something right, or it's now OBE. GCC has done this for years and years. I think it has been a net positive for code readability. Joel> I think that the best compromise, if you really want to "true" and/or Joel> "false", is to probably start using gnulib in the sim code as well. Joel> I just don't know offhand how easy it would be to integrate that Joel> with GDB's use of gnulib. But it'd allow you to include stdbool.h Joel> unconditionally, knowing that gnulib would provide it if the system Joel> doesn't already. It could perhaps be put in libiberty more easily. Tom