From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7901 Path: news.gmane.org!not-for-mail From: Harald Becker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Build option to disable locale [was: Byte-based C locale, draft 1] Date: Mon, 08 Jun 2015 01:59:35 +0200 Message-ID: <5574DAE7.8040101@gmx.de> References: <20150606214007.GA17398@brightrain.aerifal.cx> <55737684.7020803@gmx.de> <20150606231057.GZ17573@brightrain.aerifal.cx> <55738979.4030809@gmx.de> <20150607002459.GA17573@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1433721595 21903 80.91.229.3 (7 Jun 2015 23:59:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2015 23:59:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7914-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 08 01:59:54 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Z1kTp-0003Uu-Gb for gllmg-musl@m.gmane.org; Mon, 08 Jun 2015 01:59:53 +0200 Original-Received: (qmail 1793 invoked by uid 550); 7 Jun 2015 23:59:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1769 invoked from network); 7 Jun 2015 23:59:49 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <20150607002459.GA17573@brightrain.aerifal.cx> X-Provags-ID: V03:K0:OaKvGY70QxsyXsLDdWaE9dV6AnCzgFKwNh0xGu0jxOzw1YAWqVz x8Uh8XYm/QJvbkZxDnUWsl2LAS1jj6x7Z1hNf7sD7zr1thC2Nz1nUA/3dqdGr9m2Myg6qwW LHormsvHQQhyOIENWeZ+Qrj5YKXhGLCOwwR8cCQtrM1mC6qcphEF4UdjU/1p++f2+K5SdBg TUyHog+Q4mxloM2CIdaMA== X-UI-Out-Filterresults: notjunk:1;V01:K0:hOqMt9LL0So=:dX7Be8uEH+asoDlZbL1Iux 5DHHbJTzuiD/Bgo+3v1JCisHPkKTez1sSVhRByujD93AVSStg0sEXajlWaov50K4+5Bfccvsz byBlpkq9tNrzWhq+CCI6yIb7rpc3kMd1RRvXJ6t/xir/wuLuITHtH5dwnBPEiCFywxfmAOyrv f2JwE41dCGV6YMxlCnPVkHIlWU3Mt2qqD9qoR8PiBkMG68v0Gi4EWtla/CcDRKQ92t8QHIw0h 2M5L1varIjuo869hWoOWezFCi575co7hx0fmkeKyqiDCOPOKy/DIVV71OWStpacOsApoayxS9 5qBxle9zM3lQ0kdUcXE6K6+inSES7+lM/ZtqtzvQ2UszklPoAzn5Cza07iYRUxRXQJSq+r4Wj H6c1oIuluMoyREwNF7sK8gVgyVE/Wz/lvJBT8fSPwIpjl2b+g4sn15C7fw8He304wn9Ps1BjB P7Nb1e0WOEbRJKvTHdwYSiq/pwmWyd9P8iWyogVbZmLhhvv5/x8StQsYhGHp9qXAHWyBIR2vz IciD5epY9qT/+3ZrYWUM2wRSMbFT4LHLZE5eIoUoGvhZbZhlWtdgaHBsy/VJf+XaFaspYg/Wy YwbW9CZq0fgu/iT+u5VG25hY6kPSziOcrIdf9F2xkhfezoV4iDOSZjoZc+DzREDXO6VgTAOET pxz4BCexQpdEA///EvmDKCSBc4RDrj3ETfP1cGzFhz0xp+ONN2jPjuRE4ndCXpkX/WPE= Xref: news.gmane.org gmane.linux.lib.musl.general:7901 Archived-At: On 07.06.2015 02:24, Rich Felker wrote: > It's somewhat more clear what you're talking about, but I'm still not > sure what specific pieces of code you would want to omit from libc.so. > Which of the following would you want to remove or keep? I did not look into all the details ... In general: Keep the API, but add stubs with minimal operation or fail for none C locale (etc.). > - UTF-8 encoding and decoding May be of use to keep, if on bare minimum. > - Character properties > - Case mappings Keep ASCII, map all none ASCII to a single value. > - Internal message translation (nl_langinfo strings, errors, etc.) > - Message translation API (gettext) No translation at all, keep the English messages (as short as possible). > - Charset conversion (iconv) Copy ASCII / UTF-8, but fail for all other. > - Non-ASCII characters in regex and fnmatch patterns/brackers May be the question to allow for UTF-8, but only those, no other charsets (should allow to do some optimization and avoid all the extended overhead). fnmatch: Match None ASCII just 1:1, no other special operation. regex: Don't have the experience on the internals of this topic. In general allow for 1:1 matching of none ASCII characters, but otherwise behave as C locale (e.g. equivalence classes). -- Harald