gcc/libgo/go/syscall/libcall_posix_largefile.go
Ian Lance Taylor ee973155b2 re PR go/89447 (libgo largefile support is incomplete and inconsistent)
PR go/89447
    syscall, internal/syscall: adjust use of largefile functions
    
    Consistently call __go_openat for openat.  Use fstatat64, creat64,
    sendfile64, and getdents64 where needed.
    
    Based on patch by Rainer Orth.
    
    Fixes https://gcc.gnu.org/PR89447
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166420

From-SVN: r269521
2019-03-09 02:10:22 +00:00

49 lines
1.8 KiB
Go

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build aix hurd linux solaris,386 solaris,sparc
// POSIX library calls on systems which use the largefile interface.
package syscall
//sys Creat(path string, mode uint32) (fd int, err error)
//creat64(path *byte, mode Mode_t) _C_int
//sys Fstat(fd int, stat *Stat_t) (err error)
//fstat64(fd _C_int, stat *Stat_t) _C_int
//sys Ftruncate(fd int, length int64) (err error)
//ftruncate64(fd _C_int, length Offset_t) _C_int
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//getrlimit64(resource _C_int, rlim *Rlimit) _C_int
//sys Lstat(path string, stat *Stat_t) (err error)
//lstat64(path *byte, stat *Stat_t) _C_int
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
//sys Seek(fd int, offset int64, whence int) (off int64, err error)
//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//setrlimit64(resource int, rlim *Rlimit) _C_int
//sys Stat(path string, stat *Stat_t) (err error)
//stat64(path *byte, stat *Stat_t) _C_int
//sys Truncate(path string, length int64) (err error)
//truncate64(path *byte, length Offset_t) _C_int