2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/Makefile.am: Add io64.c. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/io.c(mkfifo, fsync, fdatasync): Added syscalls. * libc/sys/linux/signal.c (sigwaitinfo, sigtimedwait): Ditto. * libc/sys/linux/io64.c: New file.
This commit is contained in:
parent
7b2b12d51b
commit
557856bdd9
|
@ -1,3 +1,11 @@
|
|||
2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/sys/linux/Makefile.am: Add io64.c.
|
||||
* libc/sys/linux/Makefile.in: Regenerated.
|
||||
* libc/sys/linux/io.c(mkfifo, fsync, fdatasync): Added syscalls.
|
||||
* libc/sys/linux/signal.c (sigwaitinfo, sigtimedwait): Ditto.
|
||||
* libc/sys/linux/io64.c: New file.
|
||||
|
||||
2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* configure.in (CC_FOR_NEWLIB): New variable that
|
||||
|
|
|
@ -8,7 +8,7 @@ SUBDIRS = machine .
|
|||
SUBLIBS = $(LINUX_MACH_LIB)
|
||||
|
||||
LIB_SOURCES = \
|
||||
brk.c getoptlong.c ids.c inode.c io.c linux.c mmap.c \
|
||||
brk.c getoptlong.c ids.c inode.c io.c io64.c linux.c mmap.c \
|
||||
process.c realpath.c sched.c \
|
||||
select.c signal.c siglongjmp.c socket.c sleep.c stack.c \
|
||||
sysconf.c systat.c termios.c time.c \
|
||||
|
|
|
@ -97,7 +97,7 @@ SUBDIRS = machine .
|
|||
SUBLIBS = $(LINUX_MACH_LIB)
|
||||
|
||||
LIB_SOURCES = \
|
||||
brk.c getoptlong.c ids.c inode.c io.c linux.c mmap.c \
|
||||
brk.c getoptlong.c ids.c inode.c io.c io64.c linux.c mmap.c \
|
||||
process.c realpath.c sched.c \
|
||||
select.c signal.c siglongjmp.c socket.c sleep.c stack.c \
|
||||
sysconf.c systat.c termios.c time.c \
|
||||
|
@ -132,15 +132,15 @@ DEFS = @DEFS@ -I. -I$(srcdir)
|
|||
CPPFLAGS = @CPPFLAGS@
|
||||
LIBS = @LIBS@
|
||||
@USE_LIBTOOL_FALSE@lib_a_OBJECTS = brk.o getoptlong.o ids.o inode.o \
|
||||
@USE_LIBTOOL_FALSE@io.o linux.o mmap.o process.o realpath.o sched.o \
|
||||
@USE_LIBTOOL_FALSE@select.o signal.o siglongjmp.o socket.o sleep.o \
|
||||
@USE_LIBTOOL_FALSE@stack.o sysconf.o systat.o termios.o time.o usleep.o \
|
||||
@USE_LIBTOOL_FALSE@wait.o
|
||||
@USE_LIBTOOL_FALSE@io.o io64.o linux.o mmap.o process.o realpath.o \
|
||||
@USE_LIBTOOL_FALSE@sched.o select.o signal.o siglongjmp.o socket.o \
|
||||
@USE_LIBTOOL_FALSE@sleep.o stack.o sysconf.o systat.o termios.o time.o \
|
||||
@USE_LIBTOOL_FALSE@usleep.o wait.o
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
|
||||
@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES =
|
||||
@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = brk.lo getoptlong.lo ids.lo \
|
||||
@USE_LIBTOOL_TRUE@inode.lo io.lo linux.lo mmap.lo process.lo \
|
||||
@USE_LIBTOOL_TRUE@inode.lo io.lo io64.lo linux.lo mmap.lo process.lo \
|
||||
@USE_LIBTOOL_TRUE@realpath.lo sched.lo select.lo signal.lo \
|
||||
@USE_LIBTOOL_TRUE@siglongjmp.lo socket.lo sleep.lo stack.lo sysconf.lo \
|
||||
@USE_LIBTOOL_TRUE@systat.lo termios.lo time.lo usleep.lo wait.lo
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#define __NR___ioctl __NR_ioctl
|
||||
#define __NR___flock __NR_flock
|
||||
#define __NR___mknod __NR_mknod
|
||||
|
||||
_syscall3(int,read,int,fd,void *,buf,size_t,count)
|
||||
_syscall3(ssize_t,readv,int,fd,const struct iovec *,vec,int,count)
|
||||
|
@ -29,10 +30,12 @@ _syscall0(int,sync)
|
|||
_syscall1(int,dup,int,fd)
|
||||
_syscall2(int,dup2,int,oldfd,int,newfd)
|
||||
_syscall3(int,fcntl,int,fd,int,cmd,long,arg)
|
||||
_syscall1(int,fdatasync,int,fd)
|
||||
_syscall1(int,fsync,int,fd)
|
||||
|
||||
|
||||
static _syscall2(long,__flock,unsigned int,fd,unsigned int,cmd)
|
||||
static _syscall3(int,__ioctl,int,fd,int,request,void *,arg)
|
||||
|
||||
static _syscall3(int,__mknod,const char *,path,mode_t,mode,dev_t *,dev)
|
||||
|
||||
int ioctl(int fd,int request,...)
|
||||
{
|
||||
|
@ -45,13 +48,14 @@ int ioctl(int fd,int request,...)
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
/* Why are all the types gratuituously different ? */
|
||||
|
||||
static _syscall2(long,__flock,unsigned int,fd,unsigned int,cmd)
|
||||
|
||||
|
||||
int flock(int fd,int operation)
|
||||
{
|
||||
return __flock(fd,operation);
|
||||
}
|
||||
|
||||
int mkfifo(const char *path, mode_t mode)
|
||||
{
|
||||
dev_t dev = 0;
|
||||
return __mknod(path, mode | S_IFIFO, &dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/* libc/sys/linux/io64.c - large file input/output system calls */
|
||||
|
||||
/* Copyright 2002, Red Hat Inc. */
|
||||
|
||||
|
||||
#define __KERNEL_PROTOTYPES
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <machine/syscall.h>
|
||||
|
||||
_syscall2(int,stat64,const char *,name,struct stat64 *,st)
|
||||
|
||||
static _syscall5(void,_llseek,int,fd,off_t,hi,off_t,lo,loff_t *,pos,int,whence)
|
||||
|
||||
loff_t lseek64(int fd, loff_t offset, int whence)
|
||||
{
|
||||
loff_t pos;
|
||||
_llseek(fd, offset >> 32, offset & 0xffffffff, &pos, whence);
|
||||
return pos;
|
||||
}
|
||||
|
||||
int open64(const char *path, int oflag, ...)
|
||||
{
|
||||
mode_t mode = 0;
|
||||
if (oflag & O_CREAT)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, oflag);
|
||||
mode = va_arg(list, int);
|
||||
va_end(list);
|
||||
}
|
||||
return open(path, oflag | O_LARGEFILE, mode);
|
||||
}
|
||||
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
#define __NR___sgetmask __NR_sgetmask
|
||||
#define __NR___ssetmask __NR_ssetmask
|
||||
#define __NR___sigsuspend __NR_sigsuspend
|
||||
#define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
|
||||
|
||||
_syscall2(int,kill,pid_t,pid,int,sig)
|
||||
_syscall2(__sighandler_t,signal,int,signum,__sighandler_t,handler)
|
||||
|
@ -25,6 +26,7 @@ _syscall3(int,sigprocmask,int,how,const sigset_t *,set,sigset_t *,oldset)
|
|||
static _syscall0(int,__sgetmask)
|
||||
static _syscall1(int,__ssetmask,int,newmask)
|
||||
static _syscall3(int,__sigsuspend,int,arg1,int,arg2,int,mask)
|
||||
static _syscall4(int,__rt_sigtimedwait,const sigset_t *,set,siginfo_t *,info,struct timespec *,timeout,size_t,size)
|
||||
|
||||
int sigsuspend (const sigset_t *mask)
|
||||
{
|
||||
|
@ -54,6 +56,16 @@ int raise(int sig)
|
|||
return kill(getpid(),sig);
|
||||
}
|
||||
|
||||
int sigtimedwait(const sigset_t *set, siginfo_t *info,
|
||||
struct timespec *timeout)
|
||||
{
|
||||
return __rt_sigtimedwait(set, info, timeout, sizeof(sigset_t));
|
||||
}
|
||||
|
||||
int sigwaitinfo(const sigset_t *set, siginfo_t *info)
|
||||
{
|
||||
return __rt_sigtimedwait(set, info, NULL, sizeof(sigset_t));
|
||||
}
|
||||
|
||||
const char *const sys_siglist[] = {
|
||||
#include "siglist.inc"
|
||||
|
|
Loading…
Reference in New Issue