xref: /freebsd/lib/libc/stdlib/qsort_r.c (revision 7d8f797b725e3efc0a4256554654780df83c456c)
1 /*
2  * This file is in the public domain.  Originally written by Garrett
3  * A. Wollman.
4  *
5  * $FreeBSD$
6  */
7 #include "block_abi.h"
8 #define I_AM_QSORT_R
9 #include "qsort.c"
10 
11 typedef DECLARE_BLOCK(int, qsort_block, const void *, const void *);
12 
13 void
14 qsort_b(void *base, size_t nel, size_t width, qsort_block compar)
15 {
16 	qsort_r(base, nel, width, compar,
17 		(int (*)(void *, const void *, const void *))
18 		GET_BLOCK_FUNCTION(compar));
19 }
20