Subject: Re: includes question
To: Luke Mewburn <lukem@netbsd.org>
From: Klaus Klein <kleink@reziprozitaet.de>
List: tech-kern
Date: 11/12/2002 11:40:45
Luke Mewburn <lukem@netbsd.org> writes:

> On the other hand, if the interface definition says you must include
> <sys/socket.h> and makes *no mention* of <sys/types.h>, then you
> shouldn't be required to pull in <sys/types.h> first.
> 
> This is a situation that occurs right now with bind(2) (et al); code
> written on other systems to the manual pages (including the NetBSD
> manual pages!) and to the POSIX standards which only include
> <sys/socket.h> will not compile on NetBSD unless <sys/types.h> is
> pulled in first.
> 
> This is wrong, and our header files should be fixed to match the
> standards and our manual pages.

As far as the POSIX headers are concerned, I think we have reached
conformance in that aspect already.  (I didn't look into the other
headers at the time because I considered mandating such a change for
them a matter of local policy, KNF etc..)

The the manual pages were aligned with the standard to reflect
this. :-)


- Klaus