const poisoning.
This commit is contained in:
parent
907740b591
commit
4024f73640
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: string.h,v 1.15 1998/05/06 20:17:55 kleink Exp $ */
|
||||
/* $NetBSD: string.h,v 1.16 1998/07/26 13:34:18 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -63,7 +63,7 @@ int strcmp __P((const char *, const char *));
|
|||
int strcoll __P((const char *, const char *));
|
||||
char *strcpy __P((char *, const char *));
|
||||
size_t strcspn __P((const char *, const char *));
|
||||
char *strerror __P((int));
|
||||
const char *strerror __P((int));
|
||||
size_t strlen __P((const char *));
|
||||
char *strncat __P((char *, const char *, size_t));
|
||||
int strncmp __P((const char *, const char *, size_t));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: unistd.h,v 1.58 1998/07/02 21:20:54 kleink Exp $ */
|
||||
/* $NetBSD: unistd.h,v 1.59 1998/07/26 13:34:18 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -291,7 +291,7 @@ int getdomainname __P((char *, size_t));
|
|||
int getgrouplist __P((const char *, gid_t, gid_t *, int *));
|
||||
mode_t getmode __P((const void *, mode_t));
|
||||
int getsubopt __P((char **, char * const *, char **));
|
||||
char *getusershell __P((void));
|
||||
const char *getusershell __P((void));
|
||||
int initgroups __P((const char *, gid_t));
|
||||
int iruserok __P((u_int32_t, int, const char *, const char *));
|
||||
int nfssvc __P((int, void *));
|
||||
|
@ -315,7 +315,7 @@ int setrgid __P((gid_t));
|
|||
int setruid __P((uid_t));
|
||||
void setusershell __P((void));
|
||||
void strmode __P((mode_t, char *));
|
||||
char *strsignal __P((int));
|
||||
const char *strsignal __P((int));
|
||||
int swapctl __P((int, const void *, int));
|
||||
int swapon __P((const char *)); /* obsoleted by swapctl() */
|
||||
int syscall __P((int, ...));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disklabel.c,v 1.19 1998/02/28 12:54:39 enami Exp $ */
|
||||
/* $NetBSD: disklabel.c,v 1.20 1998/07/26 13:42:28 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1987, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 5/3/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: disklabel.c,v 1.19 1998/02/28 12:54:39 enami Exp $");
|
||||
__RCSID("$NetBSD: disklabel.c,v 1.20 1998/07/26 13:42:28 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -64,7 +64,7 @@ __weak_alias(getdiskbyname,_getdiskbyname);
|
|||
#if 0
|
||||
static void error __P((int));
|
||||
#endif
|
||||
static int gettype __P((char *, char **));
|
||||
static int gettype __P((char *, const char *const *));
|
||||
|
||||
struct disklabel *
|
||||
getdiskbyname(name)
|
||||
|
@ -177,9 +177,9 @@ getdiskbyname(name)
|
|||
static int
|
||||
gettype(t, names)
|
||||
char *t;
|
||||
char **names;
|
||||
const char *const *names;
|
||||
{
|
||||
char **nm;
|
||||
const char *const *nm;
|
||||
|
||||
for (nm = names; *nm; nm++)
|
||||
if (strcasecmp(t, *nm) == 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getusershell.c,v 1.8 1998/02/03 18:23:47 perry Exp $ */
|
||||
/* $NetBSD: getusershell.c,v 1.9 1998/07/26 13:42:28 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)getusershell.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: getusershell.c,v 1.8 1998/02/03 18:23:47 perry Exp $");
|
||||
__RCSID("$NetBSD: getusershell.c,v 1.9 1998/07/26 13:42:28 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -63,17 +63,18 @@ __weak_alias(setusershell,_setusershell);
|
|||
* /etc/shells.
|
||||
*/
|
||||
|
||||
static char *okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
|
||||
static char **curshell, **shells, *strings;
|
||||
static char **initshells __P((void));
|
||||
static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
|
||||
static const char *const *curshell, **shells;
|
||||
static char *strings;
|
||||
static const char *const *initshells __P((void));
|
||||
|
||||
/*
|
||||
* Get a list of shells from _PATH_SHELLS, if it exists.
|
||||
*/
|
||||
char *
|
||||
const char *
|
||||
getusershell()
|
||||
{
|
||||
char *ret;
|
||||
const char *ret;
|
||||
|
||||
if (curshell == NULL)
|
||||
curshell = initshells();
|
||||
|
@ -103,10 +104,11 @@ setusershell()
|
|||
curshell = initshells();
|
||||
}
|
||||
|
||||
static char **
|
||||
static const char *const *
|
||||
initshells()
|
||||
{
|
||||
char **sp, *cp;
|
||||
const char **sp;
|
||||
char *cp;
|
||||
FILE *fp;
|
||||
struct stat statb;
|
||||
|
||||
|
@ -122,19 +124,19 @@ initshells()
|
|||
(void)fclose(fp);
|
||||
return (okshells);
|
||||
}
|
||||
if ((strings = malloc((u_int)statb.st_size)) == NULL) {
|
||||
if ((cp = malloc((u_int)statb.st_size)) == NULL) {
|
||||
(void)fclose(fp);
|
||||
return (okshells);
|
||||
}
|
||||
shells = calloc((unsigned)statb.st_size / 3, sizeof (char *));
|
||||
if (shells == NULL) {
|
||||
sp = calloc((unsigned)statb.st_size / 3, sizeof (char *));
|
||||
if (sp == NULL) {
|
||||
(void)fclose(fp);
|
||||
free(strings);
|
||||
free(cp);
|
||||
strings = NULL;
|
||||
return (okshells);
|
||||
}
|
||||
sp = shells;
|
||||
cp = strings;
|
||||
shells = sp;
|
||||
strings = cp;
|
||||
while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) {
|
||||
while (*cp != '#' && *cp != '/' && *cp != '\0')
|
||||
cp++;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.2 1997/10/16 23:08:21 christos Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.3 1998/07/26 13:36:34 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
|
||||
|
@ -31,8 +31,8 @@
|
|||
|
||||
__BEGIN_DECLS
|
||||
int __getlogin __P((char *, size_t));
|
||||
char *__strerror __P((int , char *, int));
|
||||
char *__strsignal __P((int , char *, int));
|
||||
const char *__strerror __P((int , char *, int));
|
||||
const char *__strsignal __P((int , char *, int));
|
||||
char *__dtoa __P((double, int, int, int *, int *, char **));
|
||||
int __sysctl __P((int *, unsigned int, void *, size_t *, void *, size_t));
|
||||
__END_DECLS
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __strerror.c,v 1.12 1998/02/16 11:27:16 lukem Exp $ */
|
||||
/* $NetBSD: __strerror.c,v 1.13 1998/07/26 13:36:34 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
|
||||
#else
|
||||
__RCSID("$NetBSD: __strerror.c,v 1.12 1998/02/16 11:27:16 lukem Exp $");
|
||||
__RCSID("$NetBSD: __strerror.c,v 1.13 1998/07/26 13:36:34 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -59,7 +59,7 @@ __RCSID("$NetBSD: __strerror.c,v 1.12 1998/02/16 11:27:16 lukem Exp $");
|
|||
* internal function __strerror().
|
||||
*/
|
||||
|
||||
char *
|
||||
const char *
|
||||
__strerror(num, buf, buflen)
|
||||
int num;
|
||||
char *buf;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __strsignal.c,v 1.14 1998/02/03 18:49:09 perry Exp $ */
|
||||
/* $NetBSD: __strsignal.c,v 1.15 1998/07/26 13:36:34 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
|
||||
#else
|
||||
__RCSID("$NetBSD: __strsignal.c,v 1.14 1998/02/03 18:49:09 perry Exp $");
|
||||
__RCSID("$NetBSD: __strsignal.c,v 1.15 1998/07/26 13:36:34 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -53,7 +53,7 @@ __RCSID("$NetBSD: __strsignal.c,v 1.14 1998/02/03 18:49:09 perry Exp $");
|
|||
#include <string.h>
|
||||
#include "extern.h"
|
||||
|
||||
char *
|
||||
const char *
|
||||
__strsignal(num, buf, buflen)
|
||||
int num;
|
||||
char *buf;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strerror.c,v 1.8 1998/02/16 11:27:16 lukem Exp $ */
|
||||
/* $NetBSD: strerror.c,v 1.9 1998/07/26 13:36:34 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
|
||||
#else
|
||||
__RCSID("$NetBSD: strerror.c,v 1.8 1998/02/16 11:27:16 lukem Exp $");
|
||||
__RCSID("$NetBSD: strerror.c,v 1.9 1998/07/26 13:36:34 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -52,7 +52,7 @@ __RCSID("$NetBSD: strerror.c,v 1.8 1998/02/16 11:27:16 lukem Exp $");
|
|||
* internal function __strerror().
|
||||
*/
|
||||
|
||||
char *
|
||||
const char *
|
||||
strerror(num)
|
||||
int num;
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strsignal.c,v 1.7 1997/10/16 23:09:10 christos Exp $ */
|
||||
/* $NetBSD: strsignal.c,v 1.8 1998/07/26 13:36:34 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
|
||||
#else
|
||||
__RCSID("$NetBSD: strsignal.c,v 1.7 1997/10/16 23:09:10 christos Exp $");
|
||||
__RCSID("$NetBSD: strsignal.c,v 1.8 1998/07/26 13:36:34 mycroft Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -51,7 +51,7 @@ __RCSID("$NetBSD: strsignal.c,v 1.7 1997/10/16 23:09:10 christos Exp $");
|
|||
__weak_alias(strsignal,_strsignal);
|
||||
#endif
|
||||
|
||||
char *
|
||||
const char *
|
||||
strsignal(sig)
|
||||
int sig;
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue