Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 18 Mar 2017 23:00:52 +0800
From: He X <xw897002528@...il.com>
To: musl@...ts.openwall.com
Subject: Re: [setlocale]: return only one copy if all six parts of
 locale are same

Wow, tested. Thx for improvements. Learnt a lots from recent patches
related to locale.
Sincerely thank you, rich :)

xhe

2017-03-18 22:39 GMT+08:00 Rich Felker <dalias@...c.org>:

> On Sat, Mar 18, 2017 at 09:48:41PM +0800, He X wrote:
> > oops, i missed UNLOCK(lock).
> >
> > [...]
> > >>
> > >> I think the results of this patch can be achieved much more simply.
> > >> Just compare lm pointers (rather than string contents) for equality at
> > >> each iteration in the current loop, counting how many were equal to
> > >> libc.global_locale.cat[0]. If that number equals LC_ALL, return
> > >> libc.global_locale.cat[0]->name (or "C" if the lm is null) rather
> than
> > >> buf.
> > >>
> > >> Rich
> > >>
> > >
> > >
>
> By simpler I meant something like the attached.
>
> Rich
>

Content of type "text/html" skipped

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.