close.c
#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>
int
_close (int fildes)
{
return syscall(SYS_close, fildes);
}
kill.c
#include <unistd.h>
#include <sys/syscall.h>
int
_kill (int pid,
int sig)
{
return syscall(SYS_kill, pid,sig);
}
fstat.c
#include <sys/syscall.h>
#include <unistd.h>
int
_fstat (int fildes,
struct stat *st)
{
return syscall(SYS_newfstatat, fildes, st);
}
read.c
#include <sys/syscall.h>
int
_read (int file,
char *ptr,
int len)
{
return syscall(SYS_read, file, ptr, len);
}
lseek.c
#include <sys/syscall.h>
int
_lseek (int file,
int ptr,
int dir)
{
return syscall(SYS_lseek, file, &ptr, dir);
}
fork.c
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd_64.h>
int
_fork (void)
{
return syscall(SYS_fork);
}
C_INCLUDE_PATH:
export C_INCLUDE_PATH=/home/wk/workspace/newlib-cygwin/newlib/libc/include:/usr/lib/gcc/x86_64-linux-gnu/9/include:/usr/local/include:/usr/include/x86_64-linux-gnu:/usr/include:/usr/include/x86_64-linux-gnu/asm
|