From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7641 Path: news.gmane.org!not-for-mail From: Felix Janda Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: libintl: stubs or working functions Date: Thu, 14 May 2015 18:43:34 +0200 Message-ID: <20150514164333.GA1667@euler> References: <20150415191815.GA5045@euler> <20150416003506.GT6817@brightrain.aerifal.cx> <20150416171505.GA1264@euler> <20150416173345.GV6817@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1431621842 3004 80.91.229.3 (14 May 2015 16:44:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 May 2015 16:44:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7653-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 14 18:44:01 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 1YswEq-0001rm-Qt for gllmg-musl@m.gmane.org; Thu, 14 May 2015 18:44:00 +0200 Original-Received: (qmail 16267 invoked by uid 550); 14 May 2015 16:43:59 -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 16249 invoked from network); 14 May 2015 16:43:58 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20150416173345.GV6817@brightrain.aerifal.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:7641 Archived-At: On Thu, Apr 16, 2015, Rich Felker wrote: > On Thu, Apr 16, 2015 at 07:15:51PM +0200, Felix Janda wrote: > > As I understand applications need to pass 'need-formatstring-macros' to > > the AM_GNU_GETTEXT macro to request this functionality. But with debian > > code search I couldn't find any program doing that... > > OK. AFAIK it's only GNU software like coreutils using this > functionality. > > > The macro distinguishes three gettext apis. gt_api_version is 1 for the > > basic version. For the ngettext functions gt_api_version>=2 is necessary > > and for these "SYSDEP strings" gt_api_version>=3 is necessary. > > > > As I understand musl has gt_api_version=2. Is that right? > > Based on your understanding of the versions, yes, that sounds right. > > > To test for the api version AM_GNU_GETTEXT checks in all cases for > > bindtextdomain, gettext, _nl_msg_cat_cntr and _nl_domain_bindings. For > > gt_api_version>=2 it checks for ngettext and for gt_api_version>=3 it > > does something with __GNU_GETTEXT_SUPPORTED_REVISION we won't need to > > care about. > > > > So for musl the test gives obviously the wrong result. > > > > I guess that we don't want to export symbols _nl_*. > > > > What I would now like to ask upstream is to put the _nl_* stuff behind > > an #ifdef __GLIBC__ ... > > I think we should ask why they're doing it. It sounds to me like they > should just be checking for the APIs they want to use. Thanks for your advice. I've sent something [1] to their mailing list a while ago but got no reply so far. It might be difficult to find a cross-compile friendly test for the API. Felix [1]: http://lists.gnu.org/archive/html/bug-gettext/2015-04/msg00002.html