Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/webkit-gtk/files: webkit-gtk-1.1.15.4-icu44.patch
Date: Mon, 29 Mar 2010 22:28:31
Message-Id: E1NwNRd-0007md-1C@stork.gentoo.org
1 eva 10/03/29 22:28:29
2
3 Added: webkit-gtk-1.1.15.4-icu44.patch
4 Log:
5 Fix build with icu-4.4, bug #308699.
6 (Portage version: 2.2_rc67/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 net-libs/webkit-gtk/files/webkit-gtk-1.1.15.4-icu44.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.1.15.4-icu44.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/webkit-gtk/files/webkit-gtk-1.1.15.4-icu44.patch?rev=1.1&content-type=text/plain
13
14 Index: webkit-gtk-1.1.15.4-icu44.patch
15 ===================================================================
16 Backport of upstream revision 56345 (2010-03-22 Darin Adler <darin@×××××.com>)
17 to webkit-gtk-1.1.15.4
18
19 TextBreakIteratorICU.cpp is incompatible with new UBreakIterator type in ICU 4.4
20 https://bugs.webkit.org/show_bug.cgi?id=36381
21 platform/text/TextBreakIteratorICU.cpp, platform/text/TextBoundariesICU.cpp:
22 Use reinterpret_cast instead of static_cast or relying on conversion to void*.
23
24 diff -ru webkit-1.1.15.4-orig//WebCore/platform/text/TextBoundariesICU.cpp webkit-1.1.15.4/WebCore/platform/text/TextBoundariesICU.cpp
25 --- webkit-1.1.15.4-orig//WebCore/platform/text/TextBoundariesICU.cpp 2009-09-22 11:29:21.000000000 -0400
26 +++ webkit-1.1.15.4/WebCore/platform/text/TextBoundariesICU.cpp 2010-03-26 03:19:14.852055685 -0400
27 @@ -36,7 +36,7 @@
28
29 int findNextWordFromIndex(const UChar* chars, int len, int position, bool forward)
30 {
31 - UBreakIterator* it = wordBreakIterator(chars, len);
32 + UBreakIterator* it = reinterpret_cast<UBreakIterator*>(wordBreakIterator(chars, len));
33
34 if (forward) {
35 position = ubrk_following(it, position);
36 @@ -67,7 +67,7 @@
37
38 void findWordBoundary(const UChar* chars, int len, int position, int* start, int* end)
39 {
40 - UBreakIterator* it = wordBreakIterator(chars, len);
41 + UBreakIterator* it = reinterpret_cast<UBreakIterator*>(wordBreakIterator(chars, len));
42 *end = ubrk_following(it, position);
43 if (*end < 0)
44 *end = ubrk_last(it);
45 diff -ru webkit-1.1.15.4-orig//WebCore/platform/text/TextBreakIteratorICU.cpp webkit-1.1.15.4/WebCore/platform/text/TextBreakIteratorICU.cpp
46 --- webkit-1.1.15.4-orig//WebCore/platform/text/TextBreakIteratorICU.cpp 2009-09-22 11:29:21.000000000 -0400
47 +++ webkit-1.1.15.4/WebCore/platform/text/TextBreakIteratorICU.cpp 2010-03-26 02:44:51.934479159 -0400
48 @@ -38,7 +38,7 @@
49
50 if (!createdIterator) {
51 UErrorCode openStatus = U_ZERO_ERROR;
52 - iterator = static_cast<TextBreakIterator*>(ubrk_open(type, currentTextBreakLocaleID(), 0, 0, &openStatus));
53 + iterator = reinterpret_cast<TextBreakIterator*>(ubrk_open(type, currentTextBreakLocaleID(), 0, 0, &openStatus));
54 createdIterator = true;
55 ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
56 }
57 @@ -46,7 +46,7 @@
58 return 0;
59
60 UErrorCode setTextStatus = U_ZERO_ERROR;
61 - ubrk_setText(iterator, string, length, &setTextStatus);
62 + ubrk_setText(reinterpret_cast<UBreakIterator*>(iterator), string, length, &setTextStatus);
63 if (U_FAILURE(setTextStatus))
64 return 0;
65
66 @@ -85,34 +85,34 @@
67 staticSentenceBreakIterator, UBRK_SENTENCE, string, length);
68 }
69
70 -int textBreakFirst(TextBreakIterator* bi)
71 +int textBreakFirst(TextBreakIterator* iterator)
72 {
73 - return ubrk_first(bi);
74 + return ubrk_first(reinterpret_cast<UBreakIterator*>(iterator));
75 }
76
77 -int textBreakNext(TextBreakIterator* bi)
78 +int textBreakNext(TextBreakIterator* iterator)
79 {
80 - return ubrk_next(bi);
81 + return ubrk_next(reinterpret_cast<UBreakIterator*>(iterator));
82 }
83
84 -int textBreakPreceding(TextBreakIterator* bi, int pos)
85 +int textBreakPreceding(TextBreakIterator* iterator, int pos)
86 {
87 - return ubrk_preceding(bi, pos);
88 + return ubrk_preceding(reinterpret_cast<UBreakIterator*>(iterator), pos);
89 }
90
91 -int textBreakFollowing(TextBreakIterator* bi, int pos)
92 +int textBreakFollowing(TextBreakIterator* iterator, int pos)
93 {
94 - return ubrk_following(bi, pos);
95 + return ubrk_following(reinterpret_cast<UBreakIterator*>(iterator), pos);
96 }
97
98 -int textBreakCurrent(TextBreakIterator* bi)
99 +int textBreakCurrent(TextBreakIterator* iterator)
100 {
101 - return ubrk_current(bi);
102 + return ubrk_current(reinterpret_cast<UBreakIterator*>(iterator));
103 }
104
105 -bool isTextBreak(TextBreakIterator* bi, int pos)
106 +bool isTextBreak(TextBreakIterator* iterator, int position)
107 {
108 - return ubrk_isBoundary(bi, pos);
109 + return ubrk_isBoundary(reinterpret_cast<UBreakIterator*>(iterator), position);
110 }
111
112 #ifndef BUILDING_ON_TIGER
113 @@ -126,7 +126,7 @@
114 UParseError parseStatus;
115 UErrorCode openStatus = U_ZERO_ERROR;
116 String rules(breakRules);
117 - iterator = static_cast<TextBreakIterator*>(ubrk_openRules(rules.characters(), rules.length(), 0, 0, &parseStatus, &openStatus));
118 + iterator = reinterpret_cast<TextBreakIterator*>(ubrk_openRules(rules.characters(), rules.length(), 0, 0, &parseStatus, &openStatus));
119 createdIterator = true;
120 ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
121 }
122 @@ -134,7 +134,7 @@
123 return 0;
124
125 UErrorCode setTextStatus = U_ZERO_ERROR;
126 - ubrk_setText(iterator, string, length, &setTextStatus);
127 + ubrk_setText(reinterpret_cast<UBreakIterator*>(iterator), string, length, &setTextStatus);
128 if (U_FAILURE(setTextStatus))
129 return 0;