zsyscall_darwin_amd64.go 67 KB

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