Call for sanity on #include files

John P. Linderman jpl at allegra.UUCP
Wed Jan 18 23:15:49 AEST 1984


A cry for help just went up in net.bugs-4bsd because an include file
relied on definitions in another file which didn't get included.
If I got a dime from everyone on the net who has been burned by
including a file in /usr/include/sys that needs (but fails to include)
<sys/types.h>, I could retire now.  If every include file foo.h was
of the form

#ifndef fooX
#define fooX
 ... former contents of foo.h
#endif  fooX

then files could be included several times without redefining everything.
Include files that rely on other include files could (and SHOULD) go
ahead and include those files, and if they get included elsewhere as
well, all we have lost is some compile time efficiency.  Many of us
have been doing this with our own include files for years.  Now if we
could just convince the owners of /usr/include to do the same, we could
spend our time doing productive work instead of grepping through
include files.

John P. Linderman  Department of Excluded Includes  allegra!jpl



More information about the Comp.unix.wizards mailing list