View | Details | Raw Unified | Return to bug 223641
Collapse All | Expand All

(-)libkern/ashrdi3.c (-3 / +1 lines)
Lines 40-48 Link Here
40
 * Shift a (signed) quad value right (arithmetic shift right).
40
 * Shift a (signed) quad value right (arithmetic shift right).
41
 */
41
 */
42
quad_t
42
quad_t
43
__ashrdi3(a, shift)
43
__ashrdi3(quad_t a, qshift_t shift)
44
	quad_t a;
45
	qshift_t shift;
46
{
44
{
47
	union uu aa;
45
	union uu aa;
48
46
(-)libkern/bcmp.c (-3 / +1 lines)
Lines 42-50 Link Here
42
 * bcmp -- vax cmpc3 instruction
42
 * bcmp -- vax cmpc3 instruction
43
 */
43
 */
44
int
44
int
45
bcmp(b1, b2, length)
45
bcmp(const void *b1, const void *b2, size_t length)
46
	const void *b1, *b2;
47
	size_t length;
48
{
46
{
49
#if BYTE_ORDER == LITTLE_ENDIAN
47
#if BYTE_ORDER == LITTLE_ENDIAN
50
	/*
48
	/*
(-)libkern/bsearch.c (-6 / +2 lines)
Lines 53-64 Link Here
53
 * look at item 3.
53
 * look at item 3.
54
 */
54
 */
55
void *
55
void *
56
bsearch(key, base0, nmemb, size, compar)
56
bsearch(const void *key, const void *base0, size_t nmemb, size_t size,
57
	const void *key;
57
    int (*compar)(const void *, const void *))
58
	const void *base0;
59
	size_t nmemb;
60
	size_t size;
61
	int (*compar)(const void *, const void *);
62
{
58
{
63
	const char *base = base0;
59
	const char *base = base0;
64
	size_t lim;
60
	size_t lim;
(-)libkern/cmpdi2.c (-2 / +1 lines)
Lines 42-49 Link Here
42
 * signed.
42
 * signed.
43
 */
43
 */
44
int
44
int
45
__cmpdi2(a, b)
45
__cmpdi2(quad_t a, quad_t b)
46
	quad_t a, b;
47
{
46
{
48
	union uu aa, bb;
47
	union uu aa, bb;
49
48
(-)libkern/divdi3.c (-2 / +1 lines)
Lines 41-48 Link Here
41
 * ??? if -1/2 should produce -1 on this machine, this code is wrong
41
 * ??? if -1/2 should produce -1 on this machine, this code is wrong
42
 */
42
 */
43
quad_t
43
quad_t
44
__divdi3(a, b)
44
__divdi3(quad_t a, quad_t b)
45
	quad_t a, b;
46
{
45
{
47
	u_quad_t ua, ub, uq;
46
	u_quad_t ua, ub, uq;
48
	int neg;
47
	int neg;
(-)libkern/lshrdi3.c (-3 / +1 lines)
Lines 40-48 Link Here
40
 * Shift an (unsigned) quad value right (logical shift right).
40
 * Shift an (unsigned) quad value right (logical shift right).
41
 */
41
 */
42
quad_t
42
quad_t
43
__lshrdi3(a, shift)
43
__lshrdi3(quad_t a, qshift_t shift)
44
	quad_t a;
45
	qshift_t shift;
46
{
44
{
47
	union uu aa;
45
	union uu aa;
48
46
(-)libkern/mcount.c (-4 / +2 lines)
Lines 56-63 Link Here
56
 * both frompcindex and frompc.  Any reasonable, modern compiler will
56
 * both frompcindex and frompc.  Any reasonable, modern compiler will
57
 * perform this optimization.
57
 * perform this optimization.
58
 */
58
 */
59
_MCOUNT_DECL(frompc, selfpc)	/* _mcount; may be static, inline, etc */
59
_MCOUNT_DECL(uintfptr_t frompc, uintfptr_t selfpc)	/* _mcount; may be static, inline, etc */
60
	uintfptr_t frompc, selfpc;
61
{
60
{
62
#ifdef GUPROF
61
#ifdef GUPROF
63
	int delta;
62
	int delta;
Lines 245-252 Link Here
245
244
246
#ifdef GUPROF
245
#ifdef GUPROF
247
void
246
void
248
mexitcount(selfpc)
247
mexitcount(uintfptr_t selfpc)
249
	uintfptr_t selfpc;
250
{
248
{
251
	struct gmonparam *p;
249
	struct gmonparam *p;
252
	uintfptr_t selfpcdiff;
250
	uintfptr_t selfpcdiff;
(-)libkern/moddi3.c (-2 / +1 lines)
Lines 43-50 Link Here
43
 * If -1/2 should produce -1 on this machine, this code is wrong.
43
 * If -1/2 should produce -1 on this machine, this code is wrong.
44
 */
44
 */
45
quad_t
45
quad_t
46
__moddi3(a, b)
46
__moddi3(quad_t a, quad_t b)
47
	quad_t a, b;
48
{
47
{
49
	u_quad_t ua, ub, ur;
48
	u_quad_t ua, ub, ur;
50
	int neg;
49
	int neg;
(-)libkern/qdivrem.c (-2 / +1 lines)
Lines 77-84 Link Here
77
 * leading zeros).
77
 * leading zeros).
78
 */
78
 */
79
u_quad_t
79
u_quad_t
80
__qdivrem(uq, vq, arq)
80
__qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq)
81
	u_quad_t uq, vq, *arq;
82
{
81
{
83
	union uu tmp;
82
	union uu tmp;
84
	digit *u, *v, *q;
83
	digit *u, *v, *q;
(-)libkern/random.c (-2 / +1 lines)
Lines 39-46 Link Here
39
static u_long randseed = 937186357; /* after srandom(1), NSHUFF counted */
39
static u_long randseed = 937186357; /* after srandom(1), NSHUFF counted */
40
40
41
void
41
void
42
srandom(seed)
42
srandom(u_long seed)
43
	u_long seed;
44
{
43
{
45
	int i;
44
	int i;
46
45
(-)libkern/scanc.c (-4 / +1 lines)
Lines 35-44 Link Here
35
#include <sys/libkern.h>
35
#include <sys/libkern.h>
36
36
37
int
37
int
38
scanc(size, cp, table, mask0)
38
scanc(u_int size, const u_char *cp, const u_char table[], int mask0)
39
	u_int size;
40
	const u_char *cp, table[];
41
	int mask0;
42
{
39
{
43
	const u_char *end;
40
	const u_char *end;
44
	u_char mask;
41
	u_char mask;
(-)libkern/strcmp.c (-2 / +1 lines)
Lines 39-46 Link Here
39
 * Compare strings.
39
 * Compare strings.
40
 */
40
 */
41
int
41
int
42
strcmp(s1, s2)
42
strcmp(const char *s1, const char *s2)
43
	const char *s1, *s2;
44
{
43
{
45
	while (*s1 == *s2++)
44
	while (*s1 == *s2++)
46
		if (*s1++ == 0)
45
		if (*s1++ == 0)
(-)libkern/strlcat.c (-4 / +1 lines)
Lines 44-53 Link Here
44
 * If retval >= siz, truncation occurred.
44
 * If retval >= siz, truncation occurred.
45
 */
45
 */
46
size_t
46
size_t
47
strlcat(dst, src, siz)
47
strlcat(char *dst, const char *src, size_t siz)
48
	char *dst;
49
	const char *src;
50
	size_t siz;
51
{
48
{
52
	char *d = dst;
49
	char *d = dst;
53
	const char *s = src;
50
	const char *s = src;
(-)libkern/strsep.c (-3 / +1 lines)
Lines 48-56 Link Here
48
 * If *stringp is NULL, strsep returns NULL.
48
 * If *stringp is NULL, strsep returns NULL.
49
 */
49
 */
50
char *
50
char *
51
strsep(stringp, delim)
51
strsep(char **stringp, const char *delim)
52
	char **stringp;
53
	const char *delim;
54
{
52
{
55
	char *s;
53
	char *s;
56
	const char *spanp;
54
	const char *spanp;
(-)libkern/strtol.c (-4 / +1 lines)
Lines 47-56 Link Here
47
 * alphabets and digits are each contiguous.
47
 * alphabets and digits are each contiguous.
48
 */
48
 */
49
long
49
long
50
strtol(nptr, endptr, base)
50
strtol(const char *nptr, char **endptr, int base)
51
	const char *nptr;
52
	char **endptr;
53
	int base;
54
{
51
{
55
	const char *s = nptr;
52
	const char *s = nptr;
56
	unsigned long acc;
53
	unsigned long acc;
(-)libkern/strtoul.c (-4 / +1 lines)
Lines 47-56 Link Here
47
 * alphabets and digits are each contiguous.
47
 * alphabets and digits are each contiguous.
48
 */
48
 */
49
unsigned long
49
unsigned long
50
strtoul(nptr, endptr, base)
50
strtoul(const char *nptr, char **endptr, int base)
51
	const char *nptr;
52
	char **endptr;
53
	int base;
54
{
51
{
55
	const char *s = nptr;
52
	const char *s = nptr;
56
	unsigned long acc;
53
	unsigned long acc;
(-)libkern/ucmpdi2.c (-2 / +1 lines)
Lines 41-48 Link Here
41
 * Neither a nor b are considered signed.
41
 * Neither a nor b are considered signed.
42
 */
42
 */
43
int
43
int
44
__ucmpdi2(a, b)
44
__ucmpdi2(u_quad_t a, u_quad_t b)
45
	u_quad_t a, b;
46
{
45
{
47
	union uu aa, bb;
46
	union uu aa, bb;
48
47
(-)libkern/udivdi3.c (-2 / +1 lines)
Lines 40-47 Link Here
40
 * Divide two unsigned quads.
40
 * Divide two unsigned quads.
41
 */
41
 */
42
u_quad_t
42
u_quad_t
43
__udivdi3(a, b)
43
__udivdi3(u_quad_t a, u_quad_t b)
44
	u_quad_t a, b;
45
{
44
{
46
45
47
	return (__qdivrem(a, b, (u_quad_t *)0));
46
	return (__qdivrem(a, b, (u_quad_t *)0));
(-)libkern/umoddi3.c (-2 / +1 lines)
Lines 40-47 Link Here
40
 * Return remainder after dividing two unsigned quads.
40
 * Return remainder after dividing two unsigned quads.
41
 */
41
 */
42
u_quad_t
42
u_quad_t
43
__umoddi3(a, b)
43
__umoddi3(u_quad_t a, u_quad_t b)
44
	u_quad_t a, b;
45
{
44
{
46
	u_quad_t r;
45
	u_quad_t r;
47
46

Return to bug 223641