On Sun, Feb 25, 2018 at 10:19:06PM +0100, Bruno Haible wrote:
> Hi Rich,
>
> > Really use of NL_LOCALE_NAME should always be preferred if it's
> > available, since it's a clean public interface for the functionality
> > desired rather than a hack poking at implementation internals. But if
> > you
Hi Rich,
> Really use of NL_LOCALE_NAME should always be preferred if it's
> available, since it's a clean public interface for the functionality
> desired rather than a hack poking at implementation internals. But if
> you really like poking at internals for other implementations ...
In a perfec
On Sun, Feb 25, 2018 at 11:17:08AM +0100, Bruno Haible wrote:
> Hi Assaf,
>
> > > +# elif defined __linux__ && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
> > > +/* musl libc */
> >
> > A tiny comment about the comment :)
> >
> > You wrote "musl libc", but what the "elif defined ..." is s
Hi Assaf,
> Perhaps it's worth expanding the comment to say "glibc not detected,
> assuming this is musl libc" ?
This is the intent of the comment, yes. But we never write it like this,
in gnulib, for brevity. This is the style we use in gnulib:
$ grep -h '^# *if' getloadavg.c fsusage.c mountlis
Hi Assaf,
> > +# elif defined __linux__ && HAVE_LANGINFO_H && defined NL_LOCALE_NAME
> > +/* musl libc */
>
> A tiny comment about the comment :)
>
> You wrote "musl libc", but what the "elif defined ..." is something like
> "linux but not glibc, with langinfo.h" - which could (in theor
Hello Bruno,
On Sat, Feb 24, 2018 at 01:01:07PM +0100, Bruno Haible wrote:
> On Alpine Linux 3.7.0, which uses musl libc, I see this test failure:
[...]
> diff --git a/lib/localename.c b/lib/localename.c
> index 2133cbc..74c8ee0 100644
> --- a/lib/localename.c
> +++ b/lib/localename.c
> @@ -40,7 +
-02-24 Bruno Haible
localename: Add support for musl libc.
* m4/localename.m4 (gl_LOCALENAME): Check for .
* lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME
on Linux platforms which define NL_LOCALE_NAME.
diff --git a/lib/localename.c b/li