mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: use 64-bit file size for truncation on Linux
Truncate and Ftruncate for 32-bit Linux should use 64-bit offset system calls. R=rsc CC=golang-dev, royger https://golang.org/cl/2943041
This commit is contained in:
parent
6101788972
commit
fa7341aafd
7 changed files with 54 additions and 50 deletions
|
|
@ -69,6 +69,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
|
|||
//sys Fchown(fd int, uid int, gid int) (errno int)
|
||||
//sys Fstat(fd int, stat *Stat_t) (errno int) = SYS_FSTAT64
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (errno int) = SYS_FSTATFS64
|
||||
//sys Ftruncate(fd int, length int64) (errno int) = SYS_FTRUNCATE64
|
||||
//sys Getegid() (egid int)
|
||||
//sys Geteuid() (euid int)
|
||||
//sys Getgid() (gid int)
|
||||
|
|
@ -87,6 +88,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
|
|||
//sys Shutdown(fd int, how int) (errno int)
|
||||
//sys Stat(path string, stat *Stat_t) (errno int) = SYS_STAT64
|
||||
//sys Statfs(path string, buf *Statfs_t) (errno int) = SYS_STATFS64
|
||||
//sys Truncate(path string, length int64) (errno int) = SYS_TRUNCATE64
|
||||
|
||||
// Vsyscalls on amd64.
|
||||
//sys Gettimeofday(tv *Timeval) (errno int)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue