zsyscall_aix_ppc.go 36 KB

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