2007-02-05 Paolo Bonzini <bonzini@gnu.org>
authorPaolo Bonzini <bonzini@gnu.org>
Mon, 5 Feb 2007 15:38:59 +0000 (15:38 +0000)
committerPaolo Bonzini <bonzini@gnu.org>
Mon, 5 Feb 2007 15:38:59 +0000 (15:38 +0000)
Merge upstream fix for glibc bugzilla #3957:

2007-02-05  Jakub Jelinek  <jakub@redhat.com>

* 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
lib/regcomp.c

index 6969438..3dc4d8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
+
+       Merge upstream fix for glibc bugzilla #3957:
+
+       2007-02-05  Jakub Jelinek  <jakub@redhat.com>
+
+       * 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  <simon@josefsson.org>
 
        * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
index 6546be4..0209bb1 100644 (file)
@@ -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 <isamu@yamato.ibm.com>.
 
@@ -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 */
     }