2002-07-25 Jeff Johnston <jjohnstn@redhat.com>

* libc/sys/linux/io64.c (truncate64, ftruncate64): Added.
        * libc/sys/linux/sys/types.h (off64_t): Definition added.
This commit is contained in:
Jeff Johnston 2002-07-25 21:07:08 +00:00
parent aa0ca6fd29
commit dc8ac8e650
3 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/io64.c (truncate64, ftruncate64): Added.
* libc/sys/linux/sys/types.h (off64_t): Definition added.
2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/Makefile.am: Add fclean.c.

View File

@ -14,10 +14,29 @@
#include <sys/ioctl.h>
#include <machine/syscall.h>
#define __NR___truncate64 __NR_truncate64
#define __NR___ftruncate64 __NR_ftruncate64
_syscall2(int,fstat64,int,fd,struct stat64 *,st)
_syscall2(int,lstat64,const char *,name,struct stat64 *,st)
_syscall2(int,stat64,const char *,name,struct stat64 *,st)
static _syscall3(int,__truncate64,const char *,name,int,high,int,low)
int __libc_truncate64(const char *name, off64_t length)
{
return __truncate64(name,(length >> 32), (length & 0xffffffff));
}
weak_alias(__libc_truncate64,truncate64)
static _syscall3(int,__ftruncate64,int,fd,int,high,int,low);
int __libc_ftruncate64(int fd, off64_t length)
{
return __ftruncate64(fd,(length >> 32),(length & 0xffffffff));
}
weak_alias(__libc_ftruncate64,ftruncate64)
static _syscall5(void,_llseek,int,fd,off_t,hi,off_t,lo,loff_t *,pos,int,whence)
loff_t __libc_lseek64(int fd, loff_t offset, int whence)

View File

@ -143,10 +143,12 @@ typedef long fd_mask;
#define __ssize_t_defined
#define __key_t_defined
#define __off_t_defined
#define __off64_t_defined
typedef __ino64_t ino64_t;
typedef __uint32_t uintptr_t;
typedef __int32_t intptr_t;
typedef __off64_t off64_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
typedef struct _physadr {