Subject: pselect(2) added, 4.3 compat changes, TOY clock changes, more (#431)
Index:	sys/{sys,pdpstand,pdp,...)/many 2.11BSD

Description:
	1.  pselect(2) [POSIX select] is missing from the kernel.

	2. The 4.{3,2,1} compatibility code in the kernel was taking up 
	   too much space and was increasingly unused.

	3. The TOY (Time Of Year) clock support was too cpu type specific
	   (only systems reporting them selves as 11/93 and 11/94 could make
	    use of the TOY clock).

	4. dc(1) would error out due to calling malloc(3) with an argument of
	   0.

	5. make(1) would print negative exit status for commands that failed.
	   This was a little confusing at times.  While  exit(2) is shown
	   as taking an 'int' the kernel only passes the low 8 bits to the
	   parent.

	6. as(1) uses 'jmp' instead of 'jsr' in a number of places.  This makes
	   debugging certain problems almost impossible.

	7. ntpd(8) still had the old "shortname" hacks.


Repeat-By:
	1. Observation ;)

	2. A fairly large number of system calls (gethostid, sethostid, sigvec,
	   and so on) were taking up considerable kernel space.   The same calls
	   are also implemented in the C library (libc.a) as user mode library
	   functions (written as wrappers around the newer POSIX and/or 4.4BSD
	   system calls).   In order to make room for new features in the kernel
	   the kernel based 4.{3,2,1} compatbility routines have been removed.

	3. Observation _and_ running the latest version (2.5) of the Begemot 
	   PDP-11 emulator.   Version 2.5 of P11 offers the TOY clock capability
	   without the necessity of the cpu type being '93' or '94'.   

	4. Some time ago (update #412) malloc(3) was fixed to return NULL if
	   a zero length allocation was requested.  The dc(1) program makes
	   such a call.  Historically malloc(3)'s behaviour with a 0 length
	   request was indeterminate but apparently would allocate one or two
	   bytes and not fail.  The dc(1) program was fixed to call malloc(3)
	   with a nonzero count.

	5. The exit status is now masked (it is an 8 bit quantity) with 0xff
	   to avoid sign extension

	6. Using 'jmp' leaves no record on the stack of where a program came
	   *from*.  While debugging a suspected premature exit problem in the 
	   assembler it was observed that the error handling routines were
	   being arrived at but it was unknown which reference to the error
	   handler was being used.  Changing the 'jmp' instructions to 'jsr'
	   instructions leaves the return address on the stack and that is
	   very useful information to have during debugging.

	7.  A long time ago (2.10BSD, 2.10.1BSD, until 2.11BSD update #158)
	    the C compiler (assembler, preprocessor, linker, etc) could only
	    handle 7 characters in a symbol name.  After #158 the 'shortname'
	    hack (using the preprocessor to #define mangled names) was 
	    gradually purged from the system.  The ntpd(8) code was overlooked.
	    This oversight is corrected by simply removing the no longer needed
	    #define statements.

Fix:
	These changes have been sitting around in a almost completed state
	for a number of months.  Just too many projects and too little time
	(I'm sure you are all familiar with that problem ;)).   It is long
	overdue to publish the update before something else gets added.

	First the traditional monologue discussing what was changed.

	Adding pselect(2) was straightforward.  It was also a good thing that
	the no longer needed 4.3 compatility code was removed - pselect(2)
	ended up using about 25% of the savings!

	Following the lead of current BSD derived systems a new include file
	"/usr/include/sys/select.h" has been created.  Select(2) and pselect(2)
	related information from 'types.h' has been relocated into the new
	file.   The 'sys/times.h' file now defines the structure 'timespec'.
	It is definitely on the silly side to talk about nanoseconds on a 
	PDP-11 when a 50 or 60Hz clock is present but keeping the API the same
	seemed like a worthwhile goal.

	NOTE:  The system *MUST* be at patch level #430 before this (#431) can
	       be installed!

	       Part of the #430 proceedure was to recompile the entire system
	       from sources to make certain that nothing uses the old 4.3
	       system calls.   For some time libc.a has had all the compat
	       routines in it - the recompile from sources requested in #430
	       was to make sure there were no old programs around.

	adb(1) is updated to reflect the changes in the available system calls
	(and the addition of pselect(2)).  'lint(1)' was updated with pselect(2)
	information.

	The TOY clock is now probed for explicitly rather than relying on the
	cpu model number (as determined from the system maint register). 
	Normally only the KDJ-11E has a TOY clock but there may be 3rd party
	boards that folks have or the P11 emulator may be used (it presents
	a 11/73 cpu id _and_ a TOY clock).   The 'toyset' program is also
	updated (typically installed into /toyset where 'boot' can easily
	find it).

	The shar archive below contains two files:

		1) 431.patch - the file to be run thru patch(1) 

		2) 431.shar - a shar archive with the new select.h file

	Adding a new system call to libc.a means either recompiling libc.a
	or manually running the assembler, linker, ar, ranlib.   If you know
	how to do this then you can save about an hour (on a 11/73).  The
	method used below is to simpler (recompile libc) but takes longer.

	And now the moment you've all been waiting for ;)

	Cut where indicated and save to a file (/tmp/431).  Then:

	1) Unpack the shar file, install the new include file and apply the
	   patches:

	   cd /tmp
	   sh 431
	   sh 431.shar
	   patch -p0 < 431.patch

	2) Recompile and install the updated assembler, make and libc

	   cd /usr/src/bin/as
	   make
	   make install
	   make clean

	   cd /usr/src/bin/make
	   make
	   make install
	   make clean

	   cd /usr/src/lib/libc
	   make clean
	   make
	   make install
	   make clean

	3) Next the dc(1) program, the lint libraries, adb(1)

	   cd /usr/src/usr.bin/dc
	   make 
	   make install
	   make clean

	   cd /usr/src/usr.bin/lint
	   ./libs

	   cd /usr/src/bin/adb
	   make
	   make install
	   make clean

	4) The updated select(2) manpage which includes pselect(2) now

	   cd /usr/src/man/man2
	   /usr/man/manroff select.2 > /usr/man/cat2/select.0

	5) The toyset standalone program

	   cd /sys/pdpstand
	   make clean
	   make
	   cp toyset /toyset

	6) And finally the kernel.

	    NOTE: changes in .o files may cause overlays to become too 
		  large - if you see a "ld: file too big for type 431" or 
		  similar error it will be necessary to edit the Makefile 
		  and adjust the overlay structure

	   cd /sys/YOUR_KERNEL
	   make clean
	   make
	   mv /unix /ounix
	   mv /netnix /onetnix
	   mv unix netnix /
	   chmod 744 /unix /netnix

	   (omit the /netnix steps if you are not running a networking kernel)

	   reboot

	That's all - you're done.  Enjoy!

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

-----------------------cut here------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	431.patch
#	431.shar
# This archive created: Fri Apr 21 20:40:21 2000
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f '431.patch'
then
	echo shar: "will not over-write existing file '431.patch'"
else
sed 's/^Z//' << \SHAR_EOF > '431.patch'
Z*** /usr/include/syscall.h.old	Fri Sep 10 20:39:37 1999
Z--- /usr/include/syscall.h	Mon Feb 28 20:27:49 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)syscall.h	5.4.10 (2.11BSD) 1999/9/10
Z   */
Z  
Z  /*
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)syscall.h	5.4.11 (2.11BSD) 2000/2/20
Z   */
Z  
Z  /*
Z***************
Z*** 18,24 ****
Z  #define	SYS_open	5
Z  #define	SYS_close	6
Z  #define	SYS_wait4	7
Z! 				/* 8 - old creat */
Z  #define	SYS_link	9
Z  #define	SYS_unlink	10
Z  #define	SYS_execv	11
Z--- 18,24 ----
Z  #define	SYS_open	5
Z  #define	SYS_close	6
Z  #define	SYS_wait4	7
Z! 				/* 8 is old; creat */
Z  #define	SYS_link	9
Z  #define	SYS_unlink	10
Z  #define	SYS_execv	11
Z***************
Z*** 61,67 ****
Z  #define	SYS_getegid	48
Z  #define	SYS_setgid	49
Z  #define	SYS_setegid	50
Z! 				/* 51 was acct */
Z  #define	SYS_phys	52
Z  #define	SYS_lock	53
Z  #define	SYS_ioctl	54
Z--- 61,67 ----
Z  #define	SYS_getegid	48
Z  #define	SYS_setgid	49
Z  #define	SYS_setegid	50
Z! 				/* 51 is old; acct */
Z  #define	SYS_phys	52
Z  #define	SYS_lock	53
Z  #define	SYS_ioctl	54
Z***************
Z*** 74,84 ****
Z  #define	SYS_chroot	61
Z  #define	SYS_fstat	62
Z  				/* 63 is unused */
Z! 				/* 64 - old getpagesize */
Z! 				/* 65 is unused 4.3: mremap */
Z  #define	SYS_vfork	66
Z! 				/* 67 is old: vread */
Z! 				/* 68 is old: vwrite */
Z  #define	SYS_sbrk	69
Z  #define	SYS_sstk	70
Z  				/* 71 is unused 4.3: mmap */
Z--- 74,84 ----
Z  #define	SYS_chroot	61
Z  #define	SYS_fstat	62
Z  				/* 63 is unused */
Z! 				/* 64 is old; getpagesize */
Z! #define	SYS_pselect	65
Z  #define	SYS_vfork	66
Z! 				/* 67 is old; vread */
Z! 				/* 68 is old; vwrite */
Z  #define	SYS_sbrk	69
Z  #define	SYS_sstk	70
Z  				/* 71 is unused 4.3: mmap */
Z***************
Z*** 87,93 ****
Z  				/* 74 is unused 4.3: mprotect */
Z  				/* 75 is unused 4.3: madvise */
Z  #define	SYS_vhangup	76
Z! 				/* 77 is old: vlimit */
Z  				/* 78 is unused 4.3: mincore */
Z  #define	SYS_getgroups	79
Z  #define	SYS_setgroups	80
Z--- 87,93 ----
Z  				/* 74 is unused 4.3: mprotect */
Z  				/* 75 is unused 4.3: madvise */
Z  #define	SYS_vhangup	76
Z! 				/* 77 is old; vlimit */
Z  				/* 78 is unused 4.3: mincore */
Z  #define	SYS_getgroups	79
Z  #define	SYS_setgroups	80
Z***************
Z*** 97,104 ****
Z  				/* 84 is old; wait,wait3 */
Z  #define	SYS_swapon	85
Z  #define	SYS_getitimer	86
Z! #define	SYS_gethostname	87
Z! #define	SYS_sethostname	88
Z  #define	SYS_getdtablesize 89
Z  #define	SYS_dup2	90
Z  				/* 91 is unused 4.3: getdopt */
Z--- 97,104 ----
Z  				/* 84 is old; wait,wait3 */
Z  #define	SYS_swapon	85
Z  #define	SYS_getitimer	86
Z! 				/* 87 is old; gethostname */
Z! 				/* 88 is old; sethostname */
Z  #define	SYS_getdtablesize 89
Z  #define	SYS_dup2	90
Z  				/* 91 is unused 4.3: getdopt */
Z***************
Z*** 122,140 ****
Z   * 108 thru 112 are 4.3BSD compatibility syscalls.  sigstack has to remain
Z   * defined because no replacement routine exists.  Sigh.
Z  */
Z! 				/* 108 - old sigvec */
Z! 				/* 109 - old sigblock */
Z! 				/* 110 - old sigsetmask */
Z! 				/* 111 - old sigpause */
Z  #define	SYS_sigstack	112
Z  
Z  #define	SYS_recvmsg	113
Z  #define	SYS_sendmsg	114
Z! 				/* 115 is old vtrace */
Z  #define	SYS_gettimeofday 116
Z  #define	SYS_getrusage	117
Z  #define	SYS_getsockopt	118
Z! 				/* 119 is old resuba */
Z  #define	SYS_readv	120
Z  #define	SYS_writev	121
Z  #define	SYS_settimeofday 122
Z--- 122,140 ----
Z   * 108 thru 112 are 4.3BSD compatibility syscalls.  sigstack has to remain
Z   * defined because no replacement routine exists.  Sigh.
Z  */
Z! 				/* 108 is old; sigvec */
Z! 				/* 109 is old; sigblock */
Z! 				/* 110 is old; sigsetmask */
Z! 				/* 111 is old; sigpause */
Z  #define	SYS_sigstack	112
Z  
Z  #define	SYS_recvmsg	113
Z  #define	SYS_sendmsg	114
Z! 				/* 115 is old; vtrace */
Z  #define	SYS_gettimeofday 116
Z  #define	SYS_getrusage	117
Z  #define	SYS_getsockopt	118
Z! 				/* 119 is old; resuba */
Z  #define	SYS_readv	120
Z  #define	SYS_writev	121
Z  #define	SYS_settimeofday 122
Z***************
Z*** 141,148 ****
Z  #define	SYS_fchown	123
Z  #define	SYS_fchmod	124
Z  #define	SYS_recvfrom	125
Z! 				/* 126 - old setreuid */
Z! 				/* 127 - old setregid */
Z  #define	SYS_rename	128
Z  #define	SYS_truncate	129
Z  #define	SYS_ftruncate	130
Z--- 141,148 ----
Z  #define	SYS_fchown	123
Z  #define	SYS_fchmod	124
Z  #define	SYS_recvfrom	125
Z! 				/* 126 is old; setreuid */
Z! 				/* 127 is old; setregid */
Z  #define	SYS_rename	128
Z  #define	SYS_truncate	129
Z  #define	SYS_ftruncate	130
Z***************
Z*** 157,164 ****
Z  				/* 139 is unused */
Z  #define	SYS_adjtime	140
Z  #define	SYS_getpeername	141
Z! 				/* 142 - old gethostid */
Z! 				/* 143 - old sethostid */
Z  #define	SYS_getrlimit	144
Z  #define	SYS_setrlimit	145
Z  #define	SYS_killpg	146
Z--- 157,164 ----
Z  				/* 139 is unused */
Z  #define	SYS_adjtime	140
Z  #define	SYS_getpeername	141
Z! 				/* 142 is old; gethostid */
Z! 				/* 143 is old; sethostid */
Z  #define	SYS_getrlimit	144
Z  #define	SYS_setrlimit	145
Z  #define	SYS_killpg	146
Z*** /usr/src/sys/sys/kern_mman.c.old	Wed Dec 31 23:02:03 1997
Z--- /usr/src/sys/sys/kern_mman.c	Sun Feb 20 17:52:21 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_mman.c	1.2 (2.11BSD) 1997/12/31
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_mman.c	1.3 (2.11BSD) 2000/2/20
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 14,28 ****
Z  #include "vm.h"
Z  #include "text.h"
Z  #include "systm.h"
Z- 
Z- /*
Z-  * 4.3 compatibility 
Z- */
Z- getpagesize()
Z- {
Z- 
Z- 	u.u_r.r_val1 = NBPG * CLSIZE;
Z- }
Z  
Z  sbrk()
Z  {
Z--- 14,19 ----
Z*** /usr/src/sys/sys/kern_xxx.c.old	Sat Apr 30 16:15:17 1988
Z--- /usr/src/sys/sys/kern_xxx.c	Sun Feb 20 18:15:32 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_xxx.c	1.1 (2.10BSD Berkeley) 12/1/86
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_xxx.c	1.2 (2.11BSD) 2000/2/20
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 13,66 ****
Z  #include "kernel.h"
Z  #include "systm.h"
Z  #include "fs.h"
Z- 
Z- gethostid()
Z- {
Z- 
Z- 	u.u_r.r_off = hostid;
Z- }
Z- 
Z- sethostid()
Z- {
Z- 	struct a {
Z- 		long	hostid;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 
Z- 	if (suser())
Z- 		hostid = uap->hostid;
Z- }
Z- 
Z- gethostname()
Z- {
Z- 	register struct a {
Z- 		char	*hostname;
Z- 		int	len;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 	register int len;
Z- 
Z- 	len = uap->len;
Z- 	if (len > hostnamelen + 1)
Z- 		len = hostnamelen + 1;
Z- 	u.u_error = vcopyout((caddr_t)hostname, (caddr_t)uap->hostname, len);
Z- }
Z- 
Z- sethostname()
Z- {
Z- 	register struct a {
Z- 		char	*hostname;
Z- 		int	len;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 
Z- 	if (!suser())
Z- 		return;
Z- 	if (uap->len > sizeof (hostname) - 1) {
Z- 		u.u_error = EINVAL;
Z- 		return;
Z- 	}
Z- 	hostnamelen = uap->len;
Z- 	u.u_error = vcopyin((caddr_t)uap->hostname, hostname, uap->len);
Z- 	hostname[hostnamelen] = 0;
Z- }
Z  
Z  reboot()
Z  {
Z--- 13,18 ----
Z*** /usr/src/sys/sys/kern_time.c.old	Fri Feb 14 21:53:14 1997
Z--- /usr/src/sys/sys/kern_time.c	Tue Apr 11 21:25:00 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_time.c	1.4 (2.11BSD GTE) 1997/2/14
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_time.c	1.5 (2.11BSD) 2000/4/9
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 10,15 ****
Z--- 10,16 ----
Z  #include "user.h"
Z  #include "proc.h"
Z  #include "kernel.h"
Z+ #include "systm.h"
Z  
Z  /* 
Z   * Time of day and interval timer support.
Z***************
Z*** 60,65 ****
Z--- 61,68 ----
Z  		if (u.u_error)
Z  			return;
Z  		setthetime(&atv);
Z+ 		if	(u.u_error)
Z+ 			return;
Z  	}
Z  	if (uap->tzp && suser()) {
Z  		u.u_error = copyin((caddr_t)uap->tzp, (caddr_t)&atz,
Z***************
Z*** 70,93 ****
Z  }
Z  
Z  setthetime(tv)
Z! 	struct timeval *tv;
Z! {
Z! 	int s;
Z  
Z! 	if (!suser())
Z  		return;
Z  /* WHAT DO WE DO ABOUT PENDING REAL-TIME TIMEOUTS??? */
Z  	boottime.tv_sec += tv->tv_sec - time.tv_sec;
Z  	s = splhigh();
Z  	time = *tv; lbolt = time.tv_usec / mshz;
Z  	splx(s);
Z! #ifndef pdp11
Z  	/*
Z  	 * if you have a time of day board, use it here
Z  	 */
Z  	resettodr();
Z  #endif
Z! }
Z  
Z  adjtime()
Z  {
Z--- 73,114 ----
Z  }
Z  
Z  setthetime(tv)
Z! 	register struct timeval *tv;
Z! 	{
Z! 	int	s;
Z  
Z! 	if	(!suser())
Z  		return;
Z+ #ifdef	NOTNOW
Z+ /*
Z+  * If the system is secure, we do not allow the time to be set to an
Z+  * earlier value.  The time may be slowed (using adjtime) but not set back.
Z+  *
Z+  * NOTE:  Can not do this until ntpd is updated to deal with the coarse (50, 60
Z+  *	  hz) clocks.  Ntpd wants to adjust time system clock a few microseconds
Z+  *	  at a time (which gets rounded to 0 in adjtime below). If that fails 
Z+  *	  ntpd uses settimeofday to step the time backwards which obviously 
Z+  *	  will fail if the next 'if' is enabled - all that does is fill up the
Z+  *	  logfiles with "can't set time" messages and the time keeps drifting.
Z+ */
Z+ 	if	(securelevel > 0 && timercmp(tv, &time, <))
Z+ 		{
Z+ 		u.u_error = EPERM;	/* XXX */
Z+ 		return;
Z+ 		}
Z+ #endif
Z  /* WHAT DO WE DO ABOUT PENDING REAL-TIME TIMEOUTS??? */
Z  	boottime.tv_sec += tv->tv_sec - time.tv_sec;
Z  	s = splhigh();
Z  	time = *tv; lbolt = time.tv_usec / mshz;
Z  	splx(s);
Z! #ifdef	notyet
Z  	/*
Z  	 * if you have a time of day board, use it here
Z  	 */
Z  	resettodr();
Z  #endif
Z! 	}
Z  
Z  adjtime()
Z  {
Z*** /usr/src/sys/sys/kern_prot2.c.old	Fri Nov 28 16:38:34 1997
Z--- /usr/src/sys/sys/kern_prot2.c	Sun Feb 20 18:13:08 2000
Z***************
Z*** 35,41 ****
Z   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Z   * SUCH DAMAGE.
Z   *
Z!  *	@(#)kern_prot.c	8.9.1 (2.11BSD) 1997/11/28
Z   */
Z  
Z  #include "param.h"
Z--- 35,41 ----
Z   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Z   * SUCH DAMAGE.
Z   *
Z!  *	@(#)kern_prot2.c  8.9.2 (2.11BSD) 2000/2/20
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 161,223 ****
Z  	u.u_acflag |= ASUGID;
Z  	return (u.u_error = 0);
Z  	}
Z- 
Z- /* 4.3 compatibility */
Z- 
Z- int
Z- setreuid()
Z- {
Z- 	register struct a {
Z- 		int ruid;
Z- 		int euid;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 
Z- 	/*
Z- 	 * If ruid == euid then setreuid is being used to emulate setuid,
Z- 	 * just do it.
Z- 	 */
Z- 	if (uap->ruid != -1 && uap->ruid == uap->euid)
Z- 		return (_setuid(uap->ruid));
Z- 	/*
Z- 	 * Otherwise we assume that the intent of setting ruid is to be
Z- 	 * able to get back ruid priviledge (i.e. swapping ruid and euid).
Z- 	 * So we make sure that we will be able to do so, but do not
Z- 	 * actually set the ruid.
Z- 	 */
Z- 	if (uap->ruid != (uid_t)-1 && uap->ruid != u.u_ruid &&
Z- 	    uap->ruid != u.u_svuid)
Z- 		return (u.u_error = EPERM);
Z- 	if (uap->euid == (uid_t)-1)
Z- 		return (u.u_error = 0);
Z- 	return (_seteuid(uap->euid));
Z- }
Z- 
Z- /* 4.3 compatibility */
Z- 
Z- int
Z- setregid()
Z- {
Z- 	register struct a {
Z- 		int rgid;
Z- 		int egid;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 
Z- 	/*
Z- 	 * If rgid == egid then setreuid is being used to emulate setgid,
Z- 	 * just do it.
Z- 	 */
Z- 	if (uap->rgid != -1 && uap->rgid == uap->egid)
Z- 		return (_setgid(uap->rgid));
Z- 	/*
Z- 	 * Otherwise we assume that the intent of setting rgid is to be
Z- 	 * able to get back rgid priviledge (i.e. swapping rgid and egid).
Z- 	 * So we make sure that we will be able to do so, but do not
Z- 	 * actually set the rgid.
Z- 	 */
Z- 	if (uap->rgid != (gid_t)-1 && uap->rgid != u.u_rgid &&
Z- 	    uap->rgid != u.u_svgid)
Z- 		return (u.u_error = EPERM);
Z- 	if (uap->egid == (gid_t)-1)
Z- 		return (u.u_error = 0);
Z- 	return (_setegid(uap->egid));
Z- }
Z--- 161,163 ----
Z*** /usr/src/sys/sys/syscalls.c.old	Sun Sep  5 23:36:27 1999
Z--- /usr/src/sys/sys/syscalls.c	Mon Feb 28 20:33:33 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)syscalls.c	1.11 (2.11BSD) 1999/9/5
Z   */
Z  
Z  /*
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)syscalls.c	1.12 (2.11BSD) 2000/2/20
Z   */
Z  
Z  /*
Z***************
Z*** 19,25 ****
Z  	"open",			/*   5 = open */
Z  	"close",		/*   6 = close */
Z  	"wait4",		/*   7 = wait4 */
Z! 	"old creat",		/*   8 = creat COMPAT-43 */
Z  	"link",			/*   9 = link */
Z  	"unlink",		/*  10 = unlink */
Z  	"execv",		/*  11 = execv */
Z--- 19,25 ----
Z  	"open",			/*   5 = open */
Z  	"close",		/*   6 = close */
Z  	"wait4",		/*   7 = wait4 */
Z! 	"#8",			/*   8 = (old creat) */
Z  	"link",			/*   9 = link */
Z  	"unlink",		/*  10 = unlink */
Z  	"execv",		/*  11 = execv */
Z***************
Z*** 75,82 ****
Z  	"chroot",		/*  61 = chroot */
Z  	"fstat",		/*  62 = fstat */
Z  	"#63",			/*  63 = unused */
Z! 	"old getpagesize",	/*  64 = getpagesize COMPAT */
Z! 	"#65",			/*  65 = unused */
Z  	"vfork",		/*  66 = vfork */
Z  	"#67",			/*  67 = unused */
Z  	"#68",			/*  68 = unused */
Z--- 75,82 ----
Z  	"chroot",		/*  61 = chroot */
Z  	"fstat",		/*  62 = fstat */
Z  	"#63",			/*  63 = unused */
Z! 	"#64",			/*  64 = (old getpagesize) */
Z! 	"pselect",		/*  65 = pselect */
Z  	"vfork",		/*  66 = vfork */
Z  	"#67",			/*  67 = unused */
Z  	"#68",			/*  68 = unused */
Z***************
Z*** 98,105 ****
Z  	"old wait",		/*  84 = wait,wait3 COMPAT*/
Z  	"#85",			/*  85 = unused */
Z  	"getitimer",		/*  86 = getitimer */
Z! 	"gethostname",		/*  87 = gethostname */
Z! 	"sethostname",		/*  88 = sethostname */
Z  	"getdtablesize",	/*  89 = getdtablesize */
Z  	"dup2",			/*  90 = dup2 */
Z  	"#91",			/*  91 = unused */
Z--- 98,105 ----
Z  	"old wait",		/*  84 = wait,wait3 COMPAT*/
Z  	"#85",			/*  85 = unused */
Z  	"getitimer",		/*  86 = getitimer */
Z! 	"#87",			/*  87 = (old gethostname) */
Z! 	"#88",			/*  88 = (old sethostname) */
Z  	"getdtablesize",	/*  89 = getdtablesize */
Z  	"dup2",			/*  90 = dup2 */
Z  	"#91",			/*  91 = unused */
Z***************
Z*** 119,128 ****
Z  	"setsockopt",		/* 105 = setsockopt */
Z  	"listen",		/* 106 = listen */
Z  	"sigsuspend",		/* 107 = sigsuspend */
Z! 	"sigvec",		/* 108 = sigvec COMPAT-43 */
Z! 	"sigblock",		/* 109 = sigblock COMPAT-43 */
Z! 	"sigsetmask",		/* 110 = sigsetmask COMPAT-43 */
Z! 	"sigpause",		/* 111 = sigpause COMPAT-43 */
Z  	"sigstack",		/* 112 = sigstack COMPAT-43 */
Z  	"recvmsg",		/* 113 = recvmsg */
Z  	"sendmsg",		/* 114 = sendmsg */
Z--- 119,128 ----
Z  	"setsockopt",		/* 105 = setsockopt */
Z  	"listen",		/* 106 = listen */
Z  	"sigsuspend",		/* 107 = sigsuspend */
Z! 	"#108",			/* 108 = (old sigvec) */
Z! 	"#109",			/* 109 = (old sigblock) */
Z! 	"#110",			/* 110 = (old sigsetmask) */
Z! 	"#111",			/* 111 = (old sigpause)  */
Z  	"sigstack",		/* 112 = sigstack COMPAT-43 */
Z  	"recvmsg",		/* 113 = recvmsg */
Z  	"sendmsg",		/* 114 = sendmsg */
Z***************
Z*** 137,144 ****
Z  	"fchown",		/* 123 = fchown */
Z  	"fchmod",		/* 124 = fchmod */
Z  	"recvfrom",		/* 125 = recvfrom */
Z! 	"setreuid",		/* 126 = setreuid COMPAT43 */
Z! 	"setregid",		/* 127 = setregid COMPAT43 */
Z  	"rename",		/* 128 = rename */
Z  	"truncate",		/* 129 = truncate */
Z  	"ftruncate",		/* 130 = ftruncate */
Z--- 137,144 ----
Z  	"fchown",		/* 123 = fchown */
Z  	"fchmod",		/* 124 = fchmod */
Z  	"recvfrom",		/* 125 = recvfrom */
Z! 	"#126",			/* 126 = (old setreuid) */
Z! 	"#127",			/* 127 = (old setregid) */
Z  	"rename",		/* 128 = rename */
Z  	"truncate",		/* 129 = truncate */
Z  	"ftruncate",		/* 130 = ftruncate */
Z***************
Z*** 153,160 ****
Z  	"#139",			/* 139 = unused */
Z  	"adjtime",		/* 140 = adjtime */
Z  	"getpeername",		/* 141 = getpeername */
Z! 	"gethostid",		/* 142 = gethostid COMPAT-43 */
Z! 	"sethostid",		/* 143 = sethostid COMPAT-43 */
Z  	"getrlimit",		/* 144 = getrlimit */
Z  	"setrlimit",		/* 145 = setrlimit */
Z  	"killpg",		/* 146 = killpg */
Z--- 153,160 ----
Z  	"#139",			/* 139 = unused */
Z  	"adjtime",		/* 140 = adjtime */
Z  	"getpeername",		/* 141 = getpeername */
Z! 	"#142",			/* 142 = (old gethostid) */
Z! 	"#143",			/* 143 = (old sethostid) */
Z  	"getrlimit",		/* 144 = getrlimit */
Z  	"setrlimit",		/* 145 = setrlimit */
Z  	"killpg",		/* 146 = killpg */
Z*** /usr/src/sys/sys/kern_sig.c.old	Fri Sep 24 21:03:12 1999
Z--- /usr/src/sys/sys/kern_sig.c	Sun Feb 20 18:07:50 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_sig.c	1.12 (2.11BSD) 1999/9/24
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_sig.c	1.13 (2.11BSD) 2000/2/20
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 54,179 ****
Z  
Z  /*
Z   * 4.3 Compatibility
Z-  */
Z- sigvec()
Z- {
Z- 	register struct a {
Z- 		int	(*sigtramp)();
Z- 		int	signo;
Z- 		struct	sigvec *nsv;
Z- 		struct	sigvec *osv;
Z- 	} *uap = (struct a  *)u.u_ap;
Z- 	struct sigvec vec;
Z- 	register struct sigvec *sv;
Z- 	register int sig;
Z- 	struct	proc	*p;
Z- 	long bit;
Z- 	int error = 0;
Z- 
Z- 	/*
Z- 	 * Save user trampoline code entry address.
Z- 	 */
Z- 	u.u_pcb.pcb_sigc = uap->sigtramp;
Z- 	p = u.u_procp;
Z- 	sig = uap->signo;
Z- 	if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP) {
Z- 		error = EINVAL;
Z- 		goto out;
Z- 	}
Z- 	sv = &vec;
Z- 	if (uap->osv) {
Z- 		sv->sv_handler = u.u_signal[sig];
Z- 		sv->sv_mask = u.u_sigmask[sig];
Z- 		bit = sigmask(sig);
Z- 		sv->sv_flags = 0;
Z- 		if ((u.u_sigonstack & bit) != 0)
Z- 			sv->sv_flags |= SV_ONSTACK;
Z- 		if ((u.u_sigintr & bit) != 0)
Z- 			sv->sv_flags |= SV_INTERRUPT;
Z- 		if (p->p_flag & P_NOCLDSTOP)
Z- 			sv->sv_flags |= SA_NOCLDSTOP;
Z- 		error = copyout((caddr_t)sv, (caddr_t)uap->osv, sizeof (vec));
Z- 		if (error)
Z- 			goto out;
Z- 	}
Z- 	if (uap->nsv) {
Z- 		error = copyin((caddr_t)uap->nsv, (caddr_t)sv, sizeof (vec));
Z- 		if (error)
Z- 			goto out;
Z- 		if (sig == SIGCONT && sv->sv_handler == SIG_IGN) {
Z- 			error = EINVAL;
Z- 			goto out;
Z- 		}
Z- 		sv->sv_flags ^= SA_RESTART;	/* opposite of SV_INTERRUPT */
Z- 		setsigvec(sig, (struct sigaction *)sv);
Z- 	}
Z- out:
Z- 	return(u.u_error = error);
Z- }
Z- 
Z- /*
Z-  * 4.3 Compatibility
Z  */
Z- sigblock()
Z- {
Z- 	register struct a {
Z- 		long	mask;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 	register struct proc *p = u.u_procp;
Z- 
Z- 	(void) _splhigh();
Z- 	u.u_r.r_long = p->p_sigmask;
Z- 	p->p_sigmask |= uap->mask &~ sigcantmask;
Z- 	(void) _spl0();
Z- 	return(0);
Z- }
Z- 
Z- /*
Z-  * 4.3 Compatibility
Z- */
Z- sigsetmask()
Z- {
Z- 	register struct a {
Z- 		long	mask;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 	register struct proc *p = u.u_procp;
Z- 
Z- 	(void) _splhigh();
Z- 	u.u_r.r_long = p->p_sigmask;
Z- 	p->p_sigmask = uap->mask &~ sigcantmask;
Z- 	(void) _spl0();
Z- 	return(0);
Z- }
Z- 
Z- /*
Z-  * 4.3 Compatibility
Z- */
Z- sigpause()
Z- 	{
Z- 	struct a {
Z- 		long	mask;
Z- 		} *uap = (struct a *)u.u_ap;
Z- 	register struct proc *p = u.u_procp;
Z- 
Z- 	/*
Z- 	 * When returning from sigpause, we want
Z- 	 * the old mask to be restored after the
Z- 	 * signal handler has finished.  Thus, we
Z- 	 * save it here and mark the proc structure
Z- 	 * to indicate this.
Z- 	 */
Z- 	u.u_oldmask = p->p_sigmask;
Z- 	u.u_psflags |= SAS_OLDMASK;
Z- 	p->p_sigmask = uap->mask &~ sigcantmask;
Z- 	while	(tsleep((caddr_t)&u, PPAUSE|PCATCH, 0) == 0)
Z- 		;
Z- 	/* always return EINTR rather than ERESTART */
Z- 	return(u.u_error = EINTR);	/* XXX */
Z- 	}
Z- 
Z- /*
Z-  * 4.3 Compatibility
Z- */
Z  sigstack()
Z  	{
Z  	register struct a
Z--- 54,60 ----
Z***************
Z*** 697,705 ****
Z  		 * Set the new mask value and also defer further
Z  		 * occurences of this signal.
Z  		 *
Z! 		 * Special case: user has done a sigpause.  Here the
Z  		 * current mask is not of interest, but rather the
Z! 		 * mask from before the sigpause is what we want restored
Z  		 * after the signal processing is completed.
Z  		 */
Z  		(void) _splhigh();
Z--- 578,586 ----
Z  		 * Set the new mask value and also defer further
Z  		 * occurences of this signal.
Z  		 *
Z! 		 * Special case: user has done a sigsuspend.  Here the
Z  		 * current mask is not of interest, but rather the
Z! 		 * mask from before the sigsuspend is what we want restored
Z  		 * after the signal processing is completed.
Z  		 */
Z  		(void) _splhigh();
Z*** /usr/src/sys/sys/kern_exit.c.old	Mon Sep 13 20:44:23 1999
Z--- /usr/src/sys/sys/kern_exit.c	Sun Feb 20 18:18:38 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_exit.c	2.5 (2.11BSD) 1999/9/13
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)kern_exit.c	2.6 (2.11BSD) 2000/2/20
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 42,48 ****
Z  /*
Z   * Exit: deallocate address space and other resources,
Z   * change proc state to zombie, and unlink proc from allproc
Z!  * list.  Save exit status and rusage for wait().
Z   * Check for child processes and orphan them.
Z   */
Z  exit(rv)
Z--- 42,48 ----
Z  /*
Z   * Exit: deallocate address space and other resources,
Z   * change proc state to zombie, and unlink proc from allproc
Z!  * list.  Save exit status and rusage for wait4().
Z   * Check for child processes and orphan them.
Z   */
Z  exit(rv)
Z***************
Z*** 163,190 ****
Z  		struct rusage *rusage;
Z  		int compat;
Z  		};
Z- 
Z- owait()
Z- {
Z- 	int retval[2];
Z- 	register struct	args *uap = (struct args *)u.u_ap;
Z- 
Z- 	if ((u.u_ar0[RPS] & PSL_ALLCC) != PSL_ALLCC) {
Z- 		uap->options = 0;
Z- 		uap->rusage = 0;
Z- 	} else {
Z- 		uap->options = u.u_ar0[R0];
Z- 		uap->rusage = (struct rusage *)u.u_ar0[R1];
Z- 	}
Z- 	uap->pid = WAIT_ANY;
Z- 	uap->status = 0;
Z- 	uap->compat = 1;
Z- 	u.u_error = wait1(u.u_procp, uap, retval);
Z- 	if (!u.u_error) {
Z- 		u.u_r.r_val1 = retval[0];
Z- 		u.u_r.r_val2 = retval[1];
Z- 	}
Z- }
Z  
Z  wait4()
Z  {
Z--- 163,168 ----
Z*** /usr/src/sys/sys/sys_generic.c.old	Mon Sep 13 20:38:18 1999
Z--- /usr/src/sys/sys/sys_generic.c	Mon Feb 28 20:02:26 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)sys_generic.c	1.7 (2.11BSD) 1999/9/10
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)sys_generic.c	1.8 (2.11BSD) 2000/2/28
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 270,288 ****
Z  
Z  int	nselcoll;
Z  
Z  /*
Z   * Select system call.
Z!  */
Z  select()
Z  	{
Z! 	register struct uap
Z  		{
Z  		int	nd;
Z  		fd_set	*in, *ou, *ex;
Z  		struct	timeval *tv;
Z  		} *uap = (struct uap *)u.u_ap;
Z  	fd_set ibits[3], obits[3];
Z  	struct timeval atv;
Z  	unsigned int timo = 0;
Z  	register int error, ni;
Z  	int ncoll, s;
Z--- 270,332 ----
Z  
Z  int	nselcoll;
Z  
Z+ struct	pselect_args
Z+ 	{
Z+ 	int		nd;
Z+ 	fd_set		*in;
Z+ 	fd_set		*ou;
Z+ 	fd_set		*ex;
Z+ 	struct	timespec *ts;
Z+ 	sigset_t	*maskp;
Z+ 	};
Z+ 
Z  /*
Z   * Select system call.
Z! */
Z! int
Z  select()
Z  	{
Z! 	struct uap
Z  		{
Z  		int	nd;
Z  		fd_set	*in, *ou, *ex;
Z  		struct	timeval *tv;
Z  		} *uap = (struct uap *)u.u_ap;
Z+ 	register struct pselect_args *pselargs = (struct pselect_args *)uap;
Z+ 
Z+ 	/*
Z+ 	 * Fake the 6th parameter of pselect.  See the comment below about the
Z+ 	 * number of parameters!
Z+ 	*/
Z+ 	pselargs->maskp = 0;
Z+ 	return(u.u_error = select1(pselargs, 0));
Z+ 	}
Z+ 
Z+ /*
Z+  * pselect (posix select)
Z+  *
Z+  * N.B.  There is only room for 6 arguments - see user.h - so pselect() is
Z+  *       at the maximum!  See user.h
Z+ */
Z+ int
Z+ pselect()
Z+ 	{
Z+ 	register struct	pselect_args *uap = (struct pselect_args *)u.u_ap;
Z+ 
Z+ 	return(u.u_error = select1(uap, 1));
Z+ 	}
Z+ 
Z+ /*
Z+  * Select helper function common to both select() and pselect()
Z+  */
Z+ static int
Z+ select1(uap, is_pselect)
Z+ 	register struct pselect_args *uap;
Z+ 	int	is_pselect;
Z+ 	{
Z  	fd_set ibits[3], obits[3];
Z  	struct timeval atv;
Z+ 	sigset_t sigmsk;
Z  	unsigned int timo = 0;
Z  	register int error, ni;
Z  	int ncoll, s;
Z***************
Z*** 305,315 ****
Z  	getbits(ex, 2);
Z  #undef	getbits
Z  
Z! 	if	(uap->tv)
Z  		{
Z! 		error = copyin((caddr_t)uap->tv, (caddr_t)&atv, sizeof (atv));
Z  		if	(error)
Z  			goto done;
Z  		if	(itimerfix(&atv))
Z  			{
Z  			error = EINVAL;
Z--- 349,380 ----
Z  	getbits(ex, 2);
Z  #undef	getbits
Z  
Z! 	if	(uap->maskp)
Z  		{
Z! 		error = copyin(uap->maskp, &sigmsk, sizeof(sigmsk));
Z! 		sigmsk &= ~sigcantmask;
Z  		if	(error)
Z  			goto done;
Z+ 		}
Z+ 	if	(uap->ts)
Z+ 		{
Z+ 		error = copyin((caddr_t)uap->ts, (caddr_t)&atv, sizeof (atv));
Z+ 		if	(error)
Z+ 			goto done;
Z+ /*
Z+  * nanoseconds ('struct timespec') on a PDP-11 are stupid since a 50 or 60 hz
Z+  * clock is all we have.   Keeping the names and logic made porting easier
Z+  * though.
Z+ */
Z+ 		if	(is_pselect)
Z+ 			{
Z+ 			struct	timespec *ts = (struct timespec *)&atv;
Z+ 
Z+ 			if	(ts->tv_sec == 0 && ts->tv_nsec < 1000)
Z+ 					atv.tv_usec = 1;
Z+ 				else
Z+ 					atv.tv_usec = ts->tv_nsec / 1000;
Z+ 			}
Z  		if	(itimerfix(&atv))
Z  			{
Z  			error = EINVAL;
Z***************
Z*** 327,333 ****
Z  	if	(error || u.u_r.r_val1)
Z  		goto done;
Z  	s = splhigh();
Z! 	if	(uap->tv)
Z  		{
Z  		/* this should be timercmp(&time, &atv, >=) */
Z  		if	((time.tv_sec > atv.tv_sec || (time.tv_sec == atv.tv_sec
Z--- 392,398 ----
Z  	if	(error || u.u_r.r_val1)
Z  		goto done;
Z  	s = splhigh();
Z! 	if	(uap->ts)
Z  		{
Z  		/* this should be timercmp(&time, &atv, >=) */
Z  		if	((time.tv_sec > atv.tv_sec || (time.tv_sec == atv.tv_sec
Z***************
Z*** 347,353 ****
Z--- 412,431 ----
Z  		goto retry;
Z  		}
Z  	u.u_procp->p_flag &= ~P_SELECT;
Z+ /*
Z+  * If doing a pselect() need to set a temporary mask while in tsleep.  
Z+  * Returning from pselect after catching a signal the old mask has to be
Z+  * restored.  Save it here and set the appropriate flag.
Z+ */
Z+ 	if	(uap->maskp)
Z+ 		{
Z+ 		u.u_oldmask = u.u_procp->p_sigmask;
Z+ 		u.u_psflags |= SAS_OLDMASK;
Z+ 		u.u_procp->p_sigmask = sigmsk;
Z+ 		}
Z  	error = tsleep(&selwait, PSOCK | PCATCH, timo);
Z+ 	if	(uap->maskp)
Z+ 		u.u_procp->p_sigmask = u.u_oldmask;
Z  	splx(s);
Z  	if	(error == 0)
Z  		goto retry;
Z***************
Z*** 372,378 ****
Z  		putbits(ex, 2);
Z  #undef putbits
Z  		}
Z! 	return(u.u_error = error);
Z  	}
Z  
Z  selscan(ibits, obits, nfd, retval)
Z--- 450,456 ----
Z  		putbits(ex, 2);
Z  #undef putbits
Z  		}
Z! 	return(error);
Z  	}
Z  
Z  selscan(ibits, obits, nfd, retval)
Z*** /usr/src/sys/sys/init_sysent.c.old	Sun Sep  5 23:36:48 1999
Z--- /usr/src/sys/sys/init_sysent.c	Mon Feb 28 20:30:57 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)init_sysent.c	1.15 (2.11BSD) 1999/9/5
Z   */
Z  
Z  /*
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)init_sysent.c	1.16 (2.11BSD) 2000/2/20
Z   */
Z  
Z  /*
Z***************
Z*** 16,39 ****
Z  int	nosys();
Z  
Z  /* 1.1 processes and protection */
Z- int	sethostid(),gethostid(),sethostname(),gethostname();	/* COMPAT-43 */
Z  int	getpid();
Z  int	getppid(), fork(),rexit(),execv(),execve();
Z- int	owait();					/* COMPAT-43 */
Z  int	wait4(), getuid(),getgid(),getgroups(),setgroups();
Z  int	geteuid(), getegid(), getlogin();
Z  int	getpgrp(),setpgrp(), setlogin();
Z  int	setgid(), setegid(), setuid(), seteuid();
Z- int	setregid(), setreuid();				/* COMPAT-43 */
Z  int	ucall();					/* 2BSD calls */
Z  
Z  /* 1.2 memory management */
Z  int	sbrk();
Z- int	getpagesize();					/* COMPAT-43 */
Z  int	lock(),phys(),fetchi(),nostk(),fperr();		/* 2BSD calls */
Z  
Z  /* 1.3 signals */
Z! int	sigvec(),sigblock(),sigsetmask(),sigpause(),sigstack(),sigreturn();
Z  int	sigaction(), sigprocmask(), sigpending(), sigaltstack(), sigsuspend();
Z  int	sigwait(), kill(), killpg();
Z  
Z--- 16,35 ----
Z  int	nosys();
Z  
Z  /* 1.1 processes and protection */
Z  int	getpid();
Z  int	getppid(), fork(),rexit(),execv(),execve();
Z  int	wait4(), getuid(),getgid(),getgroups(),setgroups();
Z  int	geteuid(), getegid(), getlogin();
Z  int	getpgrp(),setpgrp(), setlogin();
Z  int	setgid(), setegid(), setuid(), seteuid();
Z  int	ucall();					/* 2BSD calls */
Z  
Z  /* 1.2 memory management */
Z  int	sbrk();
Z  int	lock(),phys(),fetchi(),nostk(),fperr();		/* 2BSD calls */
Z  
Z  /* 1.3 signals */
Z! int	sigstack(),sigreturn();
Z  int	sigaction(), sigprocmask(), sigpending(), sigaltstack(), sigsuspend();
Z  int	sigwait(), kill(), killpg();
Z  
Z***************
Z*** 44,50 ****
Z  
Z  /* 1.5 descriptors */
Z  int	getdtablesize(),dup(),dup2(),close();
Z! int	select(),fcntl(),flock();
Z  
Z  /* 1.6 resource controls */
Z  int	getpriority(),setpriority(),getrusage(),getrlimit(),setrlimit();
Z--- 40,46 ----
Z  
Z  /* 1.5 descriptors */
Z  int	getdtablesize(),dup(),dup2(),close();
Z! int	pselect(),select(),fcntl(),flock();
Z  
Z  /* 1.6 resource controls */
Z  int	getpriority(),setpriority(),getrusage(),getrlimit(),setrlimit();
Z***************
Z*** 60,66 ****
Z  /* 2.2 file system */
Z  int	chdir(), fchdir(), chroot();
Z  int	mkdir(),rmdir(), chflags(), fchflags();
Z! int	creat(),open(),mknod(),unlink(),stat(),fstat(),lstat();
Z  int	chown(),fchown(),chmod(),fchmod(),utimes();
Z  int	link(),symlink(),readlink(),rename();
Z  int	lseek(),truncate(),ftruncate(),saccess(),fsync();
Z--- 56,62 ----
Z  /* 2.2 file system */
Z  int	chdir(), fchdir(), chroot();
Z  int	mkdir(),rmdir(), chflags(), fchflags();
Z! int	open(),mknod(),unlink(),stat(),fstat(),lstat();
Z  int	chown(),fchown(),chmod(),fchmod(),utimes();
Z  int	link(),symlink(),readlink(),rename();
Z  int	lseek(),truncate(),ftruncate(),saccess(),fsync();
Z***************
Z*** 119,125 ****
Z  	3, open,			/*   5 = open */
Z  	1, close,			/*   6 = close */
Z  	4, wait4,			/*   7 = wait4 */
Z! 	2, creat,			/*   8 = creat COMPAT-43 */
Z  	2, link,			/*   9 = link */
Z  	1, unlink,			/*  10 = unlink */
Z  	2, execv,			/*  11 = execv */
Z--- 115,121 ----
Z  	3, open,			/*   5 = open */
Z  	1, close,			/*   6 = close */
Z  	4, wait4,			/*   7 = wait4 */
Z! 	0, nosys,			/*   8 = (old creat) */
Z  	2, link,			/*   9 = link */
Z  	1, unlink,			/*  10 = unlink */
Z  	2, execv,			/*  11 = execv */
Z***************
Z*** 175,182 ****
Z  	1, chroot,			/*  61 = chroot */
Z  	2, fstat,			/*  62 = fstat */
Z  	0, nosys,			/*  63 = reserved */
Z! 	0, getpagesize,			/*  64 = getpagesize COMPAT-43 */
Z! 	0, nosys,			/*  65 = unused */
Z  	0, vfork,			/*  66 = vfork */
Z  	0, nosys,			/*  67 = unused */
Z  	0, nosys,			/*  68 = unused */
Z--- 171,178 ----
Z  	1, chroot,			/*  61 = chroot */
Z  	2, fstat,			/*  62 = fstat */
Z  	0, nosys,			/*  63 = reserved */
Z! 	0, nosys,			/*  64 = (old getpagesize) */
Z! 	6, pselect,			/*  65 = pselect */
Z  	0, vfork,			/*  66 = vfork */
Z  	0, nosys,			/*  67 = unused */
Z  	0, nosys,			/*  68 = unused */
Z***************
Z*** 195,205 ****
Z  	1, getpgrp,			/*  81 = getpgrp */
Z  	2, setpgrp,			/*  82 = setpgrp */
Z  	3, setitimer,			/*  83 = setitimer */
Z! 	0, owait,			/*  84 = wait,wait3 COMPAT-43 */
Z  	0, nosys,			/*  85 = unused */
Z  	2, getitimer,			/*  86 = getitimer */
Z! 	2, gethostname,			/*  87 = gethostname COMPAT-43 */
Z! 	2, sethostname,			/*  88 = sethostname COMPAT-43 */
Z  	0, getdtablesize,		/*  89 = getdtablesize */
Z  	2, dup2,			/*  90 = dup2 */
Z  	0, nosys,			/*  91 = unused */
Z--- 191,201 ----
Z  	1, getpgrp,			/*  81 = getpgrp */
Z  	2, setpgrp,			/*  82 = setpgrp */
Z  	3, setitimer,			/*  83 = setitimer */
Z! 	0, nosys,			/*  84 = (old wait,wait3) */
Z  	0, nosys,			/*  85 = unused */
Z  	2, getitimer,			/*  86 = getitimer */
Z! 	0, nosys,			/*  87 = (old gethostname) */
Z! 	0, nosys,			/*  88 = (old sethostname) */
Z  	0, getdtablesize,		/*  89 = getdtablesize */
Z  	2, dup2,			/*  90 = dup2 */
Z  	0, nosys,			/*  91 = unused */
Z***************
Z*** 219,228 ****
Z  	ifnet(5, setsockopt),		/* 105 = setsockopt */
Z  	ifnet(2, listen),		/* 106 = listen */
Z  	1, sigsuspend,			/* 107 = sigsuspend */
Z! 	4, sigvec,			/* 108 = sigvec COMPAT-43 */
Z! 	2, sigblock,			/* 109 = sigblock COMPAT-43 */
Z! 	2, sigsetmask,			/* 110 = sigsetmask COMPAT-43 */
Z! 	2, sigpause,			/* 111 = sigpause COMPAT-43 */
Z  	2, sigstack,			/* 112 = sigstack COMPAT-43 */
Z  	ifnet(3, recvmsg),		/* 113 = recvmsg */
Z  	ifnet(3, sendmsg),		/* 114 = sendmsg */
Z--- 215,224 ----
Z  	ifnet(5, setsockopt),		/* 105 = setsockopt */
Z  	ifnet(2, listen),		/* 106 = listen */
Z  	1, sigsuspend,			/* 107 = sigsuspend */
Z! 	0, nosys,			/* 108 = (old sigvec) */
Z! 	0, nosys,			/* 109 = (old sigblock) */
Z! 	0, nosys,			/* 110 = (old sigsetmask) */
Z! 	0, nosys,			/* 111 = (old sigpause)  */
Z  	2, sigstack,			/* 112 = sigstack COMPAT-43 */
Z  	ifnet(3, recvmsg),		/* 113 = recvmsg */
Z  	ifnet(3, sendmsg),		/* 114 = sendmsg */
Z***************
Z*** 237,244 ****
Z  	3, fchown,			/* 123 = fchown */
Z  	2, fchmod,			/* 124 = fchmod */
Z  	ifnet(6, recvfrom),		/* 125 = recvfrom */
Z! 	2, setreuid,			/* 126 = setreuid - COMPAT43 */
Z! 	2, setregid,			/* 127 = setregid - COMPAT43 */
Z  	2, rename,			/* 128 = rename */
Z  	3, truncate,			/* 129 = truncate */
Z  	3, ftruncate,			/* 130 = ftruncate */
Z--- 233,240 ----
Z  	3, fchown,			/* 123 = fchown */
Z  	2, fchmod,			/* 124 = fchmod */
Z  	ifnet(6, recvfrom),		/* 125 = recvfrom */
Z! 	0, nosys,			/* 126 = (old setreuid) */
Z! 	0, nosys,			/* 127 = (old setregid) */
Z  	2, rename,			/* 128 = rename */
Z  	3, truncate,			/* 129 = truncate */
Z  	3, ftruncate,			/* 130 = ftruncate */
Z***************
Z*** 253,260 ****
Z  	0, nosys,			/* 139 = unused */
Z  	2, adjtime,			/* 140 = adjtime */
Z  	ifnet(3, getpeername),		/* 141 = getpeername */
Z! 	0, gethostid,			/* 142 = gethostid COMPAT-43 */
Z! 	2, sethostid,			/* 143 = sethostid COMPAT-43 */
Z  	2, getrlimit,			/* 144 = getrlimit */
Z  	2, setrlimit,			/* 145 = setrlimit */
Z  	2, killpg,			/* 146 = killpg */
Z--- 249,256 ----
Z  	0, nosys,			/* 139 = unused */
Z  	2, adjtime,			/* 140 = adjtime */
Z  	ifnet(3, getpeername),		/* 141 = getpeername */
Z! 	0, nosys,			/* 142 = (old gethostid) */
Z! 	0, nosys,			/* 143 = (old sethostid) */
Z  	2, getrlimit,			/* 144 = getrlimit */
Z  	2, setrlimit,			/* 145 = setrlimit */
Z  	2, killpg,			/* 146 = killpg */
Z*** /usr/src/sys/sys/ufs_syscalls.c.old	Mon Sep 13 20:30:36 1999
Z--- /usr/src/sys/sys/ufs_syscalls.c	Sun Feb 20 17:49:19 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)ufs_syscalls.c	1.13 (2.11BSD) 1999/9/13
Z   */
Z  
Z  #include "param.h"
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)ufs_syscalls.c	1.14 (2.11BSD) 2000/2/20
Z   */
Z  
Z  #include "param.h"
Z***************
Z*** 114,133 ****
Z  }
Z  
Z  /*
Z-  * Creat system call.
Z-  */
Z- creat()
Z- {
Z- 	register struct a {
Z- 		char	*fname;
Z- 		int	fmode;
Z- 	} *uap = (struct a *)u.u_ap;
Z- 
Z- 	u.u_error = copen(O_WRONLY|O_CREAT|O_TRUNC, uap->fmode, uap->fname);
Z- }
Z- 
Z- /*
Z-  * Common code for open and creat.
Z   * Check permissions, allocate an open file structure,
Z   * and call the device open routine if any.
Z   */
Z--- 114,119 ----
Z*** /usr/src/sys/h/time.h.old	Fri Jan 20 19:50:22 1995
Z--- /usr/src/sys/h/time.h	Fri Apr 21 20:35:56 2000
Z***************
Z*** 3,14 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)time.h	1.2 (2.11BSD GTE) 1/14/95
Z   */
Z  
Z  #ifndef	_SYS_TIME_H_
Z  #define	_SYS_TIME_H_
Z  
Z  /*
Z   * Structure returned by gettimeofday(2) system call,
Z   * and used in other calls.
Z--- 3,16 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)time.h	1.3 (2.11BSD) 2000/4/21
Z   */
Z  
Z  #ifndef	_SYS_TIME_H_
Z  #define	_SYS_TIME_H_
Z  
Z+ #include <sys/types.h>
Z+ 
Z  /*
Z   * Structure returned by gettimeofday(2) system call,
Z   * and used in other calls.
Z***************
Z*** 16,21 ****
Z--- 18,33 ----
Z  struct timeval {
Z  	long	tv_sec;		/* seconds */
Z  	long	tv_usec;	/* and microseconds */
Z+ };
Z+ 
Z+ /*
Z+  * Structure defined by POSIX.4 to be like a timeval but with nanoseconds
Z+  * instead of microseconds.  Silly on a PDP-11 but keeping the names the
Z+  * same makes life simpler than changing the names.
Z+ */
Z+ struct timespec {
Z+ 	time_t tv_sec;		/* seconds */
Z+ 	long   tv_nsec;		/* and nanoseconds */
Z  };
Z  
Z  struct timezone {
Z*** /usr/src/sys/h/types.h.old	Fri Jan 12 22:03:45 1996
Z--- /usr/src/sys/h/types.h	Mon Feb 28 21:01:48 2000
Z***************
Z*** 3,9 ****
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)types.h	1.4 (2.11BSD Berkeley) 1996/1/12
Z   */
Z  
Z  #ifndef _TYPES_
Z--- 3,9 ----
Z   * All rights reserved.  The Berkeley software License Agreement
Z   * specifies the terms and conditions for redistribution.
Z   *
Z!  *	@(#)types.h	1.4.1 (2.11BSD) 2000/2/28
Z   */
Z  
Z  #ifndef _TYPES_
Z***************
Z*** 50,79 ****
Z  typedef	u_short	mode_t;
Z  
Z  #define	NBBY	8		/* number of bits in a byte */
Z- /*
Z-  * Select uses bit masks of file descriptors in longs.
Z-  * These macros manipulate such bit fields (the filesystem macros use chars).
Z-  * FD_SETSIZE may be defined by the user, but the default here
Z-  * should be >= NOFILE (param.h).
Z-  */
Z- #ifndef	FD_SETSIZE
Z- #define	FD_SETSIZE	32
Z- #endif
Z  
Z- typedef long	fd_mask;
Z- #define NFDBITS	(sizeof(fd_mask) * NBBY)	/* bits per mask */
Z  #ifndef howmany
Z  #define	howmany(x, y)	(((x)+((y)-1))/(y))
Z  #endif
Z  
Z! typedef	struct fd_set {
Z! 	fd_mask	fds_bits[1];
Z! } fd_set;
Z! 
Z! #define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
Z! #define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
Z! #define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
Z! #define FD_ZERO(p)	bzero((char *)(p), sizeof(*(p)))
Z  
Z  typedef char	bool_t;		/* boolean */
Z  typedef u_int	memaddr;	/* core or swap address */
Z--- 50,61 ----
Z  typedef	u_short	mode_t;
Z  
Z  #define	NBBY	8		/* number of bits in a byte */
Z  
Z  #ifndef howmany
Z  #define	howmany(x, y)	(((x)+((y)-1))/(y))
Z  #endif
Z  
Z! #include <sys/select.h>
Z  
Z  typedef char	bool_t;		/* boolean */
Z  typedef u_int	memaddr;	/* core or swap address */
Z*** /usr/src/sys/pdp/toy.s.old	Wed Jul 22 14:16:00 1992
Z--- /usr/src/sys/pdp/toy.s	Sun Apr  9 14:19:36 2000
Z***************
Z*** 1,3 ****
Z--- 1,6 ----
Z+ / April 9, 2000 - modified to probe for the TOY clock rather than checking
Z+ /	the cpu type for 93 or 94.
Z+ 
Z  / the notes say that the TOY clock uses 24 hour time, but then later on
Z  / mention flags dealing with AM/PM...  So, code is present but disabled
Z  / to handle 12 hour time.  If this code is needed change the 0 below to
Z***************
Z*** 13,29 ****
Z  	.globl	TOYCSR
Z  TOYCSR	= 177526
Z  
Z! 	.globl	_toyclk
Z  	.text
Z  _toyclk:
Z  	jsr	r5,csv			/ callable from C, save regs
Z  	sub	$8.,sp			/ need 8 byte scratch area
Z  tdata = -20
Z! 	cmp	_cputype,$93.		/ are we a 11/93?
Z! 	beq	1f			/ yes - br
Z! 	cmp	_cputype,$94.		/ are we a 11/94?
Z! 	bne	err			/ no, go return "error"
Z  1:
Z  	jsr	pc,initoy		/ initialize the clock for reading
Z  	mov	r5,(sp)
Z  	add	$tdata,(sp)		/ pointer to scratch area
Z--- 16,35 ----
Z  	.globl	TOYCSR
Z  TOYCSR	= 177526
Z  
Z! 	.globl	_toyclk, nofault
Z  	.text
Z  _toyclk:
Z  	jsr	r5,csv			/ callable from C, save regs
Z  	sub	$8.,sp			/ need 8 byte scratch area
Z  tdata = -20
Z! 	clr	-(sp)
Z! 	mov	$1f, nofault		/ catch trap if no toy clock
Z! 	tst	*$TOYCSR
Z! 	inc	(sp)
Z  1:
Z+ 	clr	nofault			/ done with trap catcher
Z+ 	tst	(sp)+			/ did we see a toy clock?
Z+ 	beq	err			/ no, go return "error"
Z  	jsr	pc,initoy		/ initialize the clock for reading
Z  	mov	r5,(sp)
Z  	add	$tdata,(sp)		/ pointer to scratch area
Z*** /usr/src/sys/pdpstand/toyset.s.old	Thu Apr 10 20:14:08 1997
Z--- /usr/src/sys/pdpstand/toyset.s	Thu Apr  6 21:22:07 2000
Z***************
Z*** 1,5 ****
Z--- 1,10 ----
Z  TOYCSR	= 177526
Z  
Z+ / April 6, 2000 - sms@moe.2bsd.com
Z+ / Remove the cpu type (93 or 94) restriction and probe for the TOY register.
Z+ / Some systems have clock boards added _and_ P11 (Begemot Computer Associates'
Z+ / PDP-11 emulator) have support for the TOY clock.
Z+ /
Z  / April 10, 1997 - sms@moe.2bsd.com
Z  / The day of week calculation was incorrect and would return -1 for Saturday
Z  / rather than 6.  Alan Sieving spotted this one too (toyset.s must be favorite
Z***************
Z*** 24,36 ****
Z  / To not change the date and time simply hit a return and the program will
Z  / exit, returning control to 'boot'.
Z  
Z! 	.globl	_main, csv, cret, _printf, _gets, _exit, _cputype, _module
Z  
Z  _main:
Z  main:
Z  	jsr	r5,csv			/ srt0.o sets up a C frame...
Z  
Z! 	jsr	pc,init			/ check cpu type and display current TOY
Z  
Z  	clrb	line			/ init buffer
Z  	mov	$line,-(sp)
Z--- 29,42 ----
Z  / To not change the date and time simply hit a return and the program will
Z  / exit, returning control to 'boot'.
Z  
Z! 	.globl	_main, csv, cret, _printf, _gets, _exit, _module
Z! 	.globl	nofault
Z  
Z  _main:
Z  main:
Z  	jsr	r5,csv			/ srt0.o sets up a C frame...
Z  
Z! 	jsr	pc,init			/ probe for clock, display current TOY
Z  
Z  	clrb	line			/ init buffer
Z  	mov	$line,-(sp)
Z***************
Z*** 186,205 ****
Z  	clr	r0			/ "exit" status.  ha! ;-)
Z  	jsr	pc,_exit
Z  
Z! / Check the cpu type - only the 93 and 94 have a TOY.  Then initialize
Z! / the TOY and read the current date.  Convert the date into printable
Z! / form and print it out along with the prompt.
Z  
Z  init:
Z! 	cmp	_cputype,$93.
Z! 	beq	1f
Z! 	cmp	_cputype,$94.
Z! 	beq	1f
Z  	mov	$errmsg1,-(sp)
Z  	jsr	pc,_printf
Z  	mov	$1,r0
Z  	jsr	pc,_exit
Z! 1:
Z  	jsr	pc,initoy		/ init the TOY clock
Z  	mov	$bcd,-(sp)		/ buffer for the date
Z  	jsr	pc,_gettoy		/ read the TOY
Z--- 192,212 ----
Z  	clr	r0			/ "exit" status.  ha! ;-)
Z  	jsr	pc,_exit
Z  
Z! / Probe for the TOY register.  If present initialize the TOY and read the 
Z! / current date otherwise print an error message and exit.  Convert the date 
Z! / into printable form and print it out along with the prompt.
Z  
Z  init:
Z! 	mov	$1f, nofault		/ catch fault if no TOY clock
Z! 	tst	*$TOYCSR
Z! 	br	2f			/ we have a clock
Z! 1:
Z  	mov	$errmsg1,-(sp)
Z  	jsr	pc,_printf
Z  	mov	$1,r0
Z  	jsr	pc,_exit
Z! 2:
Z! 	clr	nofault			/ faults are serious again
Z  	jsr	pc,initoy		/ init the TOY clock
Z  	mov	$bcd,-(sp)		/ buffer for the date
Z  	jsr	pc,_gettoy		/ read the TOY
Z***************
Z*** 372,378 ****
Z  m_magic:
Z  	.byte	1,4,4,0,2,5,0,3,6,1,4,6
Z  errmsg1:
Z! 	<Cputype is not 93 or 94.  No TOY present\n\0>
Z  timmsg:
Z  	<Current TOY: >
Z  timbuf:
Z--- 379,385 ----
Z  m_magic:
Z  	.byte	1,4,4,0,2,5,0,3,6,1,4,6
Z  errmsg1:
Z! 	<No TOY clock present\n\0>
Z  timmsg:
Z  	<Current TOY: >
Z  timbuf:
Z*** /usr/src/sys/pdpstand/srt0.s.old	Mon Jun  5 20:29:16 1995
Z--- /usr/src/sys/pdpstand/srt0.s	Thu Apr  6 21:17:44 2000
Z***************
Z*** 1,3 ****
Z--- 1,4 ----
Z+ / 2000/04/06 - make 'nofault' global so toyset.o can use it
Z  / 1995/06/04 - devsw[] entries are 14. bytes, need a tape seek routine entry.
Z  / 1995/06/02 - Modifications for split I/D to work.  The vectors need to be
Z  /	       in 'data' space.
Z***************
Z*** 111,117 ****
Z  	rtt
Z  
Z  	.data
Z! .globl	_cputype, _bootcsr, _bootdev, _ssr3copy, _bootctlr
Z  
Z  nofault:	.=.+2	/ where to go on predicted trap
Z  _cputype:	.=.+2	/ cpu type (currently 44, 70, 73)
Z--- 112,118 ----
Z  	rtt
Z  
Z  	.data
Z! .globl	nofault, _cputype, _bootcsr, _bootdev, _ssr3copy, _bootctlr
Z  
Z  nofault:	.=.+2	/ where to go on predicted trap
Z  _cputype:	.=.+2	/ cpu type (currently 44, 70, 73)
Z*** /usr/src/bin/adb/opset.c.old	Sat Jan  3 20:03:30 1998
Z--- /usr/src/bin/adb/opset.c	Mon Feb 28 20:38:04 2000
Z***************
Z*** 1,5 ****
Z  #if	!defined(lint) && defined(DOSCCS)
Z! static	char	sccsid[] = "@(#)opset.c 2.6 (2.11BSD GTE) 1998/1/3";
Z  #endif
Z  
Z  #include "defs.h"
Z--- 1,5 ----
Z  #if	!defined(lint) && defined(DOSCCS)
Z! static	char	sccsid[] = "@(#)opset.c 2.7 (2.11BSD) 2000/2/28";
Z  #endif
Z  
Z  #include "defs.h"
Z***************
Z*** 140,146 ****
Z  	"open",
Z  	"close",
Z  	"wait4",
Z! 	"old creat",		/* 8 - old creat COMPAT-43 */
Z  	"link",
Z  	"unlink",		/* 10 */
Z  	"execv",
Z--- 140,146 ----
Z  	"open",
Z  	"close",
Z  	"wait4",
Z! 	NULL,			/* 8 - unused */
Z  	"link",
Z  	"unlink",		/* 10 */
Z  	"execv",
Z***************
Z*** 196,203 ****
Z  	"chroot",
Z  	"fstat",
Z  	NULL,			/* 63 - unused */
Z! 	"old getpagesize",	/* 64 - old getpagesize COMPAT-43 */
Z! 	NULL,			/* 65 - mremap */
Z  	"vfork",
Z  	NULL,			/* 67 - unused */
Z  	NULL,			/* 68 - unused */
Z--- 196,203 ----
Z  	"chroot",
Z  	"fstat",
Z  	NULL,			/* 63 - unused */
Z! 	NULL,			/* 64 - unused */
Z! 	"pselect",		/* 65 - pselect */
Z  	"vfork",
Z  	NULL,			/* 67 - unused */
Z  	NULL,			/* 68 - unused */
Z***************
Z*** 216,226 ****
Z  	"getpgrp",
Z  	"setpgrp",
Z  	"setitimer",
Z! 	"old wait",		/* 84 - old wait COMPAT-43 */
Z  	NULL,			/* 85 - unused */
Z  	"getitimer",
Z! 	"old gethostname",	/* 87 - old gethostname COMPAT-43 */
Z! 	"old sethostname",	/* 88 - old sethostname COMPAT-43 */
Z  	"getdtablesize",
Z  	"dup2",
Z  	NULL,			/* 91 - unused */
Z--- 216,226 ----
Z  	"getpgrp",
Z  	"setpgrp",
Z  	"setitimer",
Z! 	NULL,			/* 84 - unused */
Z  	NULL,			/* 85 - unused */
Z  	"getitimer",
Z! 	NULL,			/* 87 - unused */
Z! 	NULL,			/* 88 - unused */
Z  	"getdtablesize",
Z  	"dup2",
Z  	NULL,			/* 91 - unused */
Z***************
Z*** 240,250 ****
Z  	"setsockopt",
Z  	"listen",
Z  	"sigsuspend",		/* 107 - sigsuspend */
Z! 	"old sigvec",		/* 108 - sigvec COMPAT-43 */
Z! 	"old sigblock",		/* 109 - sigblock COMPAT-43 */
Z! 	"old sigsetmask",	/* 110 - sigsetmask COMPAT-43 */
Z! 	"old sigpause",		/* 111 - sigpause COMPAT-43 */
Z! 	"old sigstack",		/* 112 - sigstack COMPAT-43 */
Z  	"recvmsg",
Z  	"sendmsg",
Z  	NULL,			/* 115 - unused */
Z--- 240,250 ----
Z  	"setsockopt",
Z  	"listen",
Z  	"sigsuspend",		/* 107 - sigsuspend */
Z! 	NULL,			/* 108 - unused */
Z! 	NULL,			/* 109 - unused */
Z! 	NULL,			/* 110 - unused */
Z! 	NULL,			/* 111 - unused */
Z! 	"old sigstack",		/* 112 - sigstack COMPAT-43 for zork */
Z  	"recvmsg",
Z  	"sendmsg",
Z  	NULL,			/* 115 - unused */
Z***************
Z*** 258,265 ****
Z  	"fchown",
Z  	"fchmod",
Z  	"recvfrom",
Z! 	"old setreuid",		/* 126 - old setreuid COMPAT-43 */
Z! 	"old setregid",		/* 127 - old setregid COMPAT-43 */
Z  	"rename",
Z  	"truncate",
Z  	"ftruncate",
Z--- 258,265 ----
Z  	"fchown",
Z  	"fchmod",
Z  	"recvfrom",
Z! 	NULL,			/* 126 - unused */
Z! 	NULL,			/* 127 - unused */
Z  	"rename",
Z  	"truncate",
Z  	"ftruncate",
Z***************
Z*** 274,281 ****
Z  	NULL,			/* 139 - unused */
Z  	"adjtime",
Z  	"getpeername",
Z! 	"old gethostid",	/* 142 - gethostid COMPAT-43 */
Z! 	"old sethostid",	/* 143 - sethostid COMPAT-43 */
Z  	"getrlimit",
Z  	"setrlimit",
Z  	"killpg",
Z--- 274,281 ----
Z  	NULL,			/* 139 - unused */
Z  	"adjtime",
Z  	"getpeername",
Z! 	NULL,			/* 142 - unused */
Z! 	NULL,			/* 143 - unused */
Z  	"getrlimit",
Z  	"setrlimit",
Z  	"killpg",
Z*** /usr/src/bin/make/doname.c.old	Mon Jan 10 21:38:45 1994
Z--- /usr/src/bin/make/doname.c	Sat Feb 12 23:21:14 2000
Z***************
Z*** 1,4 ****
Z! /* static	char *sccsid = "@(#)doname.c	4.9.1 (2.11BSD GTE) 1/1/94"; */
Z  #include "defs"
Z  #include <strings.h>
Z  #include <signal.h>
Z--- 1,4 ----
Z! /* static	char *sccsid = "@(#)doname.c	4.9.2 (2.11BSD) 2000/2/12"; */
Z  #include "defs"
Z  #include <strings.h>
Z  #include <signal.h>
Z***************
Z*** 317,323 ****
Z  		if (status & 0200)
Z  			printf(" - core dumped");
Z  	} else
Z! 		printf("*** Exit %d", status>>8 );
Z  
Z  	if(nohalt) printf(" (ignored)\n");
Z  	else	printf("\n");
Z--- 317,323 ----
Z  		if (status & 0200)
Z  			printf(" - core dumped");
Z  	} else
Z! 		printf("*** Exit %d", (status>>8) & 0xff);
Z  
Z  	if(nohalt) printf(" (ignored)\n");
Z  	else	printf("\n");
Z*** /usr/src/bin/as/as0.s.old	Fri Mar 11 22:37:37 1994
Z--- /usr/src/bin/as/as0.s	Tue Apr 11 22:05:39 2000
Z***************
Z*** 1,4 ****
Z! 	.globl	_main, _write, _close, _execl, __exit, _creat, _brk
Z  	.globl	_read, _signal, _stat, _open, _mkstemp, _calloc, _realloc
Z  
Z  	.globl	error, errore, errora, checkeos, pass1, aexit, argb
Z--- 1,4 ----
Z! 	.globl	_main, _write, _close, _execl, __exit, _brk
Z  	.globl	_read, _signal, _stat, _open, _mkstemp, _calloc, _realloc
Z  
Z  	.globl	error, errore, errora, checkeos, pass1, aexit, argb
Z***************
Z*** 203,209 ****
Z  
Z  	tst	errflg			/ any errors?
Z  	beq	1f			/ yes - br
Z! 	jmp	aexit
Z  1:
Z  	inc	passno			/ go from -1 to 0
Z  	clr	line			/ reset line number
Z--- 203,210 ----
Z  
Z  	tst	errflg			/ any errors?
Z  	beq	1f			/ yes - br
Z! 	jsr	pc,aexit
Z! / not reached
Z  1:
Z  	inc	passno			/ go from -1 to 0
Z  	clr	line			/ reset line number
Z***************
Z*** 544,550 ****
Z  	mov	$1,-(sp)
Z  	jsr	pc,_write
Z  	add	$6,sp
Z! 	jmp	aexit
Z  
Z  	.data
Z  timesaround: 0
Z--- 545,552 ----
Z  	mov	$1,-(sp)
Z  	jsr	pc,_write
Z  	add	$6,sp
Z! 	jsr	pc,aexit
Z! / not reached
Z  
Z  	.data
Z  timesaround: 0
Z***************
Z*** 760,766 ****
Z  	beq	2f
Z  	mov	$'i,r5
Z  	jsr	pc,error
Z! 	jmp	aexit
Z  2:
Z  / check for the filename arguments of "-" or "--", these mean to read 'stdin'.
Z  / Additional filenames are permitted and will be processed when EOF
Z--- 762,770 ----
Z  	beq	2f
Z  	mov	$'i,r5
Z  	jsr	pc,error
Z! 	jsr	pc,aexit
Z! / not reached
Z! 
Z  2:
Z  / check for the filename arguments of "-" or "--", these mean to read 'stdin'.
Z  / Additional filenames are permitted and will be processed when EOF
Z***************
Z*** 790,796 ****
Z  	mov	*curarg,-(sp)
Z  	jsr	pc,filerr
Z  	tst	(sp)+
Z! 	jmp	aexit
Z  2:
Z  	mov	$1,line
Z  	mov	r4,-(sp)
Z--- 794,801 ----
Z  	mov	*curarg,-(sp)
Z  	jsr	pc,filerr
Z  	tst	(sp)+
Z! 	jsr	pc,aexit
Z! /not reached
Z  2:
Z  	mov	$1,line
Z  	mov	r4,-(sp)
Z***************
Z*** 968,974 ****
Z  4:
Z  	mov	$'<,r5
Z  	jsr	pc,error
Z! 	jmp	aexit
Z  
Z  	.data
Z  schar:
Z--- 973,980 ----
Z  4:
Z  	mov	$'<,r5
Z  	jsr	pc,error
Z! 	jsr	pc,aexit
Z! / not reached
Z  
Z  	.data
Z  schar:
Z*** /usr/src/bin/as/as2.s.old	Wed Sep 10 22:38:32 1997
Z--- /usr/src/bin/as/as2.s	Sun Feb 20 20:19:53 2000
Z***************
Z*** 2,8 ****
Z  /	calling convention in three places.
Z  
Z  	.globl	_signal, _close, _lseek, _unlink, _umask, _chmod, __exit
Z! 	.globl	_write, _read, _brk, _end, _open, _creat, _realloc, _fchmod
Z  	.globl	pass1, hshsiz, outmod, dot, dotdot, error
Z  	.globl	checkeos, curfb, savdot, ch, line, savop, inbuf, errflg
Z  	.globl	fbptr, fbtbl, symnum, hshtab, symblk, symleft, dotrel
Z--- 2,8 ----
Z  /	calling convention in three places.
Z  
Z  	.globl	_signal, _close, _lseek, _unlink, _umask, _chmod, __exit
Z! 	.globl	_write, _read, _brk, _end, _open, _realloc, _fchmod
Z  	.globl	pass1, hshsiz, outmod, dot, dotdot, error
Z  	.globl	checkeos, curfb, savdot, ch, line, savop, inbuf, errflg
Z  	.globl	fbptr, fbtbl, symnum, hshtab, symblk, symleft, dotrel
Z***************
Z*** 45,51 ****
Z  	mov	hshtab,-(sp)
Z  	jsr	pc,_realloc		/ hshtab = realloc(hshtab, r0)
Z  	mov	r0,hshtab
Z! 	/ check for failure?
Z  1:
Z  	mov	hshtab,r1
Z  	mov	usymtab,r2
Z--- 45,52 ----
Z  	mov	hshtab,-(sp)
Z  	jsr	pc,_realloc		/ hshtab = realloc(hshtab, r0)
Z  	mov	r0,hshtab
Z! 	bne	1f
Z! 	iot				/ should never happen
Z  1:
Z  	mov	hshtab,r1
Z  	mov	usymtab,r2
Z***************
Z*** 112,118 ****
Z  	inc	passno
Z  	cmp	outmod,$777
Z  	beq	1f
Z! 	jmp	aexit
Z  1:
Z  	jsr	pc,setup
Z  	inc	bsssiz
Z--- 113,120 ----
Z  	inc	passno
Z  	cmp	outmod,$777
Z  	beq	1f
Z! 	jsr	pc,aexit
Z! / not reached
Z  1:
Z  	jsr	pc,setup
Z  	inc	bsssiz
Z***************
Z*** 199,205 ****
Z  9:
Z  	mov	$txtp,-(sp)
Z  	jsr	pc,flush
Z! 	br	aexit
Z  
Z  saexit:
Z  	mov	pc,errflg
Z--- 201,208 ----
Z  9:
Z  	mov	$txtp,-(sp)
Z  	jsr	pc,flush
Z! 	jsr	pc,aexit
Z! / not reached
Z  
Z  saexit:
Z  	mov	pc,errflg
Z***************
Z*** 797,803 ****
Z  	mov	$1,-(sp)
Z  	jsr	pc,_write
Z  	add	$6,sp
Z! 	jmp	saexit
Z  
Z  	.data
Z  9:
Z--- 800,807 ----
Z  	mov	$1,-(sp)
Z  	jsr	pc,_write
Z  	add	$6,sp
Z! 	jsr	pc,saexit
Z! / not reached
Z  
Z  	.data
Z  9:
Z*** /usr/src/lib/libc/pdp/sys/Makefile.old	Fri Sep 10 20:36:21 1999
Z--- /usr/src/lib/libc/pdp/sys/Makefile	Mon Feb 28 21:14:15 2000
Z***************
Z*** 1,6 ****
Z  # Placed in the public domain - 1995/05/06
Z  #
Z! #	@(#)Makefile	1.8 (2.11BSD) 1999/9/10
Z  
Z  CPP= /lib/cpp
Z  LD= /bin/ld
Z--- 1,6 ----
Z  # Placed in the public domain - 1995/05/06
Z  #
Z! #	@(#)Makefile	1.9 (2.11BSD) 2000/2/28
Z  
Z  CPP= /lib/cpp
Z  LD= /bin/ld
Z***************
Z*** 27,33 ****
Z  	getpeername.o getpriority.o getrlimit.o getrusage.o getsockopt.o \
Z  	gettimeofday.o ioctl.o kill.o killpg.o link.o listen.o lstat.o mkdir.o
Z  
Z! NORM2=  mknod.o mount.o open.o quota.o read.o readlink.o readv.o reboot.o \
Z  	recv.o recvfrom.o recvmsg.o rename.o rmdir.o select.o send.o sendmsg.o \
Z  	sendto.o setgroups.o setitimer.o setpgrp.o setpriority.o setquota.o \
Z  	setuid.o seteuid.o setgid.o setegid.o \
Z--- 27,34 ----
Z  	getpeername.o getpriority.o getrlimit.o getrusage.o getsockopt.o \
Z  	gettimeofday.o ioctl.o kill.o killpg.o link.o listen.o lstat.o mkdir.o
Z  
Z! NORM2=  mknod.o mount.o open.o pselect.o quota.o read.o readlink.o readv.o \
Z! 	reboot.o \
Z  	recv.o recvfrom.o recvmsg.o rename.o rmdir.o select.o send.o sendmsg.o \
Z  	sendto.o setgroups.o setitimer.o setpgrp.o setpriority.o setquota.o \
Z  	setuid.o seteuid.o setgid.o setegid.o \
Z*** /usr/src/man/man2/select.2.old	Fri Sep 10 20:22:42 1999
Z--- /usr/src/man/man2/select.2	Sat Mar  4 16:08:53 2000
Z***************
Z*** 2,20 ****
Z  .\" All rights reserved.  The Berkeley software License Agreement
Z  .\" specifies the terms and conditions for redistribution.
Z  .\"
Z! .\"	@(#)select.2	6.5.1 (2.11BSD) 1999/9/10
Z  .\"
Z! .TH SELECT 2 "September 10, 1999"
Z  .UC 5
Z  .SH NAME
Z! select \- synchronous I/O multiplexing
Z  .SH SYNOPSIS
Z  .nf
Z  .ft B
Z  #include <sys/types.h>
Z  #include <sys/time.h>
Z  .PP
Z  .ft B
Z  nfound = select(nfds, readfds, writefds, exceptfds, timeout)
Z  int nfound, nfds;
Z  fd_set *readfds, *writefds, *exceptfds;
Z--- 2,29 ----
Z  .\" All rights reserved.  The Berkeley software License Agreement
Z  .\" specifies the terms and conditions for redistribution.
Z  .\"
Z! .\"	@(#)select.2	6.5.2 (2.11BSD) 2000/3/4
Z  .\"
Z! .TH SELECT 2 "March 4, 2000"
Z  .UC 5
Z  .SH NAME
Z! pselect, select \- synchronous I/O multiplexing
Z  .SH SYNOPSIS
Z  .nf
Z  .ft B
Z  #include <sys/types.h>
Z  #include <sys/time.h>
Z+ #include <sys/select.h>
Z+ #include <signal.h>
Z  .PP
Z  .ft B
Z+ nfound = pselect(nfds, readfds, writefds, exceptfds, timeout, sigmask);
Z+ int nfound, nfds;
Z+ fd_set *readfds, *writefds, *exceptfds;
Z+ struct timespec *timeout;
Z+ sigset_t *sigmask;
Z+ .PP
Z+ .ft B
Z  nfound = select(nfds, readfds, writefds, exceptfds, timeout)
Z  int nfound, nfds;
Z  fd_set *readfds, *writefds, *exceptfds;
Z***************
Z*** 29,36 ****
Z  fd_set fdset;
Z  .fi
Z  .SH DESCRIPTION
Z! .I Select
Z! examines the I/O descriptor sets whose addresses are passed in
Z  .IR readfds ,
Z  .IR writefds ,
Z  and
Z--- 38,47 ----
Z  fd_set fdset;
Z  .fi
Z  .SH DESCRIPTION
Z! .I Pselect
Z! and
Z! .I select
Z! examine the I/O descriptor sets whose addresses are passed in
Z  .IR readfds ,
Z  .IR writefds ,
Z  and
Z***************
Z*** 38,43 ****
Z--- 49,62 ----
Z  to see if some of their descriptors
Z  are ready for reading, are ready for writing, or have an exceptional
Z  condition pending, respectively.
Z+ The two functions are identical except for the type and format of the
Z+ .I timeout
Z+ value, and the additonal 
Z+ .I sigmask
Z+ parameter supplied to the
Z+ .IR pselect ()
Z+ call.
Z+ .PP
Z  The first
Z  .I nfds
Z  descriptors are checked in each set;
Z***************
Z*** 85,94 ****
Z  is a non-zero pointer, it specifies a maximum interval to wait for the
Z  selection to complete.  If 
Z  .I timeout
Z! is a zero pointer, the select blocks indefinitely.  To affect a poll, the
Z  .I timeout
Z! argument should be non-zero, pointing to a zero-valued timeval structure.
Z  .PP
Z  Any of
Z  .IR readfds ,
Z  .IR writefds ,
Z--- 104,128 ----
Z  is a non-zero pointer, it specifies a maximum interval to wait for the
Z  selection to complete.  If 
Z  .I timeout
Z! is a zero pointer, 
Z! .I select
Z! blocks indefinitely.  To affect a poll, the
Z  .I timeout
Z! argument should be non-zero, pointing to a zero-valued timeval
Z! structure.
Z  .PP
Z+ If the 
Z+ .I sigmask
Z+ parameter to
Z+ .IR pselect ()
Z+ is not NULL, it points to a signal mask that replaces the previous
Z+ signal mask for the process for the duration of the call,
Z+ and the previous mask is restored upon return; see sigprocmask(3).
Z+ This is normally used so that signals can be blocked while preparing
Z+ for a call to
Z+ .IR pselect ()
Z+ and then atomically unblocking the signals while selecting.
Z+ .PP
Z  Any of
Z  .IR readfds ,
Z  .IR writefds ,
Z***************
Z*** 151,153 ****
Z--- 185,191 ----
Z  timeout is 32767 ticks.  In the US (60hz power) this gives a maximum
Z  timeout of approximately 9 minutes.  In countries using 50hz power 
Z  the maximum timeout is about 13 minutes.
Z+ .PP
Z+ .I struct timespec
Z+ on a PDP\-11 is silly since the hardware has nowhere near microsecond
Z+ much less nanosecond clock resolution.
Z*** /usr/src/man/man2/Makefile.old	Fri Sep 10 21:09:55 1999
Z--- /usr/src/man/man2/Makefile	Sat Mar  4 16:12:17 2000
Z***************
Z*** 14,20 ****
Z  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
Z  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Z  #
Z! #	@(#)Makefile	2.10 (2.11BSD) 1999/9/10
Z  #
Z  MDIR=	/usr/man/cat2
Z  SRCS=	accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chmod.2 \
Z--- 14,20 ----
Z  # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
Z  # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Z  #
Z! #	@(#)Makefile	2.11 (2.11BSD) 2000/3/4
Z  #
Z  MDIR=	/usr/man/cat2
Z  SRCS=	accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chmod.2 \
Z***************
Z*** 73,78 ****
Z--- 73,79 ----
Z  REM= sbrk.0 dup2.0 fstat.0 lstat.0 readv.0 recvfrom.0 sendmsg.0 recvmsg.0 \
Z  	sendto.0 fstatfs.0 wait3.0 wait4.0 waitpid.0 fchdir.0 fchflags.0 \
Z  	fchmod.0 fchown.0 umount.0 writev.0 getppid.0 ftruncate.0 \
Z+ 	pselect.0 \
Z  	sethostid.0 setitimer.0 setrlimit.0 setsockopt.0 sethostname.0 \
Z  	setpriority.0 settimeofday.0 setlogin.0 geteuid.0 setgid.0 \
Z  	seteuid.0 setegid.0 getegid.0
Z***************
Z*** 100,105 ****
Z--- 101,107 ----
Z  	ln ${P}/chmod.0 ${P}/fchmod.0
Z  	ln ${P}/chown.0 ${P}/fchown.0
Z  	ln ${P}/mount.0 ${P}/umount.0
Z+ 	ln ${P}/select.0 ${P}/pselect.0
Z  	ln ${P}/write.0 ${P}/writev.0
Z  	ln ${P}/getpid.0 ${P}/getppid.0
Z  	ln ${P}/truncate.0 ${P}/ftruncate.0
Z*** /usr/src/usr.bin/dc/dc.c.old	Mon Feb 16 16:21:50 1987
Z--- /usr/src/usr.bin/dc/dc.c	Sat Feb 12 23:03:14 2000
Z***************
Z*** 1,10 ****
Z! #ifndef lint
Z! static char sccsid[] = "@(#)dc.c	4.3	(Berkeley)	4/26/86";
Z! #endif not lint
Z  
Z  #include <stdio.h>
Z  #include <signal.h>
Z  #include "dc.h"
Z  main(argc,argv)
Z  int argc;
Z  char *argv[];
Z--- 1,11 ----
Z! #if	!defined(lint) && defined(DOSCCS)
Z! static char sccsid[] = "@(#)dc.c	4.3.1	(2.11BSD)	2000/2/12";
Z! #endif
Z  
Z  #include <stdio.h>
Z  #include <signal.h>
Z  #include "dc.h"
Z+ 
Z  main(argc,argv)
Z  int argc;
Z  char *argv[];
Z***************
Z*** 1673,1678 ****
Z--- 1674,1682 ----
Z  {
Z  	register struct blk *hdr;
Z  	register char *ptr;
Z+ 
Z+ 	if (size == 0)
Z+ 		size++;		/* malloc returns NULL for 0 length requests */
Z  	all++;
Z  	nbytes += size;
Z  	ptr = malloc((unsigned)size);
Z*** /usr/src/share/lint/llib-lc.old	Fri Sep 10 21:13:15 1999
Z--- /usr/src/share/lint/llib-lc	Mon Feb 28 20:49:40 2000
Z***************
Z*** 100,118 ****
Z  int	lock(f) { return(0); }
Z  off_t	lseek(f, o, d) off_t o; { return(o); }
Z  int	lstat(s, b) char *s; struct stat *b; { return(0); }
Z- #ifdef notdef
Z- int	madvise( a, l, b ) char * a; int l, b; { return 0;}
Z- int	mmap( a, l, p, s, f, o ) char * a; off_t o; { return 0;}
Z- int	mincore( a, l, v ) char * a; int l; char *v; { return 0; }
Z- #endif
Z  int	mkdir( p, m ) char *p; { return 0; }
Z  int	mknod(n, m, a) char *n; { return(0); }
Z  int	mount(s, n, f) char *s, *n; { return(0); }
Z- #ifdef notdef
Z- int	mprotect( a, l, p) char * a; { return 0;}
Z- int	mremap( a, l, p, s, f) char * a, f; { return 0;}
Z- int	munmap( a, l) char * a; { return 0;}
Z- #endif
Z  int	nostk() { return(0); }
Z  	/* VARARGS2 */
Z  int	open(f, m, stuff) char *f; { return(0); }
Z--- 100,108 ----
Z***************
Z*** 119,124 ****
Z--- 109,115 ----
Z  int	phys(seg, size, addr) unsigned seg, size, addr; { return(0); }
Z  int	pipe(f) int f[2]; { return(0); }
Z  	profil(b, s, o, i) char *b; {;}
Z+ int	pselect( n, r, w, e, t, s ) fd_set *r, *w, *e; struct timespec *t; sigset_t *s; { return n; }
Z  int	ptrace(r, p, a, d) int *a; { return(0); }
Z  int	quota(c, u, a, ad) char *ad; { return(0); }
Z  int	read(f, b, l) char *b; unsigned l; { return(l); }
Z*** /usr/src/usr.sbin/ntp/ntp.h.old	Fri Jan 27 17:33:52 1995
Z--- /usr/src/usr.sbin/ntp/ntp.h	Tue Apr 11 20:58:26 2000
Z***************
Z*** 2,7 ****
Z--- 2,10 ----
Z  
Z  /*
Z   *  $Log:	ntp.h,v $
Z+  * Revision 3.4.1.9 2000/04/11 20:55:00 sms
Z+  * Remove short name hacks - 2.11BSD has long variable names.
Z+  *
Z   * Revision 3.4.1.8  95/01/27  17:20:14  sms
Z   * Fix name 'struct clockinfo' name collision with sysctl.h by renaming our
Z   * structure xclockinfo.
Z***************
Z*** 413,430 ****
Z  	u_char fill3;
Z  	u_char fill4;
Z  };
Z- 
Z- #ifdef	pdp11
Z- #define double_to_s_fixed Adouble_to_s_fixed
Z- #define adjtime2 Aadjtime2
Z- #define kern_tickadj Akern_tickadj
Z- #define refclock Brefclock
Z- #define read_clock Aread_clock
Z- #define drift_comp Adrift_comp
Z- #define init_clock Ainit_clock
Z- #define stratums Astratums
Z- #define peer_switches Apeer_switches
Z- #define refclock_input Arefclock_input
Z- #define read_clock_local Bread_clock_local
Z- #define init_clock_local Binit_clock_local
Z- #endif
Z--- 416,418 ----
Z*** /VERSION.old	Fri Nov 26 20:46:22 1999
Z--- /VERSION	Fri Apr 21 20:38:04 2000
Z***************
Z*** 1,5 ****
Z! Current Patch Level: 430
Z! Date: November 26, 1999
Z  
Z  2.11 BSD
Z  ============
Z--- 1,5 ----
Z! Current Patch Level: 431
Z! Date: April 21, 2000
Z  
Z  2.11 BSD
Z  ============
SHAR_EOF
fi
if test -f '431.shar'
then
	echo shar: "will not over-write existing file '431.shar'"
else
sed 's/^Z//' << \SHAR_EOF > '431.shar'
Z#! /bin/sh
Z# This is a shell archive, meaning:
Z# 1. Remove everything above the #! /bin/sh line.
Z# 2. Save the resulting text in a file.
Z# 3. Execute the file with /bin/sh (not csh) to create:
Z#	/usr/src/sys/h/select.h
Z# This archive created: Fri Apr 21 19:29:01 2000
Zexport PATH; PATH=/bin:/usr/bin:$PATH
Zif test -f '/usr/src/sys/h/select.h'
Zthen
Z	echo shar: "will not over-write existing file '/usr/src/sys/h/select.h'"
Zelse
Zsed 's/^Y//' << \SHAR_EOF > '/usr/src/sys/h/select.h'
ZY/*-
ZY * Copyright (c) 1992, 1993
ZY *	The Regents of the University of California.  All rights reserved.
ZY *
ZY * Redistribution and use in source and binary forms, with or without
ZY * modification, are permitted provided that the following conditions
ZY * are met:
ZY * 1. Redistributions of source code must retain the above copyright
ZY *    notice, this list of conditions and the following disclaimer.
ZY * 2. Redistributions in binary form must reproduce the above copyright
ZY *    notice, this list of conditions and the following disclaimer in the
ZY *    documentation and/or other materials provided with the distribution.
ZY * 3. All advertising materials mentioning features or use of this software
ZY *    must display the following acknowledgement:
ZY *	This product includes software developed by the University of
ZY *	California, Berkeley and its contributors.
ZY * 4. Neither the name of the University nor the names of its contributors
ZY *    may be used to endorse or promote products derived from this software
ZY *    without specific prior written permission.
ZY *
ZY * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ZY * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
ZY * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ZY * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
ZY * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
ZY * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
ZY * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ZY * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
ZY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
ZY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
ZY * SUCH DAMAGE.
ZY *
ZY *	@(#)select.h	8.2.1 (2.11BSD) 2000/2/28
ZY */
ZY
ZY#ifndef _SYS_SELECT_H_
ZY#define	_SYS_SELECT_H_
ZY
ZY#include <sys/types.h>
ZY
ZY/*
ZY * Select uses bit masks of file descriptors in longs.
ZY * These macros manipulate such bit fields (the filesystem macros use chars).
ZY * FD_SETSIZE may be defined by the user, but the default here
ZY * should be >= NOFILE (param.h).
ZY */
ZY#ifndef	FD_SETSIZE
ZY#define	FD_SETSIZE	32
ZY#endif
ZY
ZYtypedef long	fd_mask;
ZY#define NFDBITS	(sizeof(fd_mask) * NBBY)	/* bits per mask */
ZY
ZYtypedef	struct fd_set {
ZY	fd_mask	fds_bits[1];
ZY} fd_set;
ZY
ZY#define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
ZY#define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
ZY#define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
ZY#define FD_ZERO(p)	bzero((char *)(p), sizeof(*(p)))
ZY
ZY#ifndef KERNEL
ZYint	select();
ZYint	pselect();
ZY#endif /* !KERNEL */
ZY
ZY#endif /* !_SYS_SELECT_H_ */
ZSHAR_EOF
Zchmod 644 '/usr/src/sys/h/select.h'
Zfi
Zexit 0
Z#	End of shell archive
SHAR_EOF
fi
exit 0
#	End of shell archive
