2018-12-20 21:26:58 +03:00
|
|
|
// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
2017-08-01 11:50:40 +03:00
|
|
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
2015-05-17 07:37:28 +03:00
|
|
|
|
2021-02-20 06:57:36 +03:00
|
|
|
//go:build darwin && arm64 && go1.12
|
2018-12-20 21:26:58 +03:00
|
|
|
// +build darwin,arm64,go1.12
|
2015-05-17 07:37:28 +03:00
|
|
|
|
|
|
|
package unix
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ syscall.Errno
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getgroups_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func setgroups(ngid int, gid *_Gid_t) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setgroups_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
wpid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_wait4_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
2015-05-17 07:37:28 +03:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_accept_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_bind_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_connect_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func socket(domain int, typ int, proto int) (fd int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
|
2015-05-17 07:37:28 +03:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_socket_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getsockopt_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setsockopt_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getpeername_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getsockname_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Shutdown(s int, how int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_shutdown_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_socketpair_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_recvfrom_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_sendto_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_recvmsg_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_sendmsg_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_kevent_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func utimes(path string, timeval *[2]Timeval) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_utimes_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func futimes(fd int, timeval *[2]Timeval) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_futimes_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-11-04 19:08:45 +03:00
|
|
|
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
2017-11-04 19:08:45 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_poll_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-11-04 19:08:45 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
func Madvise(b []byte, behav int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_madvise_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mlock(b []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mlock_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mlockall(flags int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mlockall_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mprotect(b []byte, prot int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mprotect_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Msync(b []byte, flags int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_msync_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Munlock(b []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_munlock_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Munlockall() (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
|
2017-08-16 18:16:36 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_munlockall_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-16 18:16:36 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2021-01-04 23:22:21 +03:00
|
|
|
func pipe(p *[2]int32) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_pipe_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getxattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
|
2018-08-08 11:17:46 +03:00
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fgetxattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setxattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
|
2018-08-08 11:17:46 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fsetxattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
func removexattr(path string, attr string, options int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_removexattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
func fremovexattr(fd int, attr string, options int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
|
2018-08-08 11:17:46 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fremovexattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_listxattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
unix: add {get,set,remove,list}xattr on darwin
It's only when dest is set to NULL that the OS X implementations of
getxattr() and listxattr() return the current sizes of the named
attributes. An empty byte array is not sufficient. To maintain the same
behaviour as the linux implementation, we wrap around the system calls
and pass in NULL when dest is empty.
The parameters for the OS X implementation of setxattr() vary slightly
compared to the linux system call, specifically the 'position'
parameter:
linux:
int setxattr(
const char *path,
const char *name,
const void *value,
size_t size,
int flags
);
darwin:
int setxattr(
const char *path,
const char *name,
void *value,
size_t size,
u_int32_t position,
int options
);
'position' specifies the offset within the extended attribute. In the
current implementation, only the resource fork extended attribute makes
use of this argument. For all others, position is reserved. We simply
default to setting it to zero. If that's needed by the package user, a
function with a different name needs to be implemented instead.
Similarly for removexattr(), we wrap around and explicitly zero out the
options provided. We do so for interoperability with the linux variant.
If options are needed by the package user, a function with a different
name needs to be implemented instead.
Fixes golang/go#14456
Change-Id: I2581e1fa8dc9324bced7fda7f8ada10fe2ede3f5
Reviewed-on: https://go-review.googlesource.com/113995
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-05-21 23:15:56 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
|
2018-08-08 11:17:46 +03:00
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_flistxattr_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-08-08 11:17:46 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-12-18 06:31:28 +03:00
|
|
|
func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
2018-12-18 06:31:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setattrlist_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 06:31:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2019-12-21 16:53:33 +03:00
|
|
|
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
|
2019-12-21 16:53:33 +03:00
|
|
|
val = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fcntl_trampoline_addr uintptr
|
2019-12-21 16:53:33 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func kill(pid int, signum int, posix int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_kill_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
2017-08-01 11:50:40 +03:00
|
|
|
|
|
|
|
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
2017-08-01 11:50:40 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_ioctl_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-01 11:50:40 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
2018-12-18 07:08:14 +03:00
|
|
|
|
2019-10-23 14:32:03 +03:00
|
|
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(mib) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&mib[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
2019-10-23 14:32:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_sysctl_trampoline_addr uintptr
|
2019-10-23 14:32:03 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-12-18 07:08:14 +03:00
|
|
|
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
2018-12-18 07:08:14 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_sendfile_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 07:08:14 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
2021-10-01 12:38:46 +03:00
|
|
|
|
|
|
|
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
|
|
|
|
r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
|
|
|
|
ret = uintptr(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
var libc_shmat_trampoline_addr uintptr
|
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
|
|
|
|
r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
|
|
|
|
result = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
var libc_shmctl_trampoline_addr uintptr
|
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func shmdt(addr uintptr) (err error) {
|
|
|
|
_, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
var libc_shmdt_trampoline_addr uintptr
|
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func shmget(key int, size int, flag int) (id int, err error) {
|
|
|
|
r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
|
|
|
|
id = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
var libc_shmget_trampoline_addr uintptr
|
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
2015-05-17 07:37:28 +03:00
|
|
|
|
|
|
|
func Access(path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_access_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_adjtime_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chdir(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_chdir_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chflags(path string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_chflags_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chmod(path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_chmod_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chown(path string, uid int, gid int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_chown_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chroot(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_chroot_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2019-09-07 19:19:55 +03:00
|
|
|
func ClockGettime(clockid int32, time *Timespec) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
|
2019-09-07 19:19:55 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_clock_gettime_trampoline_addr uintptr
|
2019-09-07 19:19:55 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Close(fd int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_close_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2020-09-13 21:36:12 +03:00
|
|
|
func Clonefile(src string, dst string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(src)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(dst)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
|
2020-09-13 21:36:12 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_clonefile_trampoline_addr uintptr
|
2020-09-13 21:36:12 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(src)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(dst)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
2020-09-13 21:36:12 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_clonefileat_trampoline_addr uintptr
|
2020-09-13 21:36:12 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Dup(fd int) (nfd int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
nfd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_dup_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Dup2(from int, to int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_dup2_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Exchangedata(path1 string, path2 string, options int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path1)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(path2)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_exchangedata_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Exit(code int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_exit_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_faccessat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Fchdir(fd int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fchdir_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchflags(fd int, flags int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fchflags_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchmod(fd int, mode uint32) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fchmod_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fchmodat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Fchown(fd int, uid int, gid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fchown_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fchownat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2020-09-13 21:36:12 +03:00
|
|
|
func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(dst)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
|
2020-09-13 21:36:12 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fclonefileat_trampoline_addr uintptr
|
2020-09-13 21:36:12 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Flock(fd int, how int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_flock_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fpathconf(fd int, name int) (val int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
val = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fpathconf_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fsync(fd int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fsync_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Ftruncate(fd int, length int64) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_ftruncate_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2020-09-25 15:46:26 +03:00
|
|
|
func Getcwd(buf []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
|
2020-09-25 15:46:26 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getcwd_trampoline_addr uintptr
|
2020-09-25 15:46:26 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Getdtablesize() (size int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
size = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getdtablesize_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getegid() (egid int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
egid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getegid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Geteuid() (uid int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
uid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_geteuid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getgid() (gid int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
gid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getgid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpgid(pid int) (pgid int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
pgid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getpgid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpgrp() (pgrp int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
pgrp = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getpgrp_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpid() (pid int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
pid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getpid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getppid() (ppid int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
ppid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getppid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpriority(which int, who int) (prio int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
prio = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getpriority_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getrlimit(which int, lim *Rlimit) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getrlimit_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getrusage_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getsid(pid int) (sid int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
sid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getsid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2020-05-08 12:22:56 +03:00
|
|
|
func Gettimeofday(tp *Timeval) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
|
2020-05-08 12:22:56 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_gettimeofday_trampoline_addr uintptr
|
2020-05-08 12:22:56 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Getuid() (uid int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
uid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getuid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Issetugid() (tainted bool) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
tainted = bool(r0 != 0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_issetugid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Kqueue() (fd int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_kqueue_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Lchown(path string, uid int, gid int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_lchown_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Link(path string, link string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(link)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_link_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(link)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_linkat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Listen(s int, backlog int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_listen_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mkdir(path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mkdir_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mkdirat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Mkfifo(path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mkfifo_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mknod(path string, mode uint32, dev int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mknod_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Open(path string, mode int, perm uint32) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
|
2015-05-17 07:37:28 +03:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_open_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_openat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Pathconf(path string, name int) (val int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
val = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_pathconf_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-03-15 10:41:19 +03:00
|
|
|
func pread(fd int, p []byte, offset int64) (n int, err error) {
|
2015-05-17 07:37:28 +03:00
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_pread_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2022-03-15 10:41:19 +03:00
|
|
|
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
2015-05-17 07:37:28 +03:00
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_pwrite_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func read(fd int, p []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_read_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Readlink(path string, buf []byte) (n int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_readlink_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_readlinkat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Rename(from string, to string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(from)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(to)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_rename_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(from)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(to)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_renameat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Revoke(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_revoke_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Rmdir(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_rmdir_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
|
2015-05-17 07:37:28 +03:00
|
|
|
newoffset = int64(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_lseek_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2019-09-23 22:22:06 +03:00
|
|
|
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
2019-09-23 22:22:06 +03:00
|
|
|
n = int(r0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_select_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setegid(egid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setegid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Seteuid(euid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_seteuid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setgid(gid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setgid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setlogin(name string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(name)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setlogin_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setpgid(pid int, pgid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setpgid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setpriority(which int, who int, prio int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setpriority_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setprivexec(flag int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setprivexec_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setregid(rgid int, egid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setregid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setreuid(ruid int, euid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setreuid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setrlimit(which int, lim *Rlimit) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setrlimit_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setsid() (pid int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
pid = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setsid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Settimeofday(tp *Timeval) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_settimeofday_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setuid(uid int) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_setuid_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Symlink(path string, link string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(link)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_symlink_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_symlinkat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Sync() (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_sync_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Truncate(path string, length int64) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_truncate_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Umask(newmask int) (oldmask int) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
oldmask = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_umask_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Undelete(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_undelete_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Unlink(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_unlink_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
func Unlinkat(dirfd int, path string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
2017-08-09 13:15:03 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_unlinkat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2017-08-09 13:15:03 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
func Unmount(path string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_unmount_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func write(fd int, p []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_write_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
|
2015-05-17 07:37:28 +03:00
|
|
|
ret = uintptr(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_mmap_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func munmap(addr uintptr, length uintptr) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
|
2015-05-17 07:37:28 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_munmap_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2015-05-17 07:37:28 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
|
2015-05-17 07:37:28 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2018-12-18 04:25:45 +03:00
|
|
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
2018-12-18 04:25:45 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fstat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 04:25:45 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
2018-12-18 04:25:45 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fstatat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 04:25:45 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
2018-12-18 04:25:45 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_fstatfs_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 04:25:45 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
2018-12-18 06:18:00 +03:00
|
|
|
|
|
|
|
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags))
|
2018-12-18 06:18:00 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_getfsstat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 06:18:00 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
2018-12-18 04:25:45 +03:00
|
|
|
|
|
|
|
func Lstat(path string, stat *Stat_t) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
2018-12-18 04:25:45 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_lstat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
|
2020-10-16 11:45:38 +03:00
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2020-12-22 18:24:28 +03:00
|
|
|
func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
2020-10-16 11:45:38 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_ptrace_trampoline_addr uintptr
|
2020-10-16 11:45:38 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 04:25:45 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Stat(path string, stat *Stat_t) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
2018-12-18 04:25:45 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_stat_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
|
2018-12-20 23:00:02 +03:00
|
|
|
|
2018-12-18 04:25:45 +03:00
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Statfs(path string, stat *Statfs_t) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-07 04:57:46 +03:00
|
|
|
_, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
2018-12-18 04:25:45 +03:00
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
2018-12-20 21:26:58 +03:00
|
|
|
|
2021-05-07 04:57:46 +03:00
|
|
|
var libc_statfs_trampoline_addr uintptr
|
2018-12-20 21:26:58 +03:00
|
|
|
|
|
|
|
//go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
|