On Thu, Jan 08, 2026 at 02:24:32PM +0100, Bruno Haible via Gnulib discussion 
list wrote:
> Yesterday, Haiku introduced a getlocalename_l() function.
> Here are two patches to deal with that:
> 
> 1) There is a new test failure in test-getlocalename_l, because Haiku's
>    function returns "POSIX" where Gnulib expects "C". Patch 0001 works
>    around it.

Code should treat the two names as synonyms; the workaround looks
reasonable, in that you called it an oddity rather than a bug.

> +++ b/doc/posix-functions/getlocalename_l.texi
> @@ -20,6 +20,9 @@
>  on some platforms:
>  @c https://cygwin.com/pipermail/cygwin/2025-March/257715.html
>  Cygwin 3.6.0.
> +@item
> +This function returns @code{"POSIX"} instead of @code{"C"} onn some 
> platforms:

s/onn/on/

> +++ b/lib/getlocalename_l-unsafe.c
> @@ -579,6 +579,15 @@ getlocalename_l_unsafe (int category, locale_t locale)
>  # endif
>        return (struct string_with_storage) { name, STORAGE_OBJECT };
>  #elif defined __HAIKU__
> +# if HAVE_GETLOCALENAME_L
> +      /* Haiku revision hrev59293 (2026-01-07) or newer.  */
> +#  undef getlocalename_l
> +      const char *name = getlocalename_l (category, locale);
> +      if (strcmp (name, "POSIX") != 0)

Should this be using streq?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to