summaryrefslogtreecommitdiff
blob: 2941fdf106e3ea8b0f4f967bfcebe1fdbd616b1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From a395c47f97ae2cc7564c2af04913620767c650d3 Mon Sep 17 00:00:00 2001
From: Peter Levine <plevine457@gmail.com>
Date: Sat, 4 Mar 2017 14:25:40 +0200
Subject: [PATCH] Fix build with gcc6

If nls is disabled, the build defines a number of macros such as 'gettext' and 'dgettext' that would otherwise clash with symbols in /usr/include/libintl.h.  Unfortunately, the build eventually includes /usr/include/libintl.h anyway, and the symbols do clash.  Testing on gcc-5.4 and gcc-6.2 shows the macros aren't needed or used.
---
 src/gettext.h | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/src/gettext.h b/src/gettext.h
index 8b262f4..8aea60c 100644
--- a/src/gettext.h
+++ b/src/gettext.h
@@ -36,25 +36,6 @@
 #if defined(__sun)
 # include <locale.h>
 #endif
-
-/* Disabled NLS.
-   The casts to 'const char *' serve the purpose of producing warnings
-   for invalid uses of the value returned from these functions.
-   On pre-ANSI systems without 'const', the config.h file is supposed to
-   contain "#define const".  */
-# define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
-# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
-# define ngettext(Msgid1, Msgid2, N) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
-
 #endif
 
 /* A pseudo function call that serves as a marker for the automated
-- 
2.12.0