Initial revision

This commit is contained in:
ceriel 1987-02-23 18:58:58 +00:00
parent 318e1bfec8
commit 4ffb6fe8bd
132 changed files with 848 additions and 0 deletions

131
mach/vax4/libbsd4_2/LIST Normal file
View file

@ -0,0 +1,131 @@
libmon_s.a
accept.s
access.s
acct.s
alarm.c
bind.s
brk.s
cerror.s
chdir.s
chmod.s
chown.s
chroot.s
close.s
connect.s
creat.s
dup.s
dup2.s
execl.s
execle.s
exect.s
execv.s
execve.s
exit.c
_exit.s
cleanup.c
fchmod.s
fchown.s
fcntl.s
flock.s
fork.s
fstat.s
fsync.s
ftime.c
ftruncate.s
getdtabsz.s
getegid.s
geteuid.s
getgid.s
getgroups.s
gethostid.s
gethostnam.s
getitimer.s
getpagesiz.s
getpeernam.s
getpgrp.s
getpid.s
getppid.s
getrlimit.s
getsocknam.s
getsockopt.s
getuid.s
gtty.c
kill.s
killpg.s
link.s
listen.s
lstat.s
mkdir.s
mknod.s
mount.s
nice.c
getprio.s
open.s
pause.c
pipe.s
profil.s
ptrace.s
quota.s
read.s
readlink.s
readv.s
reboot.s
recv.s
recvfrom.s
recvmsg.s
rename.s
rmdir.s
select.s
send.s
sendmsg.s
sendto.s
setgid.c
setgroups.s
sethostid.s
sethostnam.s
setitimer.s
setpgrp.s
setprio.s
setquota.s
setregid.s
setrlimit.s
setsockopt.s
setuid.c
setreuid.s
shutdown.s
sigblock.s
signal.c
sigpause.s
sigsetmask.s
sigstack.s
sigvec.s
socket.s
socketpair.s
stat.s
stime.c
settimday.s
stty.c
ioctl.s
swapon.s
symlink.s
sync.s
syscall.s
tell.c
lseek.s
time.c
gettimday.s
times.c
getrusage.s
truncate.s
umask.s
umount.s
unlink.s
utime.c
utimes.s
vadvise.s
vfork.s
vhangup.s
wait.s
wait3.s
write.s
writev.s

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(__exit)
SYSTEM(SYS_exit)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_accept)
SYSTEM(SYS_accept)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_access)
SYSTEM(SYS_access)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_acct)
SYSTEM(SYS_acct)

View file

@ -0,0 +1,13 @@
unsigned
alarm(n)
unsigned n;
{
struct { long l1,l2,l3,l4; } t1,t2;
t1.l1 = 0;
t1.l2 = 0;
t1.l4 = 0;
t1.l3 = n;
if (setitimer(0,&t1,&t2) < 0) return -1;
if (t2.l4) t2.l3++;
return t2.l3;
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_bind)
SYSTEM(SYS_bind)

29
mach/vax4/libbsd4_2/brk.s Normal file
View file

@ -0,0 +1,29 @@
#include "syscall.h"
.globl _end
DEFINE(_brk)
cmpl 4(ap),min
bgeq ok
movl min,4(ap)
ok:
chmk $17
bcs err
movl 4(ap),cur
clrl r0
ret
err:
jmp cerror
DEFINE(_sbrk)
addl3 cur,4(ap),-(sp)
bcs err
pushl $1
movl ap,r3
movl sp,ap
chmk $17
bcs err
movl cur,r0
addl2 4(r3),cur
ret
.data
min: .long _end
cur: .long _end

View file

@ -0,0 +1,5 @@
.globl _errno
cerror:
movl r0,_errno
mnegl $1,r0
ret

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_chdir)
SYSTEM(SYS_chdir)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_chmod)
SYSTEM(SYS_chmod)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_chwon)
SYSTEM(SYS_chwon)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_chroot)
SYSTEM(SYS_chroot)

View file

@ -0,0 +1 @@
_cleanup() { }

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_close)
SYSTEM(SYS_close)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_connect)
SYSTEM(SYS_connect)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_creat)
SYSTEM(SYS_creat)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_dup)
SYSTEM(SYS_dup)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_dup2)
SYSTEM(SYS_dup2)

View file

@ -0,0 +1,8 @@
#include "syscall.h"
.globl _environ
DEFINE(_execl)
pushl _environ
pushab 8(ap)
pushl 4(ap)
calls $3,_execve
ret

View file

@ -0,0 +1,8 @@
#include "syscall.h"
DEFINE(_execle)
movl (ap),r0
pushl (ap)[r0]
pushab 8(ap)
pushl 4(ap)
calls $3,_execve
ret

View file

@ -0,0 +1,5 @@
#include "syscall.h"
DEFINE(_exect)
bispsw $16
chmk $SYS_execve
jmp cerror

View file

@ -0,0 +1,8 @@
#include "syscall.h"
.globl _environ
DEFINE(_execv)
pushl _environ
pushl 8(ap)
pushl 4(ap)
calls $3,_execve
ret

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_execve)
SYSTEM(SYS_execve)

View file

@ -0,0 +1,5 @@
exit(n)
{
_cleanup();
_exit(n);
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_fchmod)
SYSTEM(SYS_fchmod)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_fchown)
SYSTEM(SYS_fchown)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_fcntl)
SYSTEM(SYS_fcntl)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_flock)
SYSTEM(SYS_flock)

View file

@ -0,0 +1,10 @@
#include "syscall.h"
DEFINE(_fork)
chmk $SYS_fork
bcs err
jlbc r1,parent
clrl r0
parent:
ret
err:
jmp cerror

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_fstat)
SYSTEM(SYS_fstat)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_fsync)
SYSTEM(SYS_fsync)

View file

@ -0,0 +1,15 @@
#include <sys/types.h>
ftime(p)
struct { time_t time; unsigned short millitm;
short timezone; short dstflag; } *p;
{
struct { long l1,l2; } t1,t2;
if (gettimeofday(&t1,&t2) < 0) return -1;
p->time = t1.l1;
p->millitm = t1.l2/1000;
p->dstflag = t2.l2;
p->timezone = t2.l1;
return 0;
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_ftruncate)
SYSTEM(SYS_ftruncate)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getdtablesize)
SYSTEM(SYS_getdtablesize)

View file

@ -0,0 +1,5 @@
#include "syscall.h"
DEFINE(_getegid)
SYSNORET(SYS_getgid)
movl r1,r0
ret

View file

@ -0,0 +1,5 @@
#include "syscall.h"
DEFINE(_geteuid)
SYSNORET(SYS_getuid)
movl r1,r0
ret

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getgid)
SYSTEM(SYS_getgid)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getgroups)
SYSTEM(SYS_getgroups)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_gethostid)
SYSTEM(SYS_gethostid)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_gethostname)
SYSTEM(SYS_gethostname)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getitimer)
SYSTEM(SYS_getitimer)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getpagesize)
SYSTEM(SYS_getpagesize)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getpeername)
SYSTEM(SYS_getpeername)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getpgrp)
SYSTEM(SYS_getpgrp)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getpid)
SYSTEM(SYS_getpid)

View file

@ -0,0 +1,5 @@
#include "syscall.h"
DEFINE(_getppid)
SYSNORET(SYS_getpid)
movl r1,r0
ret

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getpriority)
SYSTEM(SYS_getpriority)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getrlimit)
SYSTEM(SYS_getrlimit)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getrusage)
SYSTEM(SYS_getrusage)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getsockname)
SYSTEM(SYS_getsockname)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getsockopt)
SYSTEM(SYS_getsockopt)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_gettimeofday)
SYSTEM(SYS_gettimeofday)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_getuid)
SYSTEM(SYS_getuid)

View file

@ -0,0 +1,7 @@
#include <sgtty.h>
int gtty(fildes,argp)
int fildes ;
struct sgttyb *argp ;
{
return ioctl(fildes,TIOCGETP,argp) ;
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_ioctl)
SYSTEM(SYS_ioctl)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_kill)
SYSTEM(SYS_kill)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_killpg)
SYSTEM(SYS_killpg)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_link)
SYSTEM(SYS_link)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_listen)
SYSTEM(SYS_listen)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_lseek)
SYSTEM(SYS_lseek)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_lstat)
SYSTEM(SYS_lstat)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_mkdir)
SYSTEM(SYS_mkdir)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_mknod)
SYSTEM(SYS_mknod)

View file

@ -0,0 +1,5 @@
#include "syscall.h"
DEFINE(_mount)
SYSNORET(SYS_mount)
clrl r0
ret

View file

@ -0,0 +1,13 @@
nice(incr)
{
extern int errno;
int sav = errno;
int prio;
errno = 0;
prio = getpriority(0,0);
if (prio == -1 && errno) return -1;
if (setpriority(0,0,prio+incr) < 0) return -1;
errno = sav;
return 0;
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_open)
SYSTEM(SYS_open)

View file

@ -0,0 +1,3 @@
pause() {
sigpause(sigblock());
}

View file

@ -0,0 +1,8 @@
#include "syscall.h"
DEFINE(_pipe)
SYSNORET(SYS_pipe)
movl 4(ap),r2
movl r0,(r2)+
movl r1,(r2)
clrl r0
ret

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_profil)
SYSTEM(SYS_profil)

View file

@ -0,0 +1,4 @@
#include "syscall.h"
DEFINE(_ptrace)
clrl _errno
SYSTEM(SYS_ptrace)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_quota)
SYSTEM(SYS_quota)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_read)
SYSTEM(SYS_read)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_readlink)
SYSTEM(SYS_readlink)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_readv)
SYSTEM(SYS_readv)

View file

@ -0,0 +1,4 @@
#include "syscall.h"
DEFINE(_reboot)
SYSNORET(SYS_reboot)
halt

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_recv)
SYSTEM(SYS_recv)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_recvfrom)
SYSTEM(SYS_recvfrom)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_recvmsg)
SYSTEM(SYS_recvmsg)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_rename)
SYSTEM(SYS_rename)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_rmdir)
SYSTEM(SYS_rmdir)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_select)
SYSTEM(SYS_select)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_send)
SYSTEM(SYS_send)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_sendmsg)
SYSTEM(SYS_sendmsg)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_sendto)
SYSTEM(SYS_sendto)

View file

@ -0,0 +1,4 @@
setgid(u)
{
return setregid(u,u);
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setgroups)
SYSTEM(SYS_setgroups)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_sethostid)
SYSTEM(SYS_sethostid)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_sethostname)
SYSTEM(SYS_sethostname)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setitimer)
SYSTEM(SYS_setitimer)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setpgrp)
SYSTEM(SYS_setpgrp)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setpriority)
SYSTEM(SYS_setpriority)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setquota)
SYSTEM(SYS_setquota)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setregid)
SYSTEM(SYS_setregid)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setreuid)
SYSTEM(SYS_setreuid)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setrlimit)
SYSTEM(SYS_setrlimit)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_setsockopt)
SYSTEM(SYS_setsockopt)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_settimeofday)
SYSTEM(SYS_settimeofday)

View file

@ -0,0 +1,4 @@
setuid(u)
{
return setreuid(u,u);
}

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(_shutdown)
SYSTEM(SYS_shutdown)

Some files were not shown because too many files have changed in this diff Show more