diff options
-rw-r--r-- | lib/libc/gen/getgrent.c | 8 | ||||
-rw-r--r-- | lib/libc/gen/getgrouplist.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/initgroups.c | 5 | ||||
-rw-r--r-- | lib/libc/gen/setmode.c | 15 | ||||
-rw-r--r-- | lib/libc/gen/unvis.c | 4 |
5 files changed, 24 insertions, 12 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index b7d5692e4f3..da67f603c50 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -56,7 +56,8 @@ static char rcsid[] = "$NetBSD: getgrent.c,v 1.13 1995/07/28 05:43:57 phil Exp $ static FILE *_gr_fp; static struct group _gr_group; static int _gr_stayopen; -static int grscan(), start_gr(); +static int grscan __P((int, gid_t, const char *)); +static int start_gr __P((void)); #define MAXGRP 200 static char *members[MAXGRP]; @@ -159,8 +160,9 @@ endgrent() static int grscan(search, gid, name) - register int search, gid; - register char *name; + register int search; + register gid_t gid; + register const char *name; { register char *cp, **m; char *bp; diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 91255592561..1ce6b11bfec 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -51,8 +51,8 @@ static char rcsid[] = "$NetBSD: getgrouplist.c,v 1.5 1995/06/01 22:51:17 jtc Exp int getgrouplist(uname, agroup, groups, grpcnt) const char *uname; - int agroup; - register int *groups; + gid_t agroup; + register gid_t *groups; int *grpcnt; { register struct group *grp; diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c index ec05aa372ad..86e21051525 100644 --- a/lib/libc/gen/initgroups.c +++ b/lib/libc/gen/initgroups.c @@ -49,9 +49,10 @@ static char rcsid[] = "$NetBSD: initgroups.c,v 1.11 1995/06/03 02:27:19 mycroft int initgroups(uname, agroup) const char *uname; - int agroup; + gid_t agroup; { - int groups[NGROUPS], ngroups; + gid_t groups[NGROUPS]; + int ngroups; ngroups = NGROUPS; if (getgrouplist(uname, agroup, groups, &ngroups) < 0) diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c index f96b7c907d6..0d6eb4eeb4d 100644 --- a/lib/libc/gen/setmode.c +++ b/lib/libc/gen/setmode.c @@ -51,6 +51,7 @@ static char rcsid[] = "$NetBSD: setmode.c,v 1.12 1995/03/23 19:51:13 jtc Exp $"; #include <errno.h> #include <signal.h> #include <stdlib.h> +#include <unistd.h> #ifdef SETMODE_DEBUG #include <stdio.h> @@ -72,7 +73,7 @@ typedef struct bitcmd { #define CMD2_UBITS 0x10 static BITCMD *addcmd __P((BITCMD *, int, int, int, u_int)); -static int compress_mode __P((BITCMD *)); +static void compress_mode __P((BITCMD *)); #ifdef SETMODE_DEBUG static void dumpmode __P((BITCMD *)); #endif @@ -84,9 +85,13 @@ static void dumpmode __P((BITCMD *)); * bits) followed by a '+' (set bits). */ mode_t +#if __STDC__ +getmode(const void *bbox, mode_t omode) +#else getmode(bbox, omode) - void *bbox; + const void *bbox; mode_t omode; +#endif { register BITCMD *set; register mode_t clrval, newmode, value; @@ -170,7 +175,7 @@ common: if (set->cmd2 & CMD2_CLR) { void * setmode(p) - register char *p; + register const char *p; { register int perm, who; register char op; @@ -368,7 +373,7 @@ addcmd(set, op, who, oparg, mask) set->cmd2 = ((who & S_IRUSR) ? CMD2_UBITS : 0) | ((who & S_IRGRP) ? CMD2_GBITS : 0) | ((who & S_IROTH) ? CMD2_OBITS : 0); - set->bits = ~0; + set->bits = (mode_t)~0; } else { set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS; set->bits = mask; @@ -407,7 +412,7 @@ dumpmode(set) * 'g' and 'o' commands continue to be separate. They could probably be * compacted, but it's not worth the effort. */ -static int +static void compress_mode(set) register BITCMD *set; { diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c index 4ab9b20f0f6..844328c5d56 100644 --- a/lib/libc/gen/unvis.c +++ b/lib/libc/gen/unvis.c @@ -62,10 +62,14 @@ static char rcsid[] = "$NetBSD: unvis.c,v 1.5 1995/02/25 17:18:31 cgd Exp $"; * unvis - decode characters previously encoded by vis */ int +#if __STDC__ +unvis(char *cp, char c, int *astate, int flag) +#else unvis(cp, c, astate, flag) char *cp; char c; int *astate, flag; +#endif { if (flag & UNVIS_END) { |