From owner-svn-src-all@FreeBSD.ORG Mon May 6 10:35:56 2013 Return-Path: Delivered-To: svn-src-all@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 6D2A0F95 for ; Mon, 6 May 2013 10:35:56 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id E76EC7B7 for ; Mon, 6 May 2013 10:35:55 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id fk20so3187190lab.33 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=EiVkFO4MRDxq0klsv1THHmuXYWwmGPHozdTA9lBP/5aR7y/eex1ZQvB8QQEctq4qad japygJUo7fXbJmFjZuxmqgjByU0byC5GklKnATw5eGxXfQGUDF4YD/T/lqwcGgEy/n7o Ubnzk8n5GjRzlbhKF1/TmZ2SSvYCfQiCOvgtUifVlIwz9/sdon4pQEuaPdiwsHzKhTup 386ybSgzdeRvgBmAAZusPcZ7EsHOaJukCrI5jiE2Sk+oV/1+6+1d8J/g+Df+ne0itn8X Ihi79gOeWXeDVSFfMH3L3ihAXnpbPfk5tLhee5Jd6GtXAMK4Jsdm5VsMf+k71jZ2SZcE /hrQ== 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: ALoCoQnHtuhhAAo/I46t7yKCsiLgBgTxDpnBuezethNsSVyj5ZjnPSH7igw8aKNfKPswTNfLwb6o Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Sergey Kandaurov , 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, 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