Added entry points for ANSI C
This commit is contained in:
parent
8c0b75b068
commit
9eff28dac8
|
@ -1,4 +1,31 @@
|
|||
libmon_s.a
|
||||
_alarm.c
|
||||
_ftime.c
|
||||
_gtty.c
|
||||
_pause.c
|
||||
_gettimday.s
|
||||
_open.s
|
||||
_sigpause.s
|
||||
_brk.s
|
||||
_fork.s
|
||||
_unlink.s
|
||||
_close.s
|
||||
_fstat.s
|
||||
_ioctl.s
|
||||
_pipe.s
|
||||
_wait.s
|
||||
_dup2.s
|
||||
_kill.s
|
||||
_read.s
|
||||
_write.s
|
||||
_execl.s
|
||||
_getpid.s
|
||||
_link.s
|
||||
_setitimer.s
|
||||
_execve.s
|
||||
_getrusage.s
|
||||
_lseek.s
|
||||
_sigblock.s
|
||||
accept.s
|
||||
access.s
|
||||
acct.s
|
||||
|
|
13
mach/vax4/libbsd4_2/_alarm.c
Normal file
13
mach/vax4/libbsd4_2/_alarm.c
Normal 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;
|
||||
}
|
28
mach/vax4/libbsd4_2/_brk.s
Normal file
28
mach/vax4/libbsd4_2/_brk.s
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__brk)
|
||||
cmpl 4(ap),Imin
|
||||
bgeq Iok
|
||||
movl Imin,4(ap)
|
||||
Iok:
|
||||
chmk $17
|
||||
bcs Ierr
|
||||
movl 4(ap),Icur
|
||||
clrl r0
|
||||
ret
|
||||
Ierr:
|
||||
jmp cerror
|
||||
|
||||
DEFINE(__sbrk)
|
||||
addl3 Icur,4(ap),-(sp)
|
||||
bcs Ierr
|
||||
pushl $1
|
||||
movl ap,r3
|
||||
movl sp,ap
|
||||
chmk $17
|
||||
bcs Ierr
|
||||
movl Icur,r0
|
||||
addl2 4(r3),Icur
|
||||
ret
|
||||
.sect .data
|
||||
Imin: .data4 endbss
|
||||
Icur: .data4 endbss
|
3
mach/vax4/libbsd4_2/_close.s
Normal file
3
mach/vax4/libbsd4_2/_close.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__close)
|
||||
SYSTEM(SYS_close)
|
3
mach/vax4/libbsd4_2/_dup2.s
Normal file
3
mach/vax4/libbsd4_2/_dup2.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__dup2)
|
||||
SYSTEM(SYS_dup2)
|
8
mach/vax4/libbsd4_2/_execl.s
Normal file
8
mach/vax4/libbsd4_2/_execl.s
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "syscall.h"
|
||||
.extern _environ
|
||||
DEFINE(__execl)
|
||||
pushl _environ
|
||||
pushab 8(ap)
|
||||
pushl 4(ap)
|
||||
calls $3,__execve
|
||||
ret
|
3
mach/vax4/libbsd4_2/_execve.s
Normal file
3
mach/vax4/libbsd4_2/_execve.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__execve)
|
||||
SYSTEM(SYS_execve)
|
10
mach/vax4/libbsd4_2/_fork.s
Normal file
10
mach/vax4/libbsd4_2/_fork.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__fork)
|
||||
chmk $SYS_fork
|
||||
bcs Ierr
|
||||
blbc r1,Iparent
|
||||
clrl r0
|
||||
Iparent:
|
||||
ret
|
||||
Ierr:
|
||||
jmp cerror
|
3
mach/vax4/libbsd4_2/_fstat.s
Normal file
3
mach/vax4/libbsd4_2/_fstat.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__fstat)
|
||||
SYSTEM(SYS_fstat)
|
15
mach/vax4/libbsd4_2/_ftime.c
Normal file
15
mach/vax4/libbsd4_2/_ftime.c
Normal 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;
|
||||
}
|
3
mach/vax4/libbsd4_2/_getpid.s
Normal file
3
mach/vax4/libbsd4_2/_getpid.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__getpid)
|
||||
SYSTEM(SYS_getpid)
|
3
mach/vax4/libbsd4_2/_getrusage.s
Normal file
3
mach/vax4/libbsd4_2/_getrusage.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__getrusage)
|
||||
SYSTEM(SYS_getrusage)
|
3
mach/vax4/libbsd4_2/_gettimday.s
Normal file
3
mach/vax4/libbsd4_2/_gettimday.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__gettimeofday)
|
||||
SYSTEM(SYS_gettimeofday)
|
8
mach/vax4/libbsd4_2/_gtty.c
Normal file
8
mach/vax4/libbsd4_2/_gtty.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <sgtty.h>
|
||||
int
|
||||
_gtty(fildes,argp)
|
||||
int fildes ;
|
||||
struct sgttyb *argp ;
|
||||
{
|
||||
return ioctl(fildes,TIOCGETP,argp) ;
|
||||
}
|
3
mach/vax4/libbsd4_2/_ioctl.s
Normal file
3
mach/vax4/libbsd4_2/_ioctl.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__ioctl)
|
||||
SYSTEM(SYS_ioctl)
|
3
mach/vax4/libbsd4_2/_kill.s
Normal file
3
mach/vax4/libbsd4_2/_kill.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__kill)
|
||||
SYSTEM(SYS_kill)
|
3
mach/vax4/libbsd4_2/_link.s
Normal file
3
mach/vax4/libbsd4_2/_link.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__link)
|
||||
SYSTEM(SYS_link)
|
3
mach/vax4/libbsd4_2/_lseek.s
Normal file
3
mach/vax4/libbsd4_2/_lseek.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__lseek)
|
||||
SYSTEM(SYS_lseek)
|
3
mach/vax4/libbsd4_2/_open.s
Normal file
3
mach/vax4/libbsd4_2/_open.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__open)
|
||||
SYSTEM(SYS_open)
|
3
mach/vax4/libbsd4_2/_pause.c
Normal file
3
mach/vax4/libbsd4_2/_pause.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
_pause() {
|
||||
_sigpause(_sigblock());
|
||||
}
|
8
mach/vax4/libbsd4_2/_pipe.s
Normal file
8
mach/vax4/libbsd4_2/_pipe.s
Normal 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
|
3
mach/vax4/libbsd4_2/_read.s
Normal file
3
mach/vax4/libbsd4_2/_read.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__read)
|
||||
SYSTEM(SYS_read)
|
3
mach/vax4/libbsd4_2/_setitimer.s
Normal file
3
mach/vax4/libbsd4_2/_setitimer.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__setitimer)
|
||||
SYSTEM(SYS_setitimer)
|
3
mach/vax4/libbsd4_2/_sigblock.s
Normal file
3
mach/vax4/libbsd4_2/_sigblock.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__sigblock)
|
||||
SYSTEM(SYS_sigblock)
|
3
mach/vax4/libbsd4_2/_sigpause.s
Normal file
3
mach/vax4/libbsd4_2/_sigpause.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__sigpause)
|
||||
SYSTEM(SYS_sigpause)
|
3
mach/vax4/libbsd4_2/_unlink.s
Normal file
3
mach/vax4/libbsd4_2/_unlink.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__unlink)
|
||||
SYSTEM(SYS_unlink)
|
8
mach/vax4/libbsd4_2/_wait.s
Normal file
8
mach/vax4/libbsd4_2/_wait.s
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__wait)
|
||||
SYSNORET(SYS_wait)
|
||||
tstl 4(ap)
|
||||
beql Iout
|
||||
movl r1,*4(ap)
|
||||
Iout:
|
||||
ret
|
3
mach/vax4/libbsd4_2/_write.s
Normal file
3
mach/vax4/libbsd4_2/_write.s
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "syscall.h"
|
||||
DEFINE(__write)
|
||||
SYSTEM(SYS_write)
|
|
@ -1,5 +1,6 @@
|
|||
#include <sgtty.h>
|
||||
int gtty(fildes,argp)
|
||||
int
|
||||
gtty(fildes,argp)
|
||||
int fildes ;
|
||||
struct sgttyb *argp ;
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue