From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 73D191F466 for ; Mon, 27 Jan 2020 18:04:40 +0000 (UTC) Received: from localhost ([::1]:49168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iw8kY-0004u6-HU for normalperson@yhbt.net; Mon, 27 Jan 2020 13:04:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57107) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iw8iR-0002hv-P7 for bug-gnulib@gnu.org; Mon, 27 Jan 2020 13:02:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iw8iL-0007LA-Ur for bug-gnulib@gnu.org; Mon, 27 Jan 2020 13:02:27 -0500 Received: from smtpcmd11116.aruba.it ([62.149.156.116]:41297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iw8iL-0007K4-A6 for bug-gnulib@gnu.org; Mon, 27 Jan 2020 13:02:21 -0500 Received: from [192.168.159.128] ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id vW2J2100A0DySFo01W2Jc3; Mon, 27 Jan 2020 19:02:18 +0100 Subject: Re: [PATCH] lib/gettext.h: fix warning if gettext is already present To: Bruno Haible References: <20200126181929.38457-1-giulio.benetti@benettiengineering.com> <17178930.OJuyEKsSSM@omega> <2484654.CyytvBT3bq@omega> From: Giulio Benetti Message-ID: Date: Mon, 27 Jan 2020 19:02:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <2484654.CyytvBT3bq@omega> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1580148138; bh=uW+CarER7pRSkkmLMPpZxzmQONVopwF9Bcc0ZD4Uvg4=; h=Subject:To:From:Date:MIME-Version:Content-Type; b=kX/IKGwIklC89hPMWLCCIS7wYqNY4IJrzK4Rk8krIVioPJFW4phS9BCVqHHULQclt /Z65vFHGgALOUWntd/H5bxVDc/ht/tnCL14kdQlJxWc7X9ZOoeRPWFPf+tqFAHWpgi 0LN9aNoUbMauwlnbJmuOUTb/2HVcvIMnqIpDxt6Or1ZTTKaHE4NIL6a82jTyYqKddZ KQLfX5H9XvMEj8Q0WOl6Ga/Ophs7LM7MSzjQe0cmRtYkgEk82H6fn2zqzY1RbLwPTV DvC9gQ8KugNWejrF1B7mk4KVXolefBGQCpL5uHswSPWYAcIBjHSaS4+OpTSDpDztQD SRDLnvnovpqAA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 62.149.156.116 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Bruno, sorry I'm following too many things in parallel and I've made a mess on explaining! On 1/27/20 6:38 PM, Bruno Haible wrote: > Giulio Benetti wrote: >>> Since you reported a redefinition warning regarding 'gettext_noop', >>> gettext_noop must have been defined as a macro already elsewhere. Where? >> >> gettext_noop() is defined in environment gettext.h > > What do you mean by "environment gettext.h"?? > > The documentation [1] says > "Do not install the gettext.h file in public locations. Every package > that needs it should contain a copy of it on its own." > > There should not be a in public include file directories! Indeed there is not, there is and it is part of uclibc: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/include/libintl.h >> and in >> libbytesize/configure.ac they define: >> CFLAGS="${CFLAGS} -DENABLE_NLS" >> ... >> libbytesize should define ENABLE_NLS according to host gettext presence > > This is perfectly OK. It implies that their package won't compile if > gettext() is not contained in libc or GNU gettext was not installed. > But it is NOT the cause of the warning that you are seeing. AFAIK ENABLE_NLS is emitted in any case, there is not check. I'm using Buildroot test-pkg and it fails with uClibc-ng that contains libintl.h where they already: #undef gettext_noop #define gettext_noop() but in your gettext.h: #include and after: #define gettext_noop(String) String without before: #undef gettext_noop so you get that gettext_noop() is redefined. What I was proposing at the beginning was to add: #undef gettext_noop the same way uClibc does. So now libbytesize PR I've opened makes sense. I've explained myself very bad, sorry, hope now it's clear. Best regards -- Giulio Benetti Benetti Engineering sas >> the problem to be fixed is in libbytesize and >> it's not fixed by the PR I've already open, I need to modify >> configure.ac to emit ENABLE_NLS according to host gettext presence. > > No, libbytesize is OK. > >> only once, it's enough to see gettext_noop() redefined, since it's >> defined in host. > > The "host" that you are alluding to is the problem. > > Bruno > > [1] https://www.gnu.org/software/gettext/manual/html_node/lib_002fgettext_002eh.html >