From: Bruno Haible Date: Fri, 21 Apr 2017 23:37:22 +0000 (+0200) Subject: gettext-h: Avoid -Wundef warning. X-Git-Tag: v1.0~6265 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8fa38e3ebd5ee16c2166e14b55718aa5f28a0cd9;p=gnulib.git gettext-h: Avoid -Wundef warning. * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined. Reported by Tim Rühsen in . --- diff --git a/ChangeLog b/ChangeLog index 94f3219396..e555d07f67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-04-21 Bruno Haible + + gettext-h: Avoid -Wundef warning. + * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined. + Reported by Tim Rühsen in + . + 2017-04-05 Tim Rühsen error: Avoid "function declaration isn't a prototype" warning. diff --git a/lib/gettext.h b/lib/gettext.h index 888e2fc096..2a12bb6c4a 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