From owner-svn-src-head@FreeBSD.ORG Mon May 6 10:35:56 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 C2AB3F9B for ; Mon, 6 May 2013 10:35:56 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9C37BB for ; Mon, 6 May 2013 10:35:55 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id y6so3247526lbh.3 for ; Mon, 06 May 2013 03:35:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=RueVXOQ2eT98322XBYkZ9G1uHf54pl5+A/8hCdtbriE=; b=csqRbPi/JX6U33jwJk6zilPFqiLFKnGHr+B3Q6Lzg93W/DechYGTdd2c0jJ/RDx0Rc gjjJ3IMZ96dhhjlGIw+tPsHWLMMPGdTOjWmBb+1FkZnza2QuLTLfD+3ThE7BnQmLJAau ChSBGbl+68aKNnHGC4AVHLVBvqyJksVQx7EY08c4xKVJYTlL2Gf//biw5vi0sfL3lC1a Coenp9gqjliumvlEuyy5WKHbEf6M0Kv8x+OS3ATQi8RjrKoaWuT9iy9j+P45OzS5O/JO WtyoSyX72fjQQCfS7h066h7b7Ax67t92i2KqidHW8wYVPBtuyHHVtrhechxA2dCHmy7g CGCg== X-Received: by 10.112.75.134 with SMTP id c6mr7841581lbw.46.1367836554869; Mon, 06 May 2013 03:35:54 -0700 (PDT) Received: from [192.168.1.2] ([89.169.163.3]) by mx.google.com with ESMTPSA id c15sm8373552lbj.17.2013.05.06.03.35.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 May 2013 03:35:54 -0700 (PDT) Message-ID: <51878784.40207@freebsd.org> Date: Mon, 06 May 2013 14:35:48 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r250245 - head/lib/libc/locale References: <201305041721.r44HLiXb066291@svn.freebsd.org> <5186A598.8040403@freebsd.org> <90B8EC0D-C669-4345-AAB7-DE880E667260@FreeBSD.org> In-Reply-To: <90B8EC0D-C669-4345-AAB7-DE880E667260@FreeBSD.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkI6GOoBNaUZXqFauyLM+wJoSuqmZwM/oMwVGB/L3UrJWsEReA8xE8kaW1+j/gkIsqRlVT2 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Sergey Kandaurov , src-committers@FreeBSD.org 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: Mon, 06 May 2013 10:35:56 -0000 On 06.05.2013 1:03, David Chisnall wrote: > On 5 May 2013, at 19:31, Andrey Chernov 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