From: Pádraig Brady Date: Thu, 14 Jan 2016 10:04:58 +0000 (+0000) Subject: doc: mention setlocale() issues on OpenBSD X-Git-Tag: v1.0~6857 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5ac0e2ba902c1b6b93c792dc8ef2f608045b6800;p=gnulib.git doc: mention setlocale() issues on OpenBSD * doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"") never fails, and the need to check categories individually. --- diff --git a/ChangeLog b/ChangeLog index b19edb1e26..27de5886c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-01-14 Pádraig Brady + + doc: mention setlocale() issues on OpenBSD + * doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"") + never fails, and the need to check categories individually. + 2016-01-14 Pádraig Brady sig2str: list all signals on FreeBSD >= 7 diff --git a/doc/posix-functions/setlocale.texi b/doc/posix-functions/setlocale.texi index ee4d477906..1da6d13396 100644 --- a/doc/posix-functions/setlocale.texi +++ b/doc/posix-functions/setlocale.texi @@ -29,4 +29,12 @@ On Cygwin 1.5.x, which doesn't have locales, @code{setlocale(LC_ALL,NULL)} always returns @code{"C"}. @item On Cygwin 1.7.0, only the charset portion of a locale designation is honored. +@item +On OpenBSD, @code{setlocale(LC_ALL,"")} will only update categories that +are deemed appropriate for the @code{LC_ALL} environment value, even if +there are other categories set to different values in the environment. +In addition any value is accepted for @code{LC_CTYPE}, and so NULL +is never returned to indicate a failure to set locale. +To verify category values, each category must be set individually +with @code{setlocale(LC_COLLATE,"")} etc. @end itemize