mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Masanori Ogino <masanori.ogino@gmail.com>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com, bug-gnu-gettext@gnu.org
Subject: Re: Re: [bug-gettext] AM_GNU_GETTEXT without referring internal symbols?
Date: Thu, 7 Apr 2016 16:12:39 +0900	[thread overview]
Message-ID: <CAA-4+jeQnL6G3wpK=KZ0jG+y8LLrXCNS3LoenkraepKGav-wRA@mail.gmail.com> (raw)
In-Reply-To: <20160407062659.GM21636@brightrain.aerifal.cx>

2016-04-07 15:26 GMT+09:00 Rich Felker <dalias@libc.org>:
> On Thu, Apr 07, 2016 at 02:34:01PM +0900, Masanori Ogino wrote:
>> 2016-04-07 11:26 GMT+09:00 Daiki Ueno <ueno@gnu.org>:
>> > Masanori Ogino <masanori.ogino@gmail.com> 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


  reply	other threads:[~2016-04-07  7:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 12:56 Masanori Ogino
     [not found] ` <CAA-4+jeUF8c+Kmv0UQi0akMAtc2hmi3pC_8=nBNcsfuRcjSgNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-04  2:23   ` Daiki Ueno
     [not found]     ` <m3h9fit8lg.fsf-ueno-mXXj517/zsQ@public.gmane.org>
2016-04-04  4:23       ` Masanori Ogino
     [not found]         ` <CAA-4+jcpfOXoYx1g_48M0B7punK7r2AOU7YU-V_pdQNGYcFmng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-07  2:26           ` [musl] " Daiki Ueno
2016-04-07  5:34             ` Re: [bug-gettext] " Masanori Ogino
     [not found]               ` <CAA-4+jfbUEi1bBBP7iT2_9zaxyR+XvRb00yrWsoFj7iWiN3uUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-07  5:36                 ` [musl] " Masanori Ogino
2016-05-26  6:09                 ` Daiki Ueno
2016-05-26 12:53                   ` Re: [bug-gettext] " Masanori Ogino
2016-05-26 19:36                     ` Rich Felker
     [not found]                       ` <20160526193658.GA21636-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org>
2016-05-27  8:48                         ` [musl] " Daiki Ueno
2016-04-07  6:26               ` Re: [bug-gettext] " Rich Felker
2016-04-07  7:12                 ` Masanori Ogino [this message]
2016-04-07 10:57                   ` Szabolcs Nagy
2016-04-07 13:53                     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA-4+jeQnL6G3wpK=KZ0jG+y8LLrXCNS3LoenkraepKGav-wRA@mail.gmail.com' \
    --to=masanori.ogino@gmail.com \
    --cc=bug-gnu-gettext@gnu.org \
    --cc=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).