From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8537 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: localeconv and char values Date: Mon, 21 Sep 2015 16:23:33 -0400 Message-ID: <20150921202333.GS17773@brightrain.aerifal.cx> References: <89422A70-4BF6-4733-9400-0932A85857F9@gmail.com> <20150921145425.GQ17773@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1442867035 29060 80.91.229.3 (21 Sep 2015 20:23:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Sep 2015 20:23:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8549-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 21 22:23:54 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Ze7cs-00048H-V3 for gllmg-musl@m.gmane.org; Mon, 21 Sep 2015 22:23:51 +0200 Original-Received: (qmail 14219 invoked by uid 550); 21 Sep 2015 20:23:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 14195 invoked from network); 21 Sep 2015 20:23:47 -0000 Content-Disposition: inline In-Reply-To: <20150921145425.GQ17773@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8537 Archived-At: On Mon, Sep 21, 2015 at 10:54:25AM -0400, Rich Felker wrote: > On Mon, Sep 21, 2015 at 12:21:34PM +0200, Julien Ramseier wrote: > > Hello, > > > > Currently, all the char fields of the lconv struct returned by > > localeconv are set to -1. > > > > According to > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/localeconv.html > > , > > negative values are not valid and CHAR_MAX should be used to > > indicate non-available values. > > As far as I can tell, you are right. I don't know how I > overlooked/misread this, except perhaps that using CHAR_MAX is rather > ugly/inappropriate because it assumes CHAR_MAX is not an interesting > character that could be used for these purposes. Thankfully that's > true for ASCII and ASCII supersets (in our case, UTF-8), so it's not a > practical problem. > > > If I’m not missing anything, here’s the corresponding patch: > > I'll look it over again before committing, but I don't see anything > immediately wrong with it. Thanks! BTW as a new contributor would you like to be credited as commit author (includes name/email) in the git log or just by name in the commit message (or not at all)? Rich