RFC: specdb needs a way to tell mkheader to exclude header
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Wishlist
|
Bug Description
In one particular area, the X11 (particularly Xt) headers, there are a number
of cooperative headers. These follow the naming style Intrinsic.h and
IntrinsicP.h, and sometimes a third choice, IntrinsicI.h.
These headers tend to have cross-references - we've particularly been following
one example:
Composite.h defines XtOrderProc and has a declaration which uses struct
_CompositeClassRec
CompositeP.h defines struct _CompositeClassRec and has a declaration which uses
XtOrderProc.
In upstream headers, the inclusion sequence is manually set up. In LSB's
generated headers, however, each file will include the other because of the
detected dependency. This doesn't work... you're sure to get a
use-before-define situation.
As discussed in other bugs, when there are cross-dependencies, one answer is to
move the dependency into a third file.
Another thought for cases where it works, which won't be all of them, is to
have a way to indicate that one header should not include another even if the
dependency checker thinks it needs to - kind of the inverse of the
header_depend constant we have now, which adds an include even if the
dependency checking didn't see a need for it. Perhaps this would be a new
constant type header_exclude, structured like header_depend, and a modification
to mkheader.
I'm not yet convinced this is the right approach, so consider this a request
for comment first.
Changed in mandriva: | |
importance: | Unknown → Wishlist |
status: | Unknown → In Progress |