From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 23:55:49 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C2FD106566B; Sat, 14 Feb 2009 23:55:49 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 0BE408FC13; Sat, 14 Feb 2009 23:55:48 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 1751773098; Sun, 15 Feb 2009 01:01:49 +0100 (CET) Date: Sun, 15 Feb 2009 01:01:49 +0100 From: Luigi Rizzo To: Bruce Evans Message-ID: <20090215000149.GB95636@onelab2.iet.unipi.it> References: <200902131514.n1DFEhft091837@svn.freebsd.org> <20090214183758.I847@besplex.bde.org> <20090214175136.GB89369@onelab2.iet.unipi.it> <20090215052941.E2522@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090215052941.E2522@delplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r188578 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 23:55:49 -0000 On Sun, Feb 15, 2009 at 06:39:56AM +1100, Bruce Evans wrote: ... > BTW, I also disagree with you adding comments to include lines to say > what the includes are for. There is no chance that such comments are > complete or can be maintained. For completeness, every include line > would need a paragraph or two like some of the ones in this mail to > explain all the reasons why a header is included, and the details will > change when code is added. The reasons why a header is needed are > most easily seen by trying to compile without it. A generic header > like will be needed for a myriad reasons and listing > them all is not useful. A small header will be needed for only a small > number of reasons and listing them all is even less useful, since it > is easy to find and understand the reasons if only a couple of > declarations are used. All true. But I am only annotating "non-obvious" or questionable #include, and only for the details relevant in the context of that source file. E.g. if I am including just to know what IFNAMSIZ is, or just to get a forward declaration for 'struct route', that's worth mentioning in my opinion, because those #includes are possible candidates for removal once the required information is obtained elsewhere (or it is not needed anymore). cheers luigi