Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 May 2013 14:35:48 +0400
From:      Andrey Chernov <ache@freebsd.org>
To:        David Chisnall <theraven@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Sergey Kandaurov <pluknet@FreeBSD.org>, src-committers@FreeBSD.org
Subject:   Re: svn commit: r250245 - head/lib/libc/locale
Message-ID:  <51878784.40207@freebsd.org>
In-Reply-To: <90B8EC0D-C669-4345-AAB7-DE880E667260@FreeBSD.org>
References:  <201305041721.r44HLiXb066291@svn.freebsd.org> <5186A598.8040403@freebsd.org> <90B8EC0D-C669-4345-AAB7-DE880E667260@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06.05.2013 1:03, David Chisnall wrote:
> On 5 May 2013, at 19:31, Andrey Chernov <ache@FreeBSD.org> wrote:
> 
>> It is better to fix this function return type to match POSIX standard
>> rather than to document its non-standard behavior. We try to follow
>> POSIX when possible and this is the case.
> 
> We follow Darwin in this case, which returns 0 on success or -1 on error.  
> 'Fixing' this will break code written for Darwin and testing the
return value.

Well, keeping in mind that POSIX now 'owns' almost all of the same
interface, how many 3rd party soft authors will follow Darwin instead of
POSIX, which claims cross-platform compatibility?
Darwin is live as implementation but already dead as interface in its
common parts differences with POSIX.

I remember almost the same discussion about free(3) return code which
was int, but finally changed to POSIX void.

> Not fixing it will not break POSIX code that ignores the (unexpected)
return value.

Not always so. I.e. passing freelocale() by pointer breaks POSIX
compatibility in case calling function expects pointer to void function.

-- 
http://ache.vniz.net/
bitcoin:13fGiNutKNHcVSsgtGQ7bQ5kgUKgEQHn7N



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