diff options
author | dim <dim@FreeBSD.org> | 2015-09-20 20:34:17 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-20 20:34:17 +0000 |
commit | 18b14b4a2fd66af5fcf07d469fe45b32b2c0be76 (patch) | |
tree | 6068d0c9297482b6c68c78d37d113e16d44371c0 /lib/libc/stdlib/heapsort.c | |
parent | 7b8be099124cf3848a48077ce37206e0ae691839 (diff) | |
parent | e5a64a53e6f41e1fb2f62f6b0fdfdbe1b7d5f5b0 (diff) | |
download | FreeBSD-src-18b14b4a2fd66af5fcf07d469fe45b32b2c0be76.zip FreeBSD-src-18b14b4a2fd66af5fcf07d469fe45b32b2c0be76.tar.gz |
Merge ^/head r287878 through r288034.
Diffstat (limited to 'lib/libc/stdlib/heapsort.c')
-rw-r--r-- | lib/libc/stdlib/heapsort.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c index 16c1bfe..a7a4a26 100644 --- a/lib/libc/stdlib/heapsort.c +++ b/lib/libc/stdlib/heapsort.c @@ -138,6 +138,12 @@ typedef DECLARE_BLOCK(int, heapsort_block, const void *, const void *); } \ } +#ifdef I_AM_HEAPSORT_B +int heapsort_b(void *, size_t, size_t, heapsort_block); +#else +int heapsort(void *, size_t, size_t, + int (*)(const void *, const void *)); +#endif /* * Heapsort -- Knuth, Vol. 3, page 145. Runs in O (N lg N), both average * and worst. While heapsort is faster than the worst case of quicksort, |