zsyscall_darwin_amd64.go 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499
  1. // go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build darwin,amd64,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_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
  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), 0)
  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), 0, 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), 0, 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, _, e1 := syscall_syscall(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
  1426. newoffset = 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), 0)
  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_syscall6(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  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 int64, usec int32, err error) {
  1827. r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
  1828. sec = int64(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 getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
  1878. r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
  1879. n = int(r0)
  1880. if e1 != 0 {
  1881. err = errnoErr(e1)
  1882. }
  1883. return
  1884. }
  1885. func libc_getfsstat64_trampoline()
  1886. //go:linkname libc_getfsstat64 libc_getfsstat64
  1887. //go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
  1888. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1889. func Lstat(path string, stat *Stat_t) (err error) {
  1890. var _p0 *byte
  1891. _p0, err = BytePtrFromString(path)
  1892. if err != nil {
  1893. return
  1894. }
  1895. _, _, e1 := syscall_syscall(funcPC(libc_lstat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1896. if e1 != 0 {
  1897. err = errnoErr(e1)
  1898. }
  1899. return
  1900. }
  1901. func libc_lstat64_trampoline()
  1902. //go:linkname libc_lstat64 libc_lstat64
  1903. //go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
  1904. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1905. func Stat(path string, stat *Stat_t) (err error) {
  1906. var _p0 *byte
  1907. _p0, err = BytePtrFromString(path)
  1908. if err != nil {
  1909. return
  1910. }
  1911. _, _, e1 := syscall_syscall(funcPC(libc_stat64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1912. if e1 != 0 {
  1913. err = errnoErr(e1)
  1914. }
  1915. return
  1916. }
  1917. func libc_stat64_trampoline()
  1918. //go:linkname libc_stat64 libc_stat64
  1919. //go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
  1920. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1921. func Statfs(path string, stat *Statfs_t) (err error) {
  1922. var _p0 *byte
  1923. _p0, err = BytePtrFromString(path)
  1924. if err != nil {
  1925. return
  1926. }
  1927. _, _, e1 := syscall_syscall(funcPC(libc_statfs64_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1928. if e1 != 0 {
  1929. err = errnoErr(e1)
  1930. }
  1931. return
  1932. }
  1933. func libc_statfs64_trampoline()
  1934. //go:linkname libc_statfs64 libc_statfs64
  1935. //go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"