bug-gnulib
[Top][All Lists]
Advanced

[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: Bruno Haible
Subject: Re: [PATCH] lib/gettext.h: fix warning if gettext is already present
Date: Mon, 27 Jan 2020 20:29:26 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

Giulio Benetti wrote:
> > 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

Ah! Most of the contents of this <libintl.h> is OK. But
  - gettext_noop
  - gettext_printf
don't belong there.

> What I was proposing at the beginning was to add:
> #undef gettext_noop
> 
> the same way uClibc does.

The compiler warning about a redefined macros is meant to catch unintentional
overriding definitions. For example, when a program defines gettext_noop
and afterwards #includes "gettext.h". It is reasonable to keep this warning
in the general case.

Therefore the right action is that the uClibc people remove their definition
of gettext_noop and gettext_printf from this file.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]