bug-gnulib
[Top][All Lists]
Advanced

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

Re: Trivial patches to silence -Wundef


From: Bruno Haible
Subject: Re: Trivial patches to silence -Wundef
Date: Sat, 22 Apr 2017 01:39:39 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

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  <address@hidden>

        gettext-h: Avoid -Wundef warning.
        * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
        Reported by Tim Rühsen <address@hidden> 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

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