Source file src/cmd/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go

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

View as plain text