Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jan 1997 07:26:28 -0500 (EST)
From:      Peter Dufault <dufault@hda.com>
To:        proff@suburbia.net
Cc:        dufault@hda.com, hackers@freebsd.org
Subject:   Re: #include file xref philosophy
Message-ID:  <199701081226.HAA03877@hda.hda.com>
In-Reply-To: <19970108121529.5416.qmail@suburbia.net> from "proff@suburbia.net" at "Jan 8, 97 11:15:29 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> > How about "POSIX.1 sometimes requires that <sys/types.h>
> > be included before including some POSIX headers".  They sprinkle
> > size_t all over the place so that old programs don't break.
> > 
> 
> Frankly it is painful...

Just to make it clear: I think headers should stand alone and include
anything they need.  Above I'm saying that POSIX isn't as clear as Bruce was.

So IMHO:

1. Yes, headers should include all prerequisites;

2. For portability, our man pages should match what POSIX says,
even if we don't require it.  For example, lseek needs both <unistd.h>
and <sys/types.h> but our man page says <unistd.h>.

(I hope that the POSIX tests don't do things such as include only
unistd.h and verify that something referencing off_t fails.)

-- 
Peter Dufault (dufault@hda.com)   Realtime Machine Control and Simulation
HD Associates, Inc.               Voice: 508 433 6936



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701081226.HAA03877>