FreeBSD Bugzilla – Attachment 187953 Details for
Bug 223641
[patch] ANSIfy sys/libkern
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ANSY prototypes for sys/libkern files
ansi-libkern.diff (text/plain), 7.33 KB, created by
ota
on 2017-11-13 05:45:53 UTC
(
hide
)
Description:
ANSY prototypes for sys/libkern files
Filename:
MIME Type:
Creator:
ota
Created:
2017-11-13 05:45:53 UTC
Size:
7.33 KB
patch
obsolete
>Index: libkern/ashrdi3.c >=================================================================== >--- libkern/ashrdi3.c (revision 325735) >+++ libkern/ashrdi3.c (working copy) >@@ -40,9 +40,7 @@ > * Shift a (signed) quad value right (arithmetic shift right). > */ > quad_t >-__ashrdi3(a, shift) >- quad_t a; >- qshift_t shift; >+__ashrdi3(quad_t a, qshift_t shift) > { > union uu aa; > >Index: libkern/bcmp.c >=================================================================== >--- libkern/bcmp.c (revision 325735) >+++ libkern/bcmp.c (working copy) >@@ -42,9 +42,7 @@ > * bcmp -- vax cmpc3 instruction > */ > int >-bcmp(b1, b2, length) >- const void *b1, *b2; >- size_t length; >+bcmp(const void *b1, const void *b2, size_t length) > { > #if BYTE_ORDER == LITTLE_ENDIAN > /* >Index: libkern/bsearch.c >=================================================================== >--- libkern/bsearch.c (revision 325735) >+++ libkern/bsearch.c (working copy) >@@ -53,12 +53,8 @@ > * look at item 3. > */ > void * >-bsearch(key, base0, nmemb, size, compar) >- const void *key; >- const void *base0; >- size_t nmemb; >- size_t size; >- int (*compar)(const void *, const void *); >+bsearch(const void *key, const void *base0, size_t nmemb, size_t size, >+ int (*compar)(const void *, const void *)) > { > const char *base = base0; > size_t lim; >Index: libkern/cmpdi2.c >=================================================================== >--- libkern/cmpdi2.c (revision 325735) >+++ libkern/cmpdi2.c (working copy) >@@ -42,8 +42,7 @@ > * signed. > */ > int >-__cmpdi2(a, b) >- quad_t a, b; >+__cmpdi2(quad_t a, quad_t b) > { > union uu aa, bb; > >Index: libkern/divdi3.c >=================================================================== >--- libkern/divdi3.c (revision 325735) >+++ libkern/divdi3.c (working copy) >@@ -41,8 +41,7 @@ > * ??? if -1/2 should produce -1 on this machine, this code is wrong > */ > quad_t >-__divdi3(a, b) >- quad_t a, b; >+__divdi3(quad_t a, quad_t b) > { > u_quad_t ua, ub, uq; > int neg; >Index: libkern/lshrdi3.c >=================================================================== >--- libkern/lshrdi3.c (revision 325735) >+++ libkern/lshrdi3.c (working copy) >@@ -40,9 +40,7 @@ > * Shift an (unsigned) quad value right (logical shift right). > */ > quad_t >-__lshrdi3(a, shift) >- quad_t a; >- qshift_t shift; >+__lshrdi3(quad_t a, qshift_t shift) > { > union uu aa; > >Index: libkern/mcount.c >=================================================================== >--- libkern/mcount.c (revision 325735) >+++ libkern/mcount.c (working copy) >@@ -56,8 +56,7 @@ > * both frompcindex and frompc. Any reasonable, modern compiler will > * perform this optimization. > */ >-_MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */ >- uintfptr_t frompc, selfpc; >+_MCOUNT_DECL(uintfptr_t frompc, uintfptr_t selfpc) /* _mcount; may be static, inline, etc */ > { > #ifdef GUPROF > int delta; >@@ -245,8 +244,7 @@ > > #ifdef GUPROF > void >-mexitcount(selfpc) >- uintfptr_t selfpc; >+mexitcount(uintfptr_t selfpc) > { > struct gmonparam *p; > uintfptr_t selfpcdiff; >Index: libkern/moddi3.c >=================================================================== >--- libkern/moddi3.c (revision 325735) >+++ libkern/moddi3.c (working copy) >@@ -43,8 +43,7 @@ > * If -1/2 should produce -1 on this machine, this code is wrong. > */ > quad_t >-__moddi3(a, b) >- quad_t a, b; >+__moddi3(quad_t a, quad_t b) > { > u_quad_t ua, ub, ur; > int neg; >Index: libkern/qdivrem.c >=================================================================== >--- libkern/qdivrem.c (revision 325735) >+++ libkern/qdivrem.c (working copy) >@@ -77,8 +77,7 @@ > * leading zeros). > */ > u_quad_t >-__qdivrem(uq, vq, arq) >- u_quad_t uq, vq, *arq; >+__qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq) > { > union uu tmp; > digit *u, *v, *q; >Index: libkern/random.c >=================================================================== >--- libkern/random.c (revision 325735) >+++ libkern/random.c (working copy) >@@ -39,8 +39,7 @@ > static u_long randseed = 937186357; /* after srandom(1), NSHUFF counted */ > > void >-srandom(seed) >- u_long seed; >+srandom(u_long seed) > { > int i; > >Index: libkern/scanc.c >=================================================================== >--- libkern/scanc.c (revision 325735) >+++ libkern/scanc.c (working copy) >@@ -35,10 +35,7 @@ > #include <sys/libkern.h> > > int >-scanc(size, cp, table, mask0) >- u_int size; >- const u_char *cp, table[]; >- int mask0; >+scanc(u_int size, const u_char *cp, const u_char table[], int mask0) > { > const u_char *end; > u_char mask; >Index: libkern/strcmp.c >=================================================================== >--- libkern/strcmp.c (revision 325735) >+++ libkern/strcmp.c (working copy) >@@ -39,8 +39,7 @@ > * Compare strings. > */ > int >-strcmp(s1, s2) >- const char *s1, *s2; >+strcmp(const char *s1, const char *s2) > { > while (*s1 == *s2++) > if (*s1++ == 0) >Index: libkern/strlcat.c >=================================================================== >--- libkern/strlcat.c (revision 325735) >+++ libkern/strlcat.c (working copy) >@@ -44,10 +44,7 @@ > * If retval >= siz, truncation occurred. > */ > size_t >-strlcat(dst, src, siz) >- char *dst; >- const char *src; >- size_t siz; >+strlcat(char *dst, const char *src, size_t siz) > { > char *d = dst; > const char *s = src; >Index: libkern/strsep.c >=================================================================== >--- libkern/strsep.c (revision 325735) >+++ libkern/strsep.c (working copy) >@@ -48,9 +48,7 @@ > * If *stringp is NULL, strsep returns NULL. > */ > char * >-strsep(stringp, delim) >- char **stringp; >- const char *delim; >+strsep(char **stringp, const char *delim) > { > char *s; > const char *spanp; >Index: libkern/strtol.c >=================================================================== >--- libkern/strtol.c (revision 325735) >+++ libkern/strtol.c (working copy) >@@ -47,10 +47,7 @@ > * alphabets and digits are each contiguous. > */ > long >-strtol(nptr, endptr, base) >- const char *nptr; >- char **endptr; >- int base; >+strtol(const char *nptr, char **endptr, int base) > { > const char *s = nptr; > unsigned long acc; >Index: libkern/strtoul.c >=================================================================== >--- libkern/strtoul.c (revision 325735) >+++ libkern/strtoul.c (working copy) >@@ -47,10 +47,7 @@ > * alphabets and digits are each contiguous. > */ > unsigned long >-strtoul(nptr, endptr, base) >- const char *nptr; >- char **endptr; >- int base; >+strtoul(const char *nptr, char **endptr, int base) > { > const char *s = nptr; > unsigned long acc; >Index: libkern/ucmpdi2.c >=================================================================== >--- libkern/ucmpdi2.c (revision 325735) >+++ libkern/ucmpdi2.c (working copy) >@@ -41,8 +41,7 @@ > * Neither a nor b are considered signed. > */ > int >-__ucmpdi2(a, b) >- u_quad_t a, b; >+__ucmpdi2(u_quad_t a, u_quad_t b) > { > union uu aa, bb; > >Index: libkern/udivdi3.c >=================================================================== >--- libkern/udivdi3.c (revision 325735) >+++ libkern/udivdi3.c (working copy) >@@ -40,8 +40,7 @@ > * Divide two unsigned quads. > */ > u_quad_t >-__udivdi3(a, b) >- u_quad_t a, b; >+__udivdi3(u_quad_t a, u_quad_t b) > { > > return (__qdivrem(a, b, (u_quad_t *)0)); >Index: libkern/umoddi3.c >=================================================================== >--- libkern/umoddi3.c (revision 325735) >+++ libkern/umoddi3.c (working copy) >@@ -40,8 +40,7 @@ > * Return remainder after dividing two unsigned quads. > */ > u_quad_t >-__umoddi3(a, b) >- u_quad_t a, b; >+__umoddi3(u_quad_t a, u_quad_t b) > { > u_quad_t r; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 223641
: 187953