]> Savannah Git Hosting - gnulib.git/commitdiff
gettext-h: Avoid -Wundef warning.
authorBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2017 23:37:22 +0000 (01:37 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2017 23:37:22 +0000 (01:37 +0200)
* lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00022.html>.

ChangeLog
lib/gettext.h

index 94f3219396c2b1078060242ee9b833e5e04cf58f..e555d07f67840cdd1ec6dcdba2bbf708daeb883c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-04-21  Bruno Haible  <bruno@clisp.org>
+
+       gettext-h: Avoid -Wundef warning.
+       * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
+       Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00022.html>.
+
 2017-04-05  Tim Rühsen  <tim.ruehsen@gmx.de>
 
        error: Avoid "function declaration isn't a prototype" warning.
index 888e2fc0960f4e51b17d9ffb3cbf6ec89e5614d2..2a12bb6c4a70dc8fc362396a4d1db029f516a6d7 100644 (file)
@@ -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>