Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 21 Sep 2015 16:23:33 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: localeconv and char values

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
> > <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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.