summaryrefslogtreecommitdiff
path: root/mail/evolution-data-server/patches/patch-e_data_server_util_c
blob: 554d90cbfab84e6198412f6aafa0d99fc9029eb7 (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
$NetBSD: patch-e_data_server_util_c,v 1.1 2012/02/06 10:44:44 drochner Exp $

In glib 2.30 G_UNICODE_COMBINING_MARK became known as
G_UNICODE_SPACING_MARK, and g_unicode_canonical_decomposition was
deprecated in favour of g_unichar_fully_decompose.

--- libedataserver/e-data-server-util.c.orig	2011-04-21 19:35:37.000000000 +0000
+++ libedataserver/e-data-server-util.c
@@ -245,7 +245,7 @@ e_util_utf8_strstrcase (const gchar *hay
 static gunichar
 stripped_char (gunichar ch)
 {
-	gunichar *decomp, retval;
+	gunichar decomp[4], retval;
 	GUnicodeType utype;
 	gsize dlen;
 
@@ -255,14 +255,23 @@ stripped_char (gunichar ch)
 	case G_UNICODE_CONTROL:
 	case G_UNICODE_FORMAT:
 	case G_UNICODE_UNASSIGNED:
+#ifdef G_UNICODE_COMBINING_MARK
 	case G_UNICODE_COMBINING_MARK:
+#endif
+#ifdef G_UNICODE_SPACING_MARK
+	case G_UNICODE_SPACING_MARK:
+#endif
 		/* Ignore those */
 		return 0;
 	default:
 		/* Convert to lowercase, fall through */
 		ch = g_unichar_tolower (ch);
 	case G_UNICODE_LOWERCASE_LETTER:
+#ifdef G_UNICODE_COMBINING_MARK
 		if ((decomp = g_unicode_canonical_decomposition (ch, &dlen))) {
+#else
+		if ((dlen = g_unichar_fully_decompose(ch, FALSE, decomp, 4))) {
+#endif
 			retval = decomp[0];
 			g_free (decomp);
 			return retval;