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: 353379 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0B1831400E3 for ; Wed, 28 May 2014 22:25:54 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type; q=dns; s=default; b=AUQc7UdwM6GVQxta8PSoQPPbvNeDN +LlbCwevu0cp7Byho5u/beQqOGhwrTDpuacl++cTHdnPcT08D/GNyyk4bEQBl/40 0TRUs7W2JIVKa0dRYs5MwZ/xO5Nz7s8r/sYDwq5VKwhpK/1AZCmAHrCZJwyVCloh yGNIHZlck/eTEI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type; s=default; bh=Aghtiuf4hXL2h7SPvkT1FAXe3Ck=; b=D+i 5QToQmSp9v+7UgAC34t4N7IhUH+pV3lc+3/cWtL3/EAYeWMoFVXU3oMGcBOYWrf2 8gl5V0laWwohlKXMcV5ziD0kfgt3REX9L4j4rLt8gbJcTdI6S8LUbax3UrHIZDY/ VfkJhFs9soJBRESzqhDsRRAwcNyUAZ4z/j0HC8Jc= 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.