This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] manual: Update LOCPATH documentation
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 28 May 2014 14:25:45 +0200
- Subject: [PATCH] manual: Update LOCPATH documentation
- Authentication-results: sourceware.org; auth=none
I noticed that the LOCPATH documentation had bitrotted and did not match
the current defaults anymore.
It's also a bit odd that we go to great lengths *not* documenting the
actual format of locale specifiers (mostly the
language_TERRITORY.codeset@modifier structure), while this format is
very much part of our public interface and described in the setlocale(3)
manual page. What's the current thinking on that? Should we add this
to the manual as well?
--
Florian Weimer / Red Hat Product Security Team
2014-05-28 Florian Weimer <fweimer@redhat.com>
* manual/locale.texi (Setting the Locale): Update documentation of
the LOCPATH environment variable.
diff --git a/manual/locale.texi b/manual/locale.texi
index 45f1e94..33e8bef 100644
--- a/manual/locale.texi
+++ b/manual/locale.texi
@@ -411,14 +411,19 @@ pointer and leaves the current locale unchanged.
The path used for finding locale data can be set using the
@code{LOCPATH} environment variable. The default path for finding
-locale data is system specific. It is computed from the value given
-as the prefix while configuring the C library. This value normally is
-@file{/usr} or @file{/}. For the former the complete path is:
+locale data is system specific. It is computed from the directory
+specified using @option{--localedir}, @option{--datarootdir}, or
+@option{--prefix} while configuring @theglibc. The prefix is normally
+set as @file{/usr} or @file{/}. For the former the complete path for
+the @code{LOCPATH} default value is:
@smallexample
-/usr/lib/locale
+/usr/share/locale
@end smallexample
+The value of @code{LOCPATH} is ignored by privileged programs for
+security reasons.
+
Here is an example showing how you might use @code{setlocale} to
temporarily switch to a new locale.