On Thu, May 09, 2002 at 03:45:59PM +1000, Greg Black wrote:
> Ian Noname wrote:
> 
> | > The general rule is "including includes from includes is bad".
> | 
> | Okay, it's time to point out that these are opinions, not rules, and
> | differing opinions exist.
> 
> There's no shortage of opinions.  They are like arseholes:
> everybody has one.  But there are rules that have been carefully
> worked out by people who have put a lot of time into them, and
> those rules are documented in the man pages for each interface
> in the system.  A programmer who can read can get this stuff
> right without even rasing a sweat.
> 

OK, time to check an actual example to see if the supposed reason
this is a GoodThing(tm) exists.

% man open

...
SYNOPSIS
     #include <fcntl.h>

     int
     open(const char *path, int flags, ...);
...

% ed $inc/fcntl.h
...
/*
 * This file includes the definitions for open and fcntl
 * described by POSIX for <fcntl.h>; it also includes
 * related kernel definitions.
 */
 
#ifndef _KERNEL
#include <sys/types.h>
#endif
...


So, the reasoning here appears specious.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to