]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid -Wundef warning in gettext.h.
authorBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2017 23:40:18 +0000 (01:40 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2017 23:40:18 +0000 (01:40 +0200)
* gnulib-local/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>.

gnulib-local/lib/gettext.h

index 3d4233c7242b38e5627501c16f2603e5a5c5b631..75f59f609a70d15d68afdfd8caccd87bda1f1c78 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>