summaryrefslogtreecommitdiff
path: root/recipes/proxy-libintl/0001-Rename-symbols-for-compatibility-with-gettext.patch
blob: f4201847d7c572217b4deaa94e4d246c2b913ca9 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
From ed92bd68ebbc660e44545be106bfc9897ec75798 Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Sun, 22 Mar 2020 16:10:17 +0100
Subject: [PATCH] Rename symbols for compatibility with gettext

---
 libintl.c |  2 +-
 libintl.h | 36 ++++++++++++++++++------------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/libintl.c b/libintl.c
index 12fc311..10e8882 100644
--- a/libintl.c
+++ b/libintl.c
@@ -243,7 +243,7 @@ _proxy_libintl_deinit (void)
 
 #define IMPLEMENT(fn, parlist, parlist2)	\
 char *						\
-g_libintl_ ## fn parlist			\
+libintl_ ## fn parlist				\
 {						\
   setup ();					\
   return p_##fn parlist2;			\
diff --git a/libintl.h b/libintl.h
index 0bd6aeb..985a47f 100644
--- a/libintl.h
+++ b/libintl.h
@@ -39,15 +39,15 @@
 # define PROXY_LIBINTL_GNUC_FORMAT(arg_idx)
 #endif
 
-#define gettext g_libintl_gettext
-#define dgettext g_libintl_dgettext
-#define dcgettext g_libintl_dcgettext
-#define ngettext g_libintl_ngettext
-#define dngettext g_libintl_dngettext
-#define dcngettext g_libintl_dcngettext
-#define textdomain g_libintl_textdomain
-#define bindtextdomain g_libintl_bindtextdomain
-#define bind_textdomain_codeset g_libintl_bind_textdomain_codeset
+#define gettext libintl_gettext
+#define dgettext libintl_dgettext
+#define dcgettext libintl_dcgettext
+#define ngettext libintl_ngettext
+#define dngettext libintl_dngettext
+#define dcngettext libintl_dcngettext
+#define textdomain libintl_textdomain
+#define bindtextdomain libintl_bindtextdomain
+#define bind_textdomain_codeset libintl_bind_textdomain_codeset
 
 /* Define G_INTL_STATIC_COMPILATION to link statically */
 #if defined(_WIN32) && !defined(G_INTL_STATIC_COMPILATION)
@@ -65,36 +65,36 @@
 extern "C" {
 #endif
 
-G_INTL_EXPORT char *g_libintl_gettext (const char *msgid) PROXY_LIBINTL_GNUC_FORMAT (1);
+G_INTL_EXPORT char *libintl_gettext (const char *msgid) PROXY_LIBINTL_GNUC_FORMAT (1);
 
-G_INTL_EXPORT char *g_libintl_dgettext (const char *domainname,
+G_INTL_EXPORT char *libintl_dgettext (const char *domainname,
 				 const char *msgid) PROXY_LIBINTL_GNUC_FORMAT (2);
 
-G_INTL_EXPORT char *g_libintl_dcgettext (const char *domainname,
+G_INTL_EXPORT char *libintl_dcgettext (const char *domainname,
 			const char *msgid,
 			int         category) PROXY_LIBINTL_GNUC_FORMAT (2);
 
-G_INTL_EXPORT char *g_libintl_ngettext (const char       *msgid1,
+G_INTL_EXPORT char *libintl_ngettext (const char       *msgid1,
 				 const char       *msgid2,
 				 unsigned long int n) PROXY_LIBINTL_GNUC_FORMAT (1) PROXY_LIBINTL_GNUC_FORMAT (2);
 
-G_INTL_EXPORT char *g_libintl_dngettext (const char       *domainname,
+G_INTL_EXPORT char *libintl_dngettext (const char       *domainname,
 				  const char       *msgid1,
 				  const char       *msgid2,
 				  unsigned long int n) PROXY_LIBINTL_GNUC_FORMAT (2) PROXY_LIBINTL_GNUC_FORMAT (3);
 
-G_INTL_EXPORT char *g_libintl_dcngettext (const char       *domainname,
+G_INTL_EXPORT char *libintl_dcngettext (const char       *domainname,
 				   const char       *msgid1,
 				   const char       *msgid2,
 				   unsigned long int n,
 				   int               category) PROXY_LIBINTL_GNUC_FORMAT (2) PROXY_LIBINTL_GNUC_FORMAT (3);
 
-G_INTL_EXPORT char *g_libintl_textdomain (const char *domainname);
+G_INTL_EXPORT char *libintl_textdomain (const char *domainname);
 
-G_INTL_EXPORT char *g_libintl_bindtextdomain (const char *domainname,
+G_INTL_EXPORT char *libintl_bindtextdomain (const char *domainname,
 				       const char *dirname);
 
-G_INTL_EXPORT char *g_libintl_bind_textdomain_codeset (const char *domainname,
+G_INTL_EXPORT char *libintl_bind_textdomain_codeset (const char *domainname,
 						const char *codeset);
 
 #ifdef __cplusplus
-- 
2.23.0