...

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

Documentation: cmd/vendor/golang.org/x/sys/unix

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

View as plain text