Remove TRUE to prep landing of icu68
ICU 68, to work with C++20, remove the #define of TRUE
since the usage in libxml is as an int, use 1 instead.
Bug: 1138555
Change-Id: I4c5955b3e80beccc8de071a129172af07c0ae0ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2478027
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818740}
GitOrigin-RevId: e8aa87fa88f55e76ce08794690665ce30caa3183
diff --git a/README.chromium b/README.chromium
index f84cc64..8da443a 100644
--- a/README.chromium
+++ b/README.chromium
@@ -24,6 +24,8 @@
non-recursive broke a few web platform tests.
- add-fuzz-target.patch: Prevents autoreconf from failing on mac due to a
missing makefile for fuzz.
+- chromium-issue-1138555.patch: Change TRUE to 1 for ICU68 which remove the
+ #define of TRUE.
- Add helper classes in the chromium/ subdirectory.
- Delete various unused files, see chromium/roll.py
diff --git a/chromium/chromium-issue-1138555.patch b/chromium/chromium-issue-1138555.patch
new file mode 100644
index 0000000..a5e1694
--- /dev/null
+++ b/chromium/chromium-issue-1138555.patch
@@ -0,0 +1,31 @@
+diff --git a/encoding.c b/encoding.c
+index c34aca44663c..47be560ede47 100644
+--- a/encoding.c
++++ b/encoding.c
+@@ -1858,7 +1858,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
+ * @outlen: the length of @out
+ * @in: a pointer to an array of input bytes
+ * @inlen: the length of @in
+- * @flush: if true, indicates end of input
++ * @flush: if 1, indicates end of input
+ *
+ * Returns 0 if success, or
+ * -1 by lack of space, or
+@@ -1898,7 +1898,7 @@ xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
+ *inlen = ucv_in - (const char*) in;
+ *outlen = ucv_out - (char *) out;
+ if (U_SUCCESS(err)) {
+- /* reset pivot buf if this is the last call for input (flush==TRUE) */
++ /* reset pivot buf if this is the last call for input (flush==1) */
+ if (flush)
+ cd->pivot_source = cd->pivot_target = cd->pivot_buf;
+ return 0;
+@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
+ #ifdef LIBXML_ICU_ENABLED
+ else if (handler->uconv_out != NULL) {
+ ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
+- TRUE);
++ 1);
+ }
+ #endif /* LIBXML_ICU_ENABLED */
+ else {
diff --git a/chromium/roll.py b/chromium/roll.py
index 1c5f58a..ce8e91f 100755
--- a/chromium/roll.py
+++ b/chromium/roll.py
@@ -74,6 +74,7 @@
'chromium-issue-708434.patch',
# TODO(jarhar): Merge this back upstream.
'add-fuzz-target.patch',
+ 'chromium-issue-1138555.patch',
]
diff --git a/src/encoding.c b/src/encoding.c
index c34aca4..47be560 100644
--- a/src/encoding.c
+++ b/src/encoding.c
@@ -1858,7 +1858,7 @@
* @outlen: the length of @out
* @in: a pointer to an array of input bytes
* @inlen: the length of @in
- * @flush: if true, indicates end of input
+ * @flush: if 1, indicates end of input
*
* Returns 0 if success, or
* -1 by lack of space, or
@@ -1898,7 +1898,7 @@
*inlen = ucv_in - (const char*) in;
*outlen = ucv_out - (char *) out;
if (U_SUCCESS(err)) {
- /* reset pivot buf if this is the last call for input (flush==TRUE) */
+ /* reset pivot buf if this is the last call for input (flush==1) */
if (flush)
cd->pivot_source = cd->pivot_target = cd->pivot_buf;
return 0;
@@ -2004,7 +2004,7 @@
#ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
- TRUE);
+ 1);
}
#endif /* LIBXML_ICU_ENABLED */
else {