Visweswara R | 7fbe1cd | 2019-01-08 14:53:10 +0530 | [diff] [blame] | 1 | // go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | // +build aix,ppc |
| 5 | |
| 6 | package unix |
| 7 | |
| 8 | /* |
| 9 | #include <stdint.h> |
chigotc | 8f1d3d2 | 2018-10-18 15:39:11 +0200 | [diff] [blame] | 10 | #include <stddef.h> |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 11 | int utimes(uintptr_t, uintptr_t); |
| 12 | int utimensat(int, uintptr_t, uintptr_t, int); |
| 13 | int getcwd(uintptr_t, size_t); |
| 14 | int accept(int, uintptr_t, uintptr_t); |
| 15 | int getdirent(int, uintptr_t, size_t); |
| 16 | int wait4(int, uintptr_t, int, uintptr_t); |
| 17 | int ioctl(int, int, uintptr_t); |
| 18 | int fcntl(uintptr_t, int, uintptr_t); |
| 19 | int acct(uintptr_t); |
| 20 | int chdir(uintptr_t); |
| 21 | int chroot(uintptr_t); |
| 22 | int close(int); |
| 23 | int dup(int); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 24 | void exit(int); |
| 25 | int faccessat(int, uintptr_t, unsigned int, int); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 26 | int fchdir(int); |
| 27 | int fchmod(int, unsigned int); |
| 28 | int fchmodat(int, uintptr_t, unsigned int, int); |
| 29 | int fchownat(int, uintptr_t, int, int, int); |
| 30 | int fdatasync(int); |
| 31 | int fsync(int); |
| 32 | int getpgid(int); |
| 33 | int getpgrp(); |
| 34 | int getpid(); |
| 35 | int getppid(); |
| 36 | int getpriority(int, int); |
| 37 | int getrusage(int, uintptr_t); |
| 38 | int getsid(int); |
| 39 | int kill(int, int); |
| 40 | int syslog(int, uintptr_t, size_t); |
Tony Reix | 1561086 | 2018-09-19 16:05:07 +0200 | [diff] [blame] | 41 | int mkdir(int, uintptr_t, unsigned int); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 42 | int mkdirat(int, uintptr_t, unsigned int); |
| 43 | int mkfifo(uintptr_t, unsigned int); |
Tony Reix | 1561086 | 2018-09-19 16:05:07 +0200 | [diff] [blame] | 44 | int mknod(uintptr_t, unsigned int, int); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 45 | int mknodat(int, uintptr_t, unsigned int, int); |
| 46 | int nanosleep(uintptr_t, uintptr_t); |
| 47 | int open64(uintptr_t, int, unsigned int); |
| 48 | int openat(int, uintptr_t, int, unsigned int); |
| 49 | int read(int, uintptr_t, size_t); |
| 50 | int readlink(uintptr_t, uintptr_t, size_t); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 51 | int renameat(int, uintptr_t, int, uintptr_t); |
| 52 | int setdomainname(uintptr_t, size_t); |
| 53 | int sethostname(uintptr_t, size_t); |
| 54 | int setpgid(int, int); |
| 55 | int setsid(); |
| 56 | int settimeofday(uintptr_t); |
| 57 | int setuid(int); |
| 58 | int setgid(int); |
| 59 | int setpriority(int, int, int); |
| 60 | int statx(int, uintptr_t, int, int, uintptr_t); |
| 61 | int sync(); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 62 | uintptr_t times(uintptr_t); |
| 63 | int umask(int); |
| 64 | int uname(uintptr_t); |
| 65 | int unlink(uintptr_t); |
| 66 | int unlinkat(int, uintptr_t, int); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 67 | int ustat(int, uintptr_t); |
| 68 | int write(int, uintptr_t, size_t); |
| 69 | int dup2(int, int); |
| 70 | int posix_fadvise64(int, long long, long long, int); |
| 71 | int fchown(int, int, int); |
| 72 | int fstat(int, uintptr_t); |
| 73 | int fstatat(int, uintptr_t, uintptr_t, int); |
| 74 | int fstatfs(int, uintptr_t); |
| 75 | int ftruncate(int, long long); |
| 76 | int getegid(); |
| 77 | int geteuid(); |
| 78 | int getgid(); |
| 79 | int getuid(); |
| 80 | int lchown(uintptr_t, int, int); |
| 81 | int listen(int, int); |
| 82 | int lstat(uintptr_t, uintptr_t); |
| 83 | int pause(); |
| 84 | int pread64(int, uintptr_t, size_t, long long); |
| 85 | int pwrite64(int, uintptr_t, size_t, long long); |
Clément Chigot | f0ce4c0 | 2019-04-18 16:57:45 +0200 | [diff] [blame] | 86 | #define c_select select |
| 87 | int select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 88 | int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); |
| 89 | int setregid(int, int); |
| 90 | int setreuid(int, int); |
| 91 | int shutdown(int, int); |
| 92 | long long splice(int, uintptr_t, int, uintptr_t, int, int); |
| 93 | int stat(uintptr_t, uintptr_t); |
| 94 | int statfs(uintptr_t, uintptr_t); |
| 95 | int truncate(uintptr_t, long long); |
| 96 | int bind(int, uintptr_t, uintptr_t); |
| 97 | int connect(int, uintptr_t, uintptr_t); |
| 98 | int getgroups(int, uintptr_t); |
| 99 | int setgroups(int, uintptr_t); |
| 100 | int getsockopt(int, int, int, uintptr_t, uintptr_t); |
| 101 | int setsockopt(int, int, int, uintptr_t, uintptr_t); |
| 102 | int socket(int, int, int); |
| 103 | int socketpair(int, int, int, uintptr_t); |
| 104 | int getpeername(int, uintptr_t, uintptr_t); |
| 105 | int getsockname(int, uintptr_t, uintptr_t); |
| 106 | int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t); |
| 107 | int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t); |
chigotc | d20716e | 2019-04-16 16:26:58 +0200 | [diff] [blame] | 108 | int nrecvmsg(int, uintptr_t, int); |
| 109 | int nsendmsg(int, uintptr_t, int); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 110 | int munmap(uintptr_t, uintptr_t); |
| 111 | int madvise(uintptr_t, size_t, int); |
| 112 | int mprotect(uintptr_t, size_t, int); |
| 113 | int mlock(uintptr_t, size_t); |
| 114 | int mlockall(int); |
| 115 | int msync(uintptr_t, size_t, int); |
| 116 | int munlock(uintptr_t, size_t); |
| 117 | int munlockall(); |
| 118 | int pipe(uintptr_t); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 119 | int poll(uintptr_t, int, int); |
| 120 | int gettimeofday(uintptr_t, uintptr_t); |
| 121 | int time(uintptr_t); |
| 122 | int utime(uintptr_t, uintptr_t); |
chigotc | d20716e | 2019-04-16 16:26:58 +0200 | [diff] [blame] | 123 | unsigned long long getsystemcfg(int); |
Clément Chigot | e8e3143 | 2019-04-19 11:16:35 +0200 | [diff] [blame] | 124 | int umount(uintptr_t); |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 125 | int getrlimit64(int, uintptr_t); |
| 126 | int setrlimit64(int, uintptr_t); |
| 127 | long long lseek64(int, long long, int); |
| 128 | uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long); |
| 129 | |
| 130 | */ |
| 131 | import "C" |
| 132 | import ( |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 133 | "unsafe" |
| 134 | ) |
| 135 | |
| 136 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 137 | |
| 138 | func utimes(path string, times *[2]Timeval) (err error) { |
| 139 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 140 | r0, er := C.utimes(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times)))) |
| 141 | if r0 == -1 && er != nil { |
| 142 | err = er |
| 143 | } |
| 144 | return |
| 145 | } |
| 146 | |
| 147 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 148 | |
| 149 | func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { |
| 150 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 151 | r0, er := C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))), C.int(flag)) |
| 152 | if r0 == -1 && er != nil { |
| 153 | err = er |
| 154 | } |
| 155 | return |
| 156 | } |
| 157 | |
| 158 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 159 | |
| 160 | func getcwd(buf []byte) (err error) { |
| 161 | var _p0 *byte |
| 162 | if len(buf) > 0 { |
| 163 | _p0 = &buf[0] |
| 164 | } |
| 165 | var _p1 int |
| 166 | _p1 = len(buf) |
| 167 | r0, er := C.getcwd(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 168 | if r0 == -1 && er != nil { |
| 169 | err = er |
| 170 | } |
| 171 | return |
| 172 | } |
| 173 | |
| 174 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 175 | |
| 176 | func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { |
| 177 | r0, er := C.accept(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen)))) |
| 178 | fd = int(r0) |
| 179 | if r0 == -1 && er != nil { |
| 180 | err = er |
| 181 | } |
| 182 | return |
| 183 | } |
| 184 | |
| 185 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 186 | |
| 187 | func getdirent(fd int, buf []byte) (n int, err error) { |
| 188 | var _p0 *byte |
| 189 | if len(buf) > 0 { |
| 190 | _p0 = &buf[0] |
| 191 | } |
| 192 | var _p1 int |
| 193 | _p1 = len(buf) |
| 194 | r0, er := C.getdirent(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 195 | n = int(r0) |
| 196 | if r0 == -1 && er != nil { |
| 197 | err = er |
| 198 | } |
| 199 | return |
| 200 | } |
| 201 | |
| 202 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 203 | |
| 204 | func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) { |
| 205 | r0, er := C.wait4(C.int(pid), C.uintptr_t(uintptr(unsafe.Pointer(status))), C.int(options), C.uintptr_t(uintptr(unsafe.Pointer(rusage)))) |
| 206 | wpid = Pid_t(r0) |
| 207 | if r0 == -1 && er != nil { |
| 208 | err = er |
| 209 | } |
| 210 | return |
| 211 | } |
| 212 | |
| 213 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 214 | |
| 215 | func ioctl(fd int, req uint, arg uintptr) (err error) { |
| 216 | r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg)) |
| 217 | if r0 == -1 && er != nil { |
| 218 | err = er |
| 219 | } |
| 220 | return |
| 221 | } |
| 222 | |
| 223 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 224 | |
| 225 | func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) { |
| 226 | r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)) |
| 227 | r = int(r0) |
| 228 | if r0 == -1 && er != nil { |
| 229 | err = er |
| 230 | } |
| 231 | return |
| 232 | } |
| 233 | |
| 234 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 235 | |
| 236 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) { |
| 237 | r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(uintptr(unsafe.Pointer(lk)))) |
| 238 | if r0 == -1 && er != nil { |
| 239 | err = er |
| 240 | } |
| 241 | return |
| 242 | } |
| 243 | |
| 244 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 245 | |
chigotc | 8f1d3d2 | 2018-10-18 15:39:11 +0200 | [diff] [blame] | 246 | func fcntl(fd int, cmd int, arg int) (val int, err error) { |
| 247 | r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)) |
| 248 | val = int(r0) |
| 249 | if r0 == -1 && er != nil { |
| 250 | err = er |
| 251 | } |
| 252 | return |
| 253 | } |
| 254 | |
| 255 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 256 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 257 | func Acct(path string) (err error) { |
| 258 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 259 | r0, er := C.acct(C.uintptr_t(_p0)) |
| 260 | if r0 == -1 && er != nil { |
| 261 | err = er |
| 262 | } |
| 263 | return |
| 264 | } |
| 265 | |
| 266 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 267 | |
| 268 | func Chdir(path string) (err error) { |
| 269 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 270 | r0, er := C.chdir(C.uintptr_t(_p0)) |
| 271 | if r0 == -1 && er != nil { |
| 272 | err = er |
| 273 | } |
| 274 | return |
| 275 | } |
| 276 | |
| 277 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 278 | |
| 279 | func Chroot(path string) (err error) { |
| 280 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 281 | r0, er := C.chroot(C.uintptr_t(_p0)) |
| 282 | if r0 == -1 && er != nil { |
| 283 | err = er |
| 284 | } |
| 285 | return |
| 286 | } |
| 287 | |
| 288 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 289 | |
| 290 | func Close(fd int) (err error) { |
| 291 | r0, er := C.close(C.int(fd)) |
| 292 | if r0 == -1 && er != nil { |
| 293 | err = er |
| 294 | } |
| 295 | return |
| 296 | } |
| 297 | |
| 298 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 299 | |
| 300 | func Dup(oldfd int) (fd int, err error) { |
| 301 | r0, er := C.dup(C.int(oldfd)) |
| 302 | fd = int(r0) |
| 303 | if r0 == -1 && er != nil { |
| 304 | err = er |
| 305 | } |
| 306 | return |
| 307 | } |
| 308 | |
| 309 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 310 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 311 | func Exit(code int) { |
| 312 | C.exit(C.int(code)) |
| 313 | return |
| 314 | } |
| 315 | |
| 316 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 317 | |
| 318 | func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 319 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 320 | r0, er := C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)) |
| 321 | if r0 == -1 && er != nil { |
| 322 | err = er |
| 323 | } |
| 324 | return |
| 325 | } |
| 326 | |
| 327 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 328 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 329 | func Fchdir(fd int) (err error) { |
| 330 | r0, er := C.fchdir(C.int(fd)) |
| 331 | if r0 == -1 && er != nil { |
| 332 | err = er |
| 333 | } |
| 334 | return |
| 335 | } |
| 336 | |
| 337 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 338 | |
| 339 | func Fchmod(fd int, mode uint32) (err error) { |
| 340 | r0, er := C.fchmod(C.int(fd), C.uint(mode)) |
| 341 | if r0 == -1 && er != nil { |
| 342 | err = er |
| 343 | } |
| 344 | return |
| 345 | } |
| 346 | |
| 347 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 348 | |
| 349 | func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 350 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 351 | r0, er := C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)) |
| 352 | if r0 == -1 && er != nil { |
| 353 | err = er |
| 354 | } |
| 355 | return |
| 356 | } |
| 357 | |
| 358 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 359 | |
| 360 | func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { |
| 361 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 362 | r0, er := C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags)) |
| 363 | if r0 == -1 && er != nil { |
| 364 | err = er |
| 365 | } |
| 366 | return |
| 367 | } |
| 368 | |
| 369 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 370 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 371 | func Fdatasync(fd int) (err error) { |
| 372 | r0, er := C.fdatasync(C.int(fd)) |
| 373 | if r0 == -1 && er != nil { |
| 374 | err = er |
| 375 | } |
| 376 | return |
| 377 | } |
| 378 | |
| 379 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 380 | |
| 381 | func Fsync(fd int) (err error) { |
| 382 | r0, er := C.fsync(C.int(fd)) |
| 383 | if r0 == -1 && er != nil { |
| 384 | err = er |
| 385 | } |
| 386 | return |
| 387 | } |
| 388 | |
| 389 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 390 | |
| 391 | func Getpgid(pid int) (pgid int, err error) { |
| 392 | r0, er := C.getpgid(C.int(pid)) |
| 393 | pgid = int(r0) |
| 394 | if r0 == -1 && er != nil { |
| 395 | err = er |
| 396 | } |
| 397 | return |
| 398 | } |
| 399 | |
| 400 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 401 | |
| 402 | func Getpgrp() (pid int) { |
| 403 | r0, _ := C.getpgrp() |
| 404 | pid = int(r0) |
| 405 | return |
| 406 | } |
| 407 | |
| 408 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 409 | |
| 410 | func Getpid() (pid int) { |
| 411 | r0, _ := C.getpid() |
| 412 | pid = int(r0) |
| 413 | return |
| 414 | } |
| 415 | |
| 416 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 417 | |
| 418 | func Getppid() (ppid int) { |
| 419 | r0, _ := C.getppid() |
| 420 | ppid = int(r0) |
| 421 | return |
| 422 | } |
| 423 | |
| 424 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 425 | |
| 426 | func Getpriority(which int, who int) (prio int, err error) { |
| 427 | r0, er := C.getpriority(C.int(which), C.int(who)) |
| 428 | prio = int(r0) |
| 429 | if r0 == -1 && er != nil { |
| 430 | err = er |
| 431 | } |
| 432 | return |
| 433 | } |
| 434 | |
| 435 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 436 | |
| 437 | func Getrusage(who int, rusage *Rusage) (err error) { |
| 438 | r0, er := C.getrusage(C.int(who), C.uintptr_t(uintptr(unsafe.Pointer(rusage)))) |
| 439 | if r0 == -1 && er != nil { |
| 440 | err = er |
| 441 | } |
| 442 | return |
| 443 | } |
| 444 | |
| 445 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 446 | |
| 447 | func Getsid(pid int) (sid int, err error) { |
| 448 | r0, er := C.getsid(C.int(pid)) |
| 449 | sid = int(r0) |
| 450 | if r0 == -1 && er != nil { |
| 451 | err = er |
| 452 | } |
| 453 | return |
| 454 | } |
| 455 | |
| 456 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 457 | |
chigotc | 8f1d3d2 | 2018-10-18 15:39:11 +0200 | [diff] [blame] | 458 | func Kill(pid int, sig Signal) (err error) { |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 459 | r0, er := C.kill(C.int(pid), C.int(sig)) |
| 460 | if r0 == -1 && er != nil { |
| 461 | err = er |
| 462 | } |
| 463 | return |
| 464 | } |
| 465 | |
| 466 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 467 | |
| 468 | func Klogctl(typ int, buf []byte) (n int, err error) { |
| 469 | var _p0 *byte |
| 470 | if len(buf) > 0 { |
| 471 | _p0 = &buf[0] |
| 472 | } |
| 473 | var _p1 int |
| 474 | _p1 = len(buf) |
| 475 | r0, er := C.syslog(C.int(typ), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 476 | n = int(r0) |
| 477 | if r0 == -1 && er != nil { |
| 478 | err = er |
| 479 | } |
| 480 | return |
| 481 | } |
| 482 | |
| 483 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 484 | |
Tony Reix | 1561086 | 2018-09-19 16:05:07 +0200 | [diff] [blame] | 485 | func Mkdir(dirfd int, path string, mode uint32) (err error) { |
| 486 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 487 | r0, er := C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)) |
| 488 | if r0 == -1 && er != nil { |
| 489 | err = er |
| 490 | } |
| 491 | return |
| 492 | } |
| 493 | |
| 494 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 495 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 496 | func Mkdirat(dirfd int, path string, mode uint32) (err error) { |
| 497 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 498 | r0, er := C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)) |
| 499 | if r0 == -1 && er != nil { |
| 500 | err = er |
| 501 | } |
| 502 | return |
| 503 | } |
| 504 | |
| 505 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 506 | |
| 507 | func Mkfifo(path string, mode uint32) (err error) { |
| 508 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 509 | r0, er := C.mkfifo(C.uintptr_t(_p0), C.uint(mode)) |
| 510 | if r0 == -1 && er != nil { |
| 511 | err = er |
| 512 | } |
| 513 | return |
| 514 | } |
| 515 | |
| 516 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 517 | |
Tony Reix | 1561086 | 2018-09-19 16:05:07 +0200 | [diff] [blame] | 518 | func Mknod(path string, mode uint32, dev int) (err error) { |
| 519 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 520 | r0, er := C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev)) |
| 521 | if r0 == -1 && er != nil { |
| 522 | err = er |
| 523 | } |
| 524 | return |
| 525 | } |
| 526 | |
| 527 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 528 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 529 | func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { |
| 530 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 531 | r0, er := C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev)) |
| 532 | if r0 == -1 && er != nil { |
| 533 | err = er |
| 534 | } |
| 535 | return |
| 536 | } |
| 537 | |
| 538 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 539 | |
| 540 | func Nanosleep(time *Timespec, leftover *Timespec) (err error) { |
| 541 | r0, er := C.nanosleep(C.uintptr_t(uintptr(unsafe.Pointer(time))), C.uintptr_t(uintptr(unsafe.Pointer(leftover)))) |
| 542 | if r0 == -1 && er != nil { |
| 543 | err = er |
| 544 | } |
| 545 | return |
| 546 | } |
| 547 | |
| 548 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 549 | |
| 550 | func Open(path string, mode int, perm uint32) (fd int, err error) { |
| 551 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 552 | r0, er := C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm)) |
| 553 | fd = int(r0) |
| 554 | if r0 == -1 && er != nil { |
| 555 | err = er |
| 556 | } |
| 557 | return |
| 558 | } |
| 559 | |
| 560 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 561 | |
| 562 | func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { |
| 563 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 564 | r0, er := C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode)) |
| 565 | fd = int(r0) |
| 566 | if r0 == -1 && er != nil { |
| 567 | err = er |
| 568 | } |
| 569 | return |
| 570 | } |
| 571 | |
| 572 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 573 | |
| 574 | func read(fd int, p []byte) (n int, err error) { |
| 575 | var _p0 *byte |
| 576 | if len(p) > 0 { |
| 577 | _p0 = &p[0] |
| 578 | } |
| 579 | var _p1 int |
| 580 | _p1 = len(p) |
| 581 | r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 582 | n = int(r0) |
| 583 | if r0 == -1 && er != nil { |
| 584 | err = er |
| 585 | } |
| 586 | return |
| 587 | } |
| 588 | |
| 589 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 590 | |
| 591 | func Readlink(path string, buf []byte) (n int, err error) { |
| 592 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 593 | var _p1 *byte |
| 594 | if len(buf) > 0 { |
| 595 | _p1 = &buf[0] |
| 596 | } |
| 597 | var _p2 int |
| 598 | _p2 = len(buf) |
| 599 | r0, er := C.readlink(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(_p1))), C.size_t(_p2)) |
| 600 | n = int(r0) |
| 601 | if r0 == -1 && er != nil { |
| 602 | err = er |
| 603 | } |
| 604 | return |
| 605 | } |
| 606 | |
| 607 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 608 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 609 | func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { |
| 610 | _p0 := uintptr(unsafe.Pointer(C.CString(oldpath))) |
| 611 | _p1 := uintptr(unsafe.Pointer(C.CString(newpath))) |
| 612 | r0, er := C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1)) |
| 613 | if r0 == -1 && er != nil { |
| 614 | err = er |
| 615 | } |
| 616 | return |
| 617 | } |
| 618 | |
| 619 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 620 | |
| 621 | func Setdomainname(p []byte) (err error) { |
| 622 | var _p0 *byte |
| 623 | if len(p) > 0 { |
| 624 | _p0 = &p[0] |
| 625 | } |
| 626 | var _p1 int |
| 627 | _p1 = len(p) |
| 628 | r0, er := C.setdomainname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 629 | if r0 == -1 && er != nil { |
| 630 | err = er |
| 631 | } |
| 632 | return |
| 633 | } |
| 634 | |
| 635 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 636 | |
| 637 | func Sethostname(p []byte) (err error) { |
| 638 | var _p0 *byte |
| 639 | if len(p) > 0 { |
| 640 | _p0 = &p[0] |
| 641 | } |
| 642 | var _p1 int |
| 643 | _p1 = len(p) |
| 644 | r0, er := C.sethostname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 645 | if r0 == -1 && er != nil { |
| 646 | err = er |
| 647 | } |
| 648 | return |
| 649 | } |
| 650 | |
| 651 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 652 | |
| 653 | func Setpgid(pid int, pgid int) (err error) { |
| 654 | r0, er := C.setpgid(C.int(pid), C.int(pgid)) |
| 655 | if r0 == -1 && er != nil { |
| 656 | err = er |
| 657 | } |
| 658 | return |
| 659 | } |
| 660 | |
| 661 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 662 | |
| 663 | func Setsid() (pid int, err error) { |
| 664 | r0, er := C.setsid() |
| 665 | pid = int(r0) |
| 666 | if r0 == -1 && er != nil { |
| 667 | err = er |
| 668 | } |
| 669 | return |
| 670 | } |
| 671 | |
| 672 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 673 | |
| 674 | func Settimeofday(tv *Timeval) (err error) { |
| 675 | r0, er := C.settimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv)))) |
| 676 | if r0 == -1 && er != nil { |
| 677 | err = er |
| 678 | } |
| 679 | return |
| 680 | } |
| 681 | |
| 682 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 683 | |
| 684 | func Setuid(uid int) (err error) { |
| 685 | r0, er := C.setuid(C.int(uid)) |
| 686 | if r0 == -1 && er != nil { |
| 687 | err = er |
| 688 | } |
| 689 | return |
| 690 | } |
| 691 | |
| 692 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 693 | |
| 694 | func Setgid(uid int) (err error) { |
| 695 | r0, er := C.setgid(C.int(uid)) |
| 696 | if r0 == -1 && er != nil { |
| 697 | err = er |
| 698 | } |
| 699 | return |
| 700 | } |
| 701 | |
| 702 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 703 | |
| 704 | func Setpriority(which int, who int, prio int) (err error) { |
| 705 | r0, er := C.setpriority(C.int(which), C.int(who), C.int(prio)) |
| 706 | if r0 == -1 && er != nil { |
| 707 | err = er |
| 708 | } |
| 709 | return |
| 710 | } |
| 711 | |
| 712 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 713 | |
| 714 | func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { |
| 715 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 716 | r0, er := C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(uintptr(unsafe.Pointer(stat)))) |
| 717 | if r0 == -1 && er != nil { |
| 718 | err = er |
| 719 | } |
| 720 | return |
| 721 | } |
| 722 | |
| 723 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 724 | |
| 725 | func Sync() { |
| 726 | C.sync() |
| 727 | return |
| 728 | } |
| 729 | |
| 730 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 731 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 732 | func Times(tms *Tms) (ticks uintptr, err error) { |
| 733 | r0, er := C.times(C.uintptr_t(uintptr(unsafe.Pointer(tms)))) |
| 734 | ticks = uintptr(r0) |
| 735 | if uintptr(r0) == ^uintptr(0) && er != nil { |
| 736 | err = er |
| 737 | } |
| 738 | return |
| 739 | } |
| 740 | |
| 741 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 742 | |
| 743 | func Umask(mask int) (oldmask int) { |
| 744 | r0, _ := C.umask(C.int(mask)) |
| 745 | oldmask = int(r0) |
| 746 | return |
| 747 | } |
| 748 | |
| 749 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 750 | |
| 751 | func Uname(buf *Utsname) (err error) { |
| 752 | r0, er := C.uname(C.uintptr_t(uintptr(unsafe.Pointer(buf)))) |
| 753 | if r0 == -1 && er != nil { |
| 754 | err = er |
| 755 | } |
| 756 | return |
| 757 | } |
| 758 | |
| 759 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 760 | |
| 761 | func Unlink(path string) (err error) { |
| 762 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 763 | r0, er := C.unlink(C.uintptr_t(_p0)) |
| 764 | if r0 == -1 && er != nil { |
| 765 | err = er |
| 766 | } |
| 767 | return |
| 768 | } |
| 769 | |
| 770 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 771 | |
| 772 | func Unlinkat(dirfd int, path string, flags int) (err error) { |
| 773 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 774 | r0, er := C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags)) |
| 775 | if r0 == -1 && er != nil { |
| 776 | err = er |
| 777 | } |
| 778 | return |
| 779 | } |
| 780 | |
| 781 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 782 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 783 | func Ustat(dev int, ubuf *Ustat_t) (err error) { |
| 784 | r0, er := C.ustat(C.int(dev), C.uintptr_t(uintptr(unsafe.Pointer(ubuf)))) |
| 785 | if r0 == -1 && er != nil { |
| 786 | err = er |
| 787 | } |
| 788 | return |
| 789 | } |
| 790 | |
| 791 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 792 | |
| 793 | func write(fd int, p []byte) (n int, err error) { |
| 794 | var _p0 *byte |
| 795 | if len(p) > 0 { |
| 796 | _p0 = &p[0] |
| 797 | } |
| 798 | var _p1 int |
| 799 | _p1 = len(p) |
| 800 | r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 801 | n = int(r0) |
| 802 | if r0 == -1 && er != nil { |
| 803 | err = er |
| 804 | } |
| 805 | return |
| 806 | } |
| 807 | |
| 808 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 809 | |
| 810 | func readlen(fd int, p *byte, np int) (n int, err error) { |
| 811 | r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np)) |
| 812 | n = int(r0) |
| 813 | if r0 == -1 && er != nil { |
| 814 | err = er |
| 815 | } |
| 816 | return |
| 817 | } |
| 818 | |
| 819 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 820 | |
| 821 | func writelen(fd int, p *byte, np int) (n int, err error) { |
| 822 | r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(p))), C.size_t(np)) |
| 823 | n = int(r0) |
| 824 | if r0 == -1 && er != nil { |
| 825 | err = er |
| 826 | } |
| 827 | return |
| 828 | } |
| 829 | |
| 830 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 831 | |
| 832 | func Dup2(oldfd int, newfd int) (err error) { |
| 833 | r0, er := C.dup2(C.int(oldfd), C.int(newfd)) |
| 834 | if r0 == -1 && er != nil { |
| 835 | err = er |
| 836 | } |
| 837 | return |
| 838 | } |
| 839 | |
| 840 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 841 | |
| 842 | func Fadvise(fd int, offset int64, length int64, advice int) (err error) { |
| 843 | r0, er := C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice)) |
| 844 | if r0 == -1 && er != nil { |
| 845 | err = er |
| 846 | } |
| 847 | return |
| 848 | } |
| 849 | |
| 850 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 851 | |
| 852 | func Fchown(fd int, uid int, gid int) (err error) { |
| 853 | r0, er := C.fchown(C.int(fd), C.int(uid), C.int(gid)) |
| 854 | if r0 == -1 && er != nil { |
| 855 | err = er |
| 856 | } |
| 857 | return |
| 858 | } |
| 859 | |
| 860 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 861 | |
Clément Chigot | ad400b1 | 2019-05-20 10:29:08 +0200 | [diff] [blame] | 862 | func fstat(fd int, stat *Stat_t) (err error) { |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 863 | r0, er := C.fstat(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(stat)))) |
| 864 | if r0 == -1 && er != nil { |
| 865 | err = er |
| 866 | } |
| 867 | return |
| 868 | } |
| 869 | |
| 870 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 871 | |
Clément Chigot | ad400b1 | 2019-05-20 10:29:08 +0200 | [diff] [blame] | 872 | func fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 873 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 874 | r0, er := C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))), C.int(flags)) |
| 875 | if r0 == -1 && er != nil { |
| 876 | err = er |
| 877 | } |
| 878 | return |
| 879 | } |
| 880 | |
| 881 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 882 | |
| 883 | func Fstatfs(fd int, buf *Statfs_t) (err error) { |
| 884 | r0, er := C.fstatfs(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(buf)))) |
| 885 | if r0 == -1 && er != nil { |
| 886 | err = er |
| 887 | } |
| 888 | return |
| 889 | } |
| 890 | |
| 891 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 892 | |
| 893 | func Ftruncate(fd int, length int64) (err error) { |
| 894 | r0, er := C.ftruncate(C.int(fd), C.longlong(length)) |
| 895 | if r0 == -1 && er != nil { |
| 896 | err = er |
| 897 | } |
| 898 | return |
| 899 | } |
| 900 | |
| 901 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 902 | |
| 903 | func Getegid() (egid int) { |
| 904 | r0, _ := C.getegid() |
| 905 | egid = int(r0) |
| 906 | return |
| 907 | } |
| 908 | |
| 909 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 910 | |
| 911 | func Geteuid() (euid int) { |
| 912 | r0, _ := C.geteuid() |
| 913 | euid = int(r0) |
| 914 | return |
| 915 | } |
| 916 | |
| 917 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 918 | |
| 919 | func Getgid() (gid int) { |
| 920 | r0, _ := C.getgid() |
| 921 | gid = int(r0) |
| 922 | return |
| 923 | } |
| 924 | |
| 925 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 926 | |
| 927 | func Getuid() (uid int) { |
| 928 | r0, _ := C.getuid() |
| 929 | uid = int(r0) |
| 930 | return |
| 931 | } |
| 932 | |
| 933 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 934 | |
| 935 | func Lchown(path string, uid int, gid int) (err error) { |
| 936 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 937 | r0, er := C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid)) |
| 938 | if r0 == -1 && er != nil { |
| 939 | err = er |
| 940 | } |
| 941 | return |
| 942 | } |
| 943 | |
| 944 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 945 | |
| 946 | func Listen(s int, n int) (err error) { |
| 947 | r0, er := C.listen(C.int(s), C.int(n)) |
| 948 | if r0 == -1 && er != nil { |
| 949 | err = er |
| 950 | } |
| 951 | return |
| 952 | } |
| 953 | |
| 954 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 955 | |
Clément Chigot | ad400b1 | 2019-05-20 10:29:08 +0200 | [diff] [blame] | 956 | func lstat(path string, stat *Stat_t) (err error) { |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 957 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 958 | r0, er := C.lstat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat)))) |
| 959 | if r0 == -1 && er != nil { |
| 960 | err = er |
| 961 | } |
| 962 | return |
| 963 | } |
| 964 | |
| 965 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 966 | |
| 967 | func Pause() (err error) { |
| 968 | r0, er := C.pause() |
| 969 | if r0 == -1 && er != nil { |
| 970 | err = er |
| 971 | } |
| 972 | return |
| 973 | } |
| 974 | |
| 975 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 976 | |
| 977 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 978 | var _p0 *byte |
| 979 | if len(p) > 0 { |
| 980 | _p0 = &p[0] |
| 981 | } |
| 982 | var _p1 int |
| 983 | _p1 = len(p) |
| 984 | r0, er := C.pread64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset)) |
| 985 | n = int(r0) |
| 986 | if r0 == -1 && er != nil { |
| 987 | err = er |
| 988 | } |
| 989 | return |
| 990 | } |
| 991 | |
| 992 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 993 | |
| 994 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 995 | var _p0 *byte |
| 996 | if len(p) > 0 { |
| 997 | _p0 = &p[0] |
| 998 | } |
| 999 | var _p1 int |
| 1000 | _p1 = len(p) |
| 1001 | r0, er := C.pwrite64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset)) |
| 1002 | n = int(r0) |
| 1003 | if r0 == -1 && er != nil { |
| 1004 | err = er |
| 1005 | } |
| 1006 | return |
| 1007 | } |
| 1008 | |
| 1009 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1010 | |
Clément Chigot | f0ce4c0 | 2019-04-18 16:57:45 +0200 | [diff] [blame] | 1011 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 1012 | r0, er := C.c_select(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout)))) |
| 1013 | n = int(r0) |
| 1014 | if r0 == -1 && er != nil { |
| 1015 | err = er |
| 1016 | } |
| 1017 | return |
| 1018 | } |
| 1019 | |
| 1020 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1021 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1022 | func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { |
| 1023 | r0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask)))) |
| 1024 | n = int(r0) |
| 1025 | if r0 == -1 && er != nil { |
| 1026 | err = er |
| 1027 | } |
| 1028 | return |
| 1029 | } |
| 1030 | |
| 1031 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1032 | |
| 1033 | func Setregid(rgid int, egid int) (err error) { |
| 1034 | r0, er := C.setregid(C.int(rgid), C.int(egid)) |
| 1035 | if r0 == -1 && er != nil { |
| 1036 | err = er |
| 1037 | } |
| 1038 | return |
| 1039 | } |
| 1040 | |
| 1041 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1042 | |
| 1043 | func Setreuid(ruid int, euid int) (err error) { |
| 1044 | r0, er := C.setreuid(C.int(ruid), C.int(euid)) |
| 1045 | if r0 == -1 && er != nil { |
| 1046 | err = er |
| 1047 | } |
| 1048 | return |
| 1049 | } |
| 1050 | |
| 1051 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1052 | |
| 1053 | func Shutdown(fd int, how int) (err error) { |
| 1054 | r0, er := C.shutdown(C.int(fd), C.int(how)) |
| 1055 | if r0 == -1 && er != nil { |
| 1056 | err = er |
| 1057 | } |
| 1058 | return |
| 1059 | } |
| 1060 | |
| 1061 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1062 | |
| 1063 | func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { |
| 1064 | r0, er := C.splice(C.int(rfd), C.uintptr_t(uintptr(unsafe.Pointer(roff))), C.int(wfd), C.uintptr_t(uintptr(unsafe.Pointer(woff))), C.int(len), C.int(flags)) |
| 1065 | n = int64(r0) |
| 1066 | if r0 == -1 && er != nil { |
| 1067 | err = er |
| 1068 | } |
| 1069 | return |
| 1070 | } |
| 1071 | |
| 1072 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1073 | |
Clément Chigot | ad400b1 | 2019-05-20 10:29:08 +0200 | [diff] [blame] | 1074 | func stat(path string, statptr *Stat_t) (err error) { |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1075 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
Clément Chigot | ad400b1 | 2019-05-20 10:29:08 +0200 | [diff] [blame] | 1076 | r0, er := C.stat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(statptr)))) |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1077 | if r0 == -1 && er != nil { |
| 1078 | err = er |
| 1079 | } |
| 1080 | return |
| 1081 | } |
| 1082 | |
| 1083 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1084 | |
| 1085 | func Statfs(path string, buf *Statfs_t) (err error) { |
| 1086 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 1087 | r0, er := C.statfs(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf)))) |
| 1088 | if r0 == -1 && er != nil { |
| 1089 | err = er |
| 1090 | } |
| 1091 | return |
| 1092 | } |
| 1093 | |
| 1094 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1095 | |
| 1096 | func Truncate(path string, length int64) (err error) { |
| 1097 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 1098 | r0, er := C.truncate(C.uintptr_t(_p0), C.longlong(length)) |
| 1099 | if r0 == -1 && er != nil { |
| 1100 | err = er |
| 1101 | } |
| 1102 | return |
| 1103 | } |
| 1104 | |
| 1105 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1106 | |
| 1107 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 1108 | r0, er := C.bind(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen))) |
| 1109 | if r0 == -1 && er != nil { |
| 1110 | err = er |
| 1111 | } |
| 1112 | return |
| 1113 | } |
| 1114 | |
| 1115 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1116 | |
| 1117 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 1118 | r0, er := C.connect(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen))) |
| 1119 | if r0 == -1 && er != nil { |
| 1120 | err = er |
| 1121 | } |
| 1122 | return |
| 1123 | } |
| 1124 | |
| 1125 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1126 | |
| 1127 | func getgroups(n int, list *_Gid_t) (nn int, err error) { |
| 1128 | r0, er := C.getgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list)))) |
| 1129 | nn = int(r0) |
| 1130 | if r0 == -1 && er != nil { |
| 1131 | err = er |
| 1132 | } |
| 1133 | return |
| 1134 | } |
| 1135 | |
| 1136 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1137 | |
| 1138 | func setgroups(n int, list *_Gid_t) (err error) { |
| 1139 | r0, er := C.setgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list)))) |
| 1140 | if r0 == -1 && er != nil { |
| 1141 | err = er |
| 1142 | } |
| 1143 | return |
| 1144 | } |
| 1145 | |
| 1146 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1147 | |
| 1148 | func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { |
| 1149 | r0, er := C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(uintptr(unsafe.Pointer(vallen)))) |
| 1150 | if r0 == -1 && er != nil { |
| 1151 | err = er |
| 1152 | } |
| 1153 | return |
| 1154 | } |
| 1155 | |
| 1156 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1157 | |
| 1158 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { |
| 1159 | r0, er := C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(vallen)) |
| 1160 | if r0 == -1 && er != nil { |
| 1161 | err = er |
| 1162 | } |
| 1163 | return |
| 1164 | } |
| 1165 | |
| 1166 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1167 | |
| 1168 | func socket(domain int, typ int, proto int) (fd int, err error) { |
| 1169 | r0, er := C.socket(C.int(domain), C.int(typ), C.int(proto)) |
| 1170 | fd = int(r0) |
| 1171 | if r0 == -1 && er != nil { |
| 1172 | err = er |
| 1173 | } |
| 1174 | return |
| 1175 | } |
| 1176 | |
| 1177 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1178 | |
| 1179 | func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { |
| 1180 | r0, er := C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(uintptr(unsafe.Pointer(fd)))) |
| 1181 | if r0 == -1 && er != nil { |
| 1182 | err = er |
| 1183 | } |
| 1184 | return |
| 1185 | } |
| 1186 | |
| 1187 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1188 | |
| 1189 | func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 1190 | r0, er := C.getpeername(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen)))) |
| 1191 | if r0 == -1 && er != nil { |
| 1192 | err = er |
| 1193 | } |
| 1194 | return |
| 1195 | } |
| 1196 | |
| 1197 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1198 | |
| 1199 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 1200 | r0, er := C.getsockname(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen)))) |
| 1201 | if r0 == -1 && er != nil { |
| 1202 | err = er |
| 1203 | } |
| 1204 | return |
| 1205 | } |
| 1206 | |
| 1207 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1208 | |
| 1209 | func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { |
| 1210 | var _p0 *byte |
| 1211 | if len(p) > 0 { |
| 1212 | _p0 = &p[0] |
| 1213 | } |
| 1214 | var _p1 int |
| 1215 | _p1 = len(p) |
| 1216 | r0, er := C.recvfrom(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(unsafe.Pointer(from))), C.uintptr_t(uintptr(unsafe.Pointer(fromlen)))) |
| 1217 | n = int(r0) |
| 1218 | if r0 == -1 && er != nil { |
| 1219 | err = er |
| 1220 | } |
| 1221 | return |
| 1222 | } |
| 1223 | |
| 1224 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1225 | |
| 1226 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { |
| 1227 | var _p0 *byte |
| 1228 | if len(buf) > 0 { |
| 1229 | _p0 = &buf[0] |
| 1230 | } |
| 1231 | var _p1 int |
| 1232 | _p1 = len(buf) |
| 1233 | r0, er := C.sendto(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(to)), C.uintptr_t(uintptr(addrlen))) |
| 1234 | if r0 == -1 && er != nil { |
| 1235 | err = er |
| 1236 | } |
| 1237 | return |
| 1238 | } |
| 1239 | |
| 1240 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1241 | |
| 1242 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
chigotc | d20716e | 2019-04-16 16:26:58 +0200 | [diff] [blame] | 1243 | r0, er := C.nrecvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags)) |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1244 | n = int(r0) |
| 1245 | if r0 == -1 && er != nil { |
| 1246 | err = er |
| 1247 | } |
| 1248 | return |
| 1249 | } |
| 1250 | |
| 1251 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1252 | |
| 1253 | func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
chigotc | d20716e | 2019-04-16 16:26:58 +0200 | [diff] [blame] | 1254 | r0, er := C.nsendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags)) |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1255 | n = int(r0) |
| 1256 | if r0 == -1 && er != nil { |
| 1257 | err = er |
| 1258 | } |
| 1259 | return |
| 1260 | } |
| 1261 | |
| 1262 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1263 | |
| 1264 | func munmap(addr uintptr, length uintptr) (err error) { |
| 1265 | r0, er := C.munmap(C.uintptr_t(addr), C.uintptr_t(length)) |
| 1266 | if r0 == -1 && er != nil { |
| 1267 | err = er |
| 1268 | } |
| 1269 | return |
| 1270 | } |
| 1271 | |
| 1272 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1273 | |
| 1274 | func Madvise(b []byte, advice int) (err error) { |
| 1275 | var _p0 *byte |
| 1276 | if len(b) > 0 { |
| 1277 | _p0 = &b[0] |
| 1278 | } |
| 1279 | var _p1 int |
| 1280 | _p1 = len(b) |
| 1281 | r0, er := C.madvise(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(advice)) |
| 1282 | if r0 == -1 && er != nil { |
| 1283 | err = er |
| 1284 | } |
| 1285 | return |
| 1286 | } |
| 1287 | |
| 1288 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1289 | |
| 1290 | func Mprotect(b []byte, prot int) (err error) { |
| 1291 | var _p0 *byte |
| 1292 | if len(b) > 0 { |
| 1293 | _p0 = &b[0] |
| 1294 | } |
| 1295 | var _p1 int |
| 1296 | _p1 = len(b) |
| 1297 | r0, er := C.mprotect(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(prot)) |
| 1298 | if r0 == -1 && er != nil { |
| 1299 | err = er |
| 1300 | } |
| 1301 | return |
| 1302 | } |
| 1303 | |
| 1304 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1305 | |
| 1306 | func Mlock(b []byte) (err error) { |
| 1307 | var _p0 *byte |
| 1308 | if len(b) > 0 { |
| 1309 | _p0 = &b[0] |
| 1310 | } |
| 1311 | var _p1 int |
| 1312 | _p1 = len(b) |
| 1313 | r0, er := C.mlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 1314 | if r0 == -1 && er != nil { |
| 1315 | err = er |
| 1316 | } |
| 1317 | return |
| 1318 | } |
| 1319 | |
| 1320 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1321 | |
| 1322 | func Mlockall(flags int) (err error) { |
| 1323 | r0, er := C.mlockall(C.int(flags)) |
| 1324 | if r0 == -1 && er != nil { |
| 1325 | err = er |
| 1326 | } |
| 1327 | return |
| 1328 | } |
| 1329 | |
| 1330 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1331 | |
| 1332 | func Msync(b []byte, flags int) (err error) { |
| 1333 | var _p0 *byte |
| 1334 | if len(b) > 0 { |
| 1335 | _p0 = &b[0] |
| 1336 | } |
| 1337 | var _p1 int |
| 1338 | _p1 = len(b) |
| 1339 | r0, er := C.msync(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags)) |
| 1340 | if r0 == -1 && er != nil { |
| 1341 | err = er |
| 1342 | } |
| 1343 | return |
| 1344 | } |
| 1345 | |
| 1346 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1347 | |
| 1348 | func Munlock(b []byte) (err error) { |
| 1349 | var _p0 *byte |
| 1350 | if len(b) > 0 { |
| 1351 | _p0 = &b[0] |
| 1352 | } |
| 1353 | var _p1 int |
| 1354 | _p1 = len(b) |
| 1355 | r0, er := C.munlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) |
| 1356 | if r0 == -1 && er != nil { |
| 1357 | err = er |
| 1358 | } |
| 1359 | return |
| 1360 | } |
| 1361 | |
| 1362 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1363 | |
| 1364 | func Munlockall() (err error) { |
| 1365 | r0, er := C.munlockall() |
| 1366 | if r0 == -1 && er != nil { |
| 1367 | err = er |
| 1368 | } |
| 1369 | return |
| 1370 | } |
| 1371 | |
| 1372 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1373 | |
| 1374 | func pipe(p *[2]_C_int) (err error) { |
| 1375 | r0, er := C.pipe(C.uintptr_t(uintptr(unsafe.Pointer(p)))) |
| 1376 | if r0 == -1 && er != nil { |
| 1377 | err = er |
| 1378 | } |
| 1379 | return |
| 1380 | } |
| 1381 | |
| 1382 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1383 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1384 | func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
| 1385 | r0, er := C.poll(C.uintptr_t(uintptr(unsafe.Pointer(fds))), C.int(nfds), C.int(timeout)) |
| 1386 | n = int(r0) |
| 1387 | if r0 == -1 && er != nil { |
| 1388 | err = er |
| 1389 | } |
| 1390 | return |
| 1391 | } |
| 1392 | |
| 1393 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1394 | |
| 1395 | func gettimeofday(tv *Timeval, tzp *Timezone) (err error) { |
| 1396 | r0, er := C.gettimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))), C.uintptr_t(uintptr(unsafe.Pointer(tzp)))) |
| 1397 | if r0 == -1 && er != nil { |
| 1398 | err = er |
| 1399 | } |
| 1400 | return |
| 1401 | } |
| 1402 | |
| 1403 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1404 | |
| 1405 | func Time(t *Time_t) (tt Time_t, err error) { |
| 1406 | r0, er := C.time(C.uintptr_t(uintptr(unsafe.Pointer(t)))) |
| 1407 | tt = Time_t(r0) |
| 1408 | if r0 == -1 && er != nil { |
| 1409 | err = er |
| 1410 | } |
| 1411 | return |
| 1412 | } |
| 1413 | |
| 1414 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1415 | |
| 1416 | func Utime(path string, buf *Utimbuf) (err error) { |
| 1417 | _p0 := uintptr(unsafe.Pointer(C.CString(path))) |
| 1418 | r0, er := C.utime(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf)))) |
| 1419 | if r0 == -1 && er != nil { |
| 1420 | err = er |
| 1421 | } |
| 1422 | return |
| 1423 | } |
| 1424 | |
| 1425 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1426 | |
chigotc | d20716e | 2019-04-16 16:26:58 +0200 | [diff] [blame] | 1427 | func Getsystemcfg(label int) (n uint64) { |
| 1428 | r0, _ := C.getsystemcfg(C.int(label)) |
| 1429 | n = uint64(r0) |
| 1430 | return |
| 1431 | } |
| 1432 | |
| 1433 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1434 | |
Clément Chigot | e8e3143 | 2019-04-19 11:16:35 +0200 | [diff] [blame] | 1435 | func umount(target string) (err error) { |
| 1436 | _p0 := uintptr(unsafe.Pointer(C.CString(target))) |
| 1437 | r0, er := C.umount(C.uintptr_t(_p0)) |
| 1438 | if r0 == -1 && er != nil { |
| 1439 | err = er |
| 1440 | } |
| 1441 | return |
| 1442 | } |
| 1443 | |
| 1444 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1445 | |
Tony Reix | d99a578 | 2018-08-17 10:25:03 +0200 | [diff] [blame] | 1446 | func Getrlimit(resource int, rlim *Rlimit) (err error) { |
| 1447 | r0, er := C.getrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim)))) |
| 1448 | if r0 == -1 && er != nil { |
| 1449 | err = er |
| 1450 | } |
| 1451 | return |
| 1452 | } |
| 1453 | |
| 1454 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1455 | |
| 1456 | func Setrlimit(resource int, rlim *Rlimit) (err error) { |
| 1457 | r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim)))) |
| 1458 | if r0 == -1 && er != nil { |
| 1459 | err = er |
| 1460 | } |
| 1461 | return |
| 1462 | } |
| 1463 | |
| 1464 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1465 | |
| 1466 | func Seek(fd int, offset int64, whence int) (off int64, err error) { |
| 1467 | r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence)) |
| 1468 | off = int64(r0) |
| 1469 | if r0 == -1 && er != nil { |
| 1470 | err = er |
| 1471 | } |
| 1472 | return |
| 1473 | } |
| 1474 | |
| 1475 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1476 | |
| 1477 | func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { |
| 1478 | r0, er := C.mmap(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset)) |
| 1479 | xaddr = uintptr(r0) |
| 1480 | if uintptr(r0) == ^uintptr(0) && er != nil { |
| 1481 | err = er |
| 1482 | } |
| 1483 | return |
| 1484 | } |