From patchwork Wed May 28 12:25:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1181 Received: (qmail 6932 invoked by alias); 28 May 2014 12:25:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 6914 invoked by uid 89); 28 May 2014 12:25:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <5385D5C9.1070503@redhat.com> Date: Wed, 28 May 2014 14:25:45 +0200 From: Florian Weimer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: GNU C Library Subject: [PATCH] manual: Update LOCPATH documentation 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? 2014-05-28 Florian Weimer * 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.