Tim Rühsen wrote on 2017-04-15:
> Here is the amended patch to deal with that situation.

Thanks. I amended the comment as well:


2017-04-21  Bruno Haible  <[email protected]>

        gettext-h: Avoid -Wundef warning.
        * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
        Reported by Tim Rühsen <[email protected]> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00022.html>.

diff --git a/lib/gettext.h b/lib/gettext.h
index 888e2fc..2a12bb6 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -18,8 +18,9 @@
 #ifndef _LIBGETTEXT_H
 #define _LIBGETTEXT_H 1
 
-/* NLS can be disabled through the configure --disable-nls option.  */
-#if ENABLE_NLS
+/* NLS can be disabled through the configure --disable-nls option
+   or through "#define ENABLE NLS 0" before including this file.  */
+#if defined ENABLE_NLS && ENABLE_NLS
 
 /* Get declarations of GNU message catalog functions.  */
 # include <libintl.h>


Reply via email to