about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--nptl/ChangeLog17
-rw-r--r--posix/Versions3
-rw-r--r--posix/regexec.c22
-rw-r--r--stdlib/qsort.c6
5 files changed, 44 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a4a6fc008..c3b139cb7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-03-09  Ulrich Drepper  <drepper@redhat.com>
+
+	* stdlib/qsort.c (_quicksort): Initialize first stack element [BZ #16].
+
+2004-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+	* posix/regexec.c (regexec): Return with error on unknown eflags.
+	Replace weak_alias with versioned_symbol.
+	(__compat_regexec): New.
+	* posix/Versions (libc): Add regexec@GLIBC_2.3.4.
+
 2004-03-09  Richard Henderson  <rth@redhat.com>
 
 	* math/math.h (isgreater, isgreaterequal, isless, islessequal,
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 650a1662f2..2ca0c7c6d4 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,15 +1,8 @@
-2004-03-09  Richard Henderson  <rth@redhat.com>
-
-	* math/math.h (isgreater, isgreaterequal, isless, islessequal,
-	islessgreater, isunordered): Use builtins if available.
-	* sysdeps/i386/fpu/bits/mathinline.h: Don't define via builtins.
-	* sysdeps/m68k/fpu/bits/mathinline.h: Likewise.
-	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
-	* sysdeps/sparc/fpu/bits/mathinline.h: Likewise.
-	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
-	* sysdeps/alpha/fpu/bits/mathinline.h (isgreater, isgreaterequal,
-	isless, islessequal, islessgreater): Remove; use default.
-	(isunordered): Convert inputs to double.
+2004-03-09  Jakub Jelinek  <jakub@redhat.com>
+
+	* tst-cancel20.c (do_one_test): Clear in_sh_body first.
+	* tst-cancel21.c (do_one_test): Likewise.
+	Reported by Gordon Jin <gordon.jin@intel.com>.
 
 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
 
diff --git a/posix/Versions b/posix/Versions
index c68594acb5..4e6f200aa0 100644
--- a/posix/Versions
+++ b/posix/Versions
@@ -119,6 +119,9 @@ libc {
   GLIBC_2.3.3 {
     sched_getaffinity; sched_setaffinity;
   }
+  GLIBC_2.3.4 {
+    regexec;
+  }
   GLIBC_PRIVATE {
     # functions which have an additional interface since they are
     # are cancelable.
diff --git a/posix/regexec.c b/posix/regexec.c
index ad62178bbd..88d05b5dbe 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -216,6 +216,10 @@ regexec (preg, string, nmatch, pmatch, eflags)
 {
   reg_errcode_t err;
   int start, length;
+
+  if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
+    return REG_BADPAT;
+
   if (eflags & REG_STARTEND)
     {
       start = pmatch[0].rm_so;
@@ -234,8 +238,24 @@ regexec (preg, string, nmatch, pmatch, eflags)
 			      length, nmatch, pmatch, eflags);
   return err != REG_NOERROR;
 }
+
 #ifdef _LIBC
-weak_alias (__regexec, regexec)
+# include <shlib-compat.h>
+versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
+
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+__typeof__ (__regexec) __compat_regexec;
+
+int
+__compat_regexec (const regex_t *__restrict preg,
+		  const char *__restrict string, size_t nmatch,
+		  regmatch_t pmatch[], int eflags)
+{
+  return regexec (preg, string, nmatch, pmatch,
+		  eflags & (REG_NOTBOL | REG_NOTEOL));
+}
+compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
+# endif
 #endif
 
 /* Entry points for GNU code.  */
diff --git a/stdlib/qsort.c b/stdlib/qsort.c
index 1ac268bec9..6a33c52f39 100644
--- a/stdlib/qsort.c
+++ b/stdlib/qsort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1996,1997,1999,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Douglas C. Schmidt (schmidt@ics.uci.edu).
 
@@ -103,7 +103,9 @@ _quicksort (void *const pbase, size_t total_elems, size_t size,
       char *lo = base_ptr;
       char *hi = &lo[size * (total_elems - 1)];
       stack_node stack[STACK_SIZE];
-      stack_node *top = stack + 1;
+      stack_node *top = stack;
+
+      PUSH (NULL, NULL);
 
       while (STACK_NOT_EMPTY)
         {