From 8fa38e3ebd5ee16c2166e14b55718aa5f28a0cd9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 22 Apr 2017 01:37:22 +0200 Subject: [PATCH] gettext-h: Avoid -Wundef warning. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined. Reported by Tim Rühsen in . --- ChangeLog | 7 +++++++ lib/gettext.h | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.39.5