From owner-svn-src-all@FreeBSD.ORG Tue Jun 5 21:48:16 2012 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 76909106564A; Tue, 5 Jun 2012 21:48:16 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id C88128FC19; Tue, 5 Jun 2012 21:48:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q55LmC3a023628; Wed, 6 Jun 2012 01:48:12 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q55LmBPR023627; Wed, 6 Jun 2012 01:48:11 +0400 (MSK) (envelope-from ache) Date: Wed, 6 Jun 2012 01:48:11 +0400 From: Andrey Chernov To: Joerg Sonnenberger Message-ID: <20120605214811.GA23384@vniz.net> Mail-Followup-To: Andrey Chernov , Joerg Sonnenberger , svn-src-all@FreeBSD.ORG, Bruce Evans , svn-src-head@FreeBSD.ORG, src-committers@FreeBSD.ORG, Pawel Jakub Dawidek , freebsd-arch@FreeBSD.ORG References: <201206042134.q54LYoVJ067685@svn.freebsd.org> <20120605074741.GA1391@garage.freebsd.pl> <20120605130922.GE13306@vniz.net> <20120606043731.D1124@besplex.bde.org> <20120605194102.GA21173@vniz.net> <20120606054555.U1456@besplex.bde.org> <20120605210154.GA22370@vniz.net> <20120605213034.GA25293@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120605213034.GA25293@britannica.bec.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, Pawel Jakub Dawidek , svn-src-all@FreeBSD.ORG, Bruce Evans , freebsd-arch@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Subject: Re: svn commit: r236582 - head/lib/libc/stdlib 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: Tue, 05 Jun 2012 21:48:16 -0000 On Tue, Jun 05, 2012 at 11:30:34PM +0200, Joerg Sonnenberger wrote: > On Wed, Jun 06, 2012 at 01:01:54AM +0400, Andrey Chernov wrote: > > On Wed, Jun 06, 2012 at 06:11:01AM +1000, Bruce Evans wrote: > > > This is essentially unusable (so a bad idea). Instead of unconditionally > > > saving and restoring errno around calls to free(), portable POSIX code > > > can soon use a messy ifdef to avoid doing this in some cases, but still > > > has to do it in other cases. The results is just bloat and complexity > > > at the source level: > > > > It looks like they now consider POSIX as moving target where previous > > POSIX versions compatibility is not so essential to care about much. I > > don't have other interpretation of their decision to suddenly accept > > free() as not modifying errno. Since they clearly indicate code > > differences for old and new standard, they are well aware of them and of > > resulting code bloating. > > Can you please stop the unjustified rants? The "new" behavior of free(3) > doesn't break any existing code, so it is certainly compatible with > "old" free(3). The "new" behavior can be obtained easily for code that > wants to be portable to "old" implementations using the C preprocessor > and a small inline wrapper. As such, there is no code bloating. Could you please read more carefully, if you decide to stay in the topic? I already say exactly that few messages behind: > Yes, it is safe for free() itself to save errno and still stay compliant > with both current and upcoming POSIX and with Standard C. > But any code which rely on that is compliant with upcoming POSIX only. It means that when some program wants to conform to current POSIX and future POSIX, it either must save errno across the free() in any case or use code bloating, just reduced by CPP macro you suggest, not eliminated. And I don't think it is good decision from POSIX side, from compatibility point of view. Are you pretend to attack my personal opinion or what? -- http://ache.vniz.net/