From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA/RFC] libdecnumber/gstdint.h is back :-(
Date: Sun, 14 Sep 2008 06:48:00 -0000 [thread overview]
Message-ID: <20080914064805.GA17662@adacore.com> (raw)
In-Reply-To: <20080913175609.GA30461@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
> > 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 <brobecker@adacore.com>
* 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
[-- Attachment #2: defs.h.diff --]
[-- Type: text/plain, Size: 1134 bytes --]
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 <limits.h>
#include <stdint.h>
+/* 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 <stddef.h>
#endif
next prev parent reply other threads:[~2008-09-14 6:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-13 5:01 Joel Brobecker
2008-09-13 14:14 ` Daniel Jacobowitz
2008-09-13 17:08 ` Joel Brobecker
2008-09-13 17:56 ` Daniel Jacobowitz
2008-09-14 6:48 ` Joel Brobecker [this message]
2008-09-14 16:04 ` Joel Brobecker
2008-09-14 17:17 ` Daniel Jacobowitz
2008-09-16 18:22 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080914064805.GA17662@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox