Commit e8aa87fa authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

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/+/2478027Reviewed-by: default avatarJoey Arhar <jarhar@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818740}
parent 1a9efc31
...@@ -24,6 +24,8 @@ Modifications: ...@@ -24,6 +24,8 @@ Modifications:
non-recursive broke a few web platform tests. non-recursive broke a few web platform tests.
- add-fuzz-target.patch: Prevents autoreconf from failing on mac due to a - add-fuzz-target.patch: Prevents autoreconf from failing on mac due to a
missing makefile for fuzz. 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. - Add helper classes in the chromium/ subdirectory.
- Delete various unused files, see chromium/roll.py - Delete various unused files, see chromium/roll.py
......
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 {
...@@ -74,6 +74,7 @@ PATCHES = [ ...@@ -74,6 +74,7 @@ PATCHES = [
'chromium-issue-708434.patch', 'chromium-issue-708434.patch',
# TODO(jarhar): Merge this back upstream. # TODO(jarhar): Merge this back upstream.
'add-fuzz-target.patch', 'add-fuzz-target.patch',
'chromium-issue-1138555.patch',
] ]
......
...@@ -1858,7 +1858,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen, ...@@ -1858,7 +1858,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
* @outlen: the length of @out * @outlen: the length of @out
* @in: a pointer to an array of input bytes * @in: a pointer to an array of input bytes
* @inlen: the length of @in * @inlen: the length of @in
* @flush: if true, indicates end of input * @flush: if 1, indicates end of input
* *
* Returns 0 if success, or * Returns 0 if success, or
* -1 by lack of space, or * -1 by lack of space, or
...@@ -1898,7 +1898,7 @@ xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen, ...@@ -1898,7 +1898,7 @@ xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
*inlen = ucv_in - (const char*) in; *inlen = ucv_in - (const char*) in;
*outlen = ucv_out - (char *) out; *outlen = ucv_out - (char *) out;
if (U_SUCCESS(err)) { 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) if (flush)
cd->pivot_source = cd->pivot_target = cd->pivot_buf; cd->pivot_source = cd->pivot_target = cd->pivot_buf;
return 0; return 0;
...@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out, ...@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
#ifdef LIBXML_ICU_ENABLED #ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) { else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
TRUE); 1);
} }
#endif /* LIBXML_ICU_ENABLED */ #endif /* LIBXML_ICU_ENABLED */
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment