kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1 | // go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 4 | //go:build darwin && arm64 && go1.12 |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 5 | // +build darwin,arm64,go1.12 |
| 6 | |
| 7 | package unix |
| 8 | |
| 9 | import ( |
| 10 | "syscall" |
| 11 | "unsafe" |
| 12 | ) |
| 13 | |
| 14 | var _ syscall.Errno |
| 15 | |
| 16 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 17 | |
| 18 | func getgroups(ngid int, gid *_Gid_t) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 19 | r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 20 | n = int(r0) |
| 21 | if e1 != 0 { |
| 22 | err = errnoErr(e1) |
| 23 | } |
| 24 | return |
| 25 | } |
| 26 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 27 | var libc_getgroups_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 28 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 29 | //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib" |
| 30 | |
| 31 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 32 | |
| 33 | func setgroups(ngid int, gid *_Gid_t) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 34 | _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 35 | if e1 != 0 { |
| 36 | err = errnoErr(e1) |
| 37 | } |
| 38 | return |
| 39 | } |
| 40 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 41 | var libc_setgroups_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 42 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 43 | //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib" |
| 44 | |
| 45 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 46 | |
| 47 | func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 48 | r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 49 | wpid = int(r0) |
| 50 | if e1 != 0 { |
| 51 | err = errnoErr(e1) |
| 52 | } |
| 53 | return |
| 54 | } |
| 55 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 56 | var libc_wait4_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 57 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 58 | //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib" |
| 59 | |
| 60 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 61 | |
| 62 | func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 63 | r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 64 | fd = int(r0) |
| 65 | if e1 != 0 { |
| 66 | err = errnoErr(e1) |
| 67 | } |
| 68 | return |
| 69 | } |
| 70 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 71 | var libc_accept_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 72 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 73 | //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib" |
| 74 | |
| 75 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 76 | |
| 77 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 78 | _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 79 | if e1 != 0 { |
| 80 | err = errnoErr(e1) |
| 81 | } |
| 82 | return |
| 83 | } |
| 84 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 85 | var libc_bind_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 86 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 87 | //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib" |
| 88 | |
| 89 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 90 | |
| 91 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 92 | _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 93 | if e1 != 0 { |
| 94 | err = errnoErr(e1) |
| 95 | } |
| 96 | return |
| 97 | } |
| 98 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 99 | var libc_connect_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 100 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 101 | //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib" |
| 102 | |
| 103 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 104 | |
| 105 | func socket(domain int, typ int, proto int) (fd int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 106 | r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 107 | fd = int(r0) |
| 108 | if e1 != 0 { |
| 109 | err = errnoErr(e1) |
| 110 | } |
| 111 | return |
| 112 | } |
| 113 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 114 | var libc_socket_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 115 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 116 | //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib" |
| 117 | |
| 118 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 119 | |
| 120 | func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 121 | _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 122 | if e1 != 0 { |
| 123 | err = errnoErr(e1) |
| 124 | } |
| 125 | return |
| 126 | } |
| 127 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 128 | var libc_getsockopt_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 129 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 130 | //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib" |
| 131 | |
| 132 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 133 | |
| 134 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 135 | _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 136 | if e1 != 0 { |
| 137 | err = errnoErr(e1) |
| 138 | } |
| 139 | return |
| 140 | } |
| 141 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 142 | var libc_setsockopt_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 143 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 144 | //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib" |
| 145 | |
| 146 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 147 | |
| 148 | func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 149 | _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 150 | if e1 != 0 { |
| 151 | err = errnoErr(e1) |
| 152 | } |
| 153 | return |
| 154 | } |
| 155 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 156 | var libc_getpeername_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 157 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 158 | //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib" |
| 159 | |
| 160 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 161 | |
| 162 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 163 | _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 164 | if e1 != 0 { |
| 165 | err = errnoErr(e1) |
| 166 | } |
| 167 | return |
| 168 | } |
| 169 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 170 | var libc_getsockname_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 171 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 172 | //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib" |
| 173 | |
| 174 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 175 | |
| 176 | func Shutdown(s int, how int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 177 | _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 178 | if e1 != 0 { |
| 179 | err = errnoErr(e1) |
| 180 | } |
| 181 | return |
| 182 | } |
| 183 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 184 | var libc_shutdown_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 185 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 186 | //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib" |
| 187 | |
| 188 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 189 | |
| 190 | func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 191 | _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 192 | if e1 != 0 { |
| 193 | err = errnoErr(e1) |
| 194 | } |
| 195 | return |
| 196 | } |
| 197 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 198 | var libc_socketpair_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 199 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 200 | //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib" |
| 201 | |
| 202 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 203 | |
| 204 | func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { |
| 205 | var _p0 unsafe.Pointer |
| 206 | if len(p) > 0 { |
| 207 | _p0 = unsafe.Pointer(&p[0]) |
| 208 | } else { |
| 209 | _p0 = unsafe.Pointer(&_zero) |
| 210 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 211 | 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))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 212 | n = int(r0) |
| 213 | if e1 != 0 { |
| 214 | err = errnoErr(e1) |
| 215 | } |
| 216 | return |
| 217 | } |
| 218 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 219 | var libc_recvfrom_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 220 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 221 | //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib" |
| 222 | |
| 223 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 224 | |
| 225 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { |
| 226 | var _p0 unsafe.Pointer |
| 227 | if len(buf) > 0 { |
| 228 | _p0 = unsafe.Pointer(&buf[0]) |
| 229 | } else { |
| 230 | _p0 = unsafe.Pointer(&_zero) |
| 231 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 232 | _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 233 | if e1 != 0 { |
| 234 | err = errnoErr(e1) |
| 235 | } |
| 236 | return |
| 237 | } |
| 238 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 239 | var libc_sendto_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 240 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 241 | //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib" |
| 242 | |
| 243 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 244 | |
| 245 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 246 | r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 247 | n = int(r0) |
| 248 | if e1 != 0 { |
| 249 | err = errnoErr(e1) |
| 250 | } |
| 251 | return |
| 252 | } |
| 253 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 254 | var libc_recvmsg_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 255 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 256 | //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib" |
| 257 | |
| 258 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 259 | |
| 260 | func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 261 | r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 262 | n = int(r0) |
| 263 | if e1 != 0 { |
| 264 | err = errnoErr(e1) |
| 265 | } |
| 266 | return |
| 267 | } |
| 268 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 269 | var libc_sendmsg_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 270 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 271 | //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib" |
| 272 | |
| 273 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 274 | |
| 275 | func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 276 | r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 277 | n = int(r0) |
| 278 | if e1 != 0 { |
| 279 | err = errnoErr(e1) |
| 280 | } |
| 281 | return |
| 282 | } |
| 283 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 284 | var libc_kevent_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 285 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 286 | //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib" |
| 287 | |
| 288 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 289 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 290 | func utimes(path string, timeval *[2]Timeval) (err error) { |
| 291 | var _p0 *byte |
| 292 | _p0, err = BytePtrFromString(path) |
| 293 | if err != nil { |
| 294 | return |
| 295 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 296 | _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 297 | if e1 != 0 { |
| 298 | err = errnoErr(e1) |
| 299 | } |
| 300 | return |
| 301 | } |
| 302 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 303 | var libc_utimes_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 304 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 305 | //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib" |
| 306 | |
| 307 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 308 | |
| 309 | func futimes(fd int, timeval *[2]Timeval) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 310 | _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 311 | if e1 != 0 { |
| 312 | err = errnoErr(e1) |
| 313 | } |
| 314 | return |
| 315 | } |
| 316 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 317 | var libc_futimes_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 318 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 319 | //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib" |
| 320 | |
| 321 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 322 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 323 | func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 324 | r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 325 | n = int(r0) |
| 326 | if e1 != 0 { |
| 327 | err = errnoErr(e1) |
| 328 | } |
| 329 | return |
| 330 | } |
| 331 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 332 | var libc_poll_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 333 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 334 | //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib" |
| 335 | |
| 336 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 337 | |
| 338 | func Madvise(b []byte, behav int) (err error) { |
| 339 | var _p0 unsafe.Pointer |
| 340 | if len(b) > 0 { |
| 341 | _p0 = unsafe.Pointer(&b[0]) |
| 342 | } else { |
| 343 | _p0 = unsafe.Pointer(&_zero) |
| 344 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 345 | _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 346 | if e1 != 0 { |
| 347 | err = errnoErr(e1) |
| 348 | } |
| 349 | return |
| 350 | } |
| 351 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 352 | var libc_madvise_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 353 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 354 | //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib" |
| 355 | |
| 356 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 357 | |
| 358 | func Mlock(b []byte) (err error) { |
| 359 | var _p0 unsafe.Pointer |
| 360 | if len(b) > 0 { |
| 361 | _p0 = unsafe.Pointer(&b[0]) |
| 362 | } else { |
| 363 | _p0 = unsafe.Pointer(&_zero) |
| 364 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 365 | _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 366 | if e1 != 0 { |
| 367 | err = errnoErr(e1) |
| 368 | } |
| 369 | return |
| 370 | } |
| 371 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 372 | var libc_mlock_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 373 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 374 | //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib" |
| 375 | |
| 376 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 377 | |
| 378 | func Mlockall(flags int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 379 | _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 380 | if e1 != 0 { |
| 381 | err = errnoErr(e1) |
| 382 | } |
| 383 | return |
| 384 | } |
| 385 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 386 | var libc_mlockall_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 387 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 388 | //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib" |
| 389 | |
| 390 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 391 | |
| 392 | func Mprotect(b []byte, prot int) (err error) { |
| 393 | var _p0 unsafe.Pointer |
| 394 | if len(b) > 0 { |
| 395 | _p0 = unsafe.Pointer(&b[0]) |
| 396 | } else { |
| 397 | _p0 = unsafe.Pointer(&_zero) |
| 398 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 399 | _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 400 | if e1 != 0 { |
| 401 | err = errnoErr(e1) |
| 402 | } |
| 403 | return |
| 404 | } |
| 405 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 406 | var libc_mprotect_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 407 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 408 | //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib" |
| 409 | |
| 410 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 411 | |
| 412 | func Msync(b []byte, flags int) (err error) { |
| 413 | var _p0 unsafe.Pointer |
| 414 | if len(b) > 0 { |
| 415 | _p0 = unsafe.Pointer(&b[0]) |
| 416 | } else { |
| 417 | _p0 = unsafe.Pointer(&_zero) |
| 418 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 419 | _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 420 | if e1 != 0 { |
| 421 | err = errnoErr(e1) |
| 422 | } |
| 423 | return |
| 424 | } |
| 425 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 426 | var libc_msync_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 427 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 428 | //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib" |
| 429 | |
| 430 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 431 | |
| 432 | func Munlock(b []byte) (err error) { |
| 433 | var _p0 unsafe.Pointer |
| 434 | if len(b) > 0 { |
| 435 | _p0 = unsafe.Pointer(&b[0]) |
| 436 | } else { |
| 437 | _p0 = unsafe.Pointer(&_zero) |
| 438 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 439 | _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 440 | if e1 != 0 { |
| 441 | err = errnoErr(e1) |
| 442 | } |
| 443 | return |
| 444 | } |
| 445 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 446 | var libc_munlock_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 447 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 448 | //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib" |
| 449 | |
| 450 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 451 | |
| 452 | func Munlockall() (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 453 | _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 454 | if e1 != 0 { |
| 455 | err = errnoErr(e1) |
| 456 | } |
| 457 | return |
| 458 | } |
| 459 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 460 | var libc_munlockall_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 461 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 462 | //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib" |
| 463 | |
| 464 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 465 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 466 | func pipe(p *[2]int32) (err error) { |
| 467 | _, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 468 | if e1 != 0 { |
| 469 | err = errnoErr(e1) |
| 470 | } |
| 471 | return |
| 472 | } |
| 473 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 474 | var libc_pipe_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 475 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 476 | //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib" |
| 477 | |
| 478 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 479 | |
| 480 | func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { |
| 481 | var _p0 *byte |
| 482 | _p0, err = BytePtrFromString(path) |
| 483 | if err != nil { |
| 484 | return |
| 485 | } |
| 486 | var _p1 *byte |
| 487 | _p1, err = BytePtrFromString(attr) |
| 488 | if err != nil { |
| 489 | return |
| 490 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 491 | 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)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 492 | sz = int(r0) |
| 493 | if e1 != 0 { |
| 494 | err = errnoErr(e1) |
| 495 | } |
| 496 | return |
| 497 | } |
| 498 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 499 | var libc_getxattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 500 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 501 | //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib" |
| 502 | |
| 503 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 504 | |
| 505 | func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { |
| 506 | var _p0 *byte |
| 507 | _p0, err = BytePtrFromString(attr) |
| 508 | if err != nil { |
| 509 | return |
| 510 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 511 | r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 512 | sz = int(r0) |
| 513 | if e1 != 0 { |
| 514 | err = errnoErr(e1) |
| 515 | } |
| 516 | return |
| 517 | } |
| 518 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 519 | var libc_fgetxattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 520 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 521 | //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib" |
| 522 | |
| 523 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 524 | |
| 525 | func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) { |
| 526 | var _p0 *byte |
| 527 | _p0, err = BytePtrFromString(path) |
| 528 | if err != nil { |
| 529 | return |
| 530 | } |
| 531 | var _p1 *byte |
| 532 | _p1, err = BytePtrFromString(attr) |
| 533 | if err != nil { |
| 534 | return |
| 535 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 536 | _, _, 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)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 537 | if e1 != 0 { |
| 538 | err = errnoErr(e1) |
| 539 | } |
| 540 | return |
| 541 | } |
| 542 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 543 | var libc_setxattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 544 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 545 | //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib" |
| 546 | |
| 547 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 548 | |
| 549 | func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) { |
| 550 | var _p0 *byte |
| 551 | _p0, err = BytePtrFromString(attr) |
| 552 | if err != nil { |
| 553 | return |
| 554 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 555 | _, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 556 | if e1 != 0 { |
| 557 | err = errnoErr(e1) |
| 558 | } |
| 559 | return |
| 560 | } |
| 561 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 562 | var libc_fsetxattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 563 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 564 | //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib" |
| 565 | |
| 566 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 567 | |
| 568 | func removexattr(path string, attr string, options int) (err error) { |
| 569 | var _p0 *byte |
| 570 | _p0, err = BytePtrFromString(path) |
| 571 | if err != nil { |
| 572 | return |
| 573 | } |
| 574 | var _p1 *byte |
| 575 | _p1, err = BytePtrFromString(attr) |
| 576 | if err != nil { |
| 577 | return |
| 578 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 579 | _, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 580 | if e1 != 0 { |
| 581 | err = errnoErr(e1) |
| 582 | } |
| 583 | return |
| 584 | } |
| 585 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 586 | var libc_removexattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 587 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 588 | //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib" |
| 589 | |
| 590 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 591 | |
| 592 | func fremovexattr(fd int, attr string, options int) (err error) { |
| 593 | var _p0 *byte |
| 594 | _p0, err = BytePtrFromString(attr) |
| 595 | if err != nil { |
| 596 | return |
| 597 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 598 | _, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 599 | if e1 != 0 { |
| 600 | err = errnoErr(e1) |
| 601 | } |
| 602 | return |
| 603 | } |
| 604 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 605 | var libc_fremovexattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 606 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 607 | //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib" |
| 608 | |
| 609 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 610 | |
| 611 | func listxattr(path string, dest *byte, size int, options int) (sz int, err error) { |
| 612 | var _p0 *byte |
| 613 | _p0, err = BytePtrFromString(path) |
| 614 | if err != nil { |
| 615 | return |
| 616 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 617 | r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 618 | sz = int(r0) |
| 619 | if e1 != 0 { |
| 620 | err = errnoErr(e1) |
| 621 | } |
| 622 | return |
| 623 | } |
| 624 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 625 | var libc_listxattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 626 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 627 | //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib" |
| 628 | |
| 629 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 630 | |
| 631 | func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 632 | r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 633 | sz = int(r0) |
| 634 | if e1 != 0 { |
| 635 | err = errnoErr(e1) |
| 636 | } |
| 637 | return |
| 638 | } |
| 639 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 640 | var libc_flistxattr_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 641 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 642 | //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib" |
| 643 | |
| 644 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 645 | |
| 646 | func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 647 | _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 648 | if e1 != 0 { |
| 649 | err = errnoErr(e1) |
| 650 | } |
| 651 | return |
| 652 | } |
| 653 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 654 | var libc_setattrlist_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 655 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 656 | //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" |
| 657 | |
| 658 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 659 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 660 | func fcntl(fd int, cmd int, arg int) (val int, err error) { |
| 661 | r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) |
| 662 | val = int(r0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 663 | if e1 != 0 { |
| 664 | err = errnoErr(e1) |
| 665 | } |
| 666 | return |
| 667 | } |
| 668 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 669 | var libc_fcntl_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 670 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 671 | //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" |
| 672 | |
| 673 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 674 | |
| 675 | func kill(pid int, signum int, posix int) (err error) { |
| 676 | _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix)) |
| 677 | if e1 != 0 { |
| 678 | err = errnoErr(e1) |
| 679 | } |
| 680 | return |
| 681 | } |
| 682 | |
| 683 | var libc_kill_trampoline_addr uintptr |
| 684 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 685 | //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib" |
| 686 | |
| 687 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 688 | |
| 689 | func ioctl(fd int, req uint, arg uintptr) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 690 | _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 691 | if e1 != 0 { |
| 692 | err = errnoErr(e1) |
| 693 | } |
| 694 | return |
| 695 | } |
| 696 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 697 | var libc_ioctl_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 698 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 699 | //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib" |
| 700 | |
| 701 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 702 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 703 | func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { |
| 704 | var _p0 unsafe.Pointer |
| 705 | if len(mib) > 0 { |
| 706 | _p0 = unsafe.Pointer(&mib[0]) |
| 707 | } else { |
| 708 | _p0 = unsafe.Pointer(&_zero) |
| 709 | } |
| 710 | _, _, 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)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 711 | if e1 != 0 { |
| 712 | err = errnoErr(e1) |
| 713 | } |
| 714 | return |
| 715 | } |
| 716 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 717 | var libc_sysctl_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 718 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 719 | //go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" |
| 720 | |
| 721 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 722 | |
| 723 | func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { |
| 724 | _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) |
| 725 | if e1 != 0 { |
| 726 | err = errnoErr(e1) |
| 727 | } |
| 728 | return |
| 729 | } |
| 730 | |
| 731 | var libc_sendfile_trampoline_addr uintptr |
| 732 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 733 | //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib" |
| 734 | |
| 735 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 736 | |
| 737 | func Access(path string, mode uint32) (err error) { |
| 738 | var _p0 *byte |
| 739 | _p0, err = BytePtrFromString(path) |
| 740 | if err != nil { |
| 741 | return |
| 742 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 743 | _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 744 | if e1 != 0 { |
| 745 | err = errnoErr(e1) |
| 746 | } |
| 747 | return |
| 748 | } |
| 749 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 750 | var libc_access_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 751 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 752 | //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib" |
| 753 | |
| 754 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 755 | |
| 756 | func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 757 | _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 758 | if e1 != 0 { |
| 759 | err = errnoErr(e1) |
| 760 | } |
| 761 | return |
| 762 | } |
| 763 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 764 | var libc_adjtime_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 765 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 766 | //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib" |
| 767 | |
| 768 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 769 | |
| 770 | func Chdir(path string) (err error) { |
| 771 | var _p0 *byte |
| 772 | _p0, err = BytePtrFromString(path) |
| 773 | if err != nil { |
| 774 | return |
| 775 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 776 | _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 777 | if e1 != 0 { |
| 778 | err = errnoErr(e1) |
| 779 | } |
| 780 | return |
| 781 | } |
| 782 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 783 | var libc_chdir_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 784 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 785 | //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib" |
| 786 | |
| 787 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 788 | |
| 789 | func Chflags(path string, flags int) (err error) { |
| 790 | var _p0 *byte |
| 791 | _p0, err = BytePtrFromString(path) |
| 792 | if err != nil { |
| 793 | return |
| 794 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 795 | _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 796 | if e1 != 0 { |
| 797 | err = errnoErr(e1) |
| 798 | } |
| 799 | return |
| 800 | } |
| 801 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 802 | var libc_chflags_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 803 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 804 | //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib" |
| 805 | |
| 806 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 807 | |
| 808 | func Chmod(path string, mode uint32) (err error) { |
| 809 | var _p0 *byte |
| 810 | _p0, err = BytePtrFromString(path) |
| 811 | if err != nil { |
| 812 | return |
| 813 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 814 | _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 815 | if e1 != 0 { |
| 816 | err = errnoErr(e1) |
| 817 | } |
| 818 | return |
| 819 | } |
| 820 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 821 | var libc_chmod_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 822 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 823 | //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib" |
| 824 | |
| 825 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 826 | |
| 827 | func Chown(path string, uid int, gid int) (err error) { |
| 828 | var _p0 *byte |
| 829 | _p0, err = BytePtrFromString(path) |
| 830 | if err != nil { |
| 831 | return |
| 832 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 833 | _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 834 | if e1 != 0 { |
| 835 | err = errnoErr(e1) |
| 836 | } |
| 837 | return |
| 838 | } |
| 839 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 840 | var libc_chown_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 841 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 842 | //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib" |
| 843 | |
| 844 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 845 | |
| 846 | func Chroot(path string) (err error) { |
| 847 | var _p0 *byte |
| 848 | _p0, err = BytePtrFromString(path) |
| 849 | if err != nil { |
| 850 | return |
| 851 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 852 | _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 853 | if e1 != 0 { |
| 854 | err = errnoErr(e1) |
| 855 | } |
| 856 | return |
| 857 | } |
| 858 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 859 | var libc_chroot_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 860 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 861 | //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib" |
| 862 | |
| 863 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 864 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 865 | func ClockGettime(clockid int32, time *Timespec) (err error) { |
| 866 | _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 867 | if e1 != 0 { |
| 868 | err = errnoErr(e1) |
| 869 | } |
| 870 | return |
| 871 | } |
| 872 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 873 | var libc_clock_gettime_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 874 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 875 | //go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib" |
| 876 | |
| 877 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 878 | |
| 879 | func Close(fd int) (err error) { |
| 880 | _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) |
| 881 | if e1 != 0 { |
| 882 | err = errnoErr(e1) |
| 883 | } |
| 884 | return |
| 885 | } |
| 886 | |
| 887 | var libc_close_trampoline_addr uintptr |
| 888 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 889 | //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib" |
| 890 | |
| 891 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 892 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 893 | func Clonefile(src string, dst string, flags int) (err error) { |
| 894 | var _p0 *byte |
| 895 | _p0, err = BytePtrFromString(src) |
| 896 | if err != nil { |
| 897 | return |
| 898 | } |
| 899 | var _p1 *byte |
| 900 | _p1, err = BytePtrFromString(dst) |
| 901 | if err != nil { |
| 902 | return |
| 903 | } |
| 904 | _, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) |
| 905 | if e1 != 0 { |
| 906 | err = errnoErr(e1) |
| 907 | } |
| 908 | return |
| 909 | } |
| 910 | |
| 911 | var libc_clonefile_trampoline_addr uintptr |
| 912 | |
| 913 | //go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib" |
| 914 | |
| 915 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 916 | |
| 917 | func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) { |
| 918 | var _p0 *byte |
| 919 | _p0, err = BytePtrFromString(src) |
| 920 | if err != nil { |
| 921 | return |
| 922 | } |
| 923 | var _p1 *byte |
| 924 | _p1, err = BytePtrFromString(dst) |
| 925 | if err != nil { |
| 926 | return |
| 927 | } |
| 928 | _, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) |
| 929 | if e1 != 0 { |
| 930 | err = errnoErr(e1) |
| 931 | } |
| 932 | return |
| 933 | } |
| 934 | |
| 935 | var libc_clonefileat_trampoline_addr uintptr |
| 936 | |
| 937 | //go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib" |
| 938 | |
| 939 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 940 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 941 | func Dup(fd int) (nfd int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 942 | r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 943 | nfd = int(r0) |
| 944 | if e1 != 0 { |
| 945 | err = errnoErr(e1) |
| 946 | } |
| 947 | return |
| 948 | } |
| 949 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 950 | var libc_dup_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 951 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 952 | //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib" |
| 953 | |
| 954 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 955 | |
| 956 | func Dup2(from int, to int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 957 | _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 958 | if e1 != 0 { |
| 959 | err = errnoErr(e1) |
| 960 | } |
| 961 | return |
| 962 | } |
| 963 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 964 | var libc_dup2_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 965 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 966 | //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib" |
| 967 | |
| 968 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 969 | |
| 970 | func Exchangedata(path1 string, path2 string, options int) (err error) { |
| 971 | var _p0 *byte |
| 972 | _p0, err = BytePtrFromString(path1) |
| 973 | if err != nil { |
| 974 | return |
| 975 | } |
| 976 | var _p1 *byte |
| 977 | _p1, err = BytePtrFromString(path2) |
| 978 | if err != nil { |
| 979 | return |
| 980 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 981 | _, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 982 | if e1 != 0 { |
| 983 | err = errnoErr(e1) |
| 984 | } |
| 985 | return |
| 986 | } |
| 987 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 988 | var libc_exchangedata_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 989 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 990 | //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib" |
| 991 | |
| 992 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 993 | |
| 994 | func Exit(code int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 995 | syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 996 | return |
| 997 | } |
| 998 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 999 | var libc_exit_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1000 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1001 | //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib" |
| 1002 | |
| 1003 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1004 | |
| 1005 | func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 1006 | var _p0 *byte |
| 1007 | _p0, err = BytePtrFromString(path) |
| 1008 | if err != nil { |
| 1009 | return |
| 1010 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1011 | _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1012 | if e1 != 0 { |
| 1013 | err = errnoErr(e1) |
| 1014 | } |
| 1015 | return |
| 1016 | } |
| 1017 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1018 | var libc_faccessat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1019 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1020 | //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib" |
| 1021 | |
| 1022 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1023 | |
| 1024 | func Fchdir(fd int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1025 | _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1026 | if e1 != 0 { |
| 1027 | err = errnoErr(e1) |
| 1028 | } |
| 1029 | return |
| 1030 | } |
| 1031 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1032 | var libc_fchdir_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1033 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1034 | //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib" |
| 1035 | |
| 1036 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1037 | |
| 1038 | func Fchflags(fd int, flags int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1039 | _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1040 | if e1 != 0 { |
| 1041 | err = errnoErr(e1) |
| 1042 | } |
| 1043 | return |
| 1044 | } |
| 1045 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1046 | var libc_fchflags_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1047 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1048 | //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib" |
| 1049 | |
| 1050 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1051 | |
| 1052 | func Fchmod(fd int, mode uint32) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1053 | _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1054 | if e1 != 0 { |
| 1055 | err = errnoErr(e1) |
| 1056 | } |
| 1057 | return |
| 1058 | } |
| 1059 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1060 | var libc_fchmod_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1061 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1062 | //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib" |
| 1063 | |
| 1064 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1065 | |
| 1066 | func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 1067 | var _p0 *byte |
| 1068 | _p0, err = BytePtrFromString(path) |
| 1069 | if err != nil { |
| 1070 | return |
| 1071 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1072 | _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1073 | if e1 != 0 { |
| 1074 | err = errnoErr(e1) |
| 1075 | } |
| 1076 | return |
| 1077 | } |
| 1078 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1079 | var libc_fchmodat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1080 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1081 | //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib" |
| 1082 | |
| 1083 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1084 | |
| 1085 | func Fchown(fd int, uid int, gid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1086 | _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1087 | if e1 != 0 { |
| 1088 | err = errnoErr(e1) |
| 1089 | } |
| 1090 | return |
| 1091 | } |
| 1092 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1093 | var libc_fchown_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1094 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1095 | //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib" |
| 1096 | |
| 1097 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1098 | |
| 1099 | func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { |
| 1100 | var _p0 *byte |
| 1101 | _p0, err = BytePtrFromString(path) |
| 1102 | if err != nil { |
| 1103 | return |
| 1104 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1105 | _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1106 | if e1 != 0 { |
| 1107 | err = errnoErr(e1) |
| 1108 | } |
| 1109 | return |
| 1110 | } |
| 1111 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1112 | var libc_fchownat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1113 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1114 | //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib" |
| 1115 | |
| 1116 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1117 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1118 | func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) { |
| 1119 | var _p0 *byte |
| 1120 | _p0, err = BytePtrFromString(dst) |
| 1121 | if err != nil { |
| 1122 | return |
| 1123 | } |
| 1124 | _, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1125 | if e1 != 0 { |
| 1126 | err = errnoErr(e1) |
| 1127 | } |
| 1128 | return |
| 1129 | } |
| 1130 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1131 | var libc_fclonefileat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1132 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1133 | //go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib" |
| 1134 | |
| 1135 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1136 | |
| 1137 | func Flock(fd int, how int) (err error) { |
| 1138 | _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) |
| 1139 | if e1 != 0 { |
| 1140 | err = errnoErr(e1) |
| 1141 | } |
| 1142 | return |
| 1143 | } |
| 1144 | |
| 1145 | var libc_flock_trampoline_addr uintptr |
| 1146 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1147 | //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib" |
| 1148 | |
| 1149 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1150 | |
| 1151 | func Fpathconf(fd int, name int) (val int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1152 | r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1153 | val = int(r0) |
| 1154 | if e1 != 0 { |
| 1155 | err = errnoErr(e1) |
| 1156 | } |
| 1157 | return |
| 1158 | } |
| 1159 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1160 | var libc_fpathconf_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1161 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1162 | //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib" |
| 1163 | |
| 1164 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1165 | |
| 1166 | func Fsync(fd int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1167 | _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1168 | if e1 != 0 { |
| 1169 | err = errnoErr(e1) |
| 1170 | } |
| 1171 | return |
| 1172 | } |
| 1173 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1174 | var libc_fsync_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1175 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1176 | //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib" |
| 1177 | |
| 1178 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1179 | |
| 1180 | func Ftruncate(fd int, length int64) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1181 | _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1182 | if e1 != 0 { |
| 1183 | err = errnoErr(e1) |
| 1184 | } |
| 1185 | return |
| 1186 | } |
| 1187 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1188 | var libc_ftruncate_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1189 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1190 | //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib" |
| 1191 | |
| 1192 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1193 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1194 | func Getcwd(buf []byte) (n int, err error) { |
| 1195 | var _p0 unsafe.Pointer |
| 1196 | if len(buf) > 0 { |
| 1197 | _p0 = unsafe.Pointer(&buf[0]) |
| 1198 | } else { |
| 1199 | _p0 = unsafe.Pointer(&_zero) |
| 1200 | } |
| 1201 | r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) |
| 1202 | n = int(r0) |
| 1203 | if e1 != 0 { |
| 1204 | err = errnoErr(e1) |
| 1205 | } |
| 1206 | return |
| 1207 | } |
| 1208 | |
| 1209 | var libc_getcwd_trampoline_addr uintptr |
| 1210 | |
| 1211 | //go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib" |
| 1212 | |
| 1213 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1214 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1215 | func Getdtablesize() (size int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1216 | r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1217 | size = int(r0) |
| 1218 | return |
| 1219 | } |
| 1220 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1221 | var libc_getdtablesize_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1222 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1223 | //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib" |
| 1224 | |
| 1225 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1226 | |
| 1227 | func Getegid() (egid int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1228 | r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1229 | egid = int(r0) |
| 1230 | return |
| 1231 | } |
| 1232 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1233 | var libc_getegid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1234 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1235 | //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib" |
| 1236 | |
| 1237 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1238 | |
| 1239 | func Geteuid() (uid int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1240 | r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1241 | uid = int(r0) |
| 1242 | return |
| 1243 | } |
| 1244 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1245 | var libc_geteuid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1246 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1247 | //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib" |
| 1248 | |
| 1249 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1250 | |
| 1251 | func Getgid() (gid int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1252 | r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1253 | gid = int(r0) |
| 1254 | return |
| 1255 | } |
| 1256 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1257 | var libc_getgid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1258 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1259 | //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib" |
| 1260 | |
| 1261 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1262 | |
| 1263 | func Getpgid(pid int) (pgid int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1264 | r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1265 | pgid = int(r0) |
| 1266 | if e1 != 0 { |
| 1267 | err = errnoErr(e1) |
| 1268 | } |
| 1269 | return |
| 1270 | } |
| 1271 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1272 | var libc_getpgid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1273 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1274 | //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib" |
| 1275 | |
| 1276 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1277 | |
| 1278 | func Getpgrp() (pgrp int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1279 | r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1280 | pgrp = int(r0) |
| 1281 | return |
| 1282 | } |
| 1283 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1284 | var libc_getpgrp_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1285 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1286 | //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib" |
| 1287 | |
| 1288 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1289 | |
| 1290 | func Getpid() (pid int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1291 | r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1292 | pid = int(r0) |
| 1293 | return |
| 1294 | } |
| 1295 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1296 | var libc_getpid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1297 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1298 | //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib" |
| 1299 | |
| 1300 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1301 | |
| 1302 | func Getppid() (ppid int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1303 | r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1304 | ppid = int(r0) |
| 1305 | return |
| 1306 | } |
| 1307 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1308 | var libc_getppid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1309 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1310 | //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib" |
| 1311 | |
| 1312 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1313 | |
| 1314 | func Getpriority(which int, who int) (prio int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1315 | r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1316 | prio = int(r0) |
| 1317 | if e1 != 0 { |
| 1318 | err = errnoErr(e1) |
| 1319 | } |
| 1320 | return |
| 1321 | } |
| 1322 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1323 | var libc_getpriority_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1324 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1325 | //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib" |
| 1326 | |
| 1327 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1328 | |
| 1329 | func Getrlimit(which int, lim *Rlimit) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1330 | _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1331 | if e1 != 0 { |
| 1332 | err = errnoErr(e1) |
| 1333 | } |
| 1334 | return |
| 1335 | } |
| 1336 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1337 | var libc_getrlimit_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1338 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1339 | //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib" |
| 1340 | |
| 1341 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1342 | |
| 1343 | func Getrusage(who int, rusage *Rusage) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1344 | _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1345 | if e1 != 0 { |
| 1346 | err = errnoErr(e1) |
| 1347 | } |
| 1348 | return |
| 1349 | } |
| 1350 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1351 | var libc_getrusage_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1352 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1353 | //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib" |
| 1354 | |
| 1355 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1356 | |
| 1357 | func Getsid(pid int) (sid int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1358 | r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1359 | sid = int(r0) |
| 1360 | if e1 != 0 { |
| 1361 | err = errnoErr(e1) |
| 1362 | } |
| 1363 | return |
| 1364 | } |
| 1365 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1366 | var libc_getsid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1367 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1368 | //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib" |
| 1369 | |
| 1370 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1371 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1372 | func Gettimeofday(tp *Timeval) (err error) { |
| 1373 | _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) |
| 1374 | if e1 != 0 { |
| 1375 | err = errnoErr(e1) |
| 1376 | } |
| 1377 | return |
| 1378 | } |
| 1379 | |
| 1380 | var libc_gettimeofday_trampoline_addr uintptr |
| 1381 | |
| 1382 | //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" |
| 1383 | |
| 1384 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1385 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1386 | func Getuid() (uid int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1387 | r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1388 | uid = int(r0) |
| 1389 | return |
| 1390 | } |
| 1391 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1392 | var libc_getuid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1393 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1394 | //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib" |
| 1395 | |
| 1396 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1397 | |
| 1398 | func Issetugid() (tainted bool) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1399 | r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1400 | tainted = bool(r0 != 0) |
| 1401 | return |
| 1402 | } |
| 1403 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1404 | var libc_issetugid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1405 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1406 | //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib" |
| 1407 | |
| 1408 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1409 | |
| 1410 | func Kqueue() (fd int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1411 | r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1412 | fd = int(r0) |
| 1413 | if e1 != 0 { |
| 1414 | err = errnoErr(e1) |
| 1415 | } |
| 1416 | return |
| 1417 | } |
| 1418 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1419 | var libc_kqueue_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1420 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1421 | //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib" |
| 1422 | |
| 1423 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1424 | |
| 1425 | func Lchown(path string, uid int, gid int) (err error) { |
| 1426 | var _p0 *byte |
| 1427 | _p0, err = BytePtrFromString(path) |
| 1428 | if err != nil { |
| 1429 | return |
| 1430 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1431 | _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1432 | if e1 != 0 { |
| 1433 | err = errnoErr(e1) |
| 1434 | } |
| 1435 | return |
| 1436 | } |
| 1437 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1438 | var libc_lchown_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1439 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1440 | //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib" |
| 1441 | |
| 1442 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1443 | |
| 1444 | func Link(path string, link string) (err error) { |
| 1445 | var _p0 *byte |
| 1446 | _p0, err = BytePtrFromString(path) |
| 1447 | if err != nil { |
| 1448 | return |
| 1449 | } |
| 1450 | var _p1 *byte |
| 1451 | _p1, err = BytePtrFromString(link) |
| 1452 | if err != nil { |
| 1453 | return |
| 1454 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1455 | _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1456 | if e1 != 0 { |
| 1457 | err = errnoErr(e1) |
| 1458 | } |
| 1459 | return |
| 1460 | } |
| 1461 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1462 | var libc_link_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1463 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1464 | //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib" |
| 1465 | |
| 1466 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1467 | |
| 1468 | func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { |
| 1469 | var _p0 *byte |
| 1470 | _p0, err = BytePtrFromString(path) |
| 1471 | if err != nil { |
| 1472 | return |
| 1473 | } |
| 1474 | var _p1 *byte |
| 1475 | _p1, err = BytePtrFromString(link) |
| 1476 | if err != nil { |
| 1477 | return |
| 1478 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1479 | _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1480 | if e1 != 0 { |
| 1481 | err = errnoErr(e1) |
| 1482 | } |
| 1483 | return |
| 1484 | } |
| 1485 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1486 | var libc_linkat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1487 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1488 | //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib" |
| 1489 | |
| 1490 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1491 | |
| 1492 | func Listen(s int, backlog int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1493 | _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1494 | if e1 != 0 { |
| 1495 | err = errnoErr(e1) |
| 1496 | } |
| 1497 | return |
| 1498 | } |
| 1499 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1500 | var libc_listen_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1501 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1502 | //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib" |
| 1503 | |
| 1504 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1505 | |
| 1506 | func Mkdir(path string, mode uint32) (err error) { |
| 1507 | var _p0 *byte |
| 1508 | _p0, err = BytePtrFromString(path) |
| 1509 | if err != nil { |
| 1510 | return |
| 1511 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1512 | _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1513 | if e1 != 0 { |
| 1514 | err = errnoErr(e1) |
| 1515 | } |
| 1516 | return |
| 1517 | } |
| 1518 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1519 | var libc_mkdir_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1520 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1521 | //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib" |
| 1522 | |
| 1523 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1524 | |
| 1525 | func Mkdirat(dirfd int, path string, mode uint32) (err error) { |
| 1526 | var _p0 *byte |
| 1527 | _p0, err = BytePtrFromString(path) |
| 1528 | if err != nil { |
| 1529 | return |
| 1530 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1531 | _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1532 | if e1 != 0 { |
| 1533 | err = errnoErr(e1) |
| 1534 | } |
| 1535 | return |
| 1536 | } |
| 1537 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1538 | var libc_mkdirat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1539 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1540 | //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib" |
| 1541 | |
| 1542 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1543 | |
| 1544 | func Mkfifo(path string, mode uint32) (err error) { |
| 1545 | var _p0 *byte |
| 1546 | _p0, err = BytePtrFromString(path) |
| 1547 | if err != nil { |
| 1548 | return |
| 1549 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1550 | _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1551 | if e1 != 0 { |
| 1552 | err = errnoErr(e1) |
| 1553 | } |
| 1554 | return |
| 1555 | } |
| 1556 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1557 | var libc_mkfifo_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1558 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1559 | //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib" |
| 1560 | |
| 1561 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1562 | |
| 1563 | func Mknod(path string, mode uint32, dev int) (err error) { |
| 1564 | var _p0 *byte |
| 1565 | _p0, err = BytePtrFromString(path) |
| 1566 | if err != nil { |
| 1567 | return |
| 1568 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1569 | _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1570 | if e1 != 0 { |
| 1571 | err = errnoErr(e1) |
| 1572 | } |
| 1573 | return |
| 1574 | } |
| 1575 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1576 | var libc_mknod_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1577 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1578 | //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib" |
| 1579 | |
| 1580 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1581 | |
| 1582 | func Open(path string, mode int, perm uint32) (fd int, err error) { |
| 1583 | var _p0 *byte |
| 1584 | _p0, err = BytePtrFromString(path) |
| 1585 | if err != nil { |
| 1586 | return |
| 1587 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1588 | r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1589 | fd = int(r0) |
| 1590 | if e1 != 0 { |
| 1591 | err = errnoErr(e1) |
| 1592 | } |
| 1593 | return |
| 1594 | } |
| 1595 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1596 | var libc_open_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1597 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1598 | //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib" |
| 1599 | |
| 1600 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1601 | |
| 1602 | func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { |
| 1603 | var _p0 *byte |
| 1604 | _p0, err = BytePtrFromString(path) |
| 1605 | if err != nil { |
| 1606 | return |
| 1607 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1608 | r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1609 | fd = int(r0) |
| 1610 | if e1 != 0 { |
| 1611 | err = errnoErr(e1) |
| 1612 | } |
| 1613 | return |
| 1614 | } |
| 1615 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1616 | var libc_openat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1617 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1618 | //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib" |
| 1619 | |
| 1620 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1621 | |
| 1622 | func Pathconf(path string, name int) (val int, err error) { |
| 1623 | var _p0 *byte |
| 1624 | _p0, err = BytePtrFromString(path) |
| 1625 | if err != nil { |
| 1626 | return |
| 1627 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1628 | r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1629 | val = int(r0) |
| 1630 | if e1 != 0 { |
| 1631 | err = errnoErr(e1) |
| 1632 | } |
| 1633 | return |
| 1634 | } |
| 1635 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1636 | var libc_pathconf_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1637 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1638 | //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib" |
| 1639 | |
| 1640 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1641 | |
| 1642 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 1643 | var _p0 unsafe.Pointer |
| 1644 | if len(p) > 0 { |
| 1645 | _p0 = unsafe.Pointer(&p[0]) |
| 1646 | } else { |
| 1647 | _p0 = unsafe.Pointer(&_zero) |
| 1648 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1649 | r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1650 | n = int(r0) |
| 1651 | if e1 != 0 { |
| 1652 | err = errnoErr(e1) |
| 1653 | } |
| 1654 | return |
| 1655 | } |
| 1656 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1657 | var libc_pread_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1658 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1659 | //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib" |
| 1660 | |
| 1661 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1662 | |
| 1663 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 1664 | var _p0 unsafe.Pointer |
| 1665 | if len(p) > 0 { |
| 1666 | _p0 = unsafe.Pointer(&p[0]) |
| 1667 | } else { |
| 1668 | _p0 = unsafe.Pointer(&_zero) |
| 1669 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1670 | r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1671 | n = int(r0) |
| 1672 | if e1 != 0 { |
| 1673 | err = errnoErr(e1) |
| 1674 | } |
| 1675 | return |
| 1676 | } |
| 1677 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1678 | var libc_pwrite_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1679 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1680 | //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib" |
| 1681 | |
| 1682 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1683 | |
| 1684 | func read(fd int, p []byte) (n int, err error) { |
| 1685 | var _p0 unsafe.Pointer |
| 1686 | if len(p) > 0 { |
| 1687 | _p0 = unsafe.Pointer(&p[0]) |
| 1688 | } else { |
| 1689 | _p0 = unsafe.Pointer(&_zero) |
| 1690 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1691 | r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1692 | n = int(r0) |
| 1693 | if e1 != 0 { |
| 1694 | err = errnoErr(e1) |
| 1695 | } |
| 1696 | return |
| 1697 | } |
| 1698 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1699 | var libc_read_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1700 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1701 | //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib" |
| 1702 | |
| 1703 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1704 | |
| 1705 | func Readlink(path string, buf []byte) (n int, err error) { |
| 1706 | var _p0 *byte |
| 1707 | _p0, err = BytePtrFromString(path) |
| 1708 | if err != nil { |
| 1709 | return |
| 1710 | } |
| 1711 | var _p1 unsafe.Pointer |
| 1712 | if len(buf) > 0 { |
| 1713 | _p1 = unsafe.Pointer(&buf[0]) |
| 1714 | } else { |
| 1715 | _p1 = unsafe.Pointer(&_zero) |
| 1716 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1717 | r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1718 | n = int(r0) |
| 1719 | if e1 != 0 { |
| 1720 | err = errnoErr(e1) |
| 1721 | } |
| 1722 | return |
| 1723 | } |
| 1724 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1725 | var libc_readlink_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1726 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1727 | //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib" |
| 1728 | |
| 1729 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1730 | |
| 1731 | func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { |
| 1732 | var _p0 *byte |
| 1733 | _p0, err = BytePtrFromString(path) |
| 1734 | if err != nil { |
| 1735 | return |
| 1736 | } |
| 1737 | var _p1 unsafe.Pointer |
| 1738 | if len(buf) > 0 { |
| 1739 | _p1 = unsafe.Pointer(&buf[0]) |
| 1740 | } else { |
| 1741 | _p1 = unsafe.Pointer(&_zero) |
| 1742 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1743 | r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1744 | n = int(r0) |
| 1745 | if e1 != 0 { |
| 1746 | err = errnoErr(e1) |
| 1747 | } |
| 1748 | return |
| 1749 | } |
| 1750 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1751 | var libc_readlinkat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1752 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1753 | //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib" |
| 1754 | |
| 1755 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1756 | |
| 1757 | func Rename(from string, to string) (err error) { |
| 1758 | var _p0 *byte |
| 1759 | _p0, err = BytePtrFromString(from) |
| 1760 | if err != nil { |
| 1761 | return |
| 1762 | } |
| 1763 | var _p1 *byte |
| 1764 | _p1, err = BytePtrFromString(to) |
| 1765 | if err != nil { |
| 1766 | return |
| 1767 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1768 | _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1769 | if e1 != 0 { |
| 1770 | err = errnoErr(e1) |
| 1771 | } |
| 1772 | return |
| 1773 | } |
| 1774 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1775 | var libc_rename_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1776 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1777 | //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib" |
| 1778 | |
| 1779 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1780 | |
| 1781 | func Renameat(fromfd int, from string, tofd int, to string) (err error) { |
| 1782 | var _p0 *byte |
| 1783 | _p0, err = BytePtrFromString(from) |
| 1784 | if err != nil { |
| 1785 | return |
| 1786 | } |
| 1787 | var _p1 *byte |
| 1788 | _p1, err = BytePtrFromString(to) |
| 1789 | if err != nil { |
| 1790 | return |
| 1791 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1792 | _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1793 | if e1 != 0 { |
| 1794 | err = errnoErr(e1) |
| 1795 | } |
| 1796 | return |
| 1797 | } |
| 1798 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1799 | var libc_renameat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1800 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1801 | //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib" |
| 1802 | |
| 1803 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1804 | |
| 1805 | func Revoke(path string) (err error) { |
| 1806 | var _p0 *byte |
| 1807 | _p0, err = BytePtrFromString(path) |
| 1808 | if err != nil { |
| 1809 | return |
| 1810 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1811 | _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1812 | if e1 != 0 { |
| 1813 | err = errnoErr(e1) |
| 1814 | } |
| 1815 | return |
| 1816 | } |
| 1817 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1818 | var libc_revoke_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1819 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1820 | //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib" |
| 1821 | |
| 1822 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1823 | |
| 1824 | func Rmdir(path string) (err error) { |
| 1825 | var _p0 *byte |
| 1826 | _p0, err = BytePtrFromString(path) |
| 1827 | if err != nil { |
| 1828 | return |
| 1829 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1830 | _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1831 | if e1 != 0 { |
| 1832 | err = errnoErr(e1) |
| 1833 | } |
| 1834 | return |
| 1835 | } |
| 1836 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1837 | var libc_rmdir_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1838 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1839 | //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib" |
| 1840 | |
| 1841 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1842 | |
| 1843 | func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1844 | r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1845 | newoffset = int64(r0) |
| 1846 | if e1 != 0 { |
| 1847 | err = errnoErr(e1) |
| 1848 | } |
| 1849 | return |
| 1850 | } |
| 1851 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1852 | var libc_lseek_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1853 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1854 | //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib" |
| 1855 | |
| 1856 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1857 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1858 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 1859 | 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) |
| 1860 | n = int(r0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1861 | if e1 != 0 { |
| 1862 | err = errnoErr(e1) |
| 1863 | } |
| 1864 | return |
| 1865 | } |
| 1866 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1867 | var libc_select_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1868 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1869 | //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib" |
| 1870 | |
| 1871 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1872 | |
| 1873 | func Setegid(egid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1874 | _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1875 | if e1 != 0 { |
| 1876 | err = errnoErr(e1) |
| 1877 | } |
| 1878 | return |
| 1879 | } |
| 1880 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1881 | var libc_setegid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1882 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1883 | //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib" |
| 1884 | |
| 1885 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1886 | |
| 1887 | func Seteuid(euid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1888 | _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1889 | if e1 != 0 { |
| 1890 | err = errnoErr(e1) |
| 1891 | } |
| 1892 | return |
| 1893 | } |
| 1894 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1895 | var libc_seteuid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1896 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1897 | //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib" |
| 1898 | |
| 1899 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1900 | |
| 1901 | func Setgid(gid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1902 | _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1903 | if e1 != 0 { |
| 1904 | err = errnoErr(e1) |
| 1905 | } |
| 1906 | return |
| 1907 | } |
| 1908 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1909 | var libc_setgid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1910 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1911 | //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib" |
| 1912 | |
| 1913 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1914 | |
| 1915 | func Setlogin(name string) (err error) { |
| 1916 | var _p0 *byte |
| 1917 | _p0, err = BytePtrFromString(name) |
| 1918 | if err != nil { |
| 1919 | return |
| 1920 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1921 | _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1922 | if e1 != 0 { |
| 1923 | err = errnoErr(e1) |
| 1924 | } |
| 1925 | return |
| 1926 | } |
| 1927 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1928 | var libc_setlogin_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1929 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1930 | //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib" |
| 1931 | |
| 1932 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1933 | |
| 1934 | func Setpgid(pid int, pgid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1935 | _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1936 | if e1 != 0 { |
| 1937 | err = errnoErr(e1) |
| 1938 | } |
| 1939 | return |
| 1940 | } |
| 1941 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1942 | var libc_setpgid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1943 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1944 | //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib" |
| 1945 | |
| 1946 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1947 | |
| 1948 | func Setpriority(which int, who int, prio int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1949 | _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1950 | if e1 != 0 { |
| 1951 | err = errnoErr(e1) |
| 1952 | } |
| 1953 | return |
| 1954 | } |
| 1955 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1956 | var libc_setpriority_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1957 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1958 | //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib" |
| 1959 | |
| 1960 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1961 | |
| 1962 | func Setprivexec(flag int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1963 | _, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1964 | if e1 != 0 { |
| 1965 | err = errnoErr(e1) |
| 1966 | } |
| 1967 | return |
| 1968 | } |
| 1969 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1970 | var libc_setprivexec_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1971 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1972 | //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib" |
| 1973 | |
| 1974 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1975 | |
| 1976 | func Setregid(rgid int, egid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1977 | _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1978 | if e1 != 0 { |
| 1979 | err = errnoErr(e1) |
| 1980 | } |
| 1981 | return |
| 1982 | } |
| 1983 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1984 | var libc_setregid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1985 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1986 | //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib" |
| 1987 | |
| 1988 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1989 | |
| 1990 | func Setreuid(ruid int, euid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1991 | _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1992 | if e1 != 0 { |
| 1993 | err = errnoErr(e1) |
| 1994 | } |
| 1995 | return |
| 1996 | } |
| 1997 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 1998 | var libc_setreuid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 1999 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2000 | //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib" |
| 2001 | |
| 2002 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2003 | |
| 2004 | func Setrlimit(which int, lim *Rlimit) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2005 | _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2006 | if e1 != 0 { |
| 2007 | err = errnoErr(e1) |
| 2008 | } |
| 2009 | return |
| 2010 | } |
| 2011 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2012 | var libc_setrlimit_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2013 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2014 | //go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib" |
| 2015 | |
| 2016 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2017 | |
| 2018 | func Setsid() (pid int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2019 | r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2020 | pid = int(r0) |
| 2021 | if e1 != 0 { |
| 2022 | err = errnoErr(e1) |
| 2023 | } |
| 2024 | return |
| 2025 | } |
| 2026 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2027 | var libc_setsid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2028 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2029 | //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib" |
| 2030 | |
| 2031 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2032 | |
| 2033 | func Settimeofday(tp *Timeval) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2034 | _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2035 | if e1 != 0 { |
| 2036 | err = errnoErr(e1) |
| 2037 | } |
| 2038 | return |
| 2039 | } |
| 2040 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2041 | var libc_settimeofday_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2042 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2043 | //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib" |
| 2044 | |
| 2045 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2046 | |
| 2047 | func Setuid(uid int) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2048 | _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2049 | if e1 != 0 { |
| 2050 | err = errnoErr(e1) |
| 2051 | } |
| 2052 | return |
| 2053 | } |
| 2054 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2055 | var libc_setuid_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2056 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2057 | //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib" |
| 2058 | |
| 2059 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2060 | |
| 2061 | func Symlink(path string, link string) (err error) { |
| 2062 | var _p0 *byte |
| 2063 | _p0, err = BytePtrFromString(path) |
| 2064 | if err != nil { |
| 2065 | return |
| 2066 | } |
| 2067 | var _p1 *byte |
| 2068 | _p1, err = BytePtrFromString(link) |
| 2069 | if err != nil { |
| 2070 | return |
| 2071 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2072 | _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2073 | if e1 != 0 { |
| 2074 | err = errnoErr(e1) |
| 2075 | } |
| 2076 | return |
| 2077 | } |
| 2078 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2079 | var libc_symlink_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2080 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2081 | //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib" |
| 2082 | |
| 2083 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2084 | |
| 2085 | func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { |
| 2086 | var _p0 *byte |
| 2087 | _p0, err = BytePtrFromString(oldpath) |
| 2088 | if err != nil { |
| 2089 | return |
| 2090 | } |
| 2091 | var _p1 *byte |
| 2092 | _p1, err = BytePtrFromString(newpath) |
| 2093 | if err != nil { |
| 2094 | return |
| 2095 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2096 | _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2097 | if e1 != 0 { |
| 2098 | err = errnoErr(e1) |
| 2099 | } |
| 2100 | return |
| 2101 | } |
| 2102 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2103 | var libc_symlinkat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2104 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2105 | //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib" |
| 2106 | |
| 2107 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2108 | |
| 2109 | func Sync() (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2110 | _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2111 | if e1 != 0 { |
| 2112 | err = errnoErr(e1) |
| 2113 | } |
| 2114 | return |
| 2115 | } |
| 2116 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2117 | var libc_sync_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2118 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2119 | //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib" |
| 2120 | |
| 2121 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2122 | |
| 2123 | func Truncate(path string, length int64) (err error) { |
| 2124 | var _p0 *byte |
| 2125 | _p0, err = BytePtrFromString(path) |
| 2126 | if err != nil { |
| 2127 | return |
| 2128 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2129 | _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2130 | if e1 != 0 { |
| 2131 | err = errnoErr(e1) |
| 2132 | } |
| 2133 | return |
| 2134 | } |
| 2135 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2136 | var libc_truncate_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2137 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2138 | //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib" |
| 2139 | |
| 2140 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2141 | |
| 2142 | func Umask(newmask int) (oldmask int) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2143 | r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2144 | oldmask = int(r0) |
| 2145 | return |
| 2146 | } |
| 2147 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2148 | var libc_umask_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2149 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2150 | //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib" |
| 2151 | |
| 2152 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2153 | |
| 2154 | func Undelete(path string) (err error) { |
| 2155 | var _p0 *byte |
| 2156 | _p0, err = BytePtrFromString(path) |
| 2157 | if err != nil { |
| 2158 | return |
| 2159 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2160 | _, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2161 | if e1 != 0 { |
| 2162 | err = errnoErr(e1) |
| 2163 | } |
| 2164 | return |
| 2165 | } |
| 2166 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2167 | var libc_undelete_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2168 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2169 | //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib" |
| 2170 | |
| 2171 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2172 | |
| 2173 | func Unlink(path string) (err error) { |
| 2174 | var _p0 *byte |
| 2175 | _p0, err = BytePtrFromString(path) |
| 2176 | if err != nil { |
| 2177 | return |
| 2178 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2179 | _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2180 | if e1 != 0 { |
| 2181 | err = errnoErr(e1) |
| 2182 | } |
| 2183 | return |
| 2184 | } |
| 2185 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2186 | var libc_unlink_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2187 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2188 | //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib" |
| 2189 | |
| 2190 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2191 | |
| 2192 | func Unlinkat(dirfd int, path string, flags int) (err error) { |
| 2193 | var _p0 *byte |
| 2194 | _p0, err = BytePtrFromString(path) |
| 2195 | if err != nil { |
| 2196 | return |
| 2197 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2198 | _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2199 | if e1 != 0 { |
| 2200 | err = errnoErr(e1) |
| 2201 | } |
| 2202 | return |
| 2203 | } |
| 2204 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2205 | var libc_unlinkat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2206 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2207 | //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib" |
| 2208 | |
| 2209 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2210 | |
| 2211 | func Unmount(path string, flags int) (err error) { |
| 2212 | var _p0 *byte |
| 2213 | _p0, err = BytePtrFromString(path) |
| 2214 | if err != nil { |
| 2215 | return |
| 2216 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2217 | _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2218 | if e1 != 0 { |
| 2219 | err = errnoErr(e1) |
| 2220 | } |
| 2221 | return |
| 2222 | } |
| 2223 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2224 | var libc_unmount_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2225 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2226 | //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib" |
| 2227 | |
| 2228 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2229 | |
| 2230 | func write(fd int, p []byte) (n int, err error) { |
| 2231 | var _p0 unsafe.Pointer |
| 2232 | if len(p) > 0 { |
| 2233 | _p0 = unsafe.Pointer(&p[0]) |
| 2234 | } else { |
| 2235 | _p0 = unsafe.Pointer(&_zero) |
| 2236 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2237 | r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2238 | n = int(r0) |
| 2239 | if e1 != 0 { |
| 2240 | err = errnoErr(e1) |
| 2241 | } |
| 2242 | return |
| 2243 | } |
| 2244 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2245 | var libc_write_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2246 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2247 | //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib" |
| 2248 | |
| 2249 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2250 | |
| 2251 | func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2252 | r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2253 | ret = uintptr(r0) |
| 2254 | if e1 != 0 { |
| 2255 | err = errnoErr(e1) |
| 2256 | } |
| 2257 | return |
| 2258 | } |
| 2259 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2260 | var libc_mmap_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2261 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2262 | //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib" |
| 2263 | |
| 2264 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2265 | |
| 2266 | func munmap(addr uintptr, length uintptr) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2267 | _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2268 | if e1 != 0 { |
| 2269 | err = errnoErr(e1) |
| 2270 | } |
| 2271 | return |
| 2272 | } |
| 2273 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2274 | var libc_munmap_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2275 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2276 | //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib" |
| 2277 | |
| 2278 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2279 | |
| 2280 | func readlen(fd int, buf *byte, nbuf int) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2281 | r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2282 | n = int(r0) |
| 2283 | if e1 != 0 { |
| 2284 | err = errnoErr(e1) |
| 2285 | } |
| 2286 | return |
| 2287 | } |
| 2288 | |
| 2289 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2290 | |
| 2291 | func writelen(fd int, buf *byte, nbuf int) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2292 | r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2293 | n = int(r0) |
| 2294 | if e1 != 0 { |
| 2295 | err = errnoErr(e1) |
| 2296 | } |
| 2297 | return |
| 2298 | } |
| 2299 | |
| 2300 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2301 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2302 | func Fstat(fd int, stat *Stat_t) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2303 | _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2304 | if e1 != 0 { |
| 2305 | err = errnoErr(e1) |
| 2306 | } |
| 2307 | return |
| 2308 | } |
| 2309 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2310 | var libc_fstat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2311 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2312 | //go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib" |
| 2313 | |
| 2314 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2315 | |
| 2316 | func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { |
| 2317 | var _p0 *byte |
| 2318 | _p0, err = BytePtrFromString(path) |
| 2319 | if err != nil { |
| 2320 | return |
| 2321 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2322 | _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2323 | if e1 != 0 { |
| 2324 | err = errnoErr(e1) |
| 2325 | } |
| 2326 | return |
| 2327 | } |
| 2328 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2329 | var libc_fstatat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2330 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2331 | //go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib" |
| 2332 | |
| 2333 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2334 | |
| 2335 | func Fstatfs(fd int, stat *Statfs_t) (err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2336 | _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2337 | if e1 != 0 { |
| 2338 | err = errnoErr(e1) |
| 2339 | } |
| 2340 | return |
| 2341 | } |
| 2342 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2343 | var libc_fstatfs_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2344 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2345 | //go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib" |
| 2346 | |
| 2347 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2348 | |
| 2349 | func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) { |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2350 | r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags)) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2351 | n = int(r0) |
| 2352 | if e1 != 0 { |
| 2353 | err = errnoErr(e1) |
| 2354 | } |
| 2355 | return |
| 2356 | } |
| 2357 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2358 | var libc_getfsstat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2359 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2360 | //go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib" |
| 2361 | |
| 2362 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2363 | |
| 2364 | func Lstat(path string, stat *Stat_t) (err error) { |
| 2365 | var _p0 *byte |
| 2366 | _p0, err = BytePtrFromString(path) |
| 2367 | if err != nil { |
| 2368 | return |
| 2369 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2370 | _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2371 | if e1 != 0 { |
| 2372 | err = errnoErr(e1) |
| 2373 | } |
| 2374 | return |
| 2375 | } |
| 2376 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2377 | var libc_lstat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2378 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2379 | //go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib" |
| 2380 | |
| 2381 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2382 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2383 | func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) { |
| 2384 | _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) |
| 2385 | if e1 != 0 { |
| 2386 | err = errnoErr(e1) |
| 2387 | } |
| 2388 | return |
| 2389 | } |
| 2390 | |
| 2391 | var libc_ptrace_trampoline_addr uintptr |
| 2392 | |
| 2393 | //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" |
| 2394 | |
| 2395 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2396 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2397 | func Stat(path string, stat *Stat_t) (err error) { |
| 2398 | var _p0 *byte |
| 2399 | _p0, err = BytePtrFromString(path) |
| 2400 | if err != nil { |
| 2401 | return |
| 2402 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2403 | _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2404 | if e1 != 0 { |
| 2405 | err = errnoErr(e1) |
| 2406 | } |
| 2407 | return |
| 2408 | } |
| 2409 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2410 | var libc_stat_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2411 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2412 | //go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib" |
| 2413 | |
| 2414 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2415 | |
| 2416 | func Statfs(path string, stat *Statfs_t) (err error) { |
| 2417 | var _p0 *byte |
| 2418 | _p0, err = BytePtrFromString(path) |
| 2419 | if err != nil { |
| 2420 | return |
| 2421 | } |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2422 | _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2423 | if e1 != 0 { |
| 2424 | err = errnoErr(e1) |
| 2425 | } |
| 2426 | return |
| 2427 | } |
| 2428 | |
Andrea Campanella | 764f1ed | 2022-03-24 11:46:38 +0100 | [diff] [blame^] | 2429 | var libc_statfs_trampoline_addr uintptr |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2430 | |
kesavand | 2cde658 | 2020-06-22 04:56:23 -0400 | [diff] [blame] | 2431 | //go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib" |