diff options
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index 7521944..914b89b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go | |||
@@ -8,7 +8,6 @@ package unix | |||
8 | 8 | ||
9 | import ( | 9 | import ( |
10 | "syscall" | 10 | "syscall" |
11 | "unsafe" | ||
12 | ) | 11 | ) |
13 | 12 | ||
14 | func setTimespec(sec, nsec int64) Timespec { | 13 | func setTimespec(sec, nsec int64) Timespec { |
@@ -48,21 +47,17 @@ func (cmsg *Cmsghdr) SetLen(length int) { | |||
48 | cmsg.Len = uint32(length) | 47 | cmsg.Len = uint32(length) |
49 | } | 48 | } |
50 | 49 | ||
51 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | ||
52 | var length = uint64(count) | ||
53 | |||
54 | _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0) | ||
55 | |||
56 | written = int(length) | ||
57 | |||
58 | if e1 != 0 { | ||
59 | err = e1 | ||
60 | } | ||
61 | return | ||
62 | } | ||
63 | |||
64 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) | 50 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) |
65 | 51 | ||
66 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions | 52 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions |
67 | // of darwin/amd64 the syscall is called sysctl instead of __sysctl. | 53 | // of darwin/amd64 the syscall is called sysctl instead of __sysctl. |
68 | const SYS___SYSCTL = SYS_SYSCTL | 54 | const SYS___SYSCTL = SYS_SYSCTL |
55 | |||
56 | //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 | ||
57 | //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 | ||
58 | //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 | ||
59 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64 | ||
60 | //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64 | ||
61 | //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 | ||
62 | //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 | ||
63 | //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 | ||