1From 308bddc0bfedb6ab222e3b626ef9bb5234c819b4 Mon Sep 17 00:00:00 2001
2From: Frank Tang <ftang@chromium.org>
3Date: Tue, 20 Oct 2020 01:09:43 +0000
4Subject: [PATCH] chromium: Remove TRUE to prep landing of icu68
5
6ICU 68, to work with C++20, remove the #define of TRUE
7since the usage in libxml is as an int, use 1 instead.
8
9Upstream-Status: Backport [https://github.com/chromium/chromium/commit/e8aa87fa88f55e76ce08794690665ce30caa3183]
10Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
11---
12 chromium/third_party/libxml/README.chromium | 2 ++
13 chromium/third_party/libxml/src/encoding.c  | 6 +++---
14 2 files changed, 5 insertions(+), 3 deletions(-)
15
16diff --git a/chromium/third_party/libxml/README.chromium b/chromium/third_party/libxml/README.chromium
17index e1b7e1d8065..5cb589f04fd 100644
18--- a/chromium/third_party/libxml/README.chromium
19+++ b/chromium/third_party/libxml/README.chromium
20@@ -24,6 +24,8 @@ Modifications:
21     non-recursive broke a few web platform tests.
22 - add-fuzz-target.patch: Prevents autoreconf from failing on mac due to a
23     missing makefile for fuzz.
24+- chromium-issue-1138555.patch: Change TRUE to 1 for ICU68 which remove the
25+  #define of TRUE.
26 - Add helper classes in the chromium/ subdirectory.
27 - Delete various unused files, see chromium/roll.py
28
29diff --git a/chromium/third_party/libxml/src/encoding.c b/chromium/third_party/libxml/src/encoding.c
30index 730e2532e45..f876e0c02de 100644
31--- a/chromium/third_party/libxml/src/encoding.c
32+++ b/chromium/third_party/libxml/src/encoding.c
33@@ -1882,7 +1882,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
34  * @outlen:  the length of @out
35  * @in:  a pointer to an array of input bytes
36  * @inlen:  the length of @in
37- * @flush: if true, indicates end of input
38+ * @flush: if 1, indicates end of input
39  *
40  * Returns 0 if success, or
41  *     -1 by lack of space, or
42@@ -1922,7 +1922,7 @@ xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
43     *inlen = ucv_in - (const char*) in;
44     *outlen = ucv_out - (char *) out;
45     if (U_SUCCESS(err)) {
46-        /* reset pivot buf if this is the last call for input (flush==TRUE) */
47+        /* reset pivot buf if this is the last call for input (flush==1) */
48         if (flush)
49             cd->pivot_source = cd->pivot_target = cd->pivot_buf;
50         return 0;
51@@ -2028,7 +2028,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
52 #ifdef LIBXML_ICU_ENABLED
53     else if (handler->uconv_out != NULL) {
54         ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
55-                              TRUE);
56+                              1);
57     }
58 #endif /* LIBXML_ICU_ENABLED */
59     else {
60