package/qt5webkit: fix ICU related compile failures from capital bool defines
authorHenri Roosen <henriroosen@gmail.com>
Thu, 25 Mar 2021 17:39:47 +0000 (18:39 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 28 Mar 2021 10:12:35 +0000 (12:12 +0200)
commit0f6c209a1d7660846e2a99f903deb89f30ca45d7
treec40cf7ff3fc61b936ef59af2e0744f4f5bc12136
parent3f2ea5db25a4ca1e9ab8db69497ab9b4e9ccb117
package/qt5webkit: fix ICU related compile failures from capital bool defines

This patch fixes the following compile failures:

In file included from platform/text/TextAllInOne.cpp:30:
platform/text/TextBreakIteratorICU.cpp: In function ‘bool
WebCore::textInChunkOrOutOfRange(UText*, int64_t, int64_t, UBool,
UBool&)’:
platform/text/TextBreakIteratorICU.cpp:217:28: error: ‘TRUE’ was not
declared in this scope
  217 |             isAccessible = TRUE;
      |                            ^~~~
platform/text/TextBreakIteratorICU.cpp:222:28: error: ‘FALSE’ was not
declared in this scope
  222 |             isAccessible = FALSE;
      |                            ^~~~~
platform/text/TextBreakIteratorICU.cpp:231:28: error: ‘TRUE’ was not
declared in this scope
  231 |             isAccessible = TRUE;
      |                            ^~~~
platform/text/TextBreakIteratorICU.cpp:236:28: error: ‘FALSE’ was not
declared in this scope
  236 |             isAccessible = FALSE;
      |                            ^~~~~
platform/text/TextBreakIteratorICU.cpp: In function ‘UBool
WebCore::textLatin1Access(UText*, int64_t, UBool)’:
platform/text/TextBreakIteratorICU.cpp:246:16: error: ‘FALSE’ was not
declared in this scope
  246 |         return FALSE;
      |                ^~~~~
platform/text/TextBreakIteratorICU.cpp:266:12: error: ‘TRUE’ was not
declared in this scope
  266 |     return TRUE;
      |            ^~~~
platform/text/TextBreakIteratorICU.cpp: In function ‘UBool
WebCore::textUTF16Access(UText*, int64_t, UBool)’:
platform/text/TextBreakIteratorICU.cpp:367:16: error: ‘FALSE’ was not
declared in this scope
  367 |         return FALSE;
      |                ^~~~~
platform/text/TextBreakIteratorICU.cpp:387:12: error: ‘TRUE’ was not
declared in this scope
  387 |     return TRUE;
      |            ^~~~
...
In file included from platform/text/TextAllInOne.cpp:32:
platform/text/TextCodecICU.cpp: In member function ‘void
WebCore::TextCodecICU::createICUConverter() const’:
platform/text/TextCodecICU.cpp:272:42: error: ‘TRUE’ was not declared in
this scope
  272 |         ucnv_setFallback(m_converterICU, TRUE);
      |                                          ^~~~

The compile failures are fixed by replacing the use of FALSE/TRUE with
false/true as suggested by [1] and/or [2].

A better description is directly from the patch/pull-request ([3]):

  Traditionally, ICU4C has defined its own `FALSE`=0 / `TRUE`=1 macros for use with `UBool`.
  Starting with ICU 68 (2020q4), we no longer define these in public header files
  (unless `U_DEFINE_FALSE_AND_TRUE`=1),
  in order to avoid name collisions with code outside ICU defining enum constants and similar
  with these names.

and explains why it occurred just recently/since the icu bump to version
68-1 ([4])...

[1] https://unicode-org.atlassian.net/browse/ICU-21267
[2] https://unicode-org.atlassian.net/browse/ICU-21148
[3] https://github.com/unicode-org/icu/pull/1282/commits/5d77f7084dbfad50c7ccc17bccb85aa24bae8937
[4] https://git.buildroot.net/buildroot/commit/?id=88f2d1c4e52607d2c2a1fa8d934152c47167a168

Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/qt5/qt5webkit/0009-Fix-ICU-related-compile-failures-from-capital-bool-d.patch [new file with mode: 0644]