Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2002 15:10:55 -0500
From:      Damon Anton Permezel <dap@damon.com>
To:        Greg Black <gjb@gbch.net>
Cc:        Ian <freebsd@damnhippie.dyndns.org>, freebsd-hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: /usr/include/netinet/in.h
Message-ID:  <20020509151055.B348@damon.com>
In-Reply-To: <nospam-1020923159.81968@bambi.gbch.net>; from gjb@gbch.net on Thu, May 09, 2002 at 03:45:59PM %2B1000
References:  <B8FED3FA.CC8C%freebsd@damnhippie.dyndns.org> <nospam-1020923159.81968@bambi.gbch.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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