[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Are "incomplete" headers bugworthy?



On 01-Apr-03, 09:27 (CST), Matthias Urlichs <smurf@noris.de> wrote: 
> Some header files require 
> 
> #include <some_header.h>
> #include <whatever_I_really_want.h>
> 
> instead of a simple
> 
> #include <whatever_I_really_want.h>
> 
> [*snip*]
> 
> IMHO, it is reasonable for all C header files to include any other header file
> they need for compileability. My question is, is there a consensus on this
> reasonableness?

While I prefer to do as you suggest in my code, there is a
significant faction that disagrees, and a substantial body of code
that would be affected. You might check out the last section of
http://www.lysator.liu.se/c/pikestyle.html for the reasoning.


> If so, should there be a Lintian test for this? (I would do that.)

It's really an upstream issue, and a style issue, andI don't think Lintian
is an appropriate tool for that.

Now, if a piece of code fileX #includes fileA than needs fileB, and
neither fileA nor fileX #include fileB, then it's a bug in X or fileA.

<rant>
The solution to all autoconf problems is to remove autoconf and write
properly portable code and build systems. But that also is an upstream
problem.
</rant>

Steve

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net



Reply to: