This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/RFC] libdecnumber/gstdint.h is back :-(
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 13 Sep 2008 10:13:35 -0400
- Subject: Re: [RFA/RFC] libdecnumber/gstdint.h is back :-(
- References: <20080913050011.GA3727@adacore.com>
On Fri, Sep 12, 2008 at 10:00:11PM -0700, Joel Brobecker wrote:
> Hello,
> I looked at the C90 draft that I have, and it seems to be saying
> that, whether you use angled brackets or double quotes in your include
> syntax, the way the file is located is implementation defined.
> So, no help there. This needs to be confirmed, but it looks like
> GCC will try to find the include file starting from the same directory
> as the file including it when double quotes are used. In other words,
> when the following directive is used from ../libdecnumber/decContext.h
>
> #include "gstdint.h"
>
> GCC will first try ../libdecnumber/gstdint.h, not ./gstdint.h.
> This defeats the purpose of the gstdint.h that we introduced in
> the gdb subdirectory.
Why does ../libdecnumber/gstdint.h exist? Is it because you're
configuring in the source directory, and if so can we just tell people
not to do that?
Another option would be to add a check for _GL_STDINT_H to
libdecnumber; I suspect they would not mind.
> What occured to me while thinking about all this is that the
> root of the problem is that we have two incompatible files that
> should be identical in practice. Since we are always building
> libdecnumber, can we use libdecnumber's gstdint.h and ditch
> gnulib's stdint.h?
This could be a problem if we pulled in gnulib modules that
include <stdint.h> from a replacement header. We already use
it in the building of gnulib (str-two-way.h).
--
Daniel Jacobowitz
CodeSourcery