diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-04-26 23:21:29 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-04-26 23:21:29 +0000 |
commit | 557856bdd9b9d8f8a4d767034df58831a96c1a93 (patch) | |
tree | 7f97754917604b4c4675e3b602145eed38e102ce /newlib/libc/sys/linux/io64.c | |
parent | 7b2b12d51bd19095edd58a7fd98ed5128e64177f (diff) | |
download | cygnal-557856bdd9b9d8f8a4d767034df58831a96c1a93.tar.gz cygnal-557856bdd9b9d8f8a4d767034df58831a96c1a93.tar.bz2 cygnal-557856bdd9b9d8f8a4d767034df58831a96c1a93.zip |
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.
Diffstat (limited to 'newlib/libc/sys/linux/io64.c')
-rw-r--r-- | newlib/libc/sys/linux/io64.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/newlib/libc/sys/linux/io64.c b/newlib/libc/sys/linux/io64.c new file mode 100644 index 000000000..c18854bf7 --- /dev/null +++ b/newlib/libc/sys/linux/io64.c @@ -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); +} + + |