Re: hard-locale: make multithread-safe

2019-12-24 Thread Bruno Haible
> 2019-12-18 Bruno Haible > * modules/hard-locale (Depends-on): Remove strdup. Add setlocale-null. This change has an effect on gettext's libgettextpo: Through this new dependency chain hard-locale -> setlocale-null -> locale there now is a gnulib-generated locale.h file in libgettextp

Re: hard-locale: make multithread-safe

2019-12-20 Thread Bruno Haible
> 2019-12-18 Bruno Haible > > hard-locale: Add test. > * tests/test-hard-locale.c: New file. > * tests/locale.c: New file. > * modules/hard-locale-tests: New file. The weekly continuous integration build [1] detected that this causes a testdir build failure. Namely, the

Re: hard-locale: make multithread-safe

2019-12-18 Thread Bruno Haible
is necessary for an MT-safe setlocale_null and therefore also for 'hard-locale'. 2019-12-18 Bruno Haible hard-locale: Make multithread-safe. * lib/hard-locale.h (hard_locale): Move documentation to here. * lib/hard-locale.c: Don't include . (

Re: hard-locale: make multithread-safe

2019-12-18 Thread Bruno Haible
> Thanks, this change looks fine to me. Thanks. But before I do the rewrite, let me add a unit test first. It's a bit tricky only on musl libc, NetBSD, and OpenBSD. Other than that, there's a test failure on Android 4.3, where - setlocale (category, NULL) always returns NULL. - hard_locale of

Re: hard-locale: make multithread-safe

2019-12-17 Thread Paul Eggert
Thanks, this change looks fine to me. I do have a qualm in that coreutils (and I assume others) interpret !hard_locale (LC_COLLATE) as meaning that the locale is unibyte and uses native byte comparison. As I recall on some platforms (macOS maybe?), the C locale uses UTF-8 so this interpretation is

Re: hard-locale: make multithread-safe

2019-12-17 Thread Tim Rühsen
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/mbr

hard-locale: make multithread-safe

2019-12-17 Thread Bruno Haible
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. 2019-12-17 Bruno Haible hard-locale: Make multithread-saf