From: "Tim Rühsen" <tim.ruehsen@gmx.de>
To: Bruno Haible <bruno@clisp.org>, bug-gnulib@gnu.org
Subject: Re: hard-locale: make multithread-safe
Date: Tue, 17 Dec 2019 15:08:54 +0100 [thread overview]
Message-ID: <ab16546a-1318-331e-832b-656fa5a78a1e@gmx.de> (raw)
In-Reply-To: <175192568.e2XXTFFdkW@omega>
[-- Attachment #1.1: Type: text/plain, Size: 1364 bytes --]
Hi Bruno, hi gnulib developers,
it's a joy to follow the posts on this list - you (all) surprise,
impress and inspire me with your code but even more with your detailed
explanations / documentations.
Thank you so much for your ongoing work !!!
[E.g. this post made me check my code for mbtowc/mbrtowc (and also to
read the man pages again). In fact I found a call to mbtowc in MT code
(protected by a mutex) without resetting the internal state.]
Regards, Tim
On 12/17/19 2:45 PM, Bruno Haible wrote:
> Hi Paul,
>
> Here is a proposed patch to make the hard_locale() function multithread-safe.
> This is needed because our mbrtowc() override relies on hard_locale, and
> mbrtowc obviously must be multi-thread safe (that's one of its main features,
> compared to mbtowc).
>
> The previous hard_locale code tries to guess whether a locale is in fact
> a "C"/"POSIX" locale, although it is not apparent from its name. This was
> a case to worry about between 1995 and 2000, when many systems did not
> have working locales. This has changed: Nowadays nearly all platforms
> honour the locale names with some localized behaviour, except OpenBSD,
> Minix, and Android. It's not my priority to optimize for these three
> systems. But if you want to keep optimizations for these platforms,
> we could add #ifs for these platforms.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-12-17 14:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 13:45 hard-locale: make multithread-safe Bruno Haible
2019-12-17 14:08 ` Tim Rühsen [this message]
[not found] ` <20191226221225.GA800@HATZ>
2019-12-27 10:51 ` string types Bruno Haible
2019-12-28 13:14 ` ag
2019-12-28 18:28 ` Paul Eggert
2019-12-28 20:44 ` ag
2019-12-28 22:40 ` Paul Eggert
2019-12-29 9:19 ` Bruno Haible
2019-12-29 17:13 ` ag
2019-12-29 20:02 ` ag
2019-12-29 21:24 ` Tim Rühsen
2019-12-31 9:53 ` Bruno Haible
2020-01-06 10:34 ` Tim Rühsen
2020-01-06 12:46 ` Bruno Haible
2020-01-06 16:08 ` Tim Rühsen
2020-01-06 16:49 ` Tim Rühsen
2019-12-18 1:45 ` hard-locale: make multithread-safe Paul Eggert
2019-12-18 8:51 ` Bruno Haible
2019-12-21 6:33 ` Bruno Haible
2019-12-18 10:29 ` LC_COLLATE in the C locale Bruno Haible
2019-12-18 16:27 ` Paul Eggert
2019-12-18 10:46 ` hard-locale: make multithread-safe Bruno Haible
2019-12-24 23:36 ` Bruno Haible
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab16546a-1318-331e-832b-656fa5a78a1e@gmx.de \
--to=tim.ruehsen@gmx.de \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).