mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Ellie <kittens@wobble.ninja>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Would it to be possible to get strtoll_l?
Date: Thu, 1 Oct 2020 11:47:03 -0400	[thread overview]
Message-ID: <20201001154702.GQ17637@brightrain.aerifal.cx> (raw)
In-Reply-To: <f2f25222-ac77-6066-cd3d-68ba5513416d@wobble.ninja>

On Thu, Oct 01, 2020 at 10:08:17AM +0200, Ellie wrote:
> Hah, sorry for the e-mail spam, I'm only now just realizing I read over
> your latest remark that strtoll doesn't really change in behavior.
> 
> Yeah, I have actually be wondering how strtoll even could be
> locale-specific, but assumed surely there'd be some corner case I don't
> know about.
> 
> But if that makes it just an alias of strtoll effectively, would it be
> possible to add strtoll_l to musl just for the sake of completion? Since
> it exists for most platforms (glibc, bsd, windows) who knows how this
> will be changed to behave in the future, I'd rather use the "proper"
> function and be on the safe side.
> 
> In any case, thanks for the insightful response!

A *complete* set of *_l functions (for all operations that are
locale-dependent) would be rather large, and would include a lot that
don't really admit such thin implementations e.g. because they'd have
variadic signatures. It looks like the set chosen for standardization
mostly covered just the ones where the function itself was expected to
be so small/fast that setting the thread-local locale around the call
would be relatively expensive, but some don't fit that pattern, like
strftime_l. And then on top of that, we seem to have a somewhat
inconsistent coverage set for non-standardized BSD/GNU extensions --
wcsftime_l, strtod_l, etc.

A big part of maintainership, especially for libc, is saying no. In
this case, it might make sense to add a few more nonstandard ones,
especially if we already have most but not all of them and there's a
clear bounded set of what would be supported and they're all things
that admit ultra-thin wrappers. Would you be interested in
investigating that and following up?

Rich

  reply	other threads:[~2020-10-01 15:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  0:34 ell1e
2020-10-01  2:35 ` Rich Felker
2020-10-01  4:36   ` ell1e
2020-10-01  5:24     ` Ellie
2020-10-01  8:08       ` Ellie
2020-10-01 15:47         ` Rich Felker [this message]
2020-10-07 13:44           ` ell1e
2020-10-07 13:52             ` Ellie
2020-10-07 14:58               ` 罗勇刚(Yonggang Luo)
2020-10-07 15:41             ` Ariadne Conill
2020-10-07 19:37             ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201001154702.GQ17637@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=kittens@wobble.ninja \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).