diff --git a/bin/csh/extern.h b/bin/csh/extern.h index bd02b85ceaff..8d29d1af15c4 100644 --- a/bin/csh/extern.h +++ b/bin/csh/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.9 1997/07/04 21:24:00 christos Exp $ */ +/* $NetBSD: extern.h,v 1.10 1998/07/26 19:37:11 mycroft Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -330,7 +330,7 @@ int s_strncmp __P((Char *, Char *, size_t)); Char *s_strsave __P((Char *)); Char *s_strend __P((Char *)); Char *s_strstr __P((Char *, Char *)); -Char *str2short __P((char *)); +Char *str2short __P((const char *)); Char **blk2short __P((char **)); char *short2str __P((Char *)); char **short2blk __P((Char **)); diff --git a/bin/csh/str.c b/bin/csh/str.c index 856c53e46887..c3ec8db1f49a 100644 --- a/bin/csh/str.c +++ b/bin/csh/str.c @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.8 1997/07/04 21:24:10 christos Exp $ */ +/* $NetBSD: str.c,v 1.9 1998/07/26 19:37:11 mycroft Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)str.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: str.c,v 1.8 1997/07/04 21:24:10 christos Exp $"); +__RCSID("$NetBSD: str.c,v 1.9 1998/07/26 19:37:11 mycroft Exp $"); #endif #endif /* not lint */ @@ -104,7 +104,7 @@ short2blk(src) Char * str2short(src) - char *src; + const char *src; { static Char *sdst; static size_t dstsize = 0; diff --git a/bin/pax/cache.c b/bin/pax/cache.c index d71baa50e402..287cf946338e 100644 --- a/bin/pax/cache.c +++ b/bin/pax/cache.c @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.6 1997/07/20 20:32:22 christos Exp $ */ +/* $NetBSD: cache.c,v 1.7 1998/07/26 19:43:14 mycroft Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: cache.c,v 1.6 1997/07/20 20:32:22 christos Exp $"); +__RCSID("$NetBSD: cache.c,v 1.7 1998/07/26 19:43:14 mycroft Exp $"); #endif #endif /* not lint */ @@ -204,10 +204,10 @@ grptb_start() */ #if __STDC__ -char * +const char * name_uid(uid_t uid, int frc) #else -char * +const char * name_uid(uid, frc) uid_t uid; int frc; @@ -281,10 +281,10 @@ name_uid(uid, frc) */ #if __STDC__ -char * +const char * name_gid(gid_t gid, int frc) #else -char * +const char * name_gid(gid, frc) gid_t gid; int frc; diff --git a/bin/pax/extern.h b/bin/pax/extern.h index 0fcde5c1fc9e..3586f7504a8a 100644 --- a/bin/pax/extern.h +++ b/bin/pax/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.9 1998/03/06 09:13:02 mrg Exp $ */ +/* $NetBSD: extern.h,v 1.10 1998/07/26 19:43:14 mycroft Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -106,8 +106,8 @@ int uidtb_start __P((void)); int gidtb_start __P((void)); int usrtb_start __P((void)); int grptb_start __P((void)); -char * name_uid __P((uid_t, int)); -char * name_gid __P((gid_t, int)); +const char * name_uid __P((uid_t, int)); +const char * name_gid __P((gid_t, int)); int uid_name __P((char *, uid_t *)); int gid_name __P((char *, gid_t *)); @@ -168,8 +168,8 @@ int next_file __P((ARCHD *)); */ void ls_list __P((ARCHD *, time_t)); void ls_tty __P((ARCHD *)); -void zf_strncpy __P((char *, char *, int)); -int l_strncpy __P((char *, char *, int)); +void zf_strncpy __P((char *, const char *, int)); +int l_strncpy __P((char *, const char *, int)); u_long asc_ul __P((char *, int, int)); int ul_asc __P((u_long, char *, int, int)); #ifndef NET2_STAT diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c index 7ca6c296563f..58f919cb6457 100644 --- a/bin/pax/gen_subs.c +++ b/bin/pax/gen_subs.c @@ -1,4 +1,4 @@ -/* $NetBSD: gen_subs.c,v 1.10 1998/04/01 14:06:12 kleink Exp $ */ +/* $NetBSD: gen_subs.c,v 1.11 1998/07/26 19:43:14 mycroft Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: gen_subs.c,v 1.10 1998/04/01 14:06:12 kleink Exp $"); +__RCSID("$NetBSD: gen_subs.c,v 1.11 1998/07/26 19:43:14 mycroft Exp $"); #endif #endif /* not lint */ @@ -217,7 +217,7 @@ ls_tty(arcn) #if __STDC__ void -zf_strncpy(char *dest, char *src, int len) +zf_strncpy(char *dest, const char *src, int len) #else void zf_strncpy(dest, src, len) @@ -246,7 +246,7 @@ zf_strncpy(dest, src, len) #if __STDC__ int -l_strncpy(char *dest, char *src, int len) +l_strncpy(char *dest, const char *src, int len) #else int l_strncpy(dest, src, len) diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index 367bf6a5655b..8c838d60a189 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -1,4 +1,4 @@ -/* $NetBSD: getnetgrent.c,v 1.14 1998/02/26 03:13:18 perry Exp $ */ +/* $NetBSD: getnetgrent.c,v 1.15 1998/07/26 19:34:10 mycroft Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -33,7 +33,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getnetgrent.c,v 1.14 1998/02/26 03:13:18 perry Exp $"); +__RCSID("$NetBSD: getnetgrent.c,v 1.15 1998/07/26 19:34:10 mycroft Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -69,7 +69,7 @@ static struct netgroup *_nghead = (struct netgroup *)NULL; static struct netgroup *_nglist = (struct netgroup *)NULL; static DB *_ng_db; -static int getstring __P((char **, int, char **)); +static int getstring __P((char **, int, const char **)); static struct netgroup *getnetgroup __P((char **)); static int lookup __P((const char *, char *, char **, int)); static void addgroup __P((char *, StringList *, char *)); @@ -91,7 +91,7 @@ static int getstring(pp, del, str) char **pp; int del; - char **str; + char const **str; { size_t len; char *sp, *ep, *dp; @@ -163,10 +163,10 @@ getnetgroup(pp) baddomain: if (ng->ng_user) - free(ng->ng_user); + free((char *)ng->ng_user); baduser: if (ng->ng_host) - free(ng->ng_host); + free((char *)ng->ng_host); badhost: free(ng); return NULL; @@ -427,11 +427,11 @@ in_find(ypdom, sl, grp, host, user, domain) /* new netgroup */ i = in_check(host, user, domain, ng); if (ng->ng_host != NULL) - free(ng->ng_host); + free((char *)ng->ng_host); if (ng->ng_user != NULL) - free(ng->ng_user); + free((char *)ng->ng_user); if (ng->ng_domain != NULL) - free(ng->ng_domain); + free((char *)ng->ng_domain); free(ng); if (i) { free(line); @@ -564,11 +564,11 @@ endnetgrent() for (_nglist = _nghead; _nglist != NULL; _nglist = _nghead) { _nghead = _nglist->ng_next; if (_nglist->ng_host != NULL) - free(_nglist->ng_host); + free((char *)_nglist->ng_host); if (_nglist->ng_user != NULL) - free(_nglist->ng_user); + free((char *)_nglist->ng_user); if (_nglist->ng_domain != NULL) - free(_nglist->ng_domain); + free((char *)_nglist->ng_domain); free(_nglist); }