bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: localename: Fix test failure on OpenBSD >= 6.2


From: Ingo Schwarze
Subject: Re: localename: Fix test failure on OpenBSD >= 6.2
Date: Sun, 16 Dec 2018 19:04:07 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

Hi Bruno,

Bruno Haible wrote on Sun, Dec 16, 2018 at 07:12:44AM +0100:

> While testing a grep snapshot on OpenBSD 6.3, I see a test failure of
> test-localename. The cause is that in OpenBSD >= 6.2, the locale_t
> type and uselocale() etc. are now available, but with a terribly dumbed-
> down implementation that makes it impossible to use these per-thread
> locales for anything real (including gettext()).

Well, you *can* use newlocale()/uselocale() to switch the charset
between the two supported character sets ASCII and UTF-8, on a
per-thread basis.

The OpenBSD C library intentionally doesn't implement any other
locale(1) categories except LC_CTYPE because many here regard the
other categories as overengineering and as detrimental to system
security, so in that sense, xlocale support is complete.  Yes, you
are right that locale_t contains exactly one bit of information,
intentionally so.  POSIX does not require that "de_DE.UTF-8" and
"fr_FR.UTF-8" must be different locales, or that they behave
differently from each other in any way.

Not sure what the conclusion should be for gnulib - it probably
depends on what gnulib suggests the application build system should
do when newlocale(3) is not available, or what it should do when
the target system intentionally refrains from implementing LC_*
categories other than LC_CTYPE.

Yours,
  Ingo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]