From: dj Date: Mon, 13 Aug 2001 02:23:00 +0000 (+0000) Subject: Merge from libc: X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=458e9fd00c029706b40b42ed9b33f1d2785282d2;p=thirdparty%2Fgcc.git Merge from libc: * regex.c (wcs_regex_compile): Use appropriate string to compare with collating element. Fix the padding for the alignment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44838 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 0a2b29542ade..9431ae514014 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2001-08-12 Isamu Hasegawa + + * regex.c (wcs_regex_compile): Use appropriate string + to compare with collating element. + Fix the padding for the alignment. + 2001-08-10 Andrew Cagney * lbasename.c (lbasename): Change function definition to return a diff --git a/libiberty/regex.c b/libiberty/regex.c index 555d3bbf66aa..f22047caa03b 100644 --- a/libiberty/regex.c +++ b/libiberty/regex.c @@ -3059,7 +3059,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp) /* First compare the hashing value. */ if (symb_table[2 * elem] == hash && c1 == extra[symb_table[2 * elem + 1]] - && memcmp (str, + && memcmp (char_str, &extra[symb_table[2 * elem + 1] + 1], c1) == 0) { @@ -3079,7 +3079,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp) in the table. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ - idx = (idx + 3) & ~4; + idx = (idx + 3) & ~3; str[0] = (wchar_t) idx + 4; }