bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: [PATCH] lib/gettext.h: fix warning if gettext is already present
Date: Mon, 27 Jan 2020 19:02:18 +0100	[thread overview]
Message-ID: <fc91addb-5418-aef6-145e-26acd8831229@benettiengineering.com> (raw)
In-Reply-To: <2484654.CyytvBT3bq@omega>

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 <gettext.h> in public include file directories!

Indeed there is not, there is <libintl.h> 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 <libintl.h>
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
> 



  reply	other threads:[~2020-01-27 18:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 18:19 [PATCH] lib/gettext.h: fix warning if gettext is already present Giulio Benetti
2020-01-26 22:12 ` Bruno Haible
2020-01-26 22:47   ` Giulio Benetti
2020-01-26 22:50     ` Giulio Benetti
2020-01-27  1:41     ` Bruno Haible
2020-01-27 16:00       ` Giulio Benetti
2020-01-27 17:38         ` Bruno Haible
2020-01-27 18:02           ` Giulio Benetti [this message]
2020-01-27 19:29             ` Bruno Haible
2020-02-02 23:15               ` Giulio Benetti
2020-02-03  1:07                 ` Bruno Haible

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=fc91addb-5418-aef6-145e-26acd8831229@benettiengineering.com \
    --to=giulio.benetti@benettiengineering.com \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).