qt5webkit-icu68.patch 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844
  2. In file included from Source/WebCore/platform/text/TextAllInOne.cpp:31:
  3. Source/WebCore/platform/text/TextCodecICU.cpp:311:42: error: use of undeclared identifier 'TRUE'
  4. ucnv_setFallback(m_converterICU, TRUE);
  5. ^
  6. In file included from Source/WebCore/platform/text/TextAllInOne.cpp:40:
  7. In file included from Source/WebCore/platform/text/icu/UTextProvider.cpp:27:
  8. Source/WebCore/platform/text/icu/UTextProvider.h:83:28: error: use of undeclared identifier 'TRUE'
  9. isAccessible = TRUE;
  10. ^
  11. Source/WebCore/platform/text/icu/UTextProvider.h:88:28: error: use of undeclared identifier 'FALSE'
  12. isAccessible = FALSE;
  13. ^
  14. Source/WebCore/platform/text/icu/UTextProvider.h:97:28: error: use of undeclared identifier 'TRUE'
  15. isAccessible = TRUE;
  16. ^
  17. Source/WebCore/platform/text/icu/UTextProvider.h:102:28: error: use of undeclared identifier 'FALSE'
  18. isAccessible = FALSE;
  19. ^
  20. In file included from Source/WebCore/platform/text/TextAllInOne.cpp:41:
  21. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:103:20: error: use of undeclared identifier 'TRUE'
  22. return TRUE;
  23. ^
  24. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:108:20: error: use of undeclared identifier 'FALSE'
  25. return FALSE;
  26. ^
  27. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:114:20: error: use of undeclared identifier 'TRUE'
  28. return TRUE;
  29. ^
  30. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:119:20: error: use of undeclared identifier 'FALSE'
  31. return FALSE;
  32. ^
  33. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:147:12: error: use of undeclared identifier 'TRUE'
  34. return TRUE;
  35. ^
  36. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:339:16: error: use of undeclared identifier 'FALSE'
  37. return FALSE;
  38. ^
  39. Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:359:12: error: use of undeclared identifier 'TRUE'
  40. return TRUE;
  41. ^
  42. In file included from Source/WebCore/platform/text/TextAllInOne.cpp:42:
  43. Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:128:16: error: use of undeclared identifier 'FALSE'
  44. return FALSE;
  45. ^
  46. Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:148:12: error: use of undeclared identifier 'TRUE'
  47. return TRUE;
  48. ^
  49. --- Source/WebCore/platform/text/TextCodecICU.cpp.orig 2020-03-04 17:16:37 UTC
  50. +++ Source/WebCore/platform/text/TextCodecICU.cpp
  51. @@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const
  52. m_converterICU = ucnv_open(m_canonicalConverterName, &err);
  53. ASSERT(U_SUCCESS(err));
  54. if (m_converterICU)
  55. - ucnv_setFallback(m_converterICU, TRUE);
  56. + ucnv_setFallback(m_converterICU, true);
  57. }
  58. int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err)
  59. --- Source/WebCore/platform/text/icu/UTextProvider.h.orig 2020-03-04 17:16:37 UTC
  60. +++ Source/WebCore/platform/text/icu/UTextProvider.h
  61. @@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text
  62. // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
  63. ASSERT(offset < std::numeric_limits<int32_t>::max());
  64. text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
  65. - isAccessible = TRUE;
  66. + isAccessible = true;
  67. return true;
  68. }
  69. if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
  70. text->chunkOffset = text->chunkLength;
  71. - isAccessible = FALSE;
  72. + isAccessible = false;
  73. return true;
  74. }
  75. } else {
  76. @@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text
  77. // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
  78. ASSERT(offset < std::numeric_limits<int32_t>::max());
  79. text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
  80. - isAccessible = TRUE;
  81. + isAccessible = true;
  82. return true;
  83. }
  84. if (nativeIndex <= 0 && !text->chunkNativeStart) {
  85. text->chunkOffset = 0;
  86. - isAccessible = FALSE;
  87. + isAccessible = false;
  88. return true;
  89. }
  90. }
  91. --- Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp.orig 2020-03-04 17:16:37 UTC
  92. +++ Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
  93. @@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t i
  94. if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
  95. // Already inside the buffer. Set the new offset.
  96. uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
  97. - return TRUE;
  98. + return true;
  99. }
  100. if (index >= length && uText->chunkNativeLimit == length) {
  101. // Off the end of the buffer, but we can't get it.
  102. uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
  103. - return FALSE;
  104. + return false;
  105. }
  106. } else {
  107. if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
  108. // Already inside the buffer. Set the new offset.
  109. uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
  110. - return TRUE;
  111. + return true;
  112. }
  113. if (!index && !uText->chunkNativeStart) {
  114. // Already at the beginning; can't go any farther.
  115. uText->chunkOffset = 0;
  116. - return FALSE;
  117. + return false;
  118. }
  119. }
  120. @@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t i
  121. uText->nativeIndexingLimit = uText->chunkLength;
  122. - return TRUE;
  123. + return true;
  124. }
  125. static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
  126. @@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UTe
  127. static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
  128. {
  129. if (!text->context)
  130. - return FALSE;
  131. + return false;
  132. int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
  133. UBool isAccessible;
  134. if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
  135. @@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text
  136. ASSERT(newContext == UTextProviderContext::PriorContext);
  137. textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
  138. }
  139. - return TRUE;
  140. + return true;
  141. }
  142. static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
  143. --- Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp.orig 2020-03-04 17:16:37 UTC
  144. +++ Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
  145. @@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLeng
  146. static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
  147. {
  148. if (!text->context)
  149. - return FALSE;
  150. + return false;
  151. int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
  152. UBool isAccessible;
  153. if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
  154. @@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text,
  155. ASSERT(newContext == UTextProviderContext::PriorContext);
  156. textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
  157. }
  158. - return TRUE;
  159. + return true;
  160. }
  161. static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)