<sys/select.h> depends on <sys/types.h>...?

Kris Kennaway kris at obsecurity.org
Tue Jan 18 20:41:49 PST 2005


On Tue, Jan 18, 2005 at 11:33:57PM -0500, Chuck Swiger wrote:
> Michael Nottebrock wrote:
> >Chuck Swiger wrote:
> [ ... ]
> >>OK, although note that MacOS X compiles foo.cxx without changes-- 
> >>sys/select.h will pull in what it needs to work on that platform:
> >
> >IIRC, FreeBSD 5.x doesn't need the extra <sys/types.h> include either. 
> >AFAIK, it's not so a much wrong-or-right issue (SUSv2 or similar 
> >standards don't require sys/select.h to setup the types it needs), but 
> >just a change of conventions (not having to include sys/types.h to make 
> >sys/select.h work is certainly convenient).
> 
> OK, thanks for the additional thoughts.
> 
> I'm happy to see system header files move in a direction that facilitates 
> use-- ie, they know what they depend on and ensure that what they need gets 
> pulled in.  After all, if people are going to spend the time & effort to 
> make system header files...erm, idempotent?, then one might as well take 
> advantage of that and of any compiler support available (precompiled 
> headers).
> 
> >If you go back a few linux kernel/solaris/macosx releases, you'd 
> >probably find the extra include requirement there, too.
> 
> Sure.  Only, if an earlier version of Linux 2.2 or OS X needed sys/types.h 
> to use sys/select.h, then wouldn't the BZFlag sources know to use it by 
> now...?

AFAIK this is a long-standing difference (modulo any recent FreeBSD
changes), and the cause of a lot of software unportability from the
Linux world.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050118/b1bad703/attachment.bin


More information about the freebsd-ports mailing list