#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: infinity.c,v 1.2 1996/08/19 08:12:30 tholo Exp $";
+static char rcsid[] = "$OpenBSD: infinity.c,v 1.3 1996/09/15 09:30:42 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/* infinity.c */
#include <math.h>
/* bytes for +Infinity on a 387 */
-char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
+char __infinity[] = { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f };
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: __setregid.c,v 1.2 1996/08/19 08:19:14 tholo Exp $";
+static char *rcsid = "$OpenBSD: __setregid.c,v 1.3 1996/09/15 09:30:44 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
__setregid(rgid, egid)
gid_t rgid, egid;
{
- static gid_t svgid = -1;
+ static gid_t svgid = (gid_t) -1;
- if (svgid == -1)
+ if (svgid == (gid_t) -1)
svgid = getegid();
/*
* we assume that the intent of setting rgid is to be able to get
* back rgid priviledge. So we make sure that we will be able to
* do so, but do not actually set the rgid.
*/
- if (rgid != -1 && rgid != getgid() && rgid != svgid) {
+ if (rgid != (gid_t) -1 && rgid != getgid() && rgid != svgid) {
errno = EPERM;
return (-1);
}
- if (egid != -1 && setegid(egid) < 0)
+ if (egid != (gid_t) -1 && setegid(egid) < 0)
return (-1);
return (0);
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: __setreuid.c,v 1.2 1996/08/19 08:19:15 tholo Exp $";
+static char *rcsid = "$OpenBSD: __setreuid.c,v 1.3 1996/09/15 09:30:45 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
__setreuid(ruid, euid)
uid_t ruid, euid;
{
- static uid_t svuid = -1;
+ static uid_t svuid = (uid_t) -1;
- if (svuid == -1)
+ if (svuid == (uid_t) -1)
svuid = geteuid();
/*
* we assume that the intent of setting ruid is to be able to get
* back ruid priviledge. So we make sure that we will be able to
* do so, but do not actually set the ruid.
*/
- if (ruid != -1 && ruid != getuid() && ruid != svuid) {
+ if (ruid != (uid_t) -1 && ruid != getuid() && ruid != svuid) {
errno = EPERM;
return (-1);
}
- if (euid != -1 && seteuid(euid) < 0)
+ if (euid != (uid_t) -1 && seteuid(euid) < 0)
return (-1);
return (0);
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.4 1996/08/19 08:19:50 tholo Exp $";
+static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.5 1996/09/15 09:30:46 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <unistd.h>
#include <stdio.h>
+#include <string.h>
#include <md5.h>
static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash.c,v 1.3 1996/08/19 08:20:31 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash.c,v 1.4 1996/09/15 09:30:47 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
/************************** INTERFACE ROUTINES ***************************/
/* OPEN/CLOSE */
+/* ARGSUSED */
extern DB *
__hash_open(file, flags, mode, info, dflags)
const char *file;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.3 1996/08/19 08:20:34 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.4 1996/09/15 09:30:48 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
}
val->size = collect_data(hashp, bufp, (int)len, set_current);
- if (val->size == -1)
+ if (val->size == (size_t) -1)
return (-1);
if (save_p->addr != save_addr) {
/* We are pretty short on buffers. */
int set;
{
key->size = collect_key(hashp, bufp, 0, val, set);
- if (key->size == -1)
+ if (key->size == (size_t) -1)
return (-1);
key->data = (u_char *)hashp->tmp_key;
return (0);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash_func.c,v 1.3 1996/08/19 08:20:37 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash_func.c,v 1.4 1996/09/15 09:30:49 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include "page.h"
#include "extern.h"
+#ifdef notdef
static u_int32_t hash1 __P((const void *, size_t));
static u_int32_t hash2 __P((const void *, size_t));
static u_int32_t hash3 __P((const void *, size_t));
+#endif
static u_int32_t hash4 __P((const void *, size_t));
/* Global default hash function */
* This came from ejb's hsearch.
*/
+#ifdef notdef
+
+
#define PRIME1 37
#define PRIME2 1048583
}
return (h);
}
+#endif
/* Hash function from Chris Torek. */
static u_int32_t
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mpool.c,v 1.3 1996/08/19 08:20:52 tholo Exp $";
+static char rcsid[] = "$OpenBSD: mpool.c,v 1.4 1996/09/15 09:30:51 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
* mpool_open --
* Initialize a memory pool.
*/
+/* ARGSUSED */
MPOOL *
mpool_open(key, fd, pagesize, maxcache)
void *key;
* mpool_get
* Get a page.
*/
+/* ARGSUSED */
void *
mpool_get(mp, pgno, flags)
MPOOL *mp;
* mpool_put
* Return a page.
*/
+/* ARGSUSED */
int
mpool_put(mp, page, flags)
MPOOL *mp;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: rec_close.c,v 1.3 1996/08/19 08:20:58 tholo Exp $";
+static char rcsid[] = "$OpenBSD: rec_close.c,v 1.4 1996/09/15 09:30:53 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
status = (dbp->seq)(dbp, &key, &data, R_NEXT);
}
} else {
- iov[1].iov_base = &t->bt_bval;
+ iov[1].iov_base = (char *) &t->bt_bval;
iov[1].iov_len = 1;
status = (dbp->seq)(dbp, &key, &data, R_FIRST);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: alarm.c,v 1.2 1996/08/19 08:21:43 tholo Exp $";
+static char rcsid[] = "$OpenBSD: alarm.c,v 1.3 1996/09/15 09:30:54 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
itp->it_value.tv_sec = secs;
itp->it_value.tv_usec = 0;
if (setitimer(ITIMER_REAL, itp, &oitv) < 0)
- return (-1);
+ return ((unsigned int) -1);
if (oitv.it_value.tv_usec)
oitv.it_value.tv_sec++;
return (oitv.it_value.tv_sec);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: confstr.c,v 1.2 1996/08/19 08:21:59 tholo Exp $";
+static char rcsid[] = "$OpenBSD: confstr.c,v 1.3 1996/09/15 09:30:55 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
mib[0] = CTL_USER;
mib[1] = USER_CS_PATH;
if (sysctl(mib, 2, NULL, &tlen, NULL, 0) == -1)
- return (-1);
+ return ((size_t) -1);
if (len != 0 && buf != NULL) {
if ((p = malloc(tlen)) == NULL)
- return (-1);
+ return ((size_t) -1);
if (sysctl(mib, 2, p, &tlen, NULL, 0) == -1) {
sverrno = errno;
free(p);
errno = sverrno;
- return (-1);
+ return ((size_t) -1);
}
/*
* POSIX 1003.2 requires partial return of
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ctype_.c,v 1.2 1996/08/19 08:22:08 tholo Exp $";
+static char rcsid[] = "$OpenBSD: ctype_.c,v 1.3 1996/09/15 09:30:56 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <ctype.h>
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
_C, _C, _C, _C, _C, _C, _C, _C,
_C, _C, _C, _C, _C, _C, _C, _C,
- _S|_B, _P, _P, _P, _P, _P, _P, _P,
+ _S|(char)_B, _P, _P, _P, _P, _P, _P, _P,
_P, _P, _P, _P, _P, _P, _P, _P,
_N, _N, _N, _N, _N, _N, _N, _N,
_N, _N, _P, _P, _P, _P, _P, _P,
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: disklabel.c,v 1.2 1996/08/19 08:22:24 tholo Exp $";
+static char rcsid[] = "$OpenBSD: disklabel.c,v 1.3 1996/09/15 09:30:58 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#include <string.h>
#include <unistd.h>
-static void error __P((int));
static int gettype __P((char *, char **));
struct disklabel *
return (atoi(t));
return (0);
}
-
-static void
-error(err)
- int err;
-{
- char *p;
-
- (void)write(STDERR_FILENO, "disktab: ", 9);
- (void)write(STDERR_FILENO, _PATH_DISKTAB, sizeof(_PATH_DISKTAB) - 1);
- (void)write(STDERR_FILENO, ": ", 2);
- p = strerror(err);
- (void)write(STDERR_FILENO, p, strlen(p));
- (void)write(STDERR_FILENO, "\n", 1);
-}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: errlist.c,v 1.2 1996/08/19 08:22:32 tholo Exp $";
+static char *rcsid = "$OpenBSD: errlist.c,v 1.3 1996/09/15 09:30:59 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
-const char *const _sys_errlist[] = {
+#ifdef lint
+char *
+#else
+const char *const
+#endif
+ _sys_errlist[] = {
"Undefined error: 0", /* 0 - ENOERROR */
"Operation not permitted", /* 1 - EPERM */
"No such file or directory", /* 2 - ENOENT */
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getcap.c,v 1.2 1996/08/19 08:23:10 tholo Exp $";
+static char rcsid[] = "$OpenBSD: getcap.c,v 1.3 1996/09/15 09:31:00 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
int fd, depth;
{
DB *capdbp;
- DBT key, data;
register char *r_end, *rp, **db_p;
int myfd, eof, foundit, retval, clen;
char *record, *cbuf;
char **bp, *name;
{
DBT key, data;
- char *buf;
- int st;
key.data = name;
key.size = strlen(name);
char **db_array;
{
size_t len;
- int status, i, done;
+ int status, done;
char *cp, *line, *rp, *np, buf[BSIZE], nbuf[BSIZE];
u_int dummy;
/*
* Line points to a name line.
*/
- i = 0;
done = 0;
np = nbuf;
for (;;) {
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.3 1996/08/19 08:23:32 tholo Exp $";
+static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.4 1996/09/15 09:31:01 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
int *grpcnt;
{
register struct group *grp;
- register struct passwd *pw;
register int i, ngroups;
int ret, maxgroups;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getpwent.c,v 1.3 1996/08/19 08:24:02 tholo Exp $";
+static char rcsid[] = "$OpenBSD: getpwent.c,v 1.4 1996/09/15 09:31:02 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
DBT key;
char bf[sizeof(_pw_keynum) + 1];
#ifdef YP
- char *cp;
static char *name = (char *)NULL;
const char *user, *host, *dom;
int has_yppw;
break;
}
break;
-
- continue;
}
if(strcmp(_pw_passwd.pw_name, name) == 0) {
if (!_pw_stayopen) {
break;
}
break;
-
- continue;
}
if( _pw_passwd.pw_uid == uid) {
if (!_pw_stayopen) {
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getttyent.c,v 1.2 1996/08/19 08:24:10 tholo Exp $";
+static char rcsid[] = "$OpenBSD: getttyent.c,v 1.3 1996/09/15 09:31:03 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
static char zapchar;
static FILE *tf;
+static char *skip __P((char *));
+static char *value __P((char *));
+
struct ttyent *
getttynam(tty)
const char *tty;
register char *p;
#define MAXLINELENGTH 200
static char line[MAXLINELENGTH];
- static char *skip(), *value();
if (!tf && !setttyent())
return (NULL);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: nlist.c,v 1.14 1996/08/19 08:25:09 tholo Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.15 1996/09/15 09:31:04 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
/* mmap section header table */
shdr = (Elf32_Shdr *)mmap(NULL, (size_t)shdr_size,
- PROT_READ, 0, fd, ehdr.e_shoff);
+ PROT_READ, 0, fd, (off_t) ehdr.e_shoff);
if (shdr == (Elf32_Shdr *)-1)
return (-1);
* making the memory allocation permanent as with malloc/free
* (i.e., munmap will return it to the system).
*/
- strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fd, symstroff);
+ strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fd, (off_t) symstroff);
if (strtab == (char *)-1)
return (-1);
/*
if (symoff == 0)
goto done;
- if (lseek(fd, symoff, SEEK_SET) == -1) {
+ if (lseek(fd, (off_t) symoff, SEEK_SET) == -1) {
nent = -1;
goto done;
}
struct nlist *list;
{
int fd, n;
- int i;
fd = open(name, O_RDONLY, 0);
if (fd < 0)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sleep.c,v 1.4 1996/08/19 08:26:20 tholo Exp $";
+static char rcsid[] = "$OpenBSD: sleep.c,v 1.5 1996/09/15 09:31:05 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/time.h>
#include <signal.h>
#include <unistd.h>
+static void sleephandler __P((int));
static volatile int ringring;
unsigned int
struct sigaction act, oact;
struct timeval diff;
sigset_t set, oset;
- static void sleephandler();
if (!seconds)
return 0;
return (itv.it_value.tv_sec);
}
+/* ARGSUSED */
static void
-sleephandler()
+sleephandler(sig)
+ int sig;
{
ringring = 1;
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sysconf.c,v 1.2 1996/08/19 08:26:24 tholo Exp $";
+static char rcsid[] = "$OpenBSD: sysconf.c,v 1.3 1996/09/15 09:31:06 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
sysconf(name)
int name;
{
- struct clockinfo clk;
struct rlimit rl;
size_t len;
int mib[2], value;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ttyname.c,v 1.2 1996/08/19 08:27:02 tholo Exp $";
+static char rcsid[] = "$OpenBSD: ttyname.c,v 1.3 1996/09/15 09:31:07 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
return (oldttyname(fd, &sb));
}
+/* ARGSUSED */
static char *
oldttyname(fd, sb)
int fd;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ualarm.c,v 1.2 1996/08/19 08:27:08 tholo Exp $";
+static char rcsid[] = "$OpenBSD: ualarm.c,v 1.3 1996/09/15 09:31:08 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/time.h>
* If ``reload'' is non-zero, keep generating SIGALRM
* every ``reload'' microseconds after the first signal.
*/
-unsigned
+u_int
ualarm(usecs, reload)
register unsigned usecs;
register unsigned reload;
if (setitimer(ITIMER_REAL, &new, &old) == 0)
return (old.it_value.tv_sec * USPS + old.it_value.tv_usec);
/* else */
- return (-1);
+ return ((u_int)-1);
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: uname.c,v 1.4 1996/08/19 08:27:12 tholo Exp $";
+static char rcsid[] = "$OpenBSD: uname.c,v 1.5 1996/09/15 09:31:09 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
{
int mib[2], rval;
size_t len;
- char *p;
rval = 0;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: unvis.c,v 1.3 1996/08/19 08:27:16 tholo Exp $";
+static char rcsid[] = "$OpenBSD: unvis.c,v 1.4 1996/09/15 09:31:10 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
*astate = S_OCTAL2;
return (0);
case 'M':
- *cp = 0200;
+ *cp = (char) 0200;
*astate = S_META;
return (0);
case '^':
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: usleep.c,v 1.3 1996/08/19 08:27:19 tholo Exp $";
+static char rcsid[] = "$OpenBSD: usleep.c,v 1.4 1996/09/15 09:31:11 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/time.h>
#define TICK 10000 /* system clock resolution in microseconds */
+static void sleephandler __P((int));
static volatile int ringring;
void
struct itimerval itv, oitv;
struct sigaction act, oact;
sigset_t set, oset;
- static void sleephandler();
if (!useconds)
return;
(void) setitimer(ITIMER_REAL, &oitv, NULL);
}
+/* ARGSUSED */
static void
-sleephandler()
+sleephandler(sig)
+ int sig;
{
ringring = 1;
}
*/
#if !defined(lint) && defined(LIBC_SCCS)
-static char rcsid[] = "$OpenBSD: gmon.c,v 1.6 1996/09/05 12:29:12 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: gmon.c,v 1.7 1996/09/15 09:31:12 tholo Exp $";
#endif
#include <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: setlocale.c,v 1.3 1996/08/26 00:17:18 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: setlocale.c,v 1.4 1996/09/15 09:31:14 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/localedef.h>
case LC_TIME:
return (NULL);
}
+ return (NULL);
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.2 1996/08/19 08:28:30 tholo Exp $";
+static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.3 1996/09/15 09:31:16 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h>
#include <sys/uio.h>
#include <unistd.h>
+/* ARGSUSED */
char *
MDXEnd(MDX_CTX *ctx, char *buf)
{
-/* $OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ */
+/* $OpenBSD: rcmdsh.c,v 1.3 1996/09/15 09:31:17 tholo Exp $ */
/*
* This is an rcmd() replacement originally by
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $";
+static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.3 1996/09/15 09:31:17 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <string.h>
#include <pwd.h>
#include <paths.h>
+#include <unistd.h>
/*
* This is a replacement rcmd() function that uses the rsh(1)
* program in place of a direct rcmd(3) function call so as to
* avoid having to be root. Note that rport is ignored.
*/
+/* ARGSUSED */
int
rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog)
char **ahost;
- u_short rport;
- char *locuser, *remuser, *cmd;
+ int rport;
+ const char *locuser, *remuser, *cmd;
char *rshprog;
{
struct hostent *hp;
(void) fprintf(stderr, "rcmdsh: execlp %s failed: %s\n",
rshprog, strerror(errno));
_exit(255);
- } else if (cpid > 0) {
+ } else {
/* Parent. close sp[1], return sp[0]. */
(void) close(sp[1]);
/* Reap child. */
(void) wait(NULL);
return(sp[0]);
}
- /*NOTREACHED*/
+ /* NOTREACHED */
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: res_debug.c,v 1.3 1996/08/19 08:29:44 tholo Exp $";
+static char rcsid[] = "$OpenBSD: res_debug.c,v 1.4 1996/09/15 09:31:18 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
case T_UINFO:
putc('\t', file);
- fputs(cp, file);
+ fputs((char *) cp, file);
cp += dlen;
break;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: res_init.c,v 1.6 1996/08/27 03:32:53 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: res_init.c,v 1.7 1996/09/15 09:31:19 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
int haveenv = 0;
int havesearch = 0;
int nsort = 0;
- int dots;
- u_long mask;
_res.nsaddr.sin_len = sizeof(struct sockaddr_in);
_res.nsaddr.sin_family = AF_INET;
return (0);
}
+/* ARGSUSED */
static void
res_setoptions(options, source)
char *options, *source;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.3 1996/08/19 08:29:47 tholo Exp $";
+static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.4 1996/09/15 09:31:20 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
* Form all types of queries.
* Returns the size of the result or -1.
*/
+/* ARGSUSED */
int
res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
int op; /* opcode of query */
register HEADER *hp;
register u_char *cp;
register int n;
+#ifdef ALLOW_UPDATES
struct rrec *newrr = (struct rrec *) newrr_in;
+#endif /* ALLOW_UPDATES */
u_char *dnptrs[10], **dpp, **lastdnptr;
#ifdef DEBUG
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: _catopen.c,v 1.2 1996/08/19 08:30:03 tholo Exp $";
+static char rcsid[] = "$OpenBSD: _catopen.c,v 1.3 1996/09/15 09:31:21 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
#include <nl_types.h>
-extern nl_catd _catopen __P((__const char *, int));
+extern nl_catd _catopen __P((const char *, int));
nl_catd
catopen(name, oflag)
- __const char *name;
+ const char *name;
int oflag;
{
return _catopen(name, oflag);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: catgets.c,v 1.4 1996/08/19 08:30:06 tholo Exp $";
+static char rcsid[] = "$OpenBSD: catgets.c,v 1.5 1996/09/15 09:31:22 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#define _NLS_PRIVATE
}
cat_hdr = (struct _nls_cat_hdr *) catd->__data;
- set_hdr = (struct _nls_set_hdr *) (catd->__data
+ set_hdr = (struct _nls_set_hdr *) ((char *)catd->__data
+ sizeof(struct _nls_cat_hdr));
/* binary search, see knuth algorithm b */
r = set_id - ntohl(set_hdr[i].__setno);
if (r == 0) {
- msg_hdr = (struct _nls_msg_hdr *) (catd->__data
+ msg_hdr = (struct _nls_msg_hdr *) ((char *)catd->__data
+ sizeof(struct _nls_cat_hdr)
+ ntohl(cat_hdr->__msg_hdr_offset));
i = (l + u) / 2;
r = msg_id - ntohl(msg_hdr[i].__msgno);
if (r == 0) {
- return (char *) (catd->__data
+ return (char *) catd->__data
+ sizeof(struct _nls_cat_hdr)
+ ntohl(cat_hdr->__msg_txt_offset)
- + ntohl(msg_hdr[i].__offset));
+ + ntohl(msg_hdr[i].__offset);
} else if (r < 0) {
u = i - 1;
} else {
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: catopen.c,v 1.7 1996/09/05 12:32:33 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: catopen.c,v 1.8 1996/09/15 09:31:23 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#define _NLS_PRIVATE
#define NLS_DEFAULT_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L"
#define NLS_DEFAULT_LANG "C"
-static nl_catd load_msgcat();
+static nl_catd load_msgcat __P((const char *));
+/* ARGSUSED */
nl_catd
_catopen(name, oflag)
const char *name;
return (nl_catd) -1;
}
- data = mmap(0, (size_t) st.st_size, PROT_READ, MAP_SHARED, fd, 0);
+ data = mmap(0, (size_t) st.st_size, PROT_READ, MAP_SHARED, fd, (off_t)0);
close (fd);
if (data == (void *) -1) {
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: regcomp.c,v 1.2 1996/08/19 08:31:10 tholo Exp $";
+static char rcsid[] = "$OpenBSD: regcomp.c,v 1.3 1996/09/15 09:31:25 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
static int firstch __P((struct parse *p, cset *cs));
static int nch __P((struct parse *p, cset *cs));
static void mcadd __P((struct parse *p, cset *cs, char *cp));
-static void mcsub __P((cset *cs, char *cp));
-static int mcin __P((cset *cs, char *cp));
-static char *mcfind __P((cset *cs, char *cp));
static void mcinvert __P((struct parse *p, cset *cs));
static void mccase __P((struct parse *p, cset *cs));
static int isinsets __P((struct re_guts *g, int c));
p_bracket(p)
register struct parse *p;
{
- register char c;
register cset *cs = allocset(p);
register int invert = 0;
register char *sp = p->next;
register struct cname *cp;
register int len;
- register char c;
while (MORE() && !SEETWO(endc, ']'))
NEXT();
cs->multis[cs->smultis - 1] = '\0';
}
-/*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(register cset *cs, register char *cp);
- */
-static void
-mcsub(cs, cp)
-register cset *cs;
-register char *cp;
-{
- register char *fp = mcfind(cs, cp);
- register size_t len = strlen(fp);
-
- assert(fp != NULL);
- (void) memmove(fp, fp + len + 1,
- cs->smultis - (fp + len + 1 - cs->multis));
- cs->smultis -= len;
-
- if (cs->smultis == 0) {
- free(cs->multis);
- cs->multis = NULL;
- return;
- }
-
- cs->multis = realloc(cs->multis, cs->smultis);
- assert(cs->multis != NULL);
-}
-
-/*
- - mcin - is a collating element in a cset?
- == static int mcin(register cset *cs, register char *cp);
- */
-static int
-mcin(cs, cp)
-register cset *cs;
-register char *cp;
-{
- return(mcfind(cs, cp) != NULL);
-}
-
-/*
- - mcfind - find a collating element in a cset
- == static char *mcfind(register cset *cs, register char *cp);
- */
-static char *
-mcfind(cs, cp)
-register cset *cs;
-register char *cp;
-{
- register char *p;
-
- if (cs->multis == NULL)
- return(NULL);
- for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
- if (strcmp(cp, p) == 0)
- return(p);
- return(NULL);
-}
-
/*
- mcinvert - invert the list of collating elements in a cset
== static void mcinvert(register struct parse *p, register cset *cs);
* This would have to know the set of possibilities. Implementation
* is deferred.
*/
+/* ARGSUSED */
static void
mcinvert(p, cs)
register struct parse *p;
* This would have to know the set of possibilities. Implementation
* is deferred.
*/
+/* ARGSUSED */
static void
mccase(p, cs)
register struct parse *p;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: regerror.c,v 1.2 1996/08/19 08:31:11 tholo Exp $";
+static char rcsid[] = "$OpenBSD: regerror.c,v 1.3 1996/09/15 09:31:26 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
char *localbuf;
{
register struct rerr *r;
- register size_t siz;
- register char *p;
for (r = rerrs; r->code != 0; r++)
if (strcmp(r->name, preg->re_endp) == 0)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: regexec.c,v 1.3 1996/08/19 08:31:15 tholo Exp $";
+static char rcsid[] = "$OpenBSD: regexec.c,v 1.4 1996/09/15 09:31:27 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
#include "utils.h"
#include "regex2.h"
-static int nope = 0; /* for use in asserts; shuts lint up */
-
/* macros for manipulating states, small version */
#define states long
#define states1 states /* for later use in regexec() decision */
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: auth_unix.c,v 1.4 1996/08/19 08:31:21 tholo Exp $";
+static char *rcsid = "$OpenBSD: auth_unix.c,v 1.5 1996/09/15 09:31:29 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
/*
* authunix operations
*/
-
+/* ARGSUSED */
static void
authunix_nextverf(auth)
AUTH *auth;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: bindresvport.c,v 1.8 1996/08/19 08:31:24 tholo Exp $";
+static char *rcsid = "$OpenBSD: bindresvport.c,v 1.9 1996/09/15 09:31:30 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
if (sin == (struct sockaddr_in *)0) {
sin = &myaddr;
- memset(sin, 0, sizeof(*sin));
- sin->sin_len = sizeof(*sin);
+ memset(sin, 0, sinlen);
+ sin->sin_len = sinlen;
sin->sin_family = AF_INET;
} else if (sin->sin_family != AF_INET) {
errno = EPFNOSUPPORT;
return(error);
}
- error = bind(sd, (struct sockaddr *)sin, sizeof(*sin));
+ error = bind(sd, (struct sockaddr *)sin, sinlen);
if (sin->sin_port == 0) {
int saved_errno = errno;
}
if (sin != &myaddr) {
- int sinlen = sizeof(*sin);
-
/* Hmm, what did the kernel assign... */
if (getsockname(sd, (struct sockaddr *)sin,
&sinlen) < 0)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.3 1996/08/19 08:31:26 tholo Exp $";
+static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.4 1996/09/15 09:31:31 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
char *s;
{
struct rpc_err e;
- void clnt_perrno();
char *err;
char *str = _buf();
char *strstart = str;
clnt_sperrno(stat)
enum clnt_stat stat;
{
- int i;
-
unsigned int errnum = stat;
if (errnum < (sizeof(rpc_errlist)/sizeof(rpc_errlist[0])))
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.3 1996/08/19 08:31:27 tholo Exp $";
+static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.4 1996/09/15 09:31:32 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
return (client);
}
+/* ARGSUSED */
static enum clnt_stat
clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
CLIENT *h;
{
}
-
+/* ARGSUSED */
static bool_t
clntraw_freeres(cl, xdr_res, res_ptr)
CLIENT *cl;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_simple.c,v 1.3 1996/08/19 08:31:28 tholo Exp $";
+static char *rcsid = "$OpenBSD: clnt_simple.c,v 1.4 1996/09/15 09:31:33 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
char *host;
+ int prognum, versnum, procnum;
xdrproc_t inproc, outproc;
char *in, *out;
{
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.8 1996/09/02 05:01:09 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.9 1996/09/15 09:31:34 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
free(fds);
return (-1);
case -1:
- if (errno == EINTR);
+ if (errno == EINTR)
continue;
ct->ct_error.re_status = RPC_CANTRECV;
ct->ct_error.re_errno = save_errno;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: getrpcent.c,v 1.6 1996/09/02 05:32:50 tholo Exp $";
+static char *rcsid = "$OpenBSD: getrpcent.c,v 1.7 1996/09/15 09:31:35 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
struct rpcent *
getrpcent()
{
- struct rpcent *hp;
- int reason;
register struct rpcdata *d = _rpcdata();
if (d == 0)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.9 1996/09/02 05:01:14 deraadt Exp $";
+static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.10 1996/09/15 09:31:37 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
#include <rpc/pmap_rmt.h>
#include <sys/socket.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc.c,v 1.7 1996/08/20 23:47:43 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc.c,v 1.8 1996/09/15 09:31:38 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
struct svc_req r;
register SVCXPRT *xprt;
register int bit;
- register u_int32_t mask, *maskp;
+ register fd_mask mask, *maskp;
register int sock;
char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE];
msg.rm_call.cb_cred.oa_base = cred_area;
}
/* now match message with a registered service*/
prog_found = FALSE;
- low_vers = 0 - 1;
+ low_vers = (u_long) -1;
high_vers = 0;
for (s = svc_head; s != NULL_SVC; s = s->sc_next) {
if (s->sc_prog == r.rq_prog) {
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_raw.c,v 1.3 1996/08/19 08:31:54 tholo Exp $";
+static char *rcsid = "$OpenBSD: svc_raw.c,v 1.4 1996/09/15 09:31:39 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
return (XPRT_IDLE);
}
+/* ARGSUSED */
static bool_t
svcraw_recv(xprt, msg)
SVCXPRT *xprt;
return (TRUE);
}
+/* ARGSUSED */
static bool_t
svcraw_reply(xprt, msg)
SVCXPRT *xprt;
return (TRUE);
}
+/* ARGSUSED */
static bool_t
svcraw_getargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
return ((*xdr_args)(&srp->xdr_stream, args_ptr));
}
+/* ARGSUSED */
static bool_t
svcraw_freeargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_run.c,v 1.7 1996/08/20 23:47:44 deraadt Exp $";
+static char *rcsid = "$OpenBSD: svc_run.c,v 1.8 1996/09/15 09:31:40 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
#include <rpc/rpc.h>
#include <sys/errno.h>
#include <unistd.h>
+#include <stdlib.h>
extern int __svc_fdsetsize;
extern fd_set *__svc_fdset;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_simple.c,v 1.3 1996/08/19 08:31:56 tholo Exp $";
+static char *rcsid = "$OpenBSD: svc_simple.c,v 1.4 1996/09/15 09:31:41 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
struct proglst *pl;
registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
+ int prognum, versnum, procnum;
char *(*progname)();
xdrproc_t inproc, outproc;
{
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: svc_udp.c,v 1.3 1996/08/19 08:31:59 tholo Exp $";
+static char *rcsid = "$OpenBSD: svc_udp.c,v 1.4 1996/09/15 09:31:42 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
static bool_t svcudp_getargs();
static bool_t svcudp_freeargs();
static void svcudp_destroy();
+static void cache_set __P((SVCXPRT *, u_long));
+static int cache_get __P((SVCXPRT *, struct rpc_msg *, char **, u_long *));
static struct xp_ops svcudp_op = {
svcudp_recv,
return(svcudp_bufcreate(sock, UDPMSGSIZE, UDPMSGSIZE));
}
+/* ARGSUSED */
static enum xprt_stat
svcudp_stat(xprt)
SVCXPRT *xprt;
register int rlen;
char *reply;
u_long replylen;
- static int cache_get();
again:
xprt->xp_addrlen = sizeof(struct sockaddr_in);
register XDR *xdrs = &(su->su_xdrs);
register int slen;
register bool_t stat = FALSE;
- static void cache_set();
xdrs->x_op = XDR_ENCODE;
XDR_SETPOS(xdrs, 0);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.4 1996/08/19 08:32:04 tholo Exp $";
+static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.5 1996/09/15 09:31:43 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
return (buf);
}
+/* ARGSUSED */
static int32_t *
xdrmem_inline_unaligned(xdrs, len)
register XDR *xdrs;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.3 1996/08/19 08:32:08 tholo Exp $";
+static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.4 1996/09/15 09:31:44 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
{
(void)fflush((FILE *)xdrs->x_private);
/* xx should we close the file ?? */
-};
+}
static bool_t
xdrstdio_getlong(xdrs, lp)
FALSE : TRUE);
}
+/* ARGSUSED */
static int32_t *
xdrstdio_inline(xdrs, len)
XDR *xdrs;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vfscanf.c,v 1.2 1996/08/19 08:33:12 tholo Exp $";
+static char rcsid[] = "$OpenBSD: vfscanf.c,v 1.3 1996/09/15 09:31:46 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
case CT_CCL:
/* scan a (nonempty) character class (sets NOSKIP) */
if (width == 0)
- width = ~0; /* `infinity' */
+ width = (size_t)~0; /* `infinity' */
/* take only those things in the class */
if (flags & SUPPRESS) {
n = 0;
case CT_STRING:
/* like CCL, but zero-length string OK, & no NOSKIP */
if (width == 0)
- width = ~0;
+ width = (size_t)~0;
if (flags & SUPPRESS) {
n = 0;
while (!isspace(*fp->_p)) {
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vsscanf.c,v 1.2 1996/08/19 08:33:15 tholo Exp $";
+static char rcsid[] = "$OpenBSD: vsscanf.c,v 1.3 1996/09/15 09:31:47 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
const char *fmt;
_BSD_VA_LIST_ ap;
{
- int ret;
FILE f;
f._flags = __SRD;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: malloc.c,v 1.10 1996/09/11 03:04:43 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: malloc.c,v 1.11 1996/09/15 09:31:49 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
;
/* Find that bit, and tweak it */
- k = ffs(*lp) - 1;
+ k = ffs((unsigned)*lp) - 1;
*lp ^= 1<<k;
/* If there are no more free, remove from free-list */
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: merge.c,v 1.2 1996/08/19 08:33:38 tholo Exp $";
+static char *rcsid = "$OpenBSD: merge.c,v 1.3 1996/09/15 09:31:50 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
sense = 0;
}
if (!big) { /* here i = 0 */
-LINEAR: while ((b += size) < t && cmp(q, b) >sense)
+ while ((b += size) < t && cmp(q, b) >sense)
if (++i == 6) {
big = 1;
goto EXPONENTIAL;
goto FASTCASE;
} else
b = p;
-SLOWCASE: while (t > b+size) {
+ while (t > b+size) {
i = (((t - b) / size) >> 1) * size;
if ((*cmp)(q, p = b + i) <= sense)
t = p;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: random.c,v 1.3 1996/08/19 08:33:46 tholo Exp $";
+static char *rcsid = "$OpenBSD: random.c,v 1.4 1996/09/15 09:31:51 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
u_int x;
{
register long int test;
- register int i, j;
+ register int i;
ldiv_t val;
if (rand_type == TYPE_0)
state[0] = x;
else {
- j = 1;
state[0] = x;
for (i = 1; i < rand_deg; i++) {
/*
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: system.c,v 1.2 1996/08/19 08:33:54 tholo Exp $";
+static char *rcsid = "$OpenBSD: system.c,v 1.3 1996/09/15 09:31:52 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
sig_t intsave, quitsave;
int omask;
int pstat;
- char *argp[] = {"sh", "-c", (char *) command, NULL};
+ char *argp[] = {"sh", "-c", NULL, NULL};
if (!command) /* just checking... */
return(1);
+ argp[2] = (char *)command;
+
omask = sigblock(sigmask(SIGCHLD));
switch(pid = vfork()) {
case -1: /* error */
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: __strerror.c,v 1.3 1996/08/19 08:33:55 tholo Exp $";
+static char *rcsid = "$OpenBSD: __strerror.c,v 1.4 1996/09/15 09:31:53 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef NLS
register unsigned int errnum;
#ifdef NLS
- nl_catd catd ;
+ nl_catd catd;
catd = catopen("libc", 0);
#endif
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.4 1996/08/19 08:34:31 tholo Exp $";
+static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.5 1996/09/15 09:31:54 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/syscall.h>
+#ifdef lint
+quad_t __syscall(quad_t, ...);
+#endif
+
/*
* This function provides 64-bit offset padding that
* is not supplied by GCC 1.X but is supplied by GCC 2.X.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mmap.c,v 1.4 1996/08/19 08:34:31 tholo Exp $";
+static char rcsid[] = "$OpenBSD: mmap.c,v 1.5 1996/09/15 09:31:55 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/syscall.h>
+#ifdef lint
+quad_t __syscall(quad_t, ...);
+#endif
+
/*
* This function provides 64-bit offset padding that
* is not supplied by GCC 1.X but is supplied by GCC 2.X.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: protolib.c,v 1.2 1996/08/19 08:34:32 tholo Exp $";
+static char rcsid[] = "$OpenBSD: protolib.c,v 1.3 1996/09/15 09:31:56 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/shm.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/timex.h>
#include <sys/wait.h>
#include <dirent.h>
#include <fcntl.h>
#include "protolib.h"
+struct blockinfo;
+
/*
* Don't include anything after protolib.h,
* both LINTLIBRARY and PROTOLIB1 are active.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: truncate.c,v 1.4 1996/08/19 08:34:33 tholo Exp $";
+static char rcsid[] = "$OpenBSD: truncate.c,v 1.5 1996/09/15 09:31:57 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/syscall.h>
+#ifdef lint
+quad_t __syscall(quad_t, ...);
+#endif
+
/*
* This function provides 64-bit offset padding that
* is not supplied by GCC 1.X but is supplied by GCC 2.X.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.2 1996/08/19 08:34:41 tholo Exp $";
+static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.3 1996/09/15 09:31:58 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
+/* ARGSUSED */
int
tcsendbreak(fd, len)
int fd, len;
-/* $OpenBSD: ypinternal.h,v 1.1 1996/04/24 12:56:29 deraadt Exp $ */
+/* $OpenBSD: ypinternal.h,v 1.2 1996/09/15 09:32:00 tholo Exp $ */
/*
* Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
#define BINDINGDIR "/var/yp/binding"
#define YPBINDLOCK "/var/run/ypbind.lock"
-#define YPMATCHCACHE
int (*ypresp_allfn) __P((u_long, char *, int, char *, int, void *));
void *ypresp_data;
extern int _yplib_timeout;
void _yp_unbind __P((struct dom_binding *));
+int _yp_check __P((char **));
#ifdef YPMATCHCACHE
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.4 1996/08/19 08:35:12 tholo Exp $";
+static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.5 1996/09/15 09:32:01 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
#include <rpcsvc/ypclnt.h>
+#define YPMATCHCACHE
#include "ypinternal.h"
int _yplib_cache = 5;