From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17545 invoked by alias); 14 Sep 2008 06:48:46 -0000 Received: (qmail 17537 invoked by uid 22791); 14 Sep 2008 06:48:46 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 14 Sep 2008 06:48:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A0BCB2A967D for ; Sun, 14 Sep 2008 02:48:09 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2AF4OU25s1mz for ; Sun, 14 Sep 2008 02:48:09 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 543882A9683 for ; Sun, 14 Sep 2008 02:48:09 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BFA16E7ACD; Sat, 13 Sep 2008 23:48:05 -0700 (PDT) Date: Sun, 14 Sep 2008 06:48:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA/RFC] libdecnumber/gstdint.h is back :-( Message-ID: <20080914064805.GA17662@adacore.com> References: <20080913050011.GA3727@adacore.com> <20080913141335.GA3005@caradoc.them.org> <20080913170814.GG3714@adacore.com> <20080913175609.GA30461@caradoc.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: <20080913175609.GA30461@caradoc.them.org> User-Agent: Mutt/1.4.2.2i 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: 2008-09/txt/msg00315.txt.bz2 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 510 > > I can rework a little the comment, but what do you think of the idea? > > I think it's similar to your suggestion, except that the knowledge is > > kept on the "client" side rather than the library side. > > In my opinion, this patch would be fine. Cool. Here is what I ended up checking in: 2008-09-13 Joel Brobecker * defs.h (GCC_GENERATED_STDINT_H): Define. Tested on x86-linux. Also verified that GDB builds when configured in-tree on Tru64. Thank you! -- Joel --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="defs.h.diff" Content-length: 1134 Index: defs.h =================================================================== RCS file: /cvs/src/src/gdb/defs.h,v retrieving revision 1.236 diff -u -p -r1.236 defs.h --- defs.h 11 Sep 2008 14:21:49 -0000 1.236 +++ defs.h 14 Sep 2008 06:36:51 -0000 @@ -30,6 +30,20 @@ #include #include +/* The libdecnumber library, on which GDB depends, includes a header file + called gstdint.h instead of relying directly on stdint.h. GDB, on the + other hand, includes stdint.h directly, relying on the fact that gnulib + generates a copy if the system doesn't provide one or if it is missing + some features. Unfortunately, gstdint.h and stdint.h cannot be included + at the same time, which may happen when we include a file from + libdecnumber. + + The following macro definition effectively prevents the inclusion of + gstdint.h, as all the definitions it provides are guarded against + the GCC_GENERATED_STDINT_H macro. We already have gnulib/stdint.h + included, so it's ok to blank out gstdint.h. */ +#define GCC_GENERATED_STDINT_H 1 + #ifdef HAVE_STDDEF_H #include #endif --fdj2RfSjLxBAspz7--