xref: /freebsd/lib/libc/stdlib/qsort_r.c (revision f3c5273d315a64826d2149ac453ff8c4583ddbe8)
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