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