This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
libc/posix regcomp.c
- From: drepper at sourceware dot org
- To: glibc-cvs at sources dot redhat dot com
- Date: 6 Sep 2005 23:03:53 -0000
- Subject: libc/posix regcomp.c
CVSROOT: /cvs/glibc
Module name: libc
Changes by: drepper@sources.redhat.com 2005-09-06 23:03:53
Modified files:
posix : regcomp.c
Log message:
(re_compile_fastmap_iter, init_dfa, init_word_char):
(optimize_subexps, lower_subexp):
Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
since the signed shift might overflow. Use 1u<<31 instead.
(optimize_subexps, lower_subexp): Use CHAR_BIT rather than 8, for clarity.
(init_dfa): Make table_size unsigned, so that we don't have to worry
about portability issues when shifting it left. Remove
no-longer-needed test for table_size > 0.
(parse_sub_exp): Do not shift more bits than there are in a word, as
the resulting behavior is undefined.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/posix/regcomp.c.diff?cvsroot=glibc&r1=1.101&r2=1.102