zsyscall_aix_ppc.go 35 KB

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