Fix #43785 for another Solaris issue.

I would like to see this in the next bugfix release.

Do you agree ?

Tim
From 518ed8d07c0a6e441e0a919ba1967d89e0061898 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim Rühsen?= <[email protected]>
Date: Thu, 5 Feb 2015 16:05:24 +0100
Subject: [PATCH] src/wget.h: Fix libintl.h / gettext clash for Solaris

In case --disable-nls is given, we have to include libintl.h before
out gettext defines because libintl.h will be implicitly included by
locale.h. And in this case our defines will conflict with libintl.h
function prototypes.
---
 src/wget.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/wget.h b/src/wget.h
index cddacdc..0b2381d 100644
--- a/src/wget.h
+++ b/src/wget.h
@@ -59,11 +59,14 @@ as that of the covered work.  */
 /* `gettext (FOO)' is long to write, so we use `_(FOO)'.  If NLS is
    unavailable, _(STRING) simply returns STRING.  */
 #if ENABLE_NLS
-#	include <libintl.h>
-#	define _(STRING) gettext(STRING)
+# include <libintl.h>
+# define _(STRING) gettext(STRING)
 #else
-#	define _(STRING) STRING
-#	define ngettext(STRING1,STRING2,N) STRING2
+# ifdef solaris
+#  include <libintl.h>
+# endif
+# define _(STRING) STRING
+# define ngettext(STRING1,STRING2,N) STRING2
 #endif

 /* A pseudo function call that serves as a marker for the automated
--
2.1.4

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to