From e458144c99ddc00769ffa6bd367c21d37e879d83 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 13 Nov 2007 17:21:43 +0000 Subject: * stdlib/stdlib.h: Define __compar_d_fn_t. Declare qsort_r. * include/stdlib.h: Add hidden_proto for qsort_t and adjust protoype for _quicksort. * stdlib/msort.c (qsort): Now a wrapper around qsort_r. (qsort_r): Renamed from qsort. Take additional parameter and pass it on as third parameter to compare function and _quicksort. * stdlib/qsort.c (_quicksort): Take additional parameter and pass on to the compare function. * stdlib/Versions [libc] (GLIBC_2.8): Add qsort_r. * Versions.def: Add GLIBC_2.8 for libc. --- include/stdlib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index a9754b7..883bc34 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -32,6 +32,7 @@ libc_hidden_proto (abort) libc_hidden_proto (getenv) libc_hidden_proto (bsearch) libc_hidden_proto (qsort) +libc_hidden_proto (qsort_r) libc_hidden_proto (lrand48_r) libc_hidden_proto (wctomb) libc_hidden_proto (__secure_getenv) @@ -83,7 +84,7 @@ extern int __add_to_environ (const char *name, const char *value, const char *combines, int replace); extern void _quicksort (void *const pbase, size_t total_elems, - size_t size, __compar_fn_t cmp); + size_t size, __compar_d_fn_t cmp, void *arg); extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg); -- cgit v1.1