Eric Blake <[EMAIL PROTECTED]> writes: > 2005-07-08 Eric Blake <[EMAIL PROTECTED]> (tiny change) > > * regcomp.c (init_dfa, build_range_exp): Store __btowc value > in wint_t, not wchar_t.
Thanks for reporting that. I installed the following (slightly-different) patch into gnulib (and coreutils), and filed a bug report with glibc <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1057>. 2005-07-08 Eric Blake <[EMAIL PROTECTED]> (tiny change) and Paul Eggert <[EMAIL PROTECTED]> * config/srclist.txt: Comment out regcomp.c, since we have a porting fix now. * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value in wint_t, not wchar_t. Remove now-unnecessary cast. Index: config/srclist.txt =================================================================== RCS file: /cvsroot/gnulib/gnulib/config/srclist.txt,v retrieving revision 1.65 diff -p -u -r1.65 srclist.txt --- config/srclist.txt 7 Jul 2005 08:08:39 -0000 1.65 +++ config/srclist.txt 8 Jul 2005 17:43:55 -0000 @@ -93,11 +93,12 @@ $LIBCSRC/stdlib/getsubopt.c lib gpl #$LIBCSRC/posix/getopt.h lib gpl (getopt_.h in gnulib) #$LIBCSRC/posix/getopt1.c lib gpl #$LIBCSRC/posix/getopt_int.h lib gpl -$LIBCSRC/posix/regcomp.c lib gpl +# regcomp.c contains a porting fix +#$LIBCSRC/posix/regcomp.c lib gpl $LIBCSRC/posix/regex.c lib gpl $LIBCSRC/posix/regex.h lib gpl $LIBCSRC/posix/regex_internal.c lib gpl -# regex_internal.h contains a porting fix (glibc defines __mempcpy) +# regex_internal.h contains a porting fix #$LIBCSRC/posix/regex_internal.h lib gpl $LIBCSRC/posix/regexec.c lib gpl # c89 changes $LIBCSRC/string/strdup.c lib gpl Index: lib/regcomp.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/regcomp.c,v retrieving revision 1.1 diff -p -u -r1.1 regcomp.c --- lib/regcomp.c 7 Jul 2005 08:08:39 -0000 1.1 +++ lib/regcomp.c 8 Jul 2005 17:43:55 -0000 @@ -917,11 +917,11 @@ init_dfa (dfa, pat_len) for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) { - wchar_t wch = __btowc (ch); + wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= 1 << j; # ifndef _LIBC - if (isascii (ch) && wch != (wchar_t) ch) + if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } @@ -2682,7 +2682,8 @@ build_range_exp (sbcset, start_elem, end # ifdef RE_ENABLE_I18N { - wchar_t wc, start_wc, end_wc; + wchar_t wc; + wint_t start_wc, end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils