* config/srclist.txt: Add glibc bug 1227.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Aug 2005 05:01:20 +0000 (05:01 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Aug 2005 05:01:20 +0000 (05:01 +0000)
* lib/regexec.c (sift_states_bkref): Fix portability bug: the code
assumed that reg_errcode_t is a signed type, which is not
necessarily true if _XOPEN_SOURCE is not defined.

config/ChangeLog
config/srclist.txt
lib/ChangeLog
lib/regexec.c

index 725cda7..8d48dd2 100644 (file)
@@ -1,6 +1,6 @@
 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * srclist.txt: Add glibc bugs 1220, 1221, 1222, 1223, 1224, 1225, 1226.
+       * srclist.txt: Add glibc bugs 1220-1227.
 
 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
 
index 779ba1f..438e126 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: srclist.txt,v 1.77 2005-08-21 03:31:46 eggert Exp $
+# $Id: srclist.txt,v 1.78 2005-08-21 05:01:20 eggert Exp $
 # Files for which we are not the source.  See ./srclistvars.sh for the
 # variable definitions.
 
@@ -121,6 +121,7 @@ $LIBCSRC/posix/regex.c                      lib gpl
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1216
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1220
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1225
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1227
 #$LIBCSRC/posix/regexec.c              lib gpl
 #
 # c89 changes $LIBCSRC/string/strdup.c         lib gpl
index c50e56d..d0a87cf 100644 (file)
@@ -1,5 +1,10 @@
 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Fix problems reported by Sam Steingold in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
+       * regexec.c (sift_states_bkref): Fix portability bug: the code
+       assumed that reg_errcode_t is a signed type, which is not
+       necessarily true if _XOPEN_SOURCE is not defined.
        * regex_internal.c (calc_state_hash): Put 'inline' before type, since
        some compilers warn about it otherwise.
 
index 6ca15bb..4f6c50c 100644 (file)
@@ -2088,7 +2088,7 @@ sift_states_bkref (re_match_context_t *mctx, re_sift_context_t *sctx,
       enabled_idx = first_idx;
       do
        {
-         int subexp_len, to_idx, dst_node;
+         int subexp_len, to_idx, dst_node, ret;
          re_dfastate_t *cur_state;
 
          if (entry->node != node)
@@ -2114,8 +2114,8 @@ sift_states_bkref (re_match_context_t *mctx, re_sift_context_t *sctx,
            }
          local_sctx.last_node = node;
          local_sctx.last_str_idx = str_idx;
-         err = re_node_set_insert (&local_sctx.limits, enabled_idx);
-         if (BE (err < 0, 0))
+         ret = re_node_set_insert (&local_sctx.limits, enabled_idx);
+         if (BE (ret < 0, 0))
            {
              err = REG_ESPACE;
              goto free_return;