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
7 #include "qsort.c"
8
9 typedef DECLARE_BLOCK(int, qsort_block, const void *, const void *);
10
11 void
qsort_b(void * base,size_t nel,size_t width,qsort_block compar)12 qsort_b(void *base, size_t nel, size_t width, qsort_block compar)
13 {
14 qsort_r(base, nel, width, compar,
15 (int (*)(void *, const void *, const void *))
16 GET_BLOCK_FUNCTION(compar));
17 }
18