RFC: specdb needs a way to tell mkheader to exclude header

Bug #1333878 reported by Jeff Johnson
6
This bug affects 1 person
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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.