zsyscall_aix_ppc.go 36 KB

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