Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2012 01:48:11 +0400
From:      Andrey Chernov <ache@FreeBSD.ORG>
To:        Joerg Sonnenberger <joerg@britannica.bec.de>
Cc:        src-committers@FreeBSD.ORG, Pawel Jakub Dawidek <pjd@FreeBSD.ORG>, svn-src-all@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
Subject:   Re: svn commit: r236582 - head/lib/libc/stdlib
Message-ID:  <20120605214811.GA23384@vniz.net>
In-Reply-To: <20120605213034.GA25293@britannica.bec.de>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120605214811.GA23384>