This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Missing #include in objfiles.h?
- From: Andrew Cagney <ac131313 at ges dot redhat dot com>
- To: Joel Brobecker <brobecker at gnat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 01 Aug 2002 16:48:05 -0400
- Subject: Re: [RFA] Missing #include in objfiles.h?
- References: <20020801192836.GY683@gnat.com>
I'm not sure if this is intended or not, but objfiles.h relies on
symfile.h for the definition of certain structures. However, objfiles
does not #include symfile. So my attempt to include objfiles without
prior including symfile caused a compilation error.
What exactly? A mindless grep suggests opaque references but not a hard
dependency. Adding an opaque ``struct sym_fns;'' to avoid an include is ok.
This patch adds the #include, assuming this was not intentional. Tested
by "./configure; make".
2002-08-01 Joel Brobecker <brobecker@gnat.com>
* objfiles.h: Add missing #include "symfile.h"
* Makefile.in (objfiles_h): Add dependency on symfile.h and dependents.
Ok to apply?
If there is a direct dependency then, yes, it should include it.
+ #include "symfile.h"
Suggest a comment mentioning what was needed.
enjoy,
Andrew
PS: I've this memory of, on true64 or hpux, there being a tangled mess
of includes that stopped the above from being added. That, however, is
a true64/hppa problem and is likely fixed by multi-arching.