On 04/05/2017 10:59 PM, Bruno Haible wrote:
> Hi Tim,
> 
>> These patches silence tons of warnings here...
>> 0001-lib-gettext.h-Avoid-Wundef-warningi-for-ENABLE_NLS.patch
> 
> We cannot apply this patch. While gettext.m4 defines ENABLE_NLS to 1
> or doesn't define it at all, many developers use "#defined ENABLE_NLS 0"
> to disable NLS from GNU gettext: A web search for "define enable_nls 0"
> lists 133 hits.
> The proposed patch would break these uses.

True, I missed that.

Here is the amended patch to deal with that situation.

Regards, Tim
From 909e7ca5b660c44ea29be8eb0a514bbfbabc87e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <[email protected]>
Date: Wed, 5 Apr 2017 15:31:30 +0200
Subject: [PATCH] * lib/gettext.h: Avoid -Wundef warning for ENABLE_NLS

---
 lib/gettext.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/gettext.h b/lib/gettext.h
index 888e2fc09..85b71cab2 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -19,7 +19,7 @@
 #define _LIBGETTEXT_H 1
 
 /* NLS can be disabled through the configure --disable-nls option.  */
-#if ENABLE_NLS
+#if defined ENABLE_NLS && ENABLE_NLS != 0
 
 /* Get declarations of GNU message catalog functions.  */
 # include <libintl.h>
-- 
2.11.0

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to