From owner-freebsd-hackers Thu May 9 13:11:16 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from damon.com (damon.com [199.98.84.130]) by hub.freebsd.org (Postfix) with ESMTP id E17B537B409 for ; Thu, 9 May 2002 13:11:09 -0700 (PDT) Received: from damon.com (localhost [127.0.0.1]) by damon.com (8.12.3/8.12.3) with ESMTP id g49KAuS2002379; Thu, 9 May 2002 15:10:56 -0500 (CDT) (envelope-from dap@damon.com) Received: (from dap@localhost) by damon.com (8.12.3/8.12.3/Submit) id g49KAtjJ002378; Thu, 9 May 2002 15:10:55 -0500 (CDT) Date: Thu, 9 May 2002 15:10:55 -0500 From: Damon Anton Permezel To: Greg Black Cc: Ian , freebsd-hackers Subject: Re: /usr/include/netinet/in.h Message-ID: <20020509151055.B348@damon.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from gjb@gbch.net on Thu, May 09, 2002 at 03:45:59PM +1000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 int open(const char *path, int flags, ...); ... % ed $inc/fcntl.h ... /* * This file includes the definitions for open and fcntl * described by POSIX for ; it also includes * related kernel definitions. */ #ifndef _KERNEL #include #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