Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BZ #16]
Update.
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.
  • Loading branch information
Ulrich Drepper committed Mar 10, 2004
1 parent f4c024d commit 3f2fb22
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 15 deletions.
11 changes: 11 additions & 0 deletions 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,
Expand Down
17 changes: 5 additions & 12 deletions 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>

Expand Down
3 changes: 3 additions & 0 deletions posix/Versions
Expand Up @@ -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.
Expand Down
22 changes: 21 additions & 1 deletion posix/regexec.c
Expand Up @@ -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;
Expand All @@ -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. */
Expand Down
6 changes: 4 additions & 2 deletions 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).
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 3f2fb22

Please sign in to comment.