Subject: getlogin(2)+setlogin(2) arrive,usleep(3)+sleep(3) fixed (#391 - 2 of 3)
Index:	sys/init_systent.c,lib/libc/{gen,pdp},many many more 2.11BSD

Description:
	See #390 (part 1 of 3).

Repeat-By:
 	Refer to #390 (part 1 of 3).

Fix:
	This is #391, part 2 of 3.

	There are 3 parts (390, 391, 392) to this update kit.  Make sure you
	have all of them.

	Update	Part	Content
	------	----	-------
	390	1	Contains the description, MANIFEST,
			a shell script (/tmp/390.sh) to remove old files,
			and a shar file (/tmp/390.shar) of new files.

	391	2	This file. First (/tmp/391.patch) of two patch files.

	392	3	Second (/tmp/392.patch) of two patch files.

	As always this and previous updates to 2.11BSD are available via
	anonymous FTP to either FTP.IIPO.GTEGSC.COM or MOE.2BSD.COM in the
	directory /pub/2.11BSD.

---------------------------------cut here----------------------
*** /usr/include/syscall.h.old	Tue Sep  9 20:32:10 1997
--- /usr/include/syscall.h	Fri Sep 26 20:18:25 1997
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)syscall.h	5.4.6 (2.11BSD GTE) 1997/8/28
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)syscall.h	5.4.7 (2.11BSD GTE) 1997/9/26
   */
  
  /*
***************
*** 49,59 ****
  #define	SYS_sync	36
  #define	SYS_kill	37
  #define	SYS_stat	38
! 				/* 39 is old: setpgrp */
  #define	SYS_lstat	40
  #define	SYS_dup		41
  #define	SYS_pipe	42
! 				/* 43 is old: times */
  #define	SYS_profil	44
  				/* 45 is unused */
  				/* 46 is old: setgid */
--- 49,59 ----
  #define	SYS_sync	36
  #define	SYS_kill	37
  #define	SYS_stat	38
! #define	SYS__getlogin	39
  #define	SYS_lstat	40
  #define	SYS_dup		41
  #define	SYS_pipe	42
! #define	SYS_setlogin	43
  #define	SYS_profil	44
  				/* 45 is unused */
  				/* 46 is old: setgid */
*** /usr/include/unistd.h.old	Thu Jul 11 19:34:32 1996
--- /usr/include/unistd.h	Fri Oct  3 12:14:14 1997
***************
*** 30,36 ****
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
!  *	@(#)unistd.h	8.10.2 (2.11BSD) 1996/7/11
   */
  
  /*
--- 30,36 ----
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
!  *	@(#)unistd.h	8.10.3 (2.11BSD) 1997/10/3
   */
  
  /*
***************
*** 54,60 ****
  #endif
  
  void	 _exit();
! unsigned int	 access();
  unsigned int	 alarm();
  pid_t	 fork();
  gid_t	 getegid();
--- 54,60 ----
  #endif
  
  void	 _exit();
! int	 access();
  unsigned int	 alarm();
  pid_t	 fork();
  gid_t	 getegid();
*** /usr/src/sys/sys/syscalls.c.old	Fri Aug 29 09:58:44 1997
--- /usr/src/sys/sys/syscalls.c	Fri Sep 26 19:46:38 1997
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)syscalls.c	1.7 (2.11BSD GTE) 1997/8/29
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)syscalls.c	1.8 (2.11BSD GTE) 1997/9/26
   */
  
  /*
***************
*** 50,60 ****
  	"sync",			/*  36 = sync */
  	"kill",			/*  37 = kill */
  	"stat",			/*  38 = stat */
! 	"#39",			/*  39 = unused */
  	"lstat",		/*  40 = lstat */
  	"dup",			/*  41 = dup */
  	"pipe",			/*  42 = pipe */
! 	"#43",			/*  43 = unused */
  	"profil",		/*  44 = profil */
  	"#45",			/*  45 = unused */
  	"#46",			/*  46 = unused */
--- 50,60 ----
  	"sync",			/*  36 = sync */
  	"kill",			/*  37 = kill */
  	"stat",			/*  38 = stat */
! 	"getlogin",		/*  39 = getlogin */
  	"lstat",		/*  40 = lstat */
  	"dup",			/*  41 = dup */
  	"pipe",			/*  42 = pipe */
! 	"setlogin",		/*  43 = setlogin */
  	"profil",		/*  44 = profil */
  	"#45",			/*  45 = unused */
  	"#46",			/*  46 = unused */
*** /usr/src/sys/sys/init_main.c.old	Fri Aug 29 23:11:47 1997
--- /usr/src/sys/sys/init_main.c	Fri Sep 26 19:42:32 1997
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)init_main.c	2.4 (2.11BSD GTE) 1997/8/29
   */
  
  #include "param.h"
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)init_main.c	2.5 (2.11BSD GTE) 1997/9/26
   */
  
  #include "param.h"
***************
*** 84,89 ****
--- 84,90 ----
  	for (i = 0; i < sizeof(u.u_rlimit)/sizeof(u.u_rlimit[0]); i++)
  		u.u_rlimit[i].rlim_cur = u.u_rlimit[i].rlim_max = 
  		    RLIM_INFINITY;
+ 	bcopy("root", u.u_login, sizeof ("root"));
  
  	/* Initialize signal state for process 0 */
  	siginit(p);
*** /usr/src/sys/sys/kern_prot.c.old	Mon May  8 22:43:32 1995
--- /usr/src/sys/sys/kern_prot.c	Fri Sep 26 19:55:22 1997
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)kern_prot.c	1.2 (2.11BSD GTE) 1995/05/08
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)kern_prot.c	1.3 (2.11BSD GTE) 1997/09/26
   */
  
  /*
***************
*** 264,266 ****
--- 264,318 ----
  			return (1);
  	return (0);
  }
+ 
+ /*
+  * Get login name, if available.
+ */
+ int
+ getlogin()
+ 	{
+ 	register struct a
+ 		{
+ 		char *namebuf;
+ 		u_int namelen;
+ 		} *uap = (struct a *)u.u_ap;
+ 	register int error;
+ 
+ 	if	(uap->namelen > sizeof (u.u_login))
+ 		uap->namelen = sizeof (u.u_login);
+ 	error = copyout(u.u_login, uap->namebuf, uap->namelen);
+ 	return(u.u_error = error);
+ 	}
+ 
+ /*
+  * Set login name.
+  * It is not clear whether this should be allowed if the process
+  * is not the "session leader" (the 'login' process).  But since 2.11
+  * doesn't have sessions and it's almost impossible to know if a process
+  * is "login" or not we simply restrict this call to the super user.
+ */
+ 
+ int
+ setlogin()
+ 	{
+ 	register struct a
+ 		{
+ 		char *namebuf;
+ 		} *uap = (struct a *)u.u_ap;
+ 	register int error;
+ 	char	newname[MAXLOGNAME + 1];
+ 
+ 	if	(!suser())
+ 		return(u.u_error);	/* XXX - suser should be changed! */
+ /*
+  * copinstr() wants to copy a string including a nul but u_login is not
+  * necessarily nul-terminated.  Copy into a temp that is one character
+  * longer then copy into place if that fit.
+ */
+ 
+ 	bzero(newname, sizeof (newname));
+ 	error = copyinstr(uap->namebuf, newname, sizeof(newname), NULL);
+ 	if	(error == 0)
+ 		bcopy(newname, u.u_login, sizeof (u.u_login));
+ 	return(u.u_error = error);
+ 	}
*** /usr/src/sys/sys/init_sysent.c.old	Fri Aug 29 09:58:42 1997
--- /usr/src/sys/sys/init_sysent.c	Fri Sep 26 19:45:56 1997
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)init_sysent.c	1.10 (2.11BSD GTE) 1997/8/29
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)init_sysent.c	1.11 (2.11BSD GTE) 1997/9/26
   */
  
  /*
***************
*** 19,26 ****
  int	sethostid(),gethostid(),sethostname(),gethostname(),getpid();
  int	getppid(), fork(),rexit(),execv(),execve(),owait(),wait4();
  int	getuid(),setreuid(),getgid(),getgroups(),setregid(),setgroups();
! int	geteuid(), getegid();
! int	getpgrp(),setpgrp();
  int	ucall();					/* 2BSD calls */
  
  /* 1.2 memory management */
--- 19,26 ----
  int	sethostid(),gethostid(),sethostname(),gethostname(),getpid();
  int	getppid(), fork(),rexit(),execv(),execve(),owait(),wait4();
  int	getuid(),setreuid(),getgid(),getgroups(),setregid(),setgroups();
! int	geteuid(), getegid(), getlogin();
! int	getpgrp(),setpgrp(), setlogin();
  int	ucall();					/* 2BSD calls */
  
  /* 1.2 memory management */
***************
*** 146,156 ****
  	0, sync,			/*  36 = sync */
  	2, kill,			/*  37 = kill */
  	2, stat,			/*  38 = stat */
! 	0, nosys,			/*  39 = unused */
  	2, lstat,			/*  40 = lstat */
  	1, dup,				/*  41 = dup */
  	0, pipe,			/*  42 = pipe */
! 	0, nosys,			/*  43 = unused */
  	4, profil,			/*  44 = profil */
  	0, nosys,			/*  45 = nosys */
  	0, nosys,			/*  46 = unused */
--- 146,156 ----
  	0, sync,			/*  36 = sync */
  	2, kill,			/*  37 = kill */
  	2, stat,			/*  38 = stat */
! 	2, getlogin,			/*  39 = getlogin */
  	2, lstat,			/*  40 = lstat */
  	1, dup,				/*  41 = dup */
  	0, pipe,			/*  42 = pipe */
! 	1, setlogin,			/*  43 = setlogin */
  	4, profil,			/*  44 = profil */
  	0, nosys,			/*  45 = nosys */
  	0, nosys,			/*  46 = unused */
*** /usr/src/bin/adb/opset.c.old	Fri Aug 29 14:34:01 1997
--- /usr/src/bin/adb/opset.c	Fri Sep 26 20:39:58 1997
***************
*** 1,5 ****
  #if	!defined(lint) && defined(DOSCCS)
! static	char	sccsid[] = "@(#)opset.c 2.3 (2.11BSD GTE) 1997/8/28";
  #endif
  
  #include "defs.h"
--- 1,5 ----
  #if	!defined(lint) && defined(DOSCCS)
! static	char	sccsid[] = "@(#)opset.c 2.4 (2.11BSD GTE) 1997/9/26";
  #endif
  
  #include "defs.h"
***************
*** 171,181 ****
  	"sync",
  	"kill",
  	"stat",
! 	NULL,			/* 39 - unused */
  	"lstat",
  	"dup",
  	"pipe",
! 	NULL,			/* 43 - unused */
  	"profil",
  	NULL,			/* 45 - unused */
  	NULL,			/* 46 - unused */
--- 171,181 ----
  	"sync",
  	"kill",
  	"stat",
! 	"_getlogin",		/* 39 - _getlogin */
  	"lstat",
  	"dup",
  	"pipe",
! 	"setlogin",		/* 43 - unused */
  	"profil",
  	NULL,			/* 45 - unused */
  	NULL,			/* 46 - unused */
*** /usr/src/bin/login/login.c.old	Mon Jan 10 21:40:07 1994
--- /usr/src/bin/login/login.c	Fri Sep 26 22:00:35 1997
***************
*** 20,26 ****
  "@(#) Copyright (c) 1980, 1987, 1988 The Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)login.c	5.40.1 (2.11BSD GTE) 1/1/94";
  #endif
  
  /*
--- 20,26 ----
  "@(#) Copyright (c) 1980, 1987, 1988 The Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)login.c	5.40.2 (2.11BSD GTE) 1997/9/26";
  #endif
  
  /*
***************
*** 431,441 ****
  	strcpy(tbuf + 1, (p = rindex(pwd->pw_shell, '/')) ?
  	    p + 1 : pwd->pw_shell);
  
  	/* discard permissions last so can't get killed and drop core */
  	(void)setuid(pwd->pw_uid);
  
  	execlp(pwd->pw_shell, tbuf, 0);
! 	(void)fprintf(stderr, "login: no shell: %s.\n", strerror(errno));
  	exit(0);
  }
  
--- 431,444 ----
  	strcpy(tbuf + 1, (p = rindex(pwd->pw_shell, '/')) ?
  	    p + 1 : pwd->pw_shell);
  
+ 	if	(setlogin(pwd->pw_name) < 0)
+ 		fprintf(stderr, "login: setlogin(): %s\n", strerror(errno));
+ 
  	/* discard permissions last so can't get killed and drop core */
  	(void)setuid(pwd->pw_uid);
  
  	execlp(pwd->pw_shell, tbuf, 0);
! 	(void)fprintf(stderr, "login: no shell: %s\n", strerror(errno));
  	exit(0);
  }
  
*** /usr/src/bin/su.c.old	Thu Mar 30 09:27:10 1989
--- /usr/src/bin/su.c	Thu Oct  2 20:36:13 1997
***************
*** 4,23 ****
   * specifies the terms and conditions for redistribution.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif not lint
  
! #ifndef lint
! static char sccsid[] = "@(#)su.c	5.4 (Berkeley) 1/13/86";
! #endif not lint
  
  #include <stdio.h>
  #include <pwd.h>
  #include <grp.h>
  #include <syslog.h>
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/resource.h>
--- 4,23 ----
   * specifies the terms and conditions for redistribution.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)su.c	5.4.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include <stdio.h>
  #include <pwd.h>
  #include <grp.h>
  #include <syslog.h>
+ #include <stdlib.h>
+ #include <unistd.h>
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/resource.h>
***************
*** 34,43 ****
  
  extern char	**environ;
  struct	passwd *pwd;
- char	*crypt();
- char	*getpass();
- char	*getenv();
- char	*getlogin();
  
  main(argc,argv)
  	int argc;
--- 34,39 ----
*** /usr/src/bin/mail.c.old	Sat Jan 27 00:41:36 1996
--- /usr/src/bin/mail.c	Thu Oct  2 20:20:01 1997
***************
*** 1,5 ****
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)mail.c	4.33.3 (2.11BSD GTE) 1996/1/27";
  #endif
  
  #include <sys/param.h>
--- 1,5 ----
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)mail.c	4.33.4 (2.11BSD GTE) 1997/10/2";
  #endif
  
  #include <sys/param.h>
***************
*** 12,19 ****
--- 12,23 ----
  #include <utmp.h>
  #include <signal.h>
  #include <setjmp.h>
+ #include <string.h>
  #include <sysexits.h>
  #include <paths.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <unistd.h>
  
  	/* copylet flags */
  #define REMOTE		1		/* remote mail, add rmtmsg */
***************
*** 33,41 ****
  } let[MAXLET];
  int	nlet	= 0;
  char	lfil[50];
! long	iop, time();
! char	*getenv();
! char	*index();
  char	lettmp[] = "/tmp/maXXXXX";
  char	maildir[] = "/usr/spool/mail/";
  char	mailfile[] = "/usr/spool/mail/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
--- 37,43 ----
  } let[MAXLET];
  int	nlet	= 0;
  char	lfil[50];
! long	iop;
  char	lettmp[] = "/tmp/maXXXXX";
  char	maildir[] = "/usr/spool/mail/";
  char	mailfile[] = "/usr/spool/mail/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
***************
*** 44,57 ****
  FILE	*tmpf;
  FILE	*malf;
  char	my_name[60];
- char	*getlogin();
  int	error;
  int	changed;
  int	forward;
  char	from[] = "From ";
- long	ftell();
  int	delex();
- char	*ctime();
  int	flgf;
  int	flgp;
  int	delflg = 1;
--- 46,56 ----
***************
*** 95,101 ****
  
  setsig(i, f)
  int i;
! int (*f)();
  {
  	if (signal(i, SIG_IGN) != SIG_IGN)
  		signal(i, f);
--- 94,100 ----
  
  setsig(i, f)
  int i;
! sig_t f;
  {
  	if (signal(i, SIG_IGN) != SIG_IGN)
  		signal(i, f);
***************
*** 121,133 ****
  
  	setuid(getuid());
  	cat(mailfile, maildir, my_name);
- #ifdef notdef
- 	if (stat(mailfile, &statb) >= 0
- 	    && (statb.st_mode & S_IFMT) == S_IFDIR) {
- 		strcat(mailfile, "/");
- 		strcat(mailfile, my_name);
- 	}
- #endif
  	for (; argc > 1; argv++, argc--) {
  		if (argv[1][0] != '-')
  			break;
--- 120,125 ----
***************
*** 531,548 ****
  	register pid;
  	int sts;
  
- #ifdef notdef
- 	if (any('^', name)) {
- 		while (p = index(name, '^'))
- 			*p = '!';
- 		if (strncmp(name, "researc", 7)) {
- 			strcpy(rsys, "research");
- 			if (*name != '!')
- 				--name;
- 			goto skip;
- 		}
- 	}
- #endif
  	for (p=rsys; *name!='!'; *p++ = *name++)
  		if (*name=='\0')
  			return(0);	/* local address, no '!' */
--- 523,528 ----
***************
*** 617,625 ****
  	char file[256];
  	int mask, fd;
  	struct passwd *pw;
- #ifdef notdef
- 	struct stat statb;
- #endif
  	char buf[128];
  
  	if (*name=='!')
--- 597,602 ----
***************
*** 631,642 ****
  		return(0);
  	}
  	cat(file, maildir, name);
- #ifdef notdef
- 	if (stat(file, &statb) >= 0 && (statb.st_mode & S_IFMT) == S_IFDIR) {
- 		strcat(file, "/");
- 		strcat(file, name);
- 	}
- #endif
  	if (!safefile(file))
  		return(0);
  	fd = open(file, O_WRONLY | O_CREAT, MAILMODE);
--- 608,613 ----
***************
*** 659,667 ****
  
  delex(i)
  {
  	if (i != SIGINT) {
  		setsig(i, SIG_DFL);
! 		sigsetmask(sigblock(0L) &~ sigmask(i));
  	}
  	putc('\n', stderr);
  	if (delflg)
--- 630,642 ----
  
  delex(i)
  {
+ 	sigset_t sigt;
+ 
  	if (i != SIGINT) {
  		setsig(i, SIG_DFL);
! 		sigemptyset(&sigt);
! 		sigaddset(&sigt, i);
! 		sigprocmask(SIG_UNBLOCK, &sigt, NULL);
  	}
  	putc('\n', stderr);
  	if (delflg)
*** /usr/src/games/warp/intrp.c.old	Sat Jan 21 18:12:36 1995
--- /usr/src/games/warp/intrp.c	Thu Oct  2 20:41:07 1997
***************
*** 1,9 ****
! /* $Header: /usr/src/games/warp/RCS/intrp.c,v 1.3.1 95/1/21 22:40:37 games Exp $
   *
   * $Log:	intrp.c,v $
   * Revision 7.0.2  93/12/31  23:40:37  games
   * Removed shortnames.h for new version of 2.11BSD
! 
   * Revision 7.0.1.2a  87/07/03  00:56:37  games
   * Included shortnames.h for 2.10BSD
   * 
--- 1,9 ----
! /* $Header: /usr/src/games/warp/RCS/intrp.c,v 1.3.2 97/10/2 22:40:37 games Exp $
   *
   * $Log:	intrp.c,v $
   * Revision 7.0.2  93/12/31  23:40:37  games
   * Removed shortnames.h for new version of 2.11BSD
!  *
   * Revision 7.0.1.2a  87/07/03  00:56:37  games
   * Included shortnames.h for 2.10BSD
   * 
***************
*** 25,30 ****
--- 25,31 ----
  #include "term.h"
  #include "INTERN.h"
  #include "intrp.h"
+ #include <unistd.h>
  
  /* name of this host */
  #ifdef GETHOSTNAME
***************
*** 68,74 ****
  intrp_init(tcbuf)
  char *tcbuf;
  {
-     char *getlogin();
  
      /* get environmental stuff */
  
--- 69,74 ----
*** /usr/src/games/boggle/boggle.c.old	Sun Aug 30 13:02:56 1987
--- /usr/src/games/boggle/boggle.c	Thu Oct  2 20:56:50 1997
***************
*** 4,18 ****
   * specifies the terms and conditions for redistribution.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif not lint
  
! #ifndef lint
! static char sccsid[] = "@(#)boggle.c	5.1 (Berkeley) 5/30/85";
! #endif not lint
  
  #include <ctype.h>
  #include <errno.h>
--- 4,16 ----
   * specifies the terms and conditions for redistribution.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)boggle.c	5.1.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include <ctype.h>
  #include <errno.h>
***************
*** 20,25 ****
--- 18,25 ----
  #include <sgtty.h>
  #include <signal.h>
  #include <stdio.h>
+ #include <time.h>
+ #include <unistd.h>
  
  /* basic parameters */
  #define N 4
***************
*** 50,56 ****
  int *timept;
  int timeint[] = {60,60,50,7,1,1,1,0};
  long timein;
- extern long int time();
  struct sgttyb origttyb, tempttyb;
  int ctlecho = 0;
  int lctlech = LCTLECH;
--- 50,55 ----
***************
*** 61,68 ****
  int logfile = -1;
  long logloc;
  char logbuff[100] = {"inst\t"};
- extern char *ctime(), *getlogin();
- extern long lseek();
  
  /* dictionary interface */
  char defname[] = "/usr/games/lib/bogdict";
--- 60,65 ----
*** /usr/src/games/hack/hack.main.c.old	Sun Dec 15 17:52:52 1985
--- /usr/src/games/hack/hack.main.c	Thu Oct  2 21:04:11 1997
***************
*** 1,8 ****
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
! /* hack.main.c - version 1.0.3 */
  
  #include <stdio.h>
  #include <signal.h>
  #include "hack.h"
  
  #ifdef QUEST
--- 1,10 ----
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
! /* hack.main.c - version 1.0.4 */
  
  #include <stdio.h>
  #include <signal.h>
+ #include <stdlib.h>
+ #include <unistd.h>
  #include "hack.h"
  
  #ifdef QUEST
***************
*** 11,17 ****
  #define	gamename	"hack"
  #endif QUEST
  
- extern char *getlogin(), *getenv();
  extern char plname[PL_NSIZ], pl_character[PL_CSIZ];
  
  int (*afternmv)();
--- 13,18 ----
*** /usr/src/games/hack/hack.mklev.c.old	Fri Oct  4 11:19:05 1985
--- /usr/src/games/hack/hack.mklev.c	Thu Oct  2 21:05:40 1997
***************
*** 1,9 ****
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
! /* hack.mklev.c - version 1.0.3 */
  
  #include "hack.h"
  
- extern char *getlogin(), *getenv();
  extern struct monst *makemon();
  extern struct obj *mkobj_at();
  extern struct trap *maketrap();
--- 1,8 ----
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
! /* hack.mklev.c - version 1.0.4 */
  
  #include "hack.h"
  
  extern struct monst *makemon();
  extern struct obj *mkobj_at();
  extern struct trap *maketrap();
*** /usr/src/games/hack/hack.pager.c.old	Mon Sep 30 16:12:26 1985
--- /usr/src/games/hack/hack.pager.c	Thu Oct  2 22:30:30 1997
***************
*** 1,5 ****
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
! /* hack.pager.c - version 1.0.3 */
  
  /* This file contains the command routine dowhatis() and a pager. */
  /* Also readmail() and doshell(), and generally the things that
--- 1,5 ----
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
! /* hack.pager.c - version 1.0.4 */
  
  /* This file contains the command routine dowhatis() and a pager. */
  /* Also readmail() and doshell(), and generally the things that
***************
*** 7,17 ****
  
  #include	<stdio.h>
  #include	<signal.h>
  #include "hack.h"
  extern int CO, LI;	/* usually COLNO and ROWNO+2 */
  extern char *CD;
  extern char quitchars[];
- extern char *getenv(), *getlogin();
  int done1();
  
  dowhatis()
--- 7,17 ----
  
  #include	<stdio.h>
  #include	<signal.h>
+ #include	<stdlib.h>
  #include "hack.h"
  extern int CO, LI;	/* usually COLNO and ROWNO+2 */
  extern char *CD;
  extern char quitchars[];
  int done1();
  
  dowhatis()
*** /usr/src/lib/libc/net/rexec.c.old	Sat May 21 22:29:20 1988
--- /usr/src/lib/libc/net/rexec.c	Thu Oct  2 21:34:58 1997
***************
*** 5,11 ****
   */
  
  #if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)rexec.c	5.2 (Berkeley) 3/9/86";
  #endif LIBC_SCCS and not lint
  
  #include <sys/types.h>
--- 5,11 ----
   */
  
  #if defined(LIBC_SCCS) && !defined(lint)
! static char sccsid[] = "@(#)rexec.c	5.2.1 (2.11BSD) 1997/10/2";
  #endif LIBC_SCCS and not lint
  
  #include <sys/types.h>
***************
*** 17,26 ****
  #include <netdb.h>
  #include <errno.h>
  
- extern	errno;
- char	*index(), *sprintf();
  int	rexecoptions;
- char	*getpass(), *getlogin();
  
  rexec(ahost, rport, name, pass, cmd, fd2p)
  	char **ahost;
--- 17,23 ----
*** /usr/src/lib/libc/pdp/sys/Makefile.old	Tue Sep  9 19:47:00 1997
--- /usr/src/lib/libc/pdp/sys/Makefile	Fri Sep 26 20:22:43 1997
***************
*** 1,6 ****
  # Placed in the public domain - 1995/05/06
  #
! #	@(#)Makefile	1.3 (2.11BSD) 1997/9/9
  
  CPP= /lib/cpp
  LD= /bin/ld
--- 1,6 ----
  # Placed in the public domain - 1995/05/06
  #
! #	@(#)Makefile	1.4 (2.11BSD) 1997/9/26
  
  CPP= /lib/cpp
  LD= /bin/ld
***************
*** 11,20 ****
  # source files associated with them.
  
  PDPSRCS= _exit.s brk.s execl.s execle.s execv.s fork.s pipe.s ptrace.s sbrk.s \
! 	sigaction.s sigreturn.s vfork.s
  
  PDPOBJS= _exit.o brk.o execl.o execle.o execv.o fork.o pipe.o ptrace.o sbrk.o \
! 	sigaction.o sigreturn.o vfork.o
  
  # these are generated with a second argument to SYSCALL of 'norm'.  Have to
  # split into more than one list because 'make' only permits 80 "lefts".
--- 11,20 ----
  # source files associated with them.
  
  PDPSRCS= _exit.s brk.s execl.s execle.s execv.s fork.s pipe.s ptrace.s sbrk.s \
! 	setlogin.s sigaction.s sigreturn.s vfork.s
  
  PDPOBJS= _exit.o brk.o execl.o execle.o execv.o fork.o pipe.o ptrace.o sbrk.o \
! 	setlogin.o sigaction.o sigreturn.o vfork.o
  
  # these are generated with a second argument to SYSCALL of 'norm'.  Have to
  # split into more than one list because 'make' only permits 80 "lefts".
***************
*** 23,29 ****
  	chmod.o chown.o chroot.o close.o connect.o dup.o dup2.o \
  	execve.o fchdir.o fchflags.o fchmod.o fchown.o fcntl.o flock.o fstat.o \
  	fsync.o ftruncate.o getdtablesize.o getgroups.o getitimer.o \
! 	gethostname.o getsockname.o sethostname.o \
  	getpeername.o getpriority.o getrlimit.o getrusage.o getsockopt.o \
  	gettimeofday.o ioctl.o kill.o killpg.o link.o listen.o lstat.o mkdir.o
  
--- 23,29 ----
  	chmod.o chown.o chroot.o close.o connect.o dup.o dup2.o \
  	execve.o fchdir.o fchflags.o fchmod.o fchown.o fcntl.o flock.o fstat.o \
  	fsync.o ftruncate.o getdtablesize.o getgroups.o getitimer.o \
! 	_getlogin.o gethostname.o getsockname.o sethostname.o \
  	getpeername.o getpriority.o getrlimit.o getrusage.o getsockopt.o \
  	gettimeofday.o ioctl.o kill.o killpg.o link.o listen.o lstat.o mkdir.o
  
*** /usr/src/man/man2/Makefile.old	Wed Sep  3 20:47:00 1997
--- /usr/src/man/man2/Makefile	Fri Sep 26 22:52:26 1997
***************
*** 14,20 ****
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	2.7 (2.11BSD GTE) 1997/9/3
  #
  MDIR=	/usr/man/cat2
  SRCS=	accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chmod.2 \
--- 14,20 ----
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	2.8 (2.11BSD GTE) 1997/9/26
  #
  MDIR=	/usr/man/cat2
  SRCS=	accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chmod.2 \
***************
*** 24,30 ****
  	getgid.2 getgroups.2 gethostid.2 gethostname.2 getitimer.2 \
  	getpagesize.2 getpeername.2 getpgrp.2 getpid.2 getpriority.2 \
  	getrlimit.2 getrusage.2 getsockname.2 getsockopt.2 gettimeofday.2 \
! 	getfsstat.2 \
  	getuid.2 intro.2 ioctl.2 kill.2 killpg.2 link.2 listen.2 \
  	lock.2 lseek.2 mkdir.2 mknod.2 mount.2 nostk.2 open.2 phys.2 \
  	pipe.2 profil.2 ptrace.2 quota.2 read.2 readlink.2 reboot.2 \
--- 24,30 ----
  	getgid.2 getgroups.2 gethostid.2 gethostname.2 getitimer.2 \
  	getpagesize.2 getpeername.2 getpgrp.2 getpid.2 getpriority.2 \
  	getrlimit.2 getrusage.2 getsockname.2 getsockopt.2 gettimeofday.2 \
! 	getfsstat.2 getlogin.2 \
  	getuid.2 intro.2 ioctl.2 kill.2 killpg.2 link.2 listen.2 \
  	lock.2 lseek.2 mkdir.2 mknod.2 mount.2 nostk.2 open.2 phys.2 \
  	pipe.2 profil.2 ptrace.2 quota.2 read.2 readlink.2 reboot.2 \
***************
*** 41,47 ****
  	getgid.0 getgroups.0 gethostid.0 gethostname.0 getitimer.0 \
  	getpagesize.0 getpeername.0 getpgrp.0 getpid.0 getpriority.0 \
  	getrlimit.0 getrusage.0 getsockname.0 getsockopt.0 gettimeofday.0 \
! 	getfsstat.0 \
  	getuid.0 intro.0 ioctl.0 kill.0 killpg.0 link.0 listen.0 \
  	lock.0 lseek.0 mkdir.0 mknod.0 mount.0 nostk.0 open.0 phys.0 \
  	pipe.0 profil.0 ptrace.0 quota.0 read.0 readlink.0 reboot.0 \
--- 41,47 ----
  	getgid.0 getgroups.0 gethostid.0 gethostname.0 getitimer.0 \
  	getpagesize.0 getpeername.0 getpgrp.0 getpid.0 getpriority.0 \
  	getrlimit.0 getrusage.0 getsockname.0 getsockopt.0 gettimeofday.0 \
! 	getfsstat.0 getlogin.0 \
  	getuid.0 intro.0 ioctl.0 kill.0 killpg.0 link.0 listen.0 \
  	lock.0 lseek.0 mkdir.0 mknod.0 mount.0 nostk.0 open.0 phys.0 \
  	pipe.0 profil.0 ptrace.0 quota.0 read.0 readlink.0 reboot.0 \
***************
*** 126,130 ****
--- 126,132 ----
  	ln ${DESTDIR}${MDIR}/getpriority.0 ${DESTDIR}${MDIR}/setpriority.0
  	rm -f ${DESTDIR}${MDIR}/settimeofday.0
  	ln ${DESTDIR}${MDIR}/gettimeofday.0 ${DESTDIR}${MDIR}/settimeofday.0
+ 	rm -f ${DESTDIR}${MDIR}/setlogin.0
+ 	ln ${DESTDIR}${MDIR}/getlogin.0 ${DESTDIR}${MDIR}/setlogin.0
  
  FRC:
*** /usr/src/man/man3/Makefile.old	Sun Sep  7 18:09:27 1997
--- /usr/src/man/man3/Makefile	Fri Oct  3 17:09:55 1997
***************
*** 14,20 ****
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.4.13 (2.11BSD) 1997/9/3
  #
  MDIR=	/usr/man/cat3
  SRCS1=	abort.3 abs.3 alarm.3 asinh.3 assert.3 atof.3 bstring.3 byteorder.3 \
--- 14,20 ----
  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  #
! #	@(#)Makefile	5.4.14 (2.11BSD) 1997/10/3
  #
  MDIR=	/usr/man/cat3
  SRCS1=	abort.3 abs.3 alarm.3 asinh.3 assert.3 atof.3 bstring.3 byteorder.3 \
***************
*** 22,28 ****
  	devname.3 directory.3 ecvt.3 end.3 erf.3 err.3 execl.3 exit.3 \
  	exp.3 fclose.3 ferror.3 floor.3 \
  	fopen.3 fread.3 frexp.3 fseek.3 getc.3 getdisk.3 getenv.3 getfsent.3 \
! 	getgrent.3 gethostbyname.3 getlogin.3 getnetent.3 getopt.3 getpass.3 \
  	getgrouplist.3 getloadavg.3 getmntinfo.3 getsubopt.3 \
  	getprotoent.3 getpwent.3 gets.3 getservent.3 getttyent.3 \
  	getusershell.3 getwd.3 hypot.3 ieee.3 inet.3 infnan.3 initgroups.3 
--- 22,28 ----
  	devname.3 directory.3 ecvt.3 end.3 erf.3 err.3 execl.3 exit.3 \
  	exp.3 fclose.3 ferror.3 floor.3 \
  	fopen.3 fread.3 frexp.3 fseek.3 getc.3 getdisk.3 getenv.3 getfsent.3 \
! 	getgrent.3 gethostbyname.3 getnetent.3 getopt.3 getpass.3 \
  	getgrouplist.3 getloadavg.3 getmntinfo.3 getsubopt.3 \
  	getprotoent.3 getpwent.3 gets.3 getservent.3 getttyent.3 \
  	getusershell.3 getwd.3 hypot.3 ieee.3 inet.3 infnan.3 initgroups.3 
***************
*** 37,49 ****
  	swab.3 sysctl.3 syslog.3 \
  	system.3 termcap.3 time.3 times.3 ttyname.3 ualarm.3 uname.3 ungetc.3 \
  	syserrlst.3 \
! 	usleep.3 utime.3 valloc.3 varargs.3
  OBJS1=	abort.0 abs.0 alarm.0 asinh.0 assert.0 atof.0 bstring.0 byteorder.0 \
  	compat-sys5.0 crypt.0 ctime.0 ctype.0 curses.0 dbm.0 daemon.0 \
  	devname.0 directory.0 ecvt.0 end.0 erf.0 err.0 execl.0 exit.0 \
  	exp.0 fclose.0 ferror.0 floor.0 \
  	fopen.0 fread.0 frexp.0 fseek.0 getc.0 getdisk.0 getenv.0 getfsent.0 \
! 	getgrent.0 gethostbyname.0 getlogin.0 getnetent.0 getopt.0 getpass.0 \
  	getprotoent.0 getpwent.0 gets.0 getservent.0 getttyent.0 \
  	getgrouplist.0 getloadavg.0 getmntinfo.0 getsubopt.0 \
  	getusershell.0 getwd.0 hypot.0 ieee.0 inet.0 infnan.0 initgroups.0 
--- 37,49 ----
  	swab.3 sysctl.3 syslog.3 \
  	system.3 termcap.3 time.3 times.3 ttyname.3 ualarm.3 uname.3 ungetc.3 \
  	syserrlst.3 \
! 	utime.3 valloc.3 varargs.3
  OBJS1=	abort.0 abs.0 alarm.0 asinh.0 assert.0 atof.0 bstring.0 byteorder.0 \
  	compat-sys5.0 crypt.0 ctime.0 ctype.0 curses.0 dbm.0 daemon.0 \
  	devname.0 directory.0 ecvt.0 end.0 erf.0 err.0 execl.0 exit.0 \
  	exp.0 fclose.0 ferror.0 floor.0 \
  	fopen.0 fread.0 frexp.0 fseek.0 getc.0 getdisk.0 getenv.0 getfsent.0 \
! 	getgrent.0 gethostbyname.0 getnetent.0 getopt.0 getpass.0 \
  	getprotoent.0 getpwent.0 gets.0 getservent.0 getttyent.0 \
  	getgrouplist.0 getloadavg.0 getmntinfo.0 getsubopt.0 \
  	getusershell.0 getwd.0 hypot.0 ieee.0 inet.0 infnan.0 initgroups.0 
***************
*** 58,64 ****
  	swab.0 sysctl.0 syslog.0 \
  	system.0 termcap.0 time.0 times.0 ttyname.0 ualarm.0 uname.0 ungetc.0 \
  	syserrlst.0 \
! 	usleep.0 utime.0 valloc.0 varargs.0
  REMO1=	edata.0 etext.0 j1.0 jn.0 ns_addr.0 ns_ntoa.0 y0.0 y1.0 yn.0 acos.0 \
  	asin.0 atan.0 atan2.0 atoi.0 atol.0 cos.0 dbm_clearerr.0 dbm_close.0 \
  	dbm_delete.0 dbm_error.0 dbm_fetch.0 dbm_firstkey.0 dbm_nextkey.0 \
--- 58,64 ----
  	swab.0 sysctl.0 syslog.0 \
  	system.0 termcap.0 time.0 times.0 ttyname.0 ualarm.0 uname.0 ungetc.0 \
  	syserrlst.0 \
! 	utime.0 valloc.0 varargs.0
  REMO1=	edata.0 etext.0 j1.0 jn.0 ns_addr.0 ns_ntoa.0 y0.0 y1.0 yn.0 acos.0 \
  	asin.0 atan.0 atan2.0 atoi.0 atol.0 cos.0 dbm_clearerr.0 dbm_close.0 \
  	dbm_delete.0 dbm_error.0 dbm_fetch.0 dbm_firstkey.0 dbm_nextkey.0 \
***************
*** 99,105 ****
  	setprotoent.0 setusershell.0 endhostent.0 gethostbyaddr.0 gethostent.0 \
  	sethostent.0 sethostfile.0 memccpy.0 memchr.0 memcmp.0 memcpy.0 \
  	memset.0 strchr.0 strrchr.0 tmpnam.0 tmpfile.0 \
! 	tempnam.0 getmode.0
  
  REMO4=	verr.0 errx.0 verrx.0 warn.0 warnx.0 vwarnx.0 
  
--- 99,105 ----
  	setprotoent.0 setusershell.0 endhostent.0 gethostbyaddr.0 gethostent.0 \
  	sethostent.0 sethostfile.0 memccpy.0 memchr.0 memcmp.0 memcpy.0 \
  	memset.0 strchr.0 strrchr.0 tmpnam.0 tmpfile.0 \
! 	tempnam.0 getmode.0 usleep.0 setenv.0 unsetenv.0
  
  REMO4=	verr.0 errx.0 verrx.0 warn.0 warnx.0 vwarnx.0 
  
***************
*** 392,396 ****
--- 392,399 ----
  	ln ${DESTDIR}${MDIR}/compat-sys5.0 ${DESTDIR}${MDIR}/tmpnam.0
  	ln ${DESTDIR}${MDIR}/compat-sys5.0 ${DESTDIR}${MDIR}/tmpfile.0
  	ln ${DESTDIR}${MDIR}/compat-sys5.0 ${DESTDIR}${MDIR}/tempnam.0
+ 	ln ${DESTDIR}${MDIR}/sleep.0 ${DESTDIR}${MDIR}/usleep.0
+ 	ln ${DESTDIR}${MDIR}/getenv.0 ${DESTDIR}${MDIR}/setenv.0
+ 	ln ${DESTDIR}${MDIR}/getenv.0 ${DESTDIR}${MDIR}/unsetenv.0
  
  FRC:
*** /usr/src/new/rcs/src/rcsutil.c.old	Thu Feb 18 12:07:26 1988
--- /usr/src/new/rcs/src/rcsutil.c	Thu Oct  2 21:53:29 1997
***************
*** 1,8 ****
  /*
   *                     RCS utilities
   */
! #ifndef lint
! static char rcsid[]= "$Id: rcsutil.c,v 4.3 87/10/18 10:40:22 narten Exp $ Purdue CS";
  #endif
  /*****************************************************************************
   *****************************************************************************
--- 1,8 ----
  /*
   *                     RCS utilities
   */
! #if	!defined(lint) && defined(DOSCCS)
! static char rcsid[]= "$Id: rcsutil.c,v 4.3.1 97/10/2 10:40:22 sms Exp $";
  #endif
  /*****************************************************************************
   *****************************************************************************
***************
*** 21,26 ****
--- 21,29 ----
  
  
  /* $Log:	rcsutil.c,v $
+  * Revision 4.3.1 97/10/2 sms
+  * Use unistd.h instead of declaring system functions locally
+  *
   * Revision 4.3  87/10/18  10:40:22  narten
   * Updating version numbers. Changes relative to 1.1 actually
   * relative to 4.1
***************
*** 79,95 ****
  #include <signal.h>
  #include "rcsbase.h"
  #include <pwd.h>
  
  extern char * malloc();
  extern char * bindex();
  extern FILE * finptr;
  extern char * RCSfilename;
- extern char * getlogin();
- extern struct passwd *getpwuid();
  
! int    (*oldSIGINT)();         /* saves the original value for SIGINT */
! 
! 
  
  char * getcaller()
  /* Function: gets the callers login from his uid.
--- 82,95 ----
  #include <signal.h>
  #include "rcsbase.h"
  #include <pwd.h>
+ #include <unistd.h>
  
  extern char * malloc();
  extern char * bindex();
  extern FILE * finptr;
  extern char * RCSfilename;
  
! sig_t    oldSIGINT;         /* saves the original value for SIGINT */
  
  char * getcaller()
  /* Function: gets the callers login from his uid.
*** /usr/src/ucb/error/errorfilter.c.old	Mon Feb 16 22:07:41 1987
--- /usr/src/ucb/error/errorfilter.c	Thu Oct  2 22:25:59 1997
***************
*** 4,16 ****
   * specifies the terms and conditions for redistribution.
   */
  
! #ifndef lint
! static char sccsid[] = "@(#)errorfilter.c	5.1 (Berkeley) 5/31/85";
! #endif not lint
  
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>
  #include "error.h"
  
  char	*lint_libs[] = {
--- 4,17 ----
   * specifies the terms and conditions for redistribution.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)errorfilter.c	5.1.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>
+ #include <unistd.h>
  #include "error.h"
  
  char	*lint_libs[] = {
***************
*** 39,45 ****
  
  	nignored = 0;
  	if (auxname == 0){	/* use the default */
! 		if ( (username = (char *)getlogin()) == NULL){
  			username = "Unknown";
  			uid = getuid();
  			if ( (passwdentry = (struct passwd *)getpwuid(uid)) == NULL){
--- 40,46 ----
  
  	nignored = 0;
  	if (auxname == 0){	/* use the default */
! 		if ( (username = getlogin()) == NULL){
  			username = "Unknown";
  			uid = getuid();
  			if ( (passwdentry = (struct passwd *)getpwuid(uid)) == NULL){
*** /usr/src/ucb/ftp/ftp.c.old	Fri Sep 14 22:25:08 1990
--- /usr/src/ucb/ftp/ftp.c	Thu Oct  2 22:34:54 1997
***************
*** 15,23 ****
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)ftp.c	5.28 (Berkeley) 4/20/89";
! #endif /* not lint */
  
  #include <sys/param.h>
  #include <sys/stat.h>
--- 15,23 ----
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)ftp.c	5.28.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include <sys/param.h>
  #include <sys/stat.h>
***************
*** 37,42 ****
--- 37,43 ----
  #include <netdb.h>
  #include <fcntl.h>
  #include <pwd.h>
+ #include <unistd.h>
  #include <varargs.h>
  
  #include "ftp_var.h"
***************
*** 198,204 ****
  	char *host;
  {
  	char tmp[80];
! 	char *user, *pass, *acct, *getlogin(), *getpass();
  	int n, aflag = 0;
  
  	user = pass = acct = 0;
--- 199,205 ----
  	char *host;
  {
  	char tmp[80];
! 	char *user, *pass, *acct;
  	int n, aflag = 0;
  
  	user = pass = acct = 0;
*** /usr/src/ucb/ftp/main.c.old	Sun Jun 25 22:08:56 1989
--- /usr/src/ucb/ftp/main.c	Thu Oct  2 22:36:38 1997
***************
*** 15,29 ****
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && !defined(pdp11)
  char copyright[] =
  "@(#) Copyright (c) 1985, 1989 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif /* not lint */
  
! #if	!defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)main.c	based on 5.13 (Berkeley) 3/14/89";
! #endif /* not lint */
  
  /*
   * FTP User Program -- Command Interface.
--- 15,27 ----
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1985, 1989 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)main.c	based on 5.13.1 (2.11BSD) 1997/10/2";
! #endif
  
  /*
   * FTP User Program -- Command Interface.
***************
*** 41,57 ****
  #include <ctype.h>
  #include <netdb.h>
  #include <pwd.h>
  
- 
- #if defined(sun) && !defined(FD_SET)
- typedef int uid_t;
- #endif
- 
- uid_t	getuid();
  int	intr();
  int	lostpeer();
  extern	char *home;
- char	*getlogin();
  
  main(argc, argv)
  	char *argv[];
--- 39,50 ----
  #include <ctype.h>
  #include <netdb.h>
  #include <pwd.h>
+ #include <stdlib.h>
+ #include <unistd.h>
  
  int	intr();
  int	lostpeer();
  extern	char *home;
  
  main(argc, argv)
  	char *argv[];
*** /usr/src/ucb/ftp/cmds.c.old	Sun Jun 25 22:05:21 1989
--- /usr/src/ucb/ftp/cmds.c	Thu Oct  2 22:43:44 1997
***************
*** 15,23 ****
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)cmds.c	5.18 (Berkeley) 4/20/89";
! #endif /* not lint */
  
  /*
   * FTP User Program -- Command Routines.
--- 15,23 ----
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)cmds.c	5.18.1 (2.11BSD) 1997/10/2";
! #endif
  
  /*
   * FTP User Program -- Command Routines.
***************
*** 35,40 ****
--- 35,43 ----
  #include <netdb.h>
  #include <ctype.h>
  #include <time.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
  #include <netinet/in.h>
  
  #include "ftp_var.h"
***************
*** 44,52 ****
  extern	char **glob();
  extern	char *home;
  extern	char *remglob();
- extern	char *getenv();
- extern	char *index();
- extern	char *rindex();
  extern	int allbinary;
  extern off_t restart_point;
  extern char reply_string[];
--- 47,52 ----
***************
*** 1274,1280 ****
  	int argc;
  	char **argv;
  {
! 	char acct[80], *getpass();
  	int n, aflag = 0;
  
  	if (argc < 2) {
--- 1274,1280 ----
  	int argc;
  	char **argv;
  {
! 	char acct[80];
  	int n, aflag = 0;
  
  	if (argc < 2) {
***************
*** 1610,1616 ****
  	int argc;
  	char **argv;
  {
! 	char acct[50], *getpass(), *ap;
  
  	if (argc > 1) {
  		++argv;
--- 1610,1616 ----
  	int argc;
  	char **argv;
  {
! 	char acct[50], *ap;
  
  	if (argc > 1) {
  		++argv;
*** /usr/src/ucb/ftp/ruserpass.c.old	Mon Jan 10 22:15:32 1994
--- /usr/src/ucb/ftp/ruserpass.c	Thu Oct  2 22:57:32 1997
***************
*** 16,22 ****
   */
  
  #if	defined(DOSCCS) && !defined(lint)
! static char sccsid[] = "@(#)ruserpass.c	5.1.1 (2.11BSD) 12/31/93";
  #endif
  
  #include <sys/types.h>
--- 16,22 ----
   */
  
  #if	defined(DOSCCS) && !defined(lint)
! static char sccsid[] = "@(#)ruserpass.c	5.1.2 (2.11BSD) 1997/10/2";
  #endif
  
  #include <sys/types.h>
***************
*** 25,34 ****
  #include <ctype.h>
  #include <sys/stat.h>
  #include <errno.h>
  #include "ftp_var.h"
  
! char	*renvlook(), *malloc(), *index(), *getenv(), *getpass(), *getlogin();
! char	*strcpy();
  struct	utmp *getutmp();
  static	FILE *cfile;
  
--- 25,36 ----
  #include <ctype.h>
  #include <sys/stat.h>
  #include <errno.h>
+ #include <string.h>
+ #include <unistd.h>
  #include "ftp_var.h"
  
! char	*renvlook();
! #include <stdlib.h>
  struct	utmp *getutmp();
  static	FILE *cfile;
  
***************
*** 121,127 ****
  		case LOGIN:
  			if (token())
  				if (*aname == 0) { 
! 					*aname = malloc((unsigned) strlen(tokval) + 1);
  					(void) strcpy(*aname, tokval);
  				} else {
  					if (strcmp(*aname, tokval))
--- 123,129 ----
  		case LOGIN:
  			if (token())
  				if (*aname == 0) { 
! 					*aname = (char *)malloc((unsigned) strlen(tokval) + 1);
  					(void) strcpy(*aname, tokval);
  				} else {
  					if (strcmp(*aname, tokval))
***************
*** 137,143 ****
  				goto bad;
  			}
  			if (token() && *apass == 0) {
! 				*apass = malloc((unsigned) strlen(tokval) + 1);
  				(void) strcpy(*apass, tokval);
  			}
  			break;
--- 139,145 ----
  				goto bad;
  			}
  			if (token() && *apass == 0) {
! 				*apass = (char *)malloc((unsigned) strlen(tokval) + 1);
  				(void) strcpy(*apass, tokval);
  			}
  			break;
***************
*** 149,155 ****
  				goto bad;
  			}
  			if (token() && *aacct == 0) {
! 				*aacct = malloc((unsigned) strlen(tokval) + 1);
  				(void) strcpy(*aacct, tokval);
  			}
  			break;
--- 151,157 ----
  				goto bad;
  			}
  			if (token() && *aacct == 0) {
! 				*aacct = (char *)malloc((unsigned) strlen(tokval) + 1);
  				(void) strcpy(*aacct, tokval);
  			}
  			break;
*** /usr/src/ucb/talk/get_names.c.old	Mon Dec 26 15:53:15 1988
--- /usr/src/ucb/talk/get_names.c	Thu Oct  2 23:08:37 1997
***************
*** 4,21 ****
   * specifies the terms and conditions for redistribution.
   */
  
! #ifndef lint
! static char sccsid[] = "@(#)get_names.c	5.2 (Berkeley) 3/13/86";
! #endif not lint
  
  #include "talk.h"
  #include <sys/param.h>
  #include <protocols/talkd.h>
  #include <netinet/in.h>
  
- char	*getlogin();
- char	*ttyname();
- char	*rindex();
  static	any();
  extern	CTL_MSG msg;
  
--- 4,20 ----
   * specifies the terms and conditions for redistribution.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)get_names.c	5.2.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include "talk.h"
  #include <sys/param.h>
  #include <protocols/talkd.h>
  #include <netinet/in.h>
+ #include <string.h>
+ #include <unistd.h>
  
  static	any();
  extern	CTL_MSG msg;
  
*** /usr/src/ucb/logger.c.old	Mon Feb 16 22:11:06 1987
--- /usr/src/ucb/logger.c	Thu Oct  2 22:54:00 1997
***************
*** 4,21 ****
   * specifies the terms and conditions for redistribution.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1983 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif not lint
  
! #ifndef lint
! static char sccsid[] = "@(#)logger.c	6.2 (Berkeley) 9/19/85";
! #endif not lint
  
  #include <stdio.h>
  #include <syslog.h>
  #include <ctype.h>
  
  /*
--- 4,20 ----
   * specifies the terms and conditions for redistribution.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1983 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)logger.c	6.2.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include <stdio.h>
  #include <syslog.h>
+ #include <unistd.h>
  #include <ctype.h>
  
  /*
***************
*** 34,40 ****
  	register char *p;
  	int pri = LOG_NOTICE;
  	int logflags = 0;
- 	extern char *getlogin();
  
  	/* initialize */
  	tag = getlogin();
--- 33,38 ----
*** /usr/src/ucb/sccs.c.old	Sun Nov 20 18:52:02 1994
--- /usr/src/ucb/sccs.c	Thu Oct  2 23:00:19 1997
***************
*** 9,25 ****
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)sccs.c	5.1.1 (2.11BSD GTE) 11/20/94";
  #endif
  
! # include <stdio.h>
! # include <sys/param.h>
! # include <sys/stat.h>
! # include <sys/dir.h>
! # include <errno.h>
! # include <signal.h>
! # include <sysexits.h>
! # include <pwd.h>
  
  /*
  **  SCCS.C -- human-oriented front end to the SCCS system.
--- 9,26 ----
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)sccs.c	5.1.2 (2.11BSD GTE) 1997/10/2";
  #endif
  
! #include <stdio.h>
! #include <sys/param.h>
! #include <sys/stat.h>
! #include <sys/dir.h>
! #include <errno.h>
! #include <signal.h>
! #include <sysexits.h>
! #include <unistd.h>
! #include <pwd.h>
  
  /*
  **  SCCS.C -- human-oriented front end to the SCCS system.
***************
*** 1505,1512 ****
  	}
  	return (pw->pw_name);
  # else
- 	extern char *getlogin();
- 	extern char *getenv();
  	register char *p;
  
  	p = getenv("USER");
--- 1506,1511 ----
*** /usr/src/ucb/from.c.old	Mon Feb 16 22:11:14 1987
--- /usr/src/ucb/from.c	Thu Oct  2 23:04:31 1997
***************
*** 4,25 ****
   * specifies the terms and conditions for redistribution.
   */
  
! #ifndef lint
  char copyright[] =
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
- #endif not lint
  
! #ifndef lint
! static char sccsid[] = "@(#)from.c	5.2 (Berkeley) 11/4/85";
! #endif not lint
  
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>
  
- struct	passwd *getpwuid();
- 
  main(argc, argv)
  	int argc;
  	register char **argv;
--- 4,22 ----
   * specifies the terms and conditions for redistribution.
   */
  
! #if	!defined(lint) && defined(DOSCCS)
  char copyright[] =
  "@(#) Copyright (c) 1980 Regents of the University of California.\n\
   All rights reserved.\n";
  
! static char sccsid[] = "@(#)from.c	5.2.1 (2.11BSD) 1997/10/2";
! #endif
  
  #include <stdio.h>
  #include <ctype.h>
  #include <pwd.h>
+ #include <unistd.h>
  
  main(argc, argv)
  	int argc;
  	register char **argv;
***************
*** 30,36 ****
  	int stashed = 0;
  	register char *name;
  	char *sender;
- 	char *getlogin();
  
  	if (argc > 1 && *(argv[1]) == '-' && (*++argv)[1] == 's') {
  		if (--argc <= 1) {
--- 27,32 ----
***************
*** 50,56 ****
  	if (argc > 1)
  		name = argv[1];
  	else {
! 		name = getlogin ();
  		if (name == NULL || strlen(name) == 0) {
  			pp = getpwuid(getuid());
  			if (pp == NULL) {
--- 46,52 ----
  	if (argc > 1)
  		name = argv[1];
  	else {
! 		name = getlogin();
  		if (name == NULL || strlen(name) == 0) {
  			pp = getpwuid(getuid());
  			if (pp == NULL) {
*** /usr/src/usr.bin/learn/learn.c.old	Wed Oct 23 20:50:14 1996
--- /usr/src/usr.bin/learn/learn.c	Thu Oct  2 23:13:01 1997
***************
*** 1,10 ****
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)learn.c	4.4.1	(2.11BSD)	1996/10/23";
  #endif
  
  #include "stdio.h"
  #include "lrnref.h"
  #include "signal.h"
  
  char	*direct	= "/usr/share/learn";	/* CHANGE THIS ON YOUR SYSTEM */
  int	more;
--- 1,11 ----
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)learn.c	4.4.2	(2.11BSD)	1997/10/2";
  #endif
  
  #include "stdio.h"
  #include "lrnref.h"
  #include "signal.h"
+ #include <unistd.h>
  
  char	*direct	= "/usr/share/learn";	/* CHANGE THIS ON YOUR SYSTEM */
  int	more;
***************
*** 33,39 ****
  char *argv[];
  {
  	extern hangup(), intrpt();
- 	extern char * getlogin(), *malloc();
  
  	speed = 0;
  	more = 1;
--- 34,39 ----
*** /usr/src/usr.bin/uucp/uucp.h.old	Sun Dec  1 22:58:53 1996
--- /usr/src/usr.bin/uucp/uucp.h	Thu Oct  2 23:43:46 1997
***************
*** 1,7 ****
! /*	uucp.h	5.11.5	96/12/1 */
  
  #include <stdio.h>
  #include <paths.h>
  
  /*
   * Determine local uucp name of this machine.
--- 1,11 ----
! /*	uucp.h	5.11.6	1997/10/2 */
  
  #include <stdio.h>
  #include <paths.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/time.h>
+ #include <unistd.h>
  
  /*
   * Determine local uucp name of this machine.
***************
*** 391,402 ****
  extern	char DLocal[], DLocalX[], *subfile(), *subdir();
  
  /* Commonly called routines which return non-int value */
! extern	char *ttyname(), *strcpy(), *strcat(), *index(), *rindex(),
! 		*fgets(), *calloc(), *malloc(), *fdig(), *ttyname(),
! 		*cfgets(), *getwd(), *strpbrk(), *strncpy();
! extern	long lseek();
  extern	FILE *rpopen();
- extern time_t time();
  
  extern char _FAILED[], CANTOPEN[], DEVNULL[];
  
--- 395,402 ----
  extern	char DLocal[], DLocalX[], *subfile(), *subdir();
  
  /* Commonly called routines which return non-int value */
! extern	char *fdig(), *cfgets();
  extern	FILE *rpopen();
  
  extern char _FAILED[], CANTOPEN[], DEVNULL[];
  
*** /usr/src/usr.bin/uucp/getpwinfo.c.old	Mon Feb 16 16:21:43 1987
--- /usr/src/usr.bin/uucp/getpwinfo.c	Thu Oct  2 23:27:15 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)getpwinfo.c	5.3 (Berkeley) 6/19/85";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)getpwinfo.c	5.3.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 19,26 ****
  register char *path, *name;
  {
  	register struct passwd *pwd;
! 	struct passwd *getpwuid(), *getpwnam();
! 	char *getlogin(), *getenv(), *l;
  
  	if ((l = getlogin()) == NULL) {
  		l = getenv("USER");
--- 19,25 ----
  register char *path, *name;
  {
  	register struct passwd *pwd;
! 	char *l;
  
  	if ((l = getlogin()) == NULL) {
  		l = getenv("USER");
***************
*** 55,61 ****
  int *uid;
  {
  	register struct passwd *pwd;
- 	struct passwd *getpwnam();
  
  	if ((pwd = getpwnam(name)) == NULL) {
  		/* can not find name in passwd file */
--- 54,59 ----
*** /usr/src/usr.bin/uucp/cico.c.old	Thu Jan  5 23:50:45 1989
--- /usr/src/usr.bin/uucp/cico.c	Thu Oct  2 23:32:23 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)cico.c	5.14 (Berkeley) 4/14/86";
  #endif
  
  #include <signal.h>
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)cico.c	5.14.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include <signal.h>
***************
*** 848,854 ****
  
  	if (parm == DBG_TEMP) {
  		sprintf(buf, "%s/%d", RMTDEBUG, getpid());
! 		temp = malloc(strlen (buf) + 1);
  		if (temp == CNULL) {
  			Debug = 0;
  			assert("RMTDEBUG MALLOC ERROR:", temp, errno);
--- 848,854 ----
  
  	if (parm == DBG_TEMP) {
  		sprintf(buf, "%s/%d", RMTDEBUG, getpid());
! 		temp = (char *)malloc(strlen (buf) + 1);
  		if (temp == CNULL) {
  			Debug = 0;
  			assert("RMTDEBUG MALLOC ERROR:", temp, errno);
*** /usr/src/usr.bin/uucp/conn.c.old	Fri Mar 22 20:30:18 1996
--- /usr/src/usr.bin/uucp/conn.c	Thu Oct  2 23:36:01 1997
***************
*** 1,5 ****
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)conn.c	5.10.1 (2.11BSD) 1996/3/22";
  #endif
  
  #include <signal.h>
--- 1,5 ----
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)conn.c	5.10.2 (2.11BSD) 1997/10/2";
  #endif
  
  #include <signal.h>
***************
*** 14,24 ****
  #ifndef	USG
  #include <sgtty.h>
  #endif
- #ifdef BSD4_2
- #include <sys/time.h>
- #else
- #include <time.h>
- #endif
  
  #define MAXC 1000
  
--- 14,19 ----
***************
*** 1084,1090 ****
  	for (i = 0; i < dev->D_numargs-5; i++) {
  		sprintf(bfr, dev->D_arg[D_CHAT+i], flds[F_PHONE]);
  		if (strcmp(bfr, dev->D_arg[D_CHAT+i])) {
! 			p = malloc((unsigned)strlen(bfr)+1);
  			if (p != NULL) {
  				strcpy(p, bfr);
  				dev->D_arg[D_CHAT+i] = p;
--- 1079,1085 ----
  	for (i = 0; i < dev->D_numargs-5; i++) {
  		sprintf(bfr, dev->D_arg[D_CHAT+i], flds[F_PHONE]);
  		if (strcmp(bfr, dev->D_arg[D_CHAT+i])) {
! 			p = (char *)malloc((unsigned)strlen(bfr)+1);
  			if (p != NULL) {
  				strcpy(p, bfr);
  				dev->D_arg[D_CHAT+i] = p;
*** /usr/src/usr.bin/uucp/condevs.c.old	Fri Mar 22 20:29:09 1996
--- /usr/src/usr.bin/uucp/condevs.c	Thu Oct  2 23:39:47 1997
***************
*** 1,5 ****
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)condevs.c	5.15.1 (2.11BSD) 1996/3/22";
  #endif
  
  /*
--- 1,5 ----
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)condevs.c	5.15.2 (2.11BSD) 1997/10/2";
  #endif
  
  /*
***************
*** 24,30 ****
   * THE FIX: Don't declare variables to be register
   */
  
- #include <string.h>
  #include "condevs.h"
  
  struct condev condevs[] = {
--- 24,29 ----
***************
*** 362,368 ****
   */
  
  #ifdef INTERVALTIMER
- #include <sys/time.h>
  #define uucpdelay(num,denom) intervaldelay(num,denom)
  intervaldelay(num,denom)
  int num, denom;
--- 361,366 ----
*** /usr/src/usr.bin/uucp/pk0.c.old	Mon Feb 16 16:21:46 1987
--- /usr/src/usr.bin/uucp/pk0.c	Thu Oct  2 23:45:20 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)pk0.c	5.7 (Berkeley) 5/30/86";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)pk0.c	5.7.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 324,330 ****
  		pk->p_pscopy = x;
  		pk->p_xcount++;
  
! 		cp = pk->p_ob[x] = malloc((unsigned)pk->p_xsize);
  		partial = 0;
  		if ((int)icount < pk->p_xsize) {
  			cc = icount;
--- 324,330 ----
  		pk->p_pscopy = x;
  		pk->p_xcount++;
  
! 		cp = pk->p_ob[x] = (char *)malloc((unsigned)pk->p_xsize);
  		partial = 0;
  		if ((int)icount < pk->p_xsize) {
  			cc = icount;
*** /usr/src/usr.bin/uucp/anlwrk.c.old	Mon Feb 16 16:21:38 1987
--- /usr/src/usr.bin/uucp/anlwrk.c	Thu Oct  2 23:50:09 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)anlwrk.c	5.5 (Berkeley) 6/19/85";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)anlwrk.c	5.5.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 17,23 ****
  
  int Nfiles = 0;
  char Filent[LLEN][NAMESIZE];
- long fseek(), ftell();
  extern int TransferSucceeded;
  
  /*LINTLIBRARY*/
--- 17,22 ----
***************
*** 293,299 ****
  		/* Save last worked-on prefix */
  		if (lastpre != 0)
  			free (lastpre);
! 		lastpre = malloc((unsigned)(strlen(pre)+1));
  		strcpy (lastpre, pre);
  
  		/* Set the external indexes properly
--- 292,298 ----
  		/* Save last worked-on prefix */
  		if (lastpre != 0)
  			free (lastpre);
! 		lastpre = (char *)malloc((unsigned)(strlen(pre)+1));
  		strcpy (lastpre, pre);
  
  		/* Set the external indexes properly
*** /usr/src/usr.bin/uucp/chkpth.c.old	Mon Feb 16 16:21:43 1987
--- /usr/src/usr.bin/uucp/chkpth.c	Thu Oct  2 23:52:30 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)chkpth.c	5.4 (Berkeley) 6/19/85";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)chkpth.c	5.4.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 108,114 ****
  			fclose (uf);
  			return;
  		}
! 		if ((pc = calloc((unsigned)strlen(buf) + 1, sizeof (char)))
  			== NULL) {
  			/* can not allocate space */
  			DEBUG (1, "Userpath calloc 1 failed\n", 0);
--- 108,114 ----
  			fclose (uf);
  			return;
  		}
! 		if ((pc = (char *)calloc((unsigned)strlen(buf) + 1, sizeof (char)))
  			== NULL) {
  			/* can not allocate space */
  			DEBUG (1, "Userpath calloc 1 failed\n", 0);
*** /usr/src/usr.bin/uucp/ulockf.c.old	Mon Mar  9 07:19:25 1987
--- /usr/src/usr.bin/uucp/ulockf.c	Thu Oct  2 23:59:02 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)ulockf.c	5.5 (Berkeley) 10/9/85";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)ulockf.c	5.5.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 74,80 ****
  	ASSERT(i < MAXLOCKS, "TOO MANY LOCKS", CNULL, i);
  	if (i >= Nlocks)
  		i = Nlocks++;
! 	p = malloc((unsigned)(strlen(file)+1));
  	ASSERT(p != NULL, "CAN NOT ALLOCATE FOR", file, 0);
  	strcpy(p, file);
  	Lockfile[i] = p;
--- 74,80 ----
  	ASSERT(i < MAXLOCKS, "TOO MANY LOCKS", CNULL, i);
  	if (i >= Nlocks)
  		i = Nlocks++;
! 	p = (char *)malloc((unsigned)(strlen(file)+1));
  	ASSERT(p != NULL, "CAN NOT ALLOCATE FOR", file, 0);
  	strcpy(p, file);
  	Lockfile[i] = p;
*** /usr/src/usr.bin/uucp/versys.c.old	Mon Feb 16 16:21:49 1987
--- /usr/src/usr.bin/uucp/versys.c	Fri Oct  3 00:01:07 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)versys.c	5.5 (Berkeley) 10/9/85";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)versys.c	5.5.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 96,102 ****
  			*q = '\0';
  			DEBUG(11, "Compare against: %s\n", p);
  			if (strcmp(*hostptr, p) == 0)/* match? */ {
! 				koshername = malloc((unsigned)strlen(buf) + 1);
  				strcpy(koshername, buf); /* save it */
  				fclose(Aliases);
  				DEBUG(4, "Alias: %s to ", *hostptr);
--- 96,102 ----
  			*q = '\0';
  			DEBUG(11, "Compare against: %s\n", p);
  			if (strcmp(*hostptr, p) == 0)/* match? */ {
! 				koshername = (char *)malloc((unsigned)strlen(buf) + 1);
  				strcpy(koshername, buf); /* save it */
  				fclose(Aliases);
  				DEBUG(4, "Alias: %s to ", *hostptr);
*** /usr/src/usr.bin/uucp/uuxqt.c.old	Mon Feb 16 16:21:49 1987
--- /usr/src/usr.bin/uucp/uuxqt.c	Fri Oct  3 00:12:49 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)uuxqt.c	5.8 (Berkeley) 1/24/86";
  #endif
  
  #include "uucp.h"
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)uuxqt.c	5.8.1 (2.11BSD) 1997/10/2";
  #endif
  
  #include "uucp.h"
***************
*** 159,165 ****
  				Notify[i] = NT_YES;
  		} else
  			Notify[i] = NT_YES;
! 		if ((Cmds[i] = malloc((unsigned)(strlen(xcmd)+1))) == NULL) {
  			DEBUG(1, "MALLOC FAILED", CNULL);
  			break;
  		}
--- 159,165 ----
  				Notify[i] = NT_YES;
  		} else
  			Notify[i] = NT_YES;
! 		if ((Cmds[i] = (char *)malloc((unsigned)(strlen(xcmd)+1))) == NULL) {
  			DEBUG(1, "MALLOC FAILED", CNULL);
  			break;
  		}
*** /usr/src/usr.bin/uucp/uuq.c.old	Mon Dec 26 13:13:44 1988
--- /usr/src/usr.bin/uucp/uuq.c	Fri Oct  3 00:23:20 1997
***************
*** 1,5 ****
! #ifndef lint
! static char sccsid[] = "@(#)uuq.c	4.6 (Berkeley) 10/9/85";
  #endif
  
  /*
--- 1,5 ----
! #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)uuq.c	4.6.1 (2.11BSD) 1997/10/2";
  #endif
  
  /*
***************
*** 60,67 ****
  int hflag;
  int lflag;
  
- char *malloc(), *calloc();
- float atof();
  float baudrate = 1200.;
  char Username[BUFSIZ];
  char Filename[BUFSIZ];
--- 60,65 ----
*** /usr/src/usr.bin/uucp/pk1.c.old	Fri Mar 22 20:45:34 1996
--- /usr/src/usr.bin/uucp/pk1.c	Thu Oct  2 23:46:42 1997
***************
*** 1,5 ****
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)pk1.c	5.9.1 (2.11BSD) 1996/3/22";
  #endif
  
  #include <signal.h>
--- 1,5 ----
  #if	!defined(lint) && defined(DOSCCS)
! static char sccsid[] = "@(#)pk1.c	5.9.2 (2.11BSD) 1997/10/2";
  #endif
  
  #include <signal.h>
***************
*** 26,32 ****
  
  extern int Retries;
  extern jmp_buf Sjbuf;
- extern	char *malloc();
  
  int Connodata = 0;
  int Ntimeout = 0;
--- 26,31 ----
*** /usr/src/usr.lib/libU77/getlog_.c.old	Wed Feb 18 01:09:58 1987
--- /usr/src/usr.lib/libU77/getlog_.c	Thu Oct  2 19:46:25 1997
***************
*** 3,9 ****
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)getlog_.c	5.1	6/7/85
   */
  
  /*
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   *
!  *	@(#)getlog_.c	5.1.1 1997/10/2
   */
  
  /*
***************
*** 19,25 ****
   *	this is a detached process.
   */
  
! char *getlogin();
  
  getlog_(name, len)
  char *name; long len;
--- 19,25 ----
   *	this is a detached process.
   */
  
! #include <unistd.h>
  
  getlog_(name, len)
  char *name; long len;
*** /usr/src/share/lint/llib-lc.old	Tue Sep 16 20:03:51 1997
--- /usr/src/share/lint/llib-lc	Fri Sep 26 21:40:47 1997
***************
*** 1,4 ****
! /*	@(#)llib-lc	1.45 (2.11BSD GTE) 1997/8/29 */
  
  /* LINTLIBRARY */
  
--- 1,4 ----
! /*	@(#)llib-lc	1.46 (2.11BSD GTE) 1997/9/26 */
  
  /* LINTLIBRARY */
  
***************
*** 363,368 ****
--- 363,369 ----
  	sethostfile(name) char *name; { ; }
  int	setjmp(e) jmp_buf e; { return(0); }
  	setkey(k) char *k; {}
+ int	setlogin(c) char *c; { return(0); }
  int	setlogmask(m) { return(0); }
  	setnetent(stayopen) { ; }
  	setprotoent(stayopen) { ; }
***************
*** 416,422 ****
  void	tzset() {;}
  unsigned	ualarm(value, interval) unsigned value, interval; { return 0; }
  void	unsetenv(n) char *n; {;}
! 	usleep(useconds) unsigned useconds; { ; }
  int	utime(name, timep) char *name; time_t *timep; { return 0; }
  char *	valloc(s) unsigned s; { return malloc(s); }
  
--- 417,423 ----
  void	tzset() {;}
  unsigned	ualarm(value, interval) unsigned value, interval; { return 0; }
  void	unsetenv(n) char *n; {;}
! 	usleep(useconds) long useconds; { ; }
  int	utime(name, timep) char *name; time_t *timep; { return 0; }
  char *	valloc(s) unsigned s; { return malloc(s); }
  
*** /usr/src/share/lint/Makefile.old	Sat Oct 26 16:13:07 1996
--- /usr/src/share/lint/Makefile	Fri Sep 26 21:45:21 1997
***************
*** 1,10 ****
  #
  # Public domain - 1996/10/23 - sms
  #
! #	@(#)Makefile	1.0 (2.11BSD) 1996/10/23
  #
  #  Makefile for the lint libraries.
  #
  
  SRCS= llib-lc llib-lcurses llib-ldbm llib-lm llib-lmp \
  	llib-lplot llib-ltermcap llib-port
--- 1,13 ----
  #
  # Public domain - 1996/10/23 - sms
  #
! #	@(#)Makefile	1.1 (2.11BSD) 1997/9/26
  #
  #  Makefile for the lint libraries.
  #
+ LINT1=/usr/libexec/lint/lint1
+ C=/lib/cpp
+ S=${DESTDIR}/usr/share/lint
  
  SRCS= llib-lc llib-lcurses llib-ldbm llib-lm llib-lmp \
  	llib-lplot llib-ltermcap llib-port
***************
*** 12,23 ****
  all:
  
  install:${SRCS}
! 	-mkdir -p ${DESTDIR}/usr/share/lint
! 	-chmod a+r,a+x ${DESTDIR}/usr/share/lint
! 	install -c -m 444 ${SRCS} ${DESTDIR}/usr/share/lint
  
  clean:
  
  tags:
  
  depend:
--- 15,36 ----
  all:
  
  install:${SRCS}
! 	-mkdir -p ${S}
! 	-chmod a+r,a+x ${S}
! 	install -c -m 444 ${SRCS} ${S}
  
  clean:
  
  tags:
+ 
+ libs:
+ 	${C} -C -Dlint ${S}/llib-port | ${LINT1} -puv > ${S}/llib-port.ln
+ 	${C} -C -Dlint ${S}/llib-ldbm | ${LINT1} -uv > ${S}/llib-ldbm.ln
+ 	${C} -C -Dlint ${S}/llib-lm | ${LINT1} -uv > ${S}/llib-lm.ln
+ 	${C} -C -Dlint ${S}/llib-lmp | ${LINT1} -uv > ${S}/llib-lmp.ln
+ 	${C} -C -Dlint ${S}/llib-lplot | ${LINT1} -uv > ${S}/llib-lplot.ln
+ 	${C} -C -Dlint ${S}/llib-ltermcap | ${LINT1} -uv > ${S}/llib-ltermcap.ln
+ 	${C} -C -Dlint ${S}/llib-lc | ${LINT1} -v > ${S}/llib-lc.ln
+ 	${C} -C -Dlint ${S}/llib-lcurses | ${LINT1} -v > ${S}/llib-lcurses.ln
  
  depend:
