From owner-svn-src-all@FreeBSD.ORG Mon May 20 15:51:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BAA1AA40; Mon, 20 May 2013 15:51:04 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep18.mx.upcmail.net (fep18.mx.upcmail.net [62.179.121.38]) by mx1.freebsd.org (Postfix) with ESMTP id AC1F11E0; Mon, 20 May 2013 15:51:03 +0000 (UTC) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep18-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20130520155056.SGPY2186.viefep18-int.chello.at@edge04.upcmail.net>; Mon, 20 May 2013 17:50:56 +0200 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge04.upcmail.net with edge id eFqu1l01H2xdvHc03FquZq; Mon, 20 May 2013 17:50:56 +0200 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id B89F96D449; Mon, 20 May 2013 17:50:54 +0200 (CEST) Date: Mon, 20 May 2013 17:50:54 +0200 From: Stefan Farfeleder To: Bruce Evans Subject: Re: svn commit: r250806 - head/sys/sys Message-ID: <20130520155053.GC1429@mole.fafoe.narf.at> References: <201305190744.r4J7i2FD055067@svn.freebsd.org> <20130519094813.GA1465@mole.fafoe.narf.at> <20130520140304.GA1429@mole.fafoe.narf.at> <20130521004803.K8511@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130521004803.K8511@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Ed Schouten , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 20 May 2013 15:51:04 -0000 On Tue, May 21, 2013 at 01:15:11AM +1000, Bruce Evans wrote: > On Mon, 20 May 2013, Stefan Farfeleder wrote: > > > I think you misunderstood what I meant. We now have quiet a few > > occurrences of `#ifdef lint' or equivalent in /usr/include. I think those > > should be changed to `#ifdef __lint' to allow application code to do > > > > #define lint foo > > #include > > > > which is perfectly fine POSIX code (at least to my knowledge) and should > > not change the behaviour of the included header. > > lint actually predefines __LINT__, not __lint. __LINT__ is fine with me. I didn't bother to read lint's source, but the man page states: "The lint utility runs the C preprocessor as its first phase, with the preprocessor symbol “lint” defined to allow certain questionable code to be altered or skipped by lint. Therefore, this symbol should be thought of as a reserved word for all code that is to be checked by lint." > Of course it is a bug that system headers depend on symbols in the > application namespace like lint. My version never had the lint ifdef(s) > in sys/cdefs.h. I don't like them for other reasons. They results in > lint checking different source code to what the compiler sees. FreeBSD's > lint barely supports C90, but C99 features like C99 initializers are now > used extensively, at least in the kernel. Use of features like this > can't be hidden from lint using a few ifdefs in headers. Since nobody wants to update lint to recent C standards, maybe it's time to remove it? Stefan