Subject: Re: missing #include ?
To: Hubert Feyrer <hubert@feyrer.de>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
List: tech-userlevel
Date: 12/10/2006 11:20:51
On Sun, 10 Dec 2006 16:13:07 +0100 (CET)
Hubert Feyrer <hubert@feyrer.de> wrote:
> On Sun, 10 Dec 2006, Jukka Salmi wrote:
> > While changing the third-party software to include sys/types.h fixes
> > the problem, I think it's NetBSD's fault: net/pfil.h should know about
> > `u_long' by including sys/types.h, shouldn't it?
> 
> IIRC we've had this discussion a few times before.
> IIRC the concensus (decree?) was always that applications should know what 
> headers are needed for a certain (other) header, to not pull in things 
> that my not be needed.
> 
> (And no, I never understood that either, and always thought headers should 
> pull in what they need, but that's just my personal, uneducated opinion)

I agree with you, Hubert.  Third party code should pull in any headers
that they need but they shouldn't need to have inside knowledge of what
those headers use.  After all, it's not like we actually save
anything.  If the header needs something, someone needs to pull it in.
Why not take responsibility for its own requirements?

-- 
D'Arcy J.M. Cain <darcy@NetBSD.org>
http://www.NetBSD.org/