[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lib/gettext.h: fix warning if gettext is already present
From: |
Giulio Benetti |
Subject: |
Re: [PATCH] lib/gettext.h: fix warning if gettext is already present |
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 |
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
- [PATCH] lib/gettext.h: fix warning if gettext is already present, Giulio Benetti, 2020/01/26
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Bruno Haible, 2020/01/26
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Giulio Benetti, 2020/01/26
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Giulio Benetti, 2020/01/26
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Bruno Haible, 2020/01/26
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Giulio Benetti, 2020/01/27
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Bruno Haible, 2020/01/27
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present,
Giulio Benetti <=
- Re: [PATCH] lib/gettext.h: fix warning if gettext is already present, Bruno Haible, 2020/01/27