zsyscall_darwin_386.go 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521
  1. // go run mksyscall.go -l32 -tags darwin,386,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build darwin,386,go1.12
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. var _ syscall.Errno
  10. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  11. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  12. r0, _, e1 := syscall_rawSyscall(funcPC(libc_getgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  13. n = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. func libc_getgroups_trampoline()
  20. //go:linkname libc_getgroups libc_getgroups
  21. //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
  22. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  23. func setgroups(ngid int, gid *_Gid_t) (err error) {
  24. _, _, e1 := syscall_rawSyscall(funcPC(libc_setgroups_trampoline), uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  25. if e1 != 0 {
  26. err = errnoErr(e1)
  27. }
  28. return
  29. }
  30. func libc_setgroups_trampoline()
  31. //go:linkname libc_setgroups libc_setgroups
  32. //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
  33. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  34. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  35. r0, _, e1 := syscall_syscall6(funcPC(libc_wait4_trampoline), uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  36. wpid = int(r0)
  37. if e1 != 0 {
  38. err = errnoErr(e1)
  39. }
  40. return
  41. }
  42. func libc_wait4_trampoline()
  43. //go:linkname libc_wait4 libc_wait4
  44. //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
  45. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  46. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  47. r0, _, e1 := syscall_syscall(funcPC(libc_accept_trampoline), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  48. fd = int(r0)
  49. if e1 != 0 {
  50. err = errnoErr(e1)
  51. }
  52. return
  53. }
  54. func libc_accept_trampoline()
  55. //go:linkname libc_accept libc_accept
  56. //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
  57. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  58. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  59. _, _, e1 := syscall_syscall(funcPC(libc_bind_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
  60. if e1 != 0 {
  61. err = errnoErr(e1)
  62. }
  63. return
  64. }
  65. func libc_bind_trampoline()
  66. //go:linkname libc_bind libc_bind
  67. //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
  68. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  69. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  70. _, _, e1 := syscall_syscall(funcPC(libc_connect_trampoline), uintptr(s), uintptr(addr), uintptr(addrlen))
  71. if e1 != 0 {
  72. err = errnoErr(e1)
  73. }
  74. return
  75. }
  76. func libc_connect_trampoline()
  77. //go:linkname libc_connect libc_connect
  78. //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
  79. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  80. func socket(domain int, typ int, proto int) (fd int, err error) {
  81. r0, _, e1 := syscall_rawSyscall(funcPC(libc_socket_trampoline), uintptr(domain), uintptr(typ), uintptr(proto))
  82. fd = int(r0)
  83. if e1 != 0 {
  84. err = errnoErr(e1)
  85. }
  86. return
  87. }
  88. func libc_socket_trampoline()
  89. //go:linkname libc_socket libc_socket
  90. //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
  91. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  92. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  93. _, _, e1 := syscall_syscall6(funcPC(libc_getsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  94. if e1 != 0 {
  95. err = errnoErr(e1)
  96. }
  97. return
  98. }
  99. func libc_getsockopt_trampoline()
  100. //go:linkname libc_getsockopt libc_getsockopt
  101. //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
  102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  103. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  104. _, _, e1 := syscall_syscall6(funcPC(libc_setsockopt_trampoline), uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  105. if e1 != 0 {
  106. err = errnoErr(e1)
  107. }
  108. return
  109. }
  110. func libc_setsockopt_trampoline()
  111. //go:linkname libc_setsockopt libc_setsockopt
  112. //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
  113. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  114. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  115. _, _, e1 := syscall_rawSyscall(funcPC(libc_getpeername_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  116. if e1 != 0 {
  117. err = errnoErr(e1)
  118. }
  119. return
  120. }
  121. func libc_getpeername_trampoline()
  122. //go:linkname libc_getpeername libc_getpeername
  123. //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
  124. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  125. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  126. _, _, e1 := syscall_rawSyscall(funcPC(libc_getsockname_trampoline), uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  127. if e1 != 0 {
  128. err = errnoErr(e1)
  129. }
  130. return
  131. }
  132. func libc_getsockname_trampoline()
  133. //go:linkname libc_getsockname libc_getsockname
  134. //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
  135. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  136. func Shutdown(s int, how int) (err error) {
  137. _, _, e1 := syscall_syscall(funcPC(libc_shutdown_trampoline), uintptr(s), uintptr(how), 0)
  138. if e1 != 0 {
  139. err = errnoErr(e1)
  140. }
  141. return
  142. }
  143. func libc_shutdown_trampoline()
  144. //go:linkname libc_shutdown libc_shutdown
  145. //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
  146. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  147. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  148. _, _, e1 := syscall_rawSyscall6(funcPC(libc_socketpair_trampoline), uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  149. if e1 != 0 {
  150. err = errnoErr(e1)
  151. }
  152. return
  153. }
  154. func libc_socketpair_trampoline()
  155. //go:linkname libc_socketpair libc_socketpair
  156. //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
  157. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  158. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  159. var _p0 unsafe.Pointer
  160. if len(p) > 0 {
  161. _p0 = unsafe.Pointer(&p[0])
  162. } else {
  163. _p0 = unsafe.Pointer(&_zero)
  164. }
  165. r0, _, e1 := syscall_syscall6(funcPC(libc_recvfrom_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  166. n = int(r0)
  167. if e1 != 0 {
  168. err = errnoErr(e1)
  169. }
  170. return
  171. }
  172. func libc_recvfrom_trampoline()
  173. //go:linkname libc_recvfrom libc_recvfrom
  174. //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
  175. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  176. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  177. var _p0 unsafe.Pointer
  178. if len(buf) > 0 {
  179. _p0 = unsafe.Pointer(&buf[0])
  180. } else {
  181. _p0 = unsafe.Pointer(&_zero)
  182. }
  183. _, _, e1 := syscall_syscall6(funcPC(libc_sendto_trampoline), uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  184. if e1 != 0 {
  185. err = errnoErr(e1)
  186. }
  187. return
  188. }
  189. func libc_sendto_trampoline()
  190. //go:linkname libc_sendto libc_sendto
  191. //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
  192. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  193. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  194. r0, _, e1 := syscall_syscall(funcPC(libc_recvmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  195. n = int(r0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. func libc_recvmsg_trampoline()
  202. //go:linkname libc_recvmsg libc_recvmsg
  203. //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
  204. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  205. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  206. r0, _, e1 := syscall_syscall(funcPC(libc_sendmsg_trampoline), uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  207. n = int(r0)
  208. if e1 != 0 {
  209. err = errnoErr(e1)
  210. }
  211. return
  212. }
  213. func libc_sendmsg_trampoline()
  214. //go:linkname libc_sendmsg libc_sendmsg
  215. //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
  216. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  217. func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  218. r0, _, e1 := syscall_syscall6(funcPC(libc_kevent_trampoline), uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  219. n = int(r0)
  220. if e1 != 0 {
  221. err = errnoErr(e1)
  222. }
  223. return
  224. }
  225. func libc_kevent_trampoline()
  226. //go:linkname libc_kevent libc_kevent
  227. //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
  228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  229. func utimes(path string, timeval *[2]Timeval) (err error) {
  230. var _p0 *byte
  231. _p0, err = BytePtrFromString(path)
  232. if err != nil {
  233. return
  234. }
  235. _, _, e1 := syscall_syscall(funcPC(libc_utimes_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  236. if e1 != 0 {
  237. err = errnoErr(e1)
  238. }
  239. return
  240. }
  241. func libc_utimes_trampoline()
  242. //go:linkname libc_utimes libc_utimes
  243. //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
  244. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  245. func futimes(fd int, timeval *[2]Timeval) (err error) {
  246. _, _, e1 := syscall_syscall(funcPC(libc_futimes_trampoline), uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  247. if e1 != 0 {
  248. err = errnoErr(e1)
  249. }
  250. return
  251. }
  252. func libc_futimes_trampoline()
  253. //go:linkname libc_futimes libc_futimes
  254. //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
  255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  256. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  257. r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
  258. val = int(r0)
  259. if e1 != 0 {
  260. err = errnoErr(e1)
  261. }
  262. return
  263. }
  264. func libc_fcntl_trampoline()
  265. //go:linkname libc_fcntl libc_fcntl
  266. //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
  267. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  268. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  269. r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  270. n = int(r0)
  271. if e1 != 0 {
  272. err = errnoErr(e1)
  273. }
  274. return
  275. }
  276. func libc_poll_trampoline()
  277. //go:linkname libc_poll libc_poll
  278. //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
  279. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  280. func Madvise(b []byte, behav int) (err error) {
  281. var _p0 unsafe.Pointer
  282. if len(b) > 0 {
  283. _p0 = unsafe.Pointer(&b[0])
  284. } else {
  285. _p0 = unsafe.Pointer(&_zero)
  286. }
  287. _, _, e1 := syscall_syscall(funcPC(libc_madvise_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(behav))
  288. if e1 != 0 {
  289. err = errnoErr(e1)
  290. }
  291. return
  292. }
  293. func libc_madvise_trampoline()
  294. //go:linkname libc_madvise libc_madvise
  295. //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
  296. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  297. func Mlock(b []byte) (err error) {
  298. var _p0 unsafe.Pointer
  299. if len(b) > 0 {
  300. _p0 = unsafe.Pointer(&b[0])
  301. } else {
  302. _p0 = unsafe.Pointer(&_zero)
  303. }
  304. _, _, e1 := syscall_syscall(funcPC(libc_mlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. func libc_mlock_trampoline()
  311. //go:linkname libc_mlock libc_mlock
  312. //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
  313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  314. func Mlockall(flags int) (err error) {
  315. _, _, e1 := syscall_syscall(funcPC(libc_mlockall_trampoline), uintptr(flags), 0, 0)
  316. if e1 != 0 {
  317. err = errnoErr(e1)
  318. }
  319. return
  320. }
  321. func libc_mlockall_trampoline()
  322. //go:linkname libc_mlockall libc_mlockall
  323. //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
  324. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  325. func Mprotect(b []byte, prot int) (err error) {
  326. var _p0 unsafe.Pointer
  327. if len(b) > 0 {
  328. _p0 = unsafe.Pointer(&b[0])
  329. } else {
  330. _p0 = unsafe.Pointer(&_zero)
  331. }
  332. _, _, e1 := syscall_syscall(funcPC(libc_mprotect_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(prot))
  333. if e1 != 0 {
  334. err = errnoErr(e1)
  335. }
  336. return
  337. }
  338. func libc_mprotect_trampoline()
  339. //go:linkname libc_mprotect libc_mprotect
  340. //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
  341. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  342. func Msync(b []byte, flags int) (err error) {
  343. var _p0 unsafe.Pointer
  344. if len(b) > 0 {
  345. _p0 = unsafe.Pointer(&b[0])
  346. } else {
  347. _p0 = unsafe.Pointer(&_zero)
  348. }
  349. _, _, e1 := syscall_syscall(funcPC(libc_msync_trampoline), uintptr(_p0), uintptr(len(b)), uintptr(flags))
  350. if e1 != 0 {
  351. err = errnoErr(e1)
  352. }
  353. return
  354. }
  355. func libc_msync_trampoline()
  356. //go:linkname libc_msync libc_msync
  357. //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
  358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  359. func Munlock(b []byte) (err error) {
  360. var _p0 unsafe.Pointer
  361. if len(b) > 0 {
  362. _p0 = unsafe.Pointer(&b[0])
  363. } else {
  364. _p0 = unsafe.Pointer(&_zero)
  365. }
  366. _, _, e1 := syscall_syscall(funcPC(libc_munlock_trampoline), uintptr(_p0), uintptr(len(b)), 0)
  367. if e1 != 0 {
  368. err = errnoErr(e1)
  369. }
  370. return
  371. }
  372. func libc_munlock_trampoline()
  373. //go:linkname libc_munlock libc_munlock
  374. //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
  375. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  376. func Munlockall() (err error) {
  377. _, _, e1 := syscall_syscall(funcPC(libc_munlockall_trampoline), 0, 0, 0)
  378. if e1 != 0 {
  379. err = errnoErr(e1)
  380. }
  381. return
  382. }
  383. func libc_munlockall_trampoline()
  384. //go:linkname libc_munlockall libc_munlockall
  385. //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
  386. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  387. func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
  388. _, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
  389. if e1 != 0 {
  390. err = errnoErr(e1)
  391. }
  392. return
  393. }
  394. func libc_getattrlist_trampoline()
  395. //go:linkname libc_getattrlist libc_getattrlist
  396. //go:cgo_import_dynamic libc_getattrlist getattrlist "/usr/lib/libSystem.B.dylib"
  397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  398. func pipe() (r int, w int, err error) {
  399. r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
  400. r = int(r0)
  401. w = int(r1)
  402. if e1 != 0 {
  403. err = errnoErr(e1)
  404. }
  405. return
  406. }
  407. func libc_pipe_trampoline()
  408. //go:linkname libc_pipe libc_pipe
  409. //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
  410. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  411. func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
  412. var _p0 *byte
  413. _p0, err = BytePtrFromString(path)
  414. if err != nil {
  415. return
  416. }
  417. var _p1 *byte
  418. _p1, err = BytePtrFromString(attr)
  419. if err != nil {
  420. return
  421. }
  422. r0, _, e1 := syscall_syscall6(funcPC(libc_getxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
  423. sz = int(r0)
  424. if e1 != 0 {
  425. err = errnoErr(e1)
  426. }
  427. return
  428. }
  429. func libc_getxattr_trampoline()
  430. //go:linkname libc_getxattr libc_getxattr
  431. //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
  432. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  433. func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
  434. var _p0 *byte
  435. _p0, err = BytePtrFromString(attr)
  436. if err != nil {
  437. return
  438. }
  439. r0, _, e1 := syscall_syscall6(funcPC(libc_fgetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
  440. sz = int(r0)
  441. if e1 != 0 {
  442. err = errnoErr(e1)
  443. }
  444. return
  445. }
  446. func libc_fgetxattr_trampoline()
  447. //go:linkname libc_fgetxattr libc_fgetxattr
  448. //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
  449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  450. func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
  451. var _p0 *byte
  452. _p0, err = BytePtrFromString(path)
  453. if err != nil {
  454. return
  455. }
  456. var _p1 *byte
  457. _p1, err = BytePtrFromString(attr)
  458. if err != nil {
  459. return
  460. }
  461. _, _, e1 := syscall_syscall6(funcPC(libc_setxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
  462. if e1 != 0 {
  463. err = errnoErr(e1)
  464. }
  465. return
  466. }
  467. func libc_setxattr_trampoline()
  468. //go:linkname libc_setxattr libc_setxattr
  469. //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
  470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  471. func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
  472. var _p0 *byte
  473. _p0, err = BytePtrFromString(attr)
  474. if err != nil {
  475. return
  476. }
  477. _, _, e1 := syscall_syscall6(funcPC(libc_fsetxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
  478. if e1 != 0 {
  479. err = errnoErr(e1)
  480. }
  481. return
  482. }
  483. func libc_fsetxattr_trampoline()
  484. //go:linkname libc_fsetxattr libc_fsetxattr
  485. //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
  486. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  487. func removexattr(path string, attr string, options int) (err error) {
  488. var _p0 *byte
  489. _p0, err = BytePtrFromString(path)
  490. if err != nil {
  491. return
  492. }
  493. var _p1 *byte
  494. _p1, err = BytePtrFromString(attr)
  495. if err != nil {
  496. return
  497. }
  498. _, _, e1 := syscall_syscall(funcPC(libc_removexattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  499. if e1 != 0 {
  500. err = errnoErr(e1)
  501. }
  502. return
  503. }
  504. func libc_removexattr_trampoline()
  505. //go:linkname libc_removexattr libc_removexattr
  506. //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
  507. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  508. func fremovexattr(fd int, attr string, options int) (err error) {
  509. var _p0 *byte
  510. _p0, err = BytePtrFromString(attr)
  511. if err != nil {
  512. return
  513. }
  514. _, _, e1 := syscall_syscall(funcPC(libc_fremovexattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
  515. if e1 != 0 {
  516. err = errnoErr(e1)
  517. }
  518. return
  519. }
  520. func libc_fremovexattr_trampoline()
  521. //go:linkname libc_fremovexattr libc_fremovexattr
  522. //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
  523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  524. func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
  525. var _p0 *byte
  526. _p0, err = BytePtrFromString(path)
  527. if err != nil {
  528. return
  529. }
  530. r0, _, e1 := syscall_syscall6(funcPC(libc_listxattr_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
  531. sz = int(r0)
  532. if e1 != 0 {
  533. err = errnoErr(e1)
  534. }
  535. return
  536. }
  537. func libc_listxattr_trampoline()
  538. //go:linkname libc_listxattr libc_listxattr
  539. //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
  542. r0, _, e1 := syscall_syscall6(funcPC(libc_flistxattr_trampoline), uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
  543. sz = int(r0)
  544. if e1 != 0 {
  545. err = errnoErr(e1)
  546. }
  547. return
  548. }
  549. func libc_flistxattr_trampoline()
  550. //go:linkname libc_flistxattr libc_flistxattr
  551. //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
  552. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  553. func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
  554. _, _, e1 := syscall_syscall6(funcPC(libc_setattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
  555. if e1 != 0 {
  556. err = errnoErr(e1)
  557. }
  558. return
  559. }
  560. func libc_setattrlist_trampoline()
  561. //go:linkname libc_setattrlist libc_setattrlist
  562. //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
  563. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  564. func kill(pid int, signum int, posix int) (err error) {
  565. _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
  566. if e1 != 0 {
  567. err = errnoErr(e1)
  568. }
  569. return
  570. }
  571. func libc_kill_trampoline()
  572. //go:linkname libc_kill libc_kill
  573. //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
  574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  575. func ioctl(fd int, req uint, arg uintptr) (err error) {
  576. _, _, e1 := syscall_syscall(funcPC(libc_ioctl_trampoline), uintptr(fd), uintptr(req), uintptr(arg))
  577. if e1 != 0 {
  578. err = errnoErr(e1)
  579. }
  580. return
  581. }
  582. func libc_ioctl_trampoline()
  583. //go:linkname libc_ioctl libc_ioctl
  584. //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
  585. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  586. func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
  587. _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
  588. if e1 != 0 {
  589. err = errnoErr(e1)
  590. }
  591. return
  592. }
  593. func libc_sendfile_trampoline()
  594. //go:linkname libc_sendfile libc_sendfile
  595. //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
  596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  597. func Access(path string, mode uint32) (err error) {
  598. var _p0 *byte
  599. _p0, err = BytePtrFromString(path)
  600. if err != nil {
  601. return
  602. }
  603. _, _, e1 := syscall_syscall(funcPC(libc_access_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  604. if e1 != 0 {
  605. err = errnoErr(e1)
  606. }
  607. return
  608. }
  609. func libc_access_trampoline()
  610. //go:linkname libc_access libc_access
  611. //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
  612. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  613. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  614. _, _, e1 := syscall_syscall(funcPC(libc_adjtime_trampoline), uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  615. if e1 != 0 {
  616. err = errnoErr(e1)
  617. }
  618. return
  619. }
  620. func libc_adjtime_trampoline()
  621. //go:linkname libc_adjtime libc_adjtime
  622. //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
  623. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  624. func Chdir(path string) (err error) {
  625. var _p0 *byte
  626. _p0, err = BytePtrFromString(path)
  627. if err != nil {
  628. return
  629. }
  630. _, _, e1 := syscall_syscall(funcPC(libc_chdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  631. if e1 != 0 {
  632. err = errnoErr(e1)
  633. }
  634. return
  635. }
  636. func libc_chdir_trampoline()
  637. //go:linkname libc_chdir libc_chdir
  638. //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
  639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  640. func Chflags(path string, flags int) (err error) {
  641. var _p0 *byte
  642. _p0, err = BytePtrFromString(path)
  643. if err != nil {
  644. return
  645. }
  646. _, _, e1 := syscall_syscall(funcPC(libc_chflags_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  647. if e1 != 0 {
  648. err = errnoErr(e1)
  649. }
  650. return
  651. }
  652. func libc_chflags_trampoline()
  653. //go:linkname libc_chflags libc_chflags
  654. //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
  655. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  656. func Chmod(path string, mode uint32) (err error) {
  657. var _p0 *byte
  658. _p0, err = BytePtrFromString(path)
  659. if err != nil {
  660. return
  661. }
  662. _, _, e1 := syscall_syscall(funcPC(libc_chmod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  663. if e1 != 0 {
  664. err = errnoErr(e1)
  665. }
  666. return
  667. }
  668. func libc_chmod_trampoline()
  669. //go:linkname libc_chmod libc_chmod
  670. //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
  671. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  672. func Chown(path string, uid int, gid int) (err error) {
  673. var _p0 *byte
  674. _p0, err = BytePtrFromString(path)
  675. if err != nil {
  676. return
  677. }
  678. _, _, e1 := syscall_syscall(funcPC(libc_chown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  679. if e1 != 0 {
  680. err = errnoErr(e1)
  681. }
  682. return
  683. }
  684. func libc_chown_trampoline()
  685. //go:linkname libc_chown libc_chown
  686. //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
  687. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  688. func Chroot(path string) (err error) {
  689. var _p0 *byte
  690. _p0, err = BytePtrFromString(path)
  691. if err != nil {
  692. return
  693. }
  694. _, _, e1 := syscall_syscall(funcPC(libc_chroot_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  695. if e1 != 0 {
  696. err = errnoErr(e1)
  697. }
  698. return
  699. }
  700. func libc_chroot_trampoline()
  701. //go:linkname libc_chroot libc_chroot
  702. //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
  703. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  704. func ClockGettime(clockid int32, time *Timespec) (err error) {
  705. _, _, e1 := syscall_syscall(funcPC(libc_clock_gettime_trampoline), uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  706. if e1 != 0 {
  707. err = errnoErr(e1)
  708. }
  709. return
  710. }
  711. func libc_clock_gettime_trampoline()
  712. //go:linkname libc_clock_gettime libc_clock_gettime
  713. //go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
  714. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  715. func Close(fd int) (err error) {
  716. _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
  717. if e1 != 0 {
  718. err = errnoErr(e1)
  719. }
  720. return
  721. }
  722. func libc_close_trampoline()
  723. //go:linkname libc_close libc_close
  724. //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
  725. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  726. func Dup(fd int) (nfd int, err error) {
  727. r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
  728. nfd = int(r0)
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. func libc_dup_trampoline()
  735. //go:linkname libc_dup libc_dup
  736. //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
  737. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  738. func Dup2(from int, to int) (err error) {
  739. _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
  740. if e1 != 0 {
  741. err = errnoErr(e1)
  742. }
  743. return
  744. }
  745. func libc_dup2_trampoline()
  746. //go:linkname libc_dup2 libc_dup2
  747. //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Exchangedata(path1 string, path2 string, options int) (err error) {
  750. var _p0 *byte
  751. _p0, err = BytePtrFromString(path1)
  752. if err != nil {
  753. return
  754. }
  755. var _p1 *byte
  756. _p1, err = BytePtrFromString(path2)
  757. if err != nil {
  758. return
  759. }
  760. _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  761. if e1 != 0 {
  762. err = errnoErr(e1)
  763. }
  764. return
  765. }
  766. func libc_exchangedata_trampoline()
  767. //go:linkname libc_exchangedata libc_exchangedata
  768. //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
  769. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  770. func Exit(code int) {
  771. syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
  772. return
  773. }
  774. func libc_exit_trampoline()
  775. //go:linkname libc_exit libc_exit
  776. //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
  777. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  778. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  779. var _p0 *byte
  780. _p0, err = BytePtrFromString(path)
  781. if err != nil {
  782. return
  783. }
  784. _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  785. if e1 != 0 {
  786. err = errnoErr(e1)
  787. }
  788. return
  789. }
  790. func libc_faccessat_trampoline()
  791. //go:linkname libc_faccessat libc_faccessat
  792. //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
  793. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  794. func Fchdir(fd int) (err error) {
  795. _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
  796. if e1 != 0 {
  797. err = errnoErr(e1)
  798. }
  799. return
  800. }
  801. func libc_fchdir_trampoline()
  802. //go:linkname libc_fchdir libc_fchdir
  803. //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
  804. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  805. func Fchflags(fd int, flags int) (err error) {
  806. _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
  807. if e1 != 0 {
  808. err = errnoErr(e1)
  809. }
  810. return
  811. }
  812. func libc_fchflags_trampoline()
  813. //go:linkname libc_fchflags libc_fchflags
  814. //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
  815. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  816. func Fchmod(fd int, mode uint32) (err error) {
  817. _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
  818. if e1 != 0 {
  819. err = errnoErr(e1)
  820. }
  821. return
  822. }
  823. func libc_fchmod_trampoline()
  824. //go:linkname libc_fchmod libc_fchmod
  825. //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
  826. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  827. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  828. var _p0 *byte
  829. _p0, err = BytePtrFromString(path)
  830. if err != nil {
  831. return
  832. }
  833. _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  834. if e1 != 0 {
  835. err = errnoErr(e1)
  836. }
  837. return
  838. }
  839. func libc_fchmodat_trampoline()
  840. //go:linkname libc_fchmodat libc_fchmodat
  841. //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
  842. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  843. func Fchown(fd int, uid int, gid int) (err error) {
  844. _, _, e1 := syscall_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
  845. if e1 != 0 {
  846. err = errnoErr(e1)
  847. }
  848. return
  849. }
  850. func libc_fchown_trampoline()
  851. //go:linkname libc_fchown libc_fchown
  852. //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
  853. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  854. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  855. var _p0 *byte
  856. _p0, err = BytePtrFromString(path)
  857. if err != nil {
  858. return
  859. }
  860. _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  861. if e1 != 0 {
  862. err = errnoErr(e1)
  863. }
  864. return
  865. }
  866. func libc_fchownat_trampoline()
  867. //go:linkname libc_fchownat libc_fchownat
  868. //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
  869. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  870. func Flock(fd int, how int) (err error) {
  871. _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
  872. if e1 != 0 {
  873. err = errnoErr(e1)
  874. }
  875. return
  876. }
  877. func libc_flock_trampoline()
  878. //go:linkname libc_flock libc_flock
  879. //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
  880. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  881. func Fpathconf(fd int, name int) (val int, err error) {
  882. r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
  883. val = int(r0)
  884. if e1 != 0 {
  885. err = errnoErr(e1)
  886. }
  887. return
  888. }
  889. func libc_fpathconf_trampoline()
  890. //go:linkname libc_fpathconf libc_fpathconf
  891. //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
  892. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  893. func Fsync(fd int) (err error) {
  894. _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
  895. if e1 != 0 {
  896. err = errnoErr(e1)
  897. }
  898. return
  899. }
  900. func libc_fsync_trampoline()
  901. //go:linkname libc_fsync libc_fsync
  902. //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
  903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  904. func Ftruncate(fd int, length int64) (err error) {
  905. _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), uintptr(length>>32))
  906. if e1 != 0 {
  907. err = errnoErr(e1)
  908. }
  909. return
  910. }
  911. func libc_ftruncate_trampoline()
  912. //go:linkname libc_ftruncate libc_ftruncate
  913. //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
  914. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  915. func Getdtablesize() (size int) {
  916. r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
  917. size = int(r0)
  918. return
  919. }
  920. func libc_getdtablesize_trampoline()
  921. //go:linkname libc_getdtablesize libc_getdtablesize
  922. //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
  923. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  924. func Getegid() (egid int) {
  925. r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
  926. egid = int(r0)
  927. return
  928. }
  929. func libc_getegid_trampoline()
  930. //go:linkname libc_getegid libc_getegid
  931. //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
  932. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  933. func Geteuid() (uid int) {
  934. r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
  935. uid = int(r0)
  936. return
  937. }
  938. func libc_geteuid_trampoline()
  939. //go:linkname libc_geteuid libc_geteuid
  940. //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
  941. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  942. func Getgid() (gid int) {
  943. r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
  944. gid = int(r0)
  945. return
  946. }
  947. func libc_getgid_trampoline()
  948. //go:linkname libc_getgid libc_getgid
  949. //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
  950. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  951. func Getpgid(pid int) (pgid int, err error) {
  952. r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
  953. pgid = int(r0)
  954. if e1 != 0 {
  955. err = errnoErr(e1)
  956. }
  957. return
  958. }
  959. func libc_getpgid_trampoline()
  960. //go:linkname libc_getpgid libc_getpgid
  961. //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
  962. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  963. func Getpgrp() (pgrp int) {
  964. r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
  965. pgrp = int(r0)
  966. return
  967. }
  968. func libc_getpgrp_trampoline()
  969. //go:linkname libc_getpgrp libc_getpgrp
  970. //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
  971. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  972. func Getpid() (pid int) {
  973. r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
  974. pid = int(r0)
  975. return
  976. }
  977. func libc_getpid_trampoline()
  978. //go:linkname libc_getpid libc_getpid
  979. //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
  980. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  981. func Getppid() (ppid int) {
  982. r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
  983. ppid = int(r0)
  984. return
  985. }
  986. func libc_getppid_trampoline()
  987. //go:linkname libc_getppid libc_getppid
  988. //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
  989. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  990. func Getpriority(which int, who int) (prio int, err error) {
  991. r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
  992. prio = int(r0)
  993. if e1 != 0 {
  994. err = errnoErr(e1)
  995. }
  996. return
  997. }
  998. func libc_getpriority_trampoline()
  999. //go:linkname libc_getpriority libc_getpriority
  1000. //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
  1001. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1002. func Getrlimit(which int, lim *Rlimit) (err error) {
  1003. _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1004. if e1 != 0 {
  1005. err = errnoErr(e1)
  1006. }
  1007. return
  1008. }
  1009. func libc_getrlimit_trampoline()
  1010. //go:linkname libc_getrlimit libc_getrlimit
  1011. //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
  1012. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1013. func Getrusage(who int, rusage *Rusage) (err error) {
  1014. _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  1015. if e1 != 0 {
  1016. err = errnoErr(e1)
  1017. }
  1018. return
  1019. }
  1020. func libc_getrusage_trampoline()
  1021. //go:linkname libc_getrusage libc_getrusage
  1022. //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
  1023. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1024. func Getsid(pid int) (sid int, err error) {
  1025. r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
  1026. sid = int(r0)
  1027. if e1 != 0 {
  1028. err = errnoErr(e1)
  1029. }
  1030. return
  1031. }
  1032. func libc_getsid_trampoline()
  1033. //go:linkname libc_getsid libc_getsid
  1034. //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
  1035. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1036. func Getuid() (uid int) {
  1037. r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
  1038. uid = int(r0)
  1039. return
  1040. }
  1041. func libc_getuid_trampoline()
  1042. //go:linkname libc_getuid libc_getuid
  1043. //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
  1044. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1045. func Issetugid() (tainted bool) {
  1046. r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
  1047. tainted = bool(r0 != 0)
  1048. return
  1049. }
  1050. func libc_issetugid_trampoline()
  1051. //go:linkname libc_issetugid libc_issetugid
  1052. //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
  1053. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1054. func Kqueue() (fd int, err error) {
  1055. r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
  1056. fd = int(r0)
  1057. if e1 != 0 {
  1058. err = errnoErr(e1)
  1059. }
  1060. return
  1061. }
  1062. func libc_kqueue_trampoline()
  1063. //go:linkname libc_kqueue libc_kqueue
  1064. //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
  1065. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1066. func Lchown(path string, uid int, gid int) (err error) {
  1067. var _p0 *byte
  1068. _p0, err = BytePtrFromString(path)
  1069. if err != nil {
  1070. return
  1071. }
  1072. _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1073. if e1 != 0 {
  1074. err = errnoErr(e1)
  1075. }
  1076. return
  1077. }
  1078. func libc_lchown_trampoline()
  1079. //go:linkname libc_lchown libc_lchown
  1080. //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
  1081. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1082. func Link(path string, link string) (err error) {
  1083. var _p0 *byte
  1084. _p0, err = BytePtrFromString(path)
  1085. if err != nil {
  1086. return
  1087. }
  1088. var _p1 *byte
  1089. _p1, err = BytePtrFromString(link)
  1090. if err != nil {
  1091. return
  1092. }
  1093. _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1094. if e1 != 0 {
  1095. err = errnoErr(e1)
  1096. }
  1097. return
  1098. }
  1099. func libc_link_trampoline()
  1100. //go:linkname libc_link libc_link
  1101. //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
  1102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1103. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  1104. var _p0 *byte
  1105. _p0, err = BytePtrFromString(path)
  1106. if err != nil {
  1107. return
  1108. }
  1109. var _p1 *byte
  1110. _p1, err = BytePtrFromString(link)
  1111. if err != nil {
  1112. return
  1113. }
  1114. _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1115. if e1 != 0 {
  1116. err = errnoErr(e1)
  1117. }
  1118. return
  1119. }
  1120. func libc_linkat_trampoline()
  1121. //go:linkname libc_linkat libc_linkat
  1122. //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
  1123. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1124. func Listen(s int, backlog int) (err error) {
  1125. _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
  1126. if e1 != 0 {
  1127. err = errnoErr(e1)
  1128. }
  1129. return
  1130. }
  1131. func libc_listen_trampoline()
  1132. //go:linkname libc_listen libc_listen
  1133. //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
  1134. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1135. func Mkdir(path string, mode uint32) (err error) {
  1136. var _p0 *byte
  1137. _p0, err = BytePtrFromString(path)
  1138. if err != nil {
  1139. return
  1140. }
  1141. _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1142. if e1 != 0 {
  1143. err = errnoErr(e1)
  1144. }
  1145. return
  1146. }
  1147. func libc_mkdir_trampoline()
  1148. //go:linkname libc_mkdir libc_mkdir
  1149. //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
  1150. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1151. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1152. var _p0 *byte
  1153. _p0, err = BytePtrFromString(path)
  1154. if err != nil {
  1155. return
  1156. }
  1157. _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1158. if e1 != 0 {
  1159. err = errnoErr(e1)
  1160. }
  1161. return
  1162. }
  1163. func libc_mkdirat_trampoline()
  1164. //go:linkname libc_mkdirat libc_mkdirat
  1165. //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
  1166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167. func Mkfifo(path string, mode uint32) (err error) {
  1168. var _p0 *byte
  1169. _p0, err = BytePtrFromString(path)
  1170. if err != nil {
  1171. return
  1172. }
  1173. _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1174. if e1 != 0 {
  1175. err = errnoErr(e1)
  1176. }
  1177. return
  1178. }
  1179. func libc_mkfifo_trampoline()
  1180. //go:linkname libc_mkfifo libc_mkfifo
  1181. //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
  1182. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1183. func Mknod(path string, mode uint32, dev int) (err error) {
  1184. var _p0 *byte
  1185. _p0, err = BytePtrFromString(path)
  1186. if err != nil {
  1187. return
  1188. }
  1189. _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1190. if e1 != 0 {
  1191. err = errnoErr(e1)
  1192. }
  1193. return
  1194. }
  1195. func libc_mknod_trampoline()
  1196. //go:linkname libc_mknod libc_mknod
  1197. //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
  1198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1199. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1200. var _p0 *byte
  1201. _p0, err = BytePtrFromString(path)
  1202. if err != nil {
  1203. return
  1204. }
  1205. r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1206. fd = int(r0)
  1207. if e1 != 0 {
  1208. err = errnoErr(e1)
  1209. }
  1210. return
  1211. }
  1212. func libc_open_trampoline()
  1213. //go:linkname libc_open libc_open
  1214. //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
  1215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1216. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  1217. var _p0 *byte
  1218. _p0, err = BytePtrFromString(path)
  1219. if err != nil {
  1220. return
  1221. }
  1222. r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1223. fd = int(r0)
  1224. if e1 != 0 {
  1225. err = errnoErr(e1)
  1226. }
  1227. return
  1228. }
  1229. func libc_openat_trampoline()
  1230. //go:linkname libc_openat libc_openat
  1231. //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
  1232. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1233. func Pathconf(path string, name int) (val int, err error) {
  1234. var _p0 *byte
  1235. _p0, err = BytePtrFromString(path)
  1236. if err != nil {
  1237. return
  1238. }
  1239. r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1240. val = int(r0)
  1241. if e1 != 0 {
  1242. err = errnoErr(e1)
  1243. }
  1244. return
  1245. }
  1246. func libc_pathconf_trampoline()
  1247. //go:linkname libc_pathconf libc_pathconf
  1248. //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
  1249. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1250. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1251. var _p0 unsafe.Pointer
  1252. if len(p) > 0 {
  1253. _p0 = unsafe.Pointer(&p[0])
  1254. } else {
  1255. _p0 = unsafe.Pointer(&_zero)
  1256. }
  1257. r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1258. n = int(r0)
  1259. if e1 != 0 {
  1260. err = errnoErr(e1)
  1261. }
  1262. return
  1263. }
  1264. func libc_pread_trampoline()
  1265. //go:linkname libc_pread libc_pread
  1266. //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
  1267. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1268. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1269. var _p0 unsafe.Pointer
  1270. if len(p) > 0 {
  1271. _p0 = unsafe.Pointer(&p[0])
  1272. } else {
  1273. _p0 = unsafe.Pointer(&_zero)
  1274. }
  1275. r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  1276. n = int(r0)
  1277. if e1 != 0 {
  1278. err = errnoErr(e1)
  1279. }
  1280. return
  1281. }
  1282. func libc_pwrite_trampoline()
  1283. //go:linkname libc_pwrite libc_pwrite
  1284. //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
  1285. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1286. func read(fd int, p []byte) (n int, err error) {
  1287. var _p0 unsafe.Pointer
  1288. if len(p) > 0 {
  1289. _p0 = unsafe.Pointer(&p[0])
  1290. } else {
  1291. _p0 = unsafe.Pointer(&_zero)
  1292. }
  1293. r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1294. n = int(r0)
  1295. if e1 != 0 {
  1296. err = errnoErr(e1)
  1297. }
  1298. return
  1299. }
  1300. func libc_read_trampoline()
  1301. //go:linkname libc_read libc_read
  1302. //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
  1303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1304. func Readlink(path string, buf []byte) (n int, err error) {
  1305. var _p0 *byte
  1306. _p0, err = BytePtrFromString(path)
  1307. if err != nil {
  1308. return
  1309. }
  1310. var _p1 unsafe.Pointer
  1311. if len(buf) > 0 {
  1312. _p1 = unsafe.Pointer(&buf[0])
  1313. } else {
  1314. _p1 = unsafe.Pointer(&_zero)
  1315. }
  1316. r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1317. n = int(r0)
  1318. if e1 != 0 {
  1319. err = errnoErr(e1)
  1320. }
  1321. return
  1322. }
  1323. func libc_readlink_trampoline()
  1324. //go:linkname libc_readlink libc_readlink
  1325. //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
  1326. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1327. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1328. var _p0 *byte
  1329. _p0, err = BytePtrFromString(path)
  1330. if err != nil {
  1331. return
  1332. }
  1333. var _p1 unsafe.Pointer
  1334. if len(buf) > 0 {
  1335. _p1 = unsafe.Pointer(&buf[0])
  1336. } else {
  1337. _p1 = unsafe.Pointer(&_zero)
  1338. }
  1339. r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1340. n = int(r0)
  1341. if e1 != 0 {
  1342. err = errnoErr(e1)
  1343. }
  1344. return
  1345. }
  1346. func libc_readlinkat_trampoline()
  1347. //go:linkname libc_readlinkat libc_readlinkat
  1348. //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func Rename(from string, to string) (err error) {
  1351. var _p0 *byte
  1352. _p0, err = BytePtrFromString(from)
  1353. if err != nil {
  1354. return
  1355. }
  1356. var _p1 *byte
  1357. _p1, err = BytePtrFromString(to)
  1358. if err != nil {
  1359. return
  1360. }
  1361. _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. func libc_rename_trampoline()
  1368. //go:linkname libc_rename libc_rename
  1369. //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
  1370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1371. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1372. var _p0 *byte
  1373. _p0, err = BytePtrFromString(from)
  1374. if err != nil {
  1375. return
  1376. }
  1377. var _p1 *byte
  1378. _p1, err = BytePtrFromString(to)
  1379. if err != nil {
  1380. return
  1381. }
  1382. _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1383. if e1 != 0 {
  1384. err = errnoErr(e1)
  1385. }
  1386. return
  1387. }
  1388. func libc_renameat_trampoline()
  1389. //go:linkname libc_renameat libc_renameat
  1390. //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
  1391. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1392. func Revoke(path string) (err error) {
  1393. var _p0 *byte
  1394. _p0, err = BytePtrFromString(path)
  1395. if err != nil {
  1396. return
  1397. }
  1398. _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1399. if e1 != 0 {
  1400. err = errnoErr(e1)
  1401. }
  1402. return
  1403. }
  1404. func libc_revoke_trampoline()
  1405. //go:linkname libc_revoke libc_revoke
  1406. //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
  1407. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1408. func Rmdir(path string) (err error) {
  1409. var _p0 *byte
  1410. _p0, err = BytePtrFromString(path)
  1411. if err != nil {
  1412. return
  1413. }
  1414. _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. func libc_rmdir_trampoline()
  1421. //go:linkname libc_rmdir libc_rmdir
  1422. //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
  1423. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1424. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1425. r0, r1, e1 := syscall_syscall6(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
  1426. newoffset = int64(int64(r1)<<32 | int64(r0))
  1427. if e1 != 0 {
  1428. err = errnoErr(e1)
  1429. }
  1430. return
  1431. }
  1432. func libc_lseek_trampoline()
  1433. //go:linkname libc_lseek libc_lseek
  1434. //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
  1435. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1436. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1437. r0, _, e1 := syscall_syscall6(funcPC(libc_select_trampoline), uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1438. n = int(r0)
  1439. if e1 != 0 {
  1440. err = errnoErr(e1)
  1441. }
  1442. return
  1443. }
  1444. func libc_select_trampoline()
  1445. //go:linkname libc_select libc_select
  1446. //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
  1447. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1448. func Setegid(egid int) (err error) {
  1449. _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
  1450. if e1 != 0 {
  1451. err = errnoErr(e1)
  1452. }
  1453. return
  1454. }
  1455. func libc_setegid_trampoline()
  1456. //go:linkname libc_setegid libc_setegid
  1457. //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
  1458. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1459. func Seteuid(euid int) (err error) {
  1460. _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
  1461. if e1 != 0 {
  1462. err = errnoErr(e1)
  1463. }
  1464. return
  1465. }
  1466. func libc_seteuid_trampoline()
  1467. //go:linkname libc_seteuid libc_seteuid
  1468. //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
  1469. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1470. func Setgid(gid int) (err error) {
  1471. _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
  1472. if e1 != 0 {
  1473. err = errnoErr(e1)
  1474. }
  1475. return
  1476. }
  1477. func libc_setgid_trampoline()
  1478. //go:linkname libc_setgid libc_setgid
  1479. //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
  1480. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1481. func Setlogin(name string) (err error) {
  1482. var _p0 *byte
  1483. _p0, err = BytePtrFromString(name)
  1484. if err != nil {
  1485. return
  1486. }
  1487. _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1488. if e1 != 0 {
  1489. err = errnoErr(e1)
  1490. }
  1491. return
  1492. }
  1493. func libc_setlogin_trampoline()
  1494. //go:linkname libc_setlogin libc_setlogin
  1495. //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func Setpgid(pid int, pgid int) (err error) {
  1498. _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
  1499. if e1 != 0 {
  1500. err = errnoErr(e1)
  1501. }
  1502. return
  1503. }
  1504. func libc_setpgid_trampoline()
  1505. //go:linkname libc_setpgid libc_setpgid
  1506. //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
  1507. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1508. func Setpriority(which int, who int, prio int) (err error) {
  1509. _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
  1510. if e1 != 0 {
  1511. err = errnoErr(e1)
  1512. }
  1513. return
  1514. }
  1515. func libc_setpriority_trampoline()
  1516. //go:linkname libc_setpriority libc_setpriority
  1517. //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
  1518. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1519. func Setprivexec(flag int) (err error) {
  1520. _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
  1521. if e1 != 0 {
  1522. err = errnoErr(e1)
  1523. }
  1524. return
  1525. }
  1526. func libc_setprivexec_trampoline()
  1527. //go:linkname libc_setprivexec libc_setprivexec
  1528. //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
  1529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1530. func Setregid(rgid int, egid int) (err error) {
  1531. _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
  1532. if e1 != 0 {
  1533. err = errnoErr(e1)
  1534. }
  1535. return
  1536. }
  1537. func libc_setregid_trampoline()
  1538. //go:linkname libc_setregid libc_setregid
  1539. //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
  1540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1541. func Setreuid(ruid int, euid int) (err error) {
  1542. _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
  1543. if e1 != 0 {
  1544. err = errnoErr(e1)
  1545. }
  1546. return
  1547. }
  1548. func libc_setreuid_trampoline()
  1549. //go:linkname libc_setreuid libc_setreuid
  1550. //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
  1551. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1552. func Setrlimit(which int, lim *Rlimit) (err error) {
  1553. _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1554. if e1 != 0 {
  1555. err = errnoErr(e1)
  1556. }
  1557. return
  1558. }
  1559. func libc_setrlimit_trampoline()
  1560. //go:linkname libc_setrlimit libc_setrlimit
  1561. //go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
  1562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1563. func Setsid() (pid int, err error) {
  1564. r0, _, e1 := syscall_rawSyscall(funcPC(libc_setsid_trampoline), 0, 0, 0)
  1565. pid = int(r0)
  1566. if e1 != 0 {
  1567. err = errnoErr(e1)
  1568. }
  1569. return
  1570. }
  1571. func libc_setsid_trampoline()
  1572. //go:linkname libc_setsid libc_setsid
  1573. //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
  1574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1575. func Settimeofday(tp *Timeval) (err error) {
  1576. _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
  1577. if e1 != 0 {
  1578. err = errnoErr(e1)
  1579. }
  1580. return
  1581. }
  1582. func libc_settimeofday_trampoline()
  1583. //go:linkname libc_settimeofday libc_settimeofday
  1584. //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
  1585. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1586. func Setuid(uid int) (err error) {
  1587. _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
  1588. if e1 != 0 {
  1589. err = errnoErr(e1)
  1590. }
  1591. return
  1592. }
  1593. func libc_setuid_trampoline()
  1594. //go:linkname libc_setuid libc_setuid
  1595. //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
  1596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1597. func Symlink(path string, link string) (err error) {
  1598. var _p0 *byte
  1599. _p0, err = BytePtrFromString(path)
  1600. if err != nil {
  1601. return
  1602. }
  1603. var _p1 *byte
  1604. _p1, err = BytePtrFromString(link)
  1605. if err != nil {
  1606. return
  1607. }
  1608. _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1609. if e1 != 0 {
  1610. err = errnoErr(e1)
  1611. }
  1612. return
  1613. }
  1614. func libc_symlink_trampoline()
  1615. //go:linkname libc_symlink libc_symlink
  1616. //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
  1617. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1618. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1619. var _p0 *byte
  1620. _p0, err = BytePtrFromString(oldpath)
  1621. if err != nil {
  1622. return
  1623. }
  1624. var _p1 *byte
  1625. _p1, err = BytePtrFromString(newpath)
  1626. if err != nil {
  1627. return
  1628. }
  1629. _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1630. if e1 != 0 {
  1631. err = errnoErr(e1)
  1632. }
  1633. return
  1634. }
  1635. func libc_symlinkat_trampoline()
  1636. //go:linkname libc_symlinkat libc_symlinkat
  1637. //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
  1638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1639. func Sync() (err error) {
  1640. _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
  1641. if e1 != 0 {
  1642. err = errnoErr(e1)
  1643. }
  1644. return
  1645. }
  1646. func libc_sync_trampoline()
  1647. //go:linkname libc_sync libc_sync
  1648. //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
  1649. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1650. func Truncate(path string, length int64) (err error) {
  1651. var _p0 *byte
  1652. _p0, err = BytePtrFromString(path)
  1653. if err != nil {
  1654. return
  1655. }
  1656. _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1657. if e1 != 0 {
  1658. err = errnoErr(e1)
  1659. }
  1660. return
  1661. }
  1662. func libc_truncate_trampoline()
  1663. //go:linkname libc_truncate libc_truncate
  1664. //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
  1665. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1666. func Umask(newmask int) (oldmask int) {
  1667. r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
  1668. oldmask = int(r0)
  1669. return
  1670. }
  1671. func libc_umask_trampoline()
  1672. //go:linkname libc_umask libc_umask
  1673. //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
  1674. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1675. func Undelete(path string) (err error) {
  1676. var _p0 *byte
  1677. _p0, err = BytePtrFromString(path)
  1678. if err != nil {
  1679. return
  1680. }
  1681. _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1682. if e1 != 0 {
  1683. err = errnoErr(e1)
  1684. }
  1685. return
  1686. }
  1687. func libc_undelete_trampoline()
  1688. //go:linkname libc_undelete libc_undelete
  1689. //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
  1690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1691. func Unlink(path string) (err error) {
  1692. var _p0 *byte
  1693. _p0, err = BytePtrFromString(path)
  1694. if err != nil {
  1695. return
  1696. }
  1697. _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1698. if e1 != 0 {
  1699. err = errnoErr(e1)
  1700. }
  1701. return
  1702. }
  1703. func libc_unlink_trampoline()
  1704. //go:linkname libc_unlink libc_unlink
  1705. //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
  1706. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1707. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1708. var _p0 *byte
  1709. _p0, err = BytePtrFromString(path)
  1710. if err != nil {
  1711. return
  1712. }
  1713. _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1714. if e1 != 0 {
  1715. err = errnoErr(e1)
  1716. }
  1717. return
  1718. }
  1719. func libc_unlinkat_trampoline()
  1720. //go:linkname libc_unlinkat libc_unlinkat
  1721. //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
  1722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1723. func Unmount(path string, flags int) (err error) {
  1724. var _p0 *byte
  1725. _p0, err = BytePtrFromString(path)
  1726. if err != nil {
  1727. return
  1728. }
  1729. _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1730. if e1 != 0 {
  1731. err = errnoErr(e1)
  1732. }
  1733. return
  1734. }
  1735. func libc_unmount_trampoline()
  1736. //go:linkname libc_unmount libc_unmount
  1737. //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
  1738. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1739. func write(fd int, p []byte) (n int, err error) {
  1740. var _p0 unsafe.Pointer
  1741. if len(p) > 0 {
  1742. _p0 = unsafe.Pointer(&p[0])
  1743. } else {
  1744. _p0 = unsafe.Pointer(&_zero)
  1745. }
  1746. r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1747. n = int(r0)
  1748. if e1 != 0 {
  1749. err = errnoErr(e1)
  1750. }
  1751. return
  1752. }
  1753. func libc_write_trampoline()
  1754. //go:linkname libc_write libc_write
  1755. //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
  1756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1757. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1758. r0, _, e1 := syscall_syscall9(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
  1759. ret = uintptr(r0)
  1760. if e1 != 0 {
  1761. err = errnoErr(e1)
  1762. }
  1763. return
  1764. }
  1765. func libc_mmap_trampoline()
  1766. //go:linkname libc_mmap libc_mmap
  1767. //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
  1768. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1769. func munmap(addr uintptr, length uintptr) (err error) {
  1770. _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
  1771. if e1 != 0 {
  1772. err = errnoErr(e1)
  1773. }
  1774. return
  1775. }
  1776. func libc_munmap_trampoline()
  1777. //go:linkname libc_munmap libc_munmap
  1778. //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
  1779. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1780. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1781. r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1782. n = int(r0)
  1783. if e1 != 0 {
  1784. err = errnoErr(e1)
  1785. }
  1786. return
  1787. }
  1788. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1789. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1790. r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1791. n = int(r0)
  1792. if e1 != 0 {
  1793. err = errnoErr(e1)
  1794. }
  1795. return
  1796. }
  1797. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1798. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  1799. var _p0 unsafe.Pointer
  1800. if len(mib) > 0 {
  1801. _p0 = unsafe.Pointer(&mib[0])
  1802. } else {
  1803. _p0 = unsafe.Pointer(&_zero)
  1804. }
  1805. _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  1806. if e1 != 0 {
  1807. err = errnoErr(e1)
  1808. }
  1809. return
  1810. }
  1811. func libc___sysctl_trampoline()
  1812. //go:linkname libc___sysctl libc___sysctl
  1813. //go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
  1814. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1815. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  1816. _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  1817. if e1 != 0 {
  1818. err = errnoErr(e1)
  1819. }
  1820. return
  1821. }
  1822. func libc_ptrace_trampoline()
  1823. //go:linkname libc_ptrace libc_ptrace
  1824. //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
  1825. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1826. func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
  1827. r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
  1828. sec = int32(r0)
  1829. usec = int32(r1)
  1830. if e1 != 0 {
  1831. err = errnoErr(e1)
  1832. }
  1833. return
  1834. }
  1835. func libc_gettimeofday_trampoline()
  1836. //go:linkname libc_gettimeofday libc_gettimeofday
  1837. //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
  1838. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1839. func Fstat(fd int, stat *Stat_t) (err error) {
  1840. _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1841. if e1 != 0 {
  1842. err = errnoErr(e1)
  1843. }
  1844. return
  1845. }
  1846. func libc_fstat64_trampoline()
  1847. //go:linkname libc_fstat64 libc_fstat64
  1848. //go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
  1849. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1850. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  1851. var _p0 *byte
  1852. _p0, err = BytePtrFromString(path)
  1853. if err != nil {
  1854. return
  1855. }
  1856. _, _, e1 := syscall_syscall6(funcPC(libc_fstatat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1857. if e1 != 0 {
  1858. err = errnoErr(e1)
  1859. }
  1860. return
  1861. }
  1862. func libc_fstatat64_trampoline()
  1863. //go:linkname libc_fstatat64 libc_fstatat64
  1864. //go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
  1865. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1866. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  1867. _, _, e1 := syscall_syscall(funcPC(libc_fstatfs64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1868. if e1 != 0 {
  1869. err = errnoErr(e1)
  1870. }
  1871. return
  1872. }
  1873. func libc_fstatfs64_trampoline()
  1874. //go:linkname libc_fstatfs64 libc_fstatfs64
  1875. //go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
  1876. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1877. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  1878. var _p0 unsafe.Pointer
  1879. if len(buf) > 0 {
  1880. _p0 = unsafe.Pointer(&buf[0])
  1881. } else {
  1882. _p0 = unsafe.Pointer(&_zero)
  1883. }
  1884. r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  1885. n = int(r0)
  1886. if e1 != 0 {
  1887. err = errnoErr(e1)
  1888. }
  1889. return
  1890. }
  1891. func libc___getdirentries64_trampoline()
  1892. //go:linkname libc___getdirentries64 libc___getdirentries64
  1893. //go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
  1894. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1895. func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
  1896. r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
  1897. n = int(r0)
  1898. if e1 != 0 {
  1899. err = errnoErr(e1)
  1900. }
  1901. return
  1902. }
  1903. func libc_getfsstat64_trampoline()
  1904. //go:linkname libc_getfsstat64 libc_getfsstat64
  1905. //go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
  1906. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1907. func Lstat(path string, stat *Stat_t) (err error) {
  1908. var _p0 *byte
  1909. _p0, err = BytePtrFromString(path)
  1910. if err != nil {
  1911. return
  1912. }
  1913. _, _, e1 := syscall_syscall(funcPC(libc_lstat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1914. if e1 != 0 {
  1915. err = errnoErr(e1)
  1916. }
  1917. return
  1918. }
  1919. func libc_lstat64_trampoline()
  1920. //go:linkname libc_lstat64 libc_lstat64
  1921. //go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
  1922. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1923. func Stat(path string, stat *Stat_t) (err error) {
  1924. var _p0 *byte
  1925. _p0, err = BytePtrFromString(path)
  1926. if err != nil {
  1927. return
  1928. }
  1929. _, _, e1 := syscall_syscall(funcPC(libc_stat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1930. if e1 != 0 {
  1931. err = errnoErr(e1)
  1932. }
  1933. return
  1934. }
  1935. func libc_stat64_trampoline()
  1936. //go:linkname libc_stat64 libc_stat64
  1937. //go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
  1938. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1939. func Statfs(path string, stat *Statfs_t) (err error) {
  1940. var _p0 *byte
  1941. _p0, err = BytePtrFromString(path)
  1942. if err != nil {
  1943. return
  1944. }
  1945. _, _, e1 := syscall_syscall(funcPC(libc_statfs64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1946. if e1 != 0 {
  1947. err = errnoErr(e1)
  1948. }
  1949. return
  1950. }
  1951. func libc_statfs64_trampoline()
  1952. //go:linkname libc_statfs64 libc_statfs64
  1953. //go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"