From d622258b0dd3767aad4c7a7cf8c672ebda39c8a3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 5 Feb 2007 15:38:59 +0000 Subject: [PATCH] 2007-02-05 Paolo Bonzini Merge upstream fix for glibc bugzilla #3957: 2007-02-05 Jakub Jelinek * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0' bit for RE_HAT_LISTS_NOT_NEWLINE. (build_charclass_op): Remove bogus comment. --- ChangeLog | 10 ++++++++++ lib/regcomp.c | 8 ++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6969438d3..3dc4d8c04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-02-05 Paolo Bonzini + + Merge upstream fix for glibc bugzilla #3957: + + 2007-02-05 Jakub Jelinek + + * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0' + bit for RE_HAT_LISTS_NOT_NEWLINE. + (build_charclass_op): Remove bogus comment. + 2007-02-05 Simon Josefsson * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512. diff --git a/lib/regcomp.c b/lib/regcomp.c index 6546be47e..0209bb130 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc. + Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -3070,7 +3070,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, #endif /* not RE_ENABLE_I18N */ non_match = true; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) - bitset_set (sbcset, '\0'); + bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) @@ -3601,10 +3601,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, if (non_match) { #ifdef RE_ENABLE_I18N - /* - if (syntax & RE_HAT_LISTS_NOT_NEWLINE) - bitset_set(cset->sbcset, '\0'); - */ mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ } -- 2.11.0