[comp.bugs.4bsd] section 3 manpages, and, mode 444 distributions

mouse@mcgill-vision.UUCP (der Mouse) (05/11/87)

I have two comments/questions.  One is about the man pages in section
3, the other is about software distribution in general.

Why do so many of the man pages (eg inet(3N), the one which directly
prompted this posting) list the necessary include files to use the
routines in question, *except* that (almost?) NONE of them mention
<sys/types.h>, which is required by maybe half of them?  The only sure
way I've found to tell whether types.h is required is to try it!

For that matter, why are the include files organized as they are?  It
seems to me that it would be much more intelligent for each .h file to
look like

#ifndef <identifier-unique-to-this-.h-file>
#define <identifier-unique-to-this-.h-file>
...body of the .h...
#endif

and then instead of requiring the user to remember which files have to
be included and (most especially) what order they have to be included
in, simply make every .h file include every other .h file necessary?
The slight extra cost (cpp skipping an entire file in a false #if)
would be more than balanced by the saved programmer time and saved
extra runs (oh yes %^^%#$%@ that's right I need <sys/time.h> for
<sys/proc.h> to work!) of cc?  Even worse, sometimes they *do* include
the needed include file, but it can't stand being included multiple
times!  Eg, if I include <sys/resource.h> and things are fine, then I
add <sys/user.h> it breaks because user.h includes resource.h
explicitly!

The other question is:  WHY is all the source under /usr/src
distributed mode 444??  Whenever I make a local copy of it (to fix a
bug, for example) the first thing I have to do is change it all to 644!

					der Mouse

				(mouse@mcgill-vision.uucp)