From owner-svn-src-head@FreeBSD.ORG Fri Apr 12 10:09:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 593A7612; Fri, 12 Apr 2013 10:09:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id E29F21D54; Fri, 12 Apr 2013 10:09:36 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3CA9RkM024782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Apr 2013 20:09:28 +1000 Date: Fri, 12 Apr 2013 20:09:27 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Juli Mallett Subject: Re: svn commit: r249355 - head/lib/libkvm In-Reply-To: Message-ID: <20130412195828.C1222@besplex.bde.org> References: <201304110730.r3B7Uo6d067302@svn.freebsd.org> <20130411175308.Q1435@besplex.bde.org> <20130411082457.GS76816@FreeBSD.org> <20130411184049.W1641@besplex.bde.org> <20130411091418.GW76816@FreeBSD.org> <20130411201652.F1911@besplex.bde.org> <20130411180013.GB76816@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=YIxocstYFt4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=6I5d2MoRAAAA:8 a=iq4sv8YNmSFSRNsHFbsA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 10:09:37 -0000 On Thu, 11 Apr 2013, Juli Mallett wrote: > On Thu, Apr 11, 2013 at 11:00 AM, Gleb Smirnoff wrote: >> Bruce, >> >> On Thu, Apr 11, 2013 at 09:07:25PM +1000, Bruce Evans wrote: >> B> Just routine avoidance of namespace pollution. This is easy in such a >> B> simple header. >> >> Sorry, with all respect, but I can't call including sys/types.h >> a namespace pollution. >> >> Ok, even you force me to name it that way, still I would prefer >> namespace pollution instead of handmade copy pasted typedefs. The copying gives a good implementation. Much easier to read (though not write) than definitions in deeply nested includes. We have too many little include files to avoid duplication, but a few big nested include files like machine/_types.h are hard to avoid. > But Gleb, making such changes unilaterally is a bit of a leap. The > project has mostly accepted Bruce's wisdom about trying to minimize > and reduce namespace pollution. Now, this isn't a standard header so > it's quite a bit less of a concern, but it's not no concern. If you > think that we should reverse our trend on including > namespace-polluting headers in system headers, we should discuss that > on arch@, and it shouldn't be something that's done without any > discussion or consideration. > > Should we expect further changes of this nature (and of the proposed > nature removing __size_t and __ssize_t use) if you make changes to > other headers as part of your work? Are you going to add > to every header currently using in a > single go, or will you be doing that a little at a time when making > functional changes? That would be a large policy change, not to mention it would break most C99 headers like . C99 headers can't include POSIX headers like since the POSIX namespace rules don't apply to them. Most of them include sys/_types.h or machine/_types.h to get declarararions like __size_t which they use to declare the limited set of typedefs specified by C99. C99 headers are relatively simple and mostly de-polluted. Bruce