Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 03:53:09 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288005 - head/lib/libc/stdlib
Message-ID:  <201509200353.t8K3r9bb067924@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Sun Sep 20 03:53:08 2015
New Revision: 288005
URL: https://svnweb.freebsd.org/changeset/base/288005

Log:
  Add declarations to eliminate -Wmissing-prototypes warnings.

Modified:
  head/lib/libc/stdlib/atexit.c
  head/lib/libc/stdlib/heapsort.c
  head/lib/libc/stdlib/merge.c

Modified: head/lib/libc/stdlib/atexit.c
==============================================================================
--- head/lib/libc/stdlib/atexit.c	Sun Sep 20 03:51:15 2015	(r288004)
+++ head/lib/libc/stdlib/atexit.c	Sun Sep 20 03:53:08 2015	(r288005)
@@ -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

Modified: head/lib/libc/stdlib/heapsort.c
==============================================================================
--- head/lib/libc/stdlib/heapsort.c	Sun Sep 20 03:51:15 2015	(r288004)
+++ head/lib/libc/stdlib/heapsort.c	Sun Sep 20 03:53:08 2015	(r288005)
@@ -138,6 +138,12 @@ typedef DECLARE_BLOCK(int, heapsort_bloc
 	} \
 }
 
+#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,

Modified: head/lib/libc/stdlib/merge.c
==============================================================================
--- head/lib/libc/stdlib/merge.c	Sun Sep 20 03:51:15 2015	(r288004)
+++ head/lib/libc/stdlib/merge.c	Sun Sep 20 03:53:08 2015	(r288005)
@@ -99,6 +99,12 @@ static void insertionsort(u_char *, size
 	((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.
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509200353.t8K3r9bb067924>