From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9856 Path: news.gmane.org!not-for-mail From: Masanori Ogino Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [bug-gettext] AM_GNU_GETTEXT without referring internal symbols? Date: Thu, 7 Apr 2016 16:12:39 +0900 Message-ID: References: <20160407062659.GM21636@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 X-Trace: ger.gmane.org 1460013176 10743 80.91.229.3 (7 Apr 2016 07:12:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2016 07:12:56 +0000 (UTC) Cc: musl@lists.openwall.com, bug-gnu-gettext@gnu.org To: Rich Felker Original-X-From: musl-return-9869-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 07 09:12:56 2016 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 1ao47b-00045u-8Z for gllmg-musl@m.gmane.org; Thu, 07 Apr 2016 09:12:55 +0200 Original-Received: (qmail 21717 invoked by uid 550); 7 Apr 2016 07:12:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21696 invoked from network); 7 Apr 2016 07:12:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=g/O4AusGP/nDJk0JZzaUwVIPl5AYfEB+R7GMqkkRnbk=; b=oC7VYi0KiufXXMUC4//50a/FJsWAR6fKUL01kvK+r4IoM72MysPn65GnMOF5pPusn1 08hRMippZPwmem4VM9X/MVp6YXhmNJyt9FznWhNnK7HogYAO8zoWWQiienoEP49qp7AA AArdSlz8gvA2P0o7c0UelrvHCL7+77zrer1BSXgHsnvN4F1zWYLYggT1mBIJex4+EKNu jgB5UuchkHXLzi93PYZbZES8UkWa/OJjk2xrr4V/mKbqaCt5pVQEw+g5kW/iUj3q77RF L4coDjf+pI2LepPeF7Te6TDYbDM3x8HgMqXm7grk3AmZphvnUuIKB+y50P9lLzInfeSL Kzkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=g/O4AusGP/nDJk0JZzaUwVIPl5AYfEB+R7GMqkkRnbk=; b=TK1QWxyaB2XtBXf+xn8JKsHKAEiHaNyjnuFkYX5cfxcVZDMXDb8w0K1DAaa8hkQAGx PcwZ07hHxRwKghmNr433KdobqFeFN+kmd60EZsW3HLSBI32rjsVfqkllPbNyW29A3G6y CCzSPDSxmIKGt5vuRbmgnUMBNFpif15xJGoXovSvLi7dwkiqY+UHTL/Rd7XgMX447rGS iBCD0nOkvwAw5v+wWfuA5ufY3avUKHX4Ntbt7/V7OdtPGyoOouNTr8KMkLDVXAzVAoWB iDMKtUzSRL2t8SK+0wkjFuVQWAkykTv3pHdtgSrYllrLdY/fKl98HCf1Db95UO3fWZwV 0XhA== X-Gm-Message-State: AD7BkJIP0vsEY0oCGXEMSlJf+gL1vmAr9oq+xZnbplK91ADzO7saLFakU/OT9xkqrrPerT6E8ho2QSvaOeoiwg== X-Received: by 10.182.128.134 with SMTP id no6mr705184obb.35.1460013159303; Thu, 07 Apr 2016 00:12:39 -0700 (PDT) Original-Sender: masanoriogino@gmail.com In-Reply-To: <20160407062659.GM21636@brightrain.aerifal.cx> X-Google-Sender-Auth: BtBEOs2zESof_9iphU85JHzpQ4Q Xref: news.gmane.org gmane.linux.lib.musl.general:9856 Archived-At: 2016-04-07 15:26 GMT+09:00 Rich Felker : > On Thu, Apr 07, 2016 at 02:34:01PM +0900, Masanori Ogino wrote: >> 2016-04-07 11:26 GMT+09:00 Daiki Ueno : >> > Masanori Ogino writes: >> >> That is why I proposed to have a blacklist of "broken" implementations >> >> as an option. >> >> >> >> AFAIK there have already been some blacklisting in autotools e.g. >> >> checking the version of glibc to reject specific broken implementation >> >> of a function. Thus, I think it's acceptable to use a blacklist. What >> >> do you think about it? >> > >> > Yes, that sounds like a good idea. But I guess we then need to collect >> > information about incompatible implementations. In this regard I'm >> > actually not sure if the gettext-tools test coverage can be used as an >> > indicator of compatibility. >> >> Indeed. >> >> > By the way, musl defines __GNU_GETTEXT_SUPPORTED_REVISION in the same >> > way as glibc: >> > >> > #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 1 : -1) >> > >> > Is major = 1 + minor = 1 actually supported in musl? >> >> musl doesn't support "%Id" (major 1) IIRC. I suspect that musl >> actually supports "system dependent segment" (minor 1) as the GNU >> implementation does. >> >> On the other hand, glibc's definition is questionable too since it >> seems that glibc's gettext implements major 1. > > The intent is that musl supports the _API_ fully, not the (IMO awful, > and against the whole spirit of gettext) GNU implementation of sysdep > strings as a segment of the mo file that's patched at runtime and > wastes core in every process. Instead, msgfmt (there's a prototype > version of the utility that does this, but it needs work) should > generate all possible combinations of the expansion of the sysdep > macros at mo generation time, and "sysdep" translations magically work > with no runtime cost. At some point I want to prepare a patch for > upstream msgfmt to do this but I haven't gotten around to it yet. > > I'm not sure what the %Id thing you're referring to is; can you point > me to a description of it? %Id is essentially an extension of printf(3) in glibc 2.2 and later. It can be implemented by the same way as how sysdep is implemented; it just depends on the current locale, not the ABI. Search http://man7.org/linux/man-pages/man3/sprintf.3.html by "glibc 2.2 adds" for details. Fortunately, https://www.gnu.org/software/gettext/manual/html_node/c_002dformat.html describes that, if I understand this correctly, gettext can ignore the I flag if printf does not recognize it. I don't know whether such implementation matches the requirement of major 1 GNU mo format. -- Masanori Ogino