zsyscall_darwin_amd64.go 65 KB

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