bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] lib/gettext.h: fix warning if gettext is already present


From: Giulio Benetti
Subject: [PATCH] lib/gettext.h: fix warning if gettext is already present
Date: Sun, 26 Jan 2020 19:19:29 +0100

Building on an environment where gettext is already present leads to
emitting a warning about gettext_noop() alread defined. And if -Werror
is passed this warning will be treated like an error, so let's #undef
gettext_noop() before #define it.

Signed-off-by: Giulio Benetti <address@hidden>
---
 lib/gettext.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/gettext.h b/lib/gettext.h
index 249668af6..641113e43 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -106,6 +106,7 @@
    and other string expressions won't work.
    The macro's expansion is not parenthesized, so that it is suitable as
    initializer for static 'char[]' or 'const char[]' variables.  */
+#undef gettext_noop
 #define gettext_noop(String) String
 
 /* The separator between msgctxt and msgid in a .mo file.  */
-- 
2.20.1




reply via email to

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