changeset 6082:f7e7f62a1516

* config/srclist.txt: Add glibc bug 1227. * 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.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 21 Aug 2005 05:01:20 +0000
parents e258f5e2593e
children 7f315cf586d6
files config/ChangeLog config/srclist.txt lib/ChangeLog lib/regexec.c
diffstat 4 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -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>
 
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -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 @@
 # 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
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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.
 
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -2088,7 +2088,7 @@
       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 @@
 	    }
 	  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;