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