diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/quad/quad.h | 7 | ||||
-rw-r--r-- | lib/libc/stdlib/qsort.c | 11 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/libc/quad/quad.h b/lib/libc/quad/quad.h index bc6a2f8..873a1f6 100644 --- a/lib/libc/quad/quad.h +++ b/lib/libc/quad/quad.h @@ -35,6 +35,7 @@ * SUCH DAMAGE. * * @(#)quad.h 8.1 (Berkeley) 6/4/93 + * $Id$ */ /* @@ -95,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 diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 49f5349..66c0224 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -32,13 +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 @@ -84,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 )) @@ -95,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; |