summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-26 13:25:13 +0000
committerbde <bde@FreeBSD.org>1995-12-26 13:25:13 +0000
commit6a0ace8bd06c07596749965bccd76d8a1f0e4605 (patch)
tree841e8d2f38cd6de07ba51b21a6438e594a45a49e /sys
parent30090aa28185845e494b2c39942fc8e845fdfb28 (diff)
downloadFreeBSD-src-6a0ace8bd06c07596749965bccd76d8a1f0e4605.zip
FreeBSD-src-6a0ace8bd06c07596749965bccd76d8a1f0e4605.tar.gz
Added prototypes.
Diffstat (limited to 'sys')
-rw-r--r--sys/libkern/qsort.c12
-rw-r--r--sys/libkern/quad.h8
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/libkern/qsort.c b/sys/libkern/qsort.c
index 72ef243..66c0224 100644
--- a/sys/libkern/qsort.c
+++ b/sys/libkern/qsort.c
@@ -32,12 +32,18 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
+#include <stdlib.h>
-static inline char *med3 __P((char *, char *, char *, int (*)()));
+typedef int cmp_t __P((const void *, const void *));
+static inline char *med3 __P((char *, char *, char *, cmp_t *));
static inline void swapfunc __P((char *, char *, int, int));
#define min(a, b) (a) < (b) ? a : b
@@ -83,7 +89,7 @@ swapfunc(a, b, n, swaptype)
static inline char *
med3(a, b, c, cmp)
char *a, *b, *c;
- int (*cmp)();
+ cmp_t *cmp;
{
return cmp(a, b) < 0 ?
(cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a ))
@@ -94,7 +100,7 @@ void
qsort(a, n, es, cmp)
void *a;
size_t n, es;
- int (*cmp)();
+ cmp_t *cmp;
{
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
int d, r, swaptype, swap_cnt;
diff --git a/sys/libkern/quad.h b/sys/libkern/quad.h
index dadd02c..873a1f6 100644
--- a/sys/libkern/quad.h
+++ b/sys/libkern/quad.h
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)quad.h 8.1 (Berkeley) 6/4/93
- * $Id$
+ * $Id$
*/
/*
@@ -96,7 +96,11 @@ union uu {
#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1))
#define LHUP(x) ((x) << HALF_BITS)
-extern u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
+quad_t __divdi3 __P((quad_t a, quad_t b));
+quad_t __moddi3 __P((quad_t a, quad_t b));
+u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
+u_quad_t __udivdi3 __P((u_quad_t a, u_quad_t b));
+u_quad_t __umoddi3 __P((u_quad_t a, u_quad_t b));
/*
* XXX
OpenPOWER on IntegriCloud