* 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>
+ * 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
bases on $(CC) and adds targ-include and libc/include as
-isystem directives if they are not already part of $(CC).
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 \
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 \
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
#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)
_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,...)
{
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);
+}
+
--- /dev/null
+/* 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);
+}
+
+
#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)
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)
{
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"