diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2015-09-20 03:53:08 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2015-09-20 03:53:08 +0000 |
commit | 08c0b3cae7201b8a0e94863e7c07d51f4ececd04 (patch) | |
tree | 6f96bbb733987159e965c6b4d0cd39ac10224543 /lib/libc/stdlib | |
parent | 0046fafdb2b31d1fb0ae1cda2cde904e192cfe01 (diff) | |
download | FreeBSD-src-08c0b3cae7201b8a0e94863e7c07d51f4ececd04.zip FreeBSD-src-08c0b3cae7201b8a0e94863e7c07d51f4ececd04.tar.gz |
Add declarations to eliminate -Wmissing-prototypes warnings.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/atexit.c | 3 | ||||
-rw-r--r-- | lib/libc/stdlib/heapsort.c | 6 | ||||
-rw-r--r-- | lib/libc/stdlib/merge.c | 6 |
3 files changed, 15 insertions, 0 deletions
diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c index 0a5048a..7e6b867 100644 --- a/lib/libc/stdlib/atexit.c +++ b/lib/libc/stdlib/atexit.c @@ -82,6 +82,9 @@ struct atexit { static struct atexit *__atexit; /* points to head of LIFO stack */ typedef DECLARE_BLOCK(void, atexit_block, void); +int atexit_b(atexit_block func); +int __cxa_atexit(void (*func)(void *), void *arg, void *dso); + /* * Register the function described by 'fptr' to be called at application * exit or owning shared object unload time. This is a helper function diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c index 16c1bfe..3f4a894 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 *vbase, size_t nmemb, size_t size, heapsort_block compar); +#else +int heapsort(void *vbase, size_t nmemb, size_t size, + int (*compar)(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, diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c index 17f07eb..805e995 100644 --- a/lib/libc/stdlib/merge.c +++ b/lib/libc/stdlib/merge.c @@ -99,6 +99,12 @@ static void insertionsort(u_char *, size_t, size_t, cmp_t); ((u_char *)0 + \ (((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1))) +#ifdef I_AM_MERGESORT_B +int mergesort_b(void *base, size_t nmemb, size_t size, cmp_t cmp); +#else +int mergesort(void *base, size_t nmemb, size_t size, cmp_t cmp); +#endif + /* * Arguments are as for qsort. */ |