aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/qsort_r.c
blob: f489d31c2335332eb7226f37bd4f3b418d2fcac2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * This file is in the public domain.  Originally written by Garrett
 * A. Wollman.
 *
 * $FreeBSD$
 */
#include "block_abi.h"
#define I_AM_QSORT_R
#include "qsort.c"

typedef DECLARE_BLOCK(int, qsort_block, const void *, const void *);

void
qsort_b(void *base, size_t nel, size_t width, qsort_block compar)
{
	qsort_r(base, nel, width, compar,
		(int (*)(void *, const void *, const void *))
		GET_BLOCK_FUNCTION(compar));
}