zsyscall_darwin_arm64.go 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483
  1. // go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build darwin,arm64,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 Close(fd int) (err error) {
  733. _, _, e1 := syscall_syscall(funcPC(libc_close_trampoline), uintptr(fd), 0, 0)
  734. if e1 != 0 {
  735. err = errnoErr(e1)
  736. }
  737. return
  738. }
  739. func libc_close_trampoline()
  740. //go:linkname libc_close libc_close
  741. //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
  742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  743. func Dup(fd int) (nfd int, err error) {
  744. r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
  745. nfd = int(r0)
  746. if e1 != 0 {
  747. err = errnoErr(e1)
  748. }
  749. return
  750. }
  751. func libc_dup_trampoline()
  752. //go:linkname libc_dup libc_dup
  753. //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
  754. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  755. func Dup2(from int, to int) (err error) {
  756. _, _, e1 := syscall_syscall(funcPC(libc_dup2_trampoline), uintptr(from), uintptr(to), 0)
  757. if e1 != 0 {
  758. err = errnoErr(e1)
  759. }
  760. return
  761. }
  762. func libc_dup2_trampoline()
  763. //go:linkname libc_dup2 libc_dup2
  764. //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
  765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  766. func Exchangedata(path1 string, path2 string, options int) (err error) {
  767. var _p0 *byte
  768. _p0, err = BytePtrFromString(path1)
  769. if err != nil {
  770. return
  771. }
  772. var _p1 *byte
  773. _p1, err = BytePtrFromString(path2)
  774. if err != nil {
  775. return
  776. }
  777. _, _, e1 := syscall_syscall(funcPC(libc_exchangedata_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  778. if e1 != 0 {
  779. err = errnoErr(e1)
  780. }
  781. return
  782. }
  783. func libc_exchangedata_trampoline()
  784. //go:linkname libc_exchangedata libc_exchangedata
  785. //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
  786. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  787. func Exit(code int) {
  788. syscall_syscall(funcPC(libc_exit_trampoline), uintptr(code), 0, 0)
  789. return
  790. }
  791. func libc_exit_trampoline()
  792. //go:linkname libc_exit libc_exit
  793. //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
  794. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  795. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  796. var _p0 *byte
  797. _p0, err = BytePtrFromString(path)
  798. if err != nil {
  799. return
  800. }
  801. _, _, e1 := syscall_syscall6(funcPC(libc_faccessat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  802. if e1 != 0 {
  803. err = errnoErr(e1)
  804. }
  805. return
  806. }
  807. func libc_faccessat_trampoline()
  808. //go:linkname libc_faccessat libc_faccessat
  809. //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
  810. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  811. func Fchdir(fd int) (err error) {
  812. _, _, e1 := syscall_syscall(funcPC(libc_fchdir_trampoline), uintptr(fd), 0, 0)
  813. if e1 != 0 {
  814. err = errnoErr(e1)
  815. }
  816. return
  817. }
  818. func libc_fchdir_trampoline()
  819. //go:linkname libc_fchdir libc_fchdir
  820. //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
  821. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  822. func Fchflags(fd int, flags int) (err error) {
  823. _, _, e1 := syscall_syscall(funcPC(libc_fchflags_trampoline), uintptr(fd), uintptr(flags), 0)
  824. if e1 != 0 {
  825. err = errnoErr(e1)
  826. }
  827. return
  828. }
  829. func libc_fchflags_trampoline()
  830. //go:linkname libc_fchflags libc_fchflags
  831. //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
  832. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  833. func Fchmod(fd int, mode uint32) (err error) {
  834. _, _, e1 := syscall_syscall(funcPC(libc_fchmod_trampoline), uintptr(fd), uintptr(mode), 0)
  835. if e1 != 0 {
  836. err = errnoErr(e1)
  837. }
  838. return
  839. }
  840. func libc_fchmod_trampoline()
  841. //go:linkname libc_fchmod libc_fchmod
  842. //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
  843. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  844. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  845. var _p0 *byte
  846. _p0, err = BytePtrFromString(path)
  847. if err != nil {
  848. return
  849. }
  850. _, _, e1 := syscall_syscall6(funcPC(libc_fchmodat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  851. if e1 != 0 {
  852. err = errnoErr(e1)
  853. }
  854. return
  855. }
  856. func libc_fchmodat_trampoline()
  857. //go:linkname libc_fchmodat libc_fchmodat
  858. //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
  859. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  860. func Fchown(fd int, uid int, gid int) (err error) {
  861. _, _, e1 := syscall_syscall(funcPC(libc_fchown_trampoline), uintptr(fd), uintptr(uid), uintptr(gid))
  862. if e1 != 0 {
  863. err = errnoErr(e1)
  864. }
  865. return
  866. }
  867. func libc_fchown_trampoline()
  868. //go:linkname libc_fchown libc_fchown
  869. //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
  870. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  871. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  872. var _p0 *byte
  873. _p0, err = BytePtrFromString(path)
  874. if err != nil {
  875. return
  876. }
  877. _, _, e1 := syscall_syscall6(funcPC(libc_fchownat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  878. if e1 != 0 {
  879. err = errnoErr(e1)
  880. }
  881. return
  882. }
  883. func libc_fchownat_trampoline()
  884. //go:linkname libc_fchownat libc_fchownat
  885. //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
  886. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  887. func Flock(fd int, how int) (err error) {
  888. _, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
  889. if e1 != 0 {
  890. err = errnoErr(e1)
  891. }
  892. return
  893. }
  894. func libc_flock_trampoline()
  895. //go:linkname libc_flock libc_flock
  896. //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
  897. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  898. func Fpathconf(fd int, name int) (val int, err error) {
  899. r0, _, e1 := syscall_syscall(funcPC(libc_fpathconf_trampoline), uintptr(fd), uintptr(name), 0)
  900. val = int(r0)
  901. if e1 != 0 {
  902. err = errnoErr(e1)
  903. }
  904. return
  905. }
  906. func libc_fpathconf_trampoline()
  907. //go:linkname libc_fpathconf libc_fpathconf
  908. //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
  909. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  910. func Fsync(fd int) (err error) {
  911. _, _, e1 := syscall_syscall(funcPC(libc_fsync_trampoline), uintptr(fd), 0, 0)
  912. if e1 != 0 {
  913. err = errnoErr(e1)
  914. }
  915. return
  916. }
  917. func libc_fsync_trampoline()
  918. //go:linkname libc_fsync libc_fsync
  919. //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
  920. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  921. func Ftruncate(fd int, length int64) (err error) {
  922. _, _, e1 := syscall_syscall(funcPC(libc_ftruncate_trampoline), uintptr(fd), uintptr(length), 0)
  923. if e1 != 0 {
  924. err = errnoErr(e1)
  925. }
  926. return
  927. }
  928. func libc_ftruncate_trampoline()
  929. //go:linkname libc_ftruncate libc_ftruncate
  930. //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
  931. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  932. func Getdtablesize() (size int) {
  933. r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
  934. size = int(r0)
  935. return
  936. }
  937. func libc_getdtablesize_trampoline()
  938. //go:linkname libc_getdtablesize libc_getdtablesize
  939. //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
  940. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  941. func Getegid() (egid int) {
  942. r0, _, _ := syscall_rawSyscall(funcPC(libc_getegid_trampoline), 0, 0, 0)
  943. egid = int(r0)
  944. return
  945. }
  946. func libc_getegid_trampoline()
  947. //go:linkname libc_getegid libc_getegid
  948. //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
  949. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  950. func Geteuid() (uid int) {
  951. r0, _, _ := syscall_rawSyscall(funcPC(libc_geteuid_trampoline), 0, 0, 0)
  952. uid = int(r0)
  953. return
  954. }
  955. func libc_geteuid_trampoline()
  956. //go:linkname libc_geteuid libc_geteuid
  957. //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
  958. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  959. func Getgid() (gid int) {
  960. r0, _, _ := syscall_rawSyscall(funcPC(libc_getgid_trampoline), 0, 0, 0)
  961. gid = int(r0)
  962. return
  963. }
  964. func libc_getgid_trampoline()
  965. //go:linkname libc_getgid libc_getgid
  966. //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
  967. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  968. func Getpgid(pid int) (pgid int, err error) {
  969. r0, _, e1 := syscall_rawSyscall(funcPC(libc_getpgid_trampoline), uintptr(pid), 0, 0)
  970. pgid = int(r0)
  971. if e1 != 0 {
  972. err = errnoErr(e1)
  973. }
  974. return
  975. }
  976. func libc_getpgid_trampoline()
  977. //go:linkname libc_getpgid libc_getpgid
  978. //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
  979. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  980. func Getpgrp() (pgrp int) {
  981. r0, _, _ := syscall_rawSyscall(funcPC(libc_getpgrp_trampoline), 0, 0, 0)
  982. pgrp = int(r0)
  983. return
  984. }
  985. func libc_getpgrp_trampoline()
  986. //go:linkname libc_getpgrp libc_getpgrp
  987. //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
  988. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  989. func Getpid() (pid int) {
  990. r0, _, _ := syscall_rawSyscall(funcPC(libc_getpid_trampoline), 0, 0, 0)
  991. pid = int(r0)
  992. return
  993. }
  994. func libc_getpid_trampoline()
  995. //go:linkname libc_getpid libc_getpid
  996. //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
  997. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  998. func Getppid() (ppid int) {
  999. r0, _, _ := syscall_rawSyscall(funcPC(libc_getppid_trampoline), 0, 0, 0)
  1000. ppid = int(r0)
  1001. return
  1002. }
  1003. func libc_getppid_trampoline()
  1004. //go:linkname libc_getppid libc_getppid
  1005. //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func Getpriority(which int, who int) (prio int, err error) {
  1008. r0, _, e1 := syscall_syscall(funcPC(libc_getpriority_trampoline), uintptr(which), uintptr(who), 0)
  1009. prio = int(r0)
  1010. if e1 != 0 {
  1011. err = errnoErr(e1)
  1012. }
  1013. return
  1014. }
  1015. func libc_getpriority_trampoline()
  1016. //go:linkname libc_getpriority libc_getpriority
  1017. //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
  1018. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1019. func Getrlimit(which int, lim *Rlimit) (err error) {
  1020. _, _, e1 := syscall_rawSyscall(funcPC(libc_getrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1021. if e1 != 0 {
  1022. err = errnoErr(e1)
  1023. }
  1024. return
  1025. }
  1026. func libc_getrlimit_trampoline()
  1027. //go:linkname libc_getrlimit libc_getrlimit
  1028. //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
  1029. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1030. func Getrusage(who int, rusage *Rusage) (err error) {
  1031. _, _, e1 := syscall_rawSyscall(funcPC(libc_getrusage_trampoline), uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  1032. if e1 != 0 {
  1033. err = errnoErr(e1)
  1034. }
  1035. return
  1036. }
  1037. func libc_getrusage_trampoline()
  1038. //go:linkname libc_getrusage libc_getrusage
  1039. //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
  1040. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1041. func Getsid(pid int) (sid int, err error) {
  1042. r0, _, e1 := syscall_rawSyscall(funcPC(libc_getsid_trampoline), uintptr(pid), 0, 0)
  1043. sid = int(r0)
  1044. if e1 != 0 {
  1045. err = errnoErr(e1)
  1046. }
  1047. return
  1048. }
  1049. func libc_getsid_trampoline()
  1050. //go:linkname libc_getsid libc_getsid
  1051. //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
  1052. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1053. func Getuid() (uid int) {
  1054. r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
  1055. uid = int(r0)
  1056. return
  1057. }
  1058. func libc_getuid_trampoline()
  1059. //go:linkname libc_getuid libc_getuid
  1060. //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
  1061. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1062. func Issetugid() (tainted bool) {
  1063. r0, _, _ := syscall_rawSyscall(funcPC(libc_issetugid_trampoline), 0, 0, 0)
  1064. tainted = bool(r0 != 0)
  1065. return
  1066. }
  1067. func libc_issetugid_trampoline()
  1068. //go:linkname libc_issetugid libc_issetugid
  1069. //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
  1070. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1071. func Kqueue() (fd int, err error) {
  1072. r0, _, e1 := syscall_syscall(funcPC(libc_kqueue_trampoline), 0, 0, 0)
  1073. fd = int(r0)
  1074. if e1 != 0 {
  1075. err = errnoErr(e1)
  1076. }
  1077. return
  1078. }
  1079. func libc_kqueue_trampoline()
  1080. //go:linkname libc_kqueue libc_kqueue
  1081. //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
  1082. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1083. func Lchown(path string, uid int, gid int) (err error) {
  1084. var _p0 *byte
  1085. _p0, err = BytePtrFromString(path)
  1086. if err != nil {
  1087. return
  1088. }
  1089. _, _, e1 := syscall_syscall(funcPC(libc_lchown_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1090. if e1 != 0 {
  1091. err = errnoErr(e1)
  1092. }
  1093. return
  1094. }
  1095. func libc_lchown_trampoline()
  1096. //go:linkname libc_lchown libc_lchown
  1097. //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
  1098. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1099. func Link(path string, link string) (err error) {
  1100. var _p0 *byte
  1101. _p0, err = BytePtrFromString(path)
  1102. if err != nil {
  1103. return
  1104. }
  1105. var _p1 *byte
  1106. _p1, err = BytePtrFromString(link)
  1107. if err != nil {
  1108. return
  1109. }
  1110. _, _, e1 := syscall_syscall(funcPC(libc_link_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1111. if e1 != 0 {
  1112. err = errnoErr(e1)
  1113. }
  1114. return
  1115. }
  1116. func libc_link_trampoline()
  1117. //go:linkname libc_link libc_link
  1118. //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
  1119. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1120. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  1121. var _p0 *byte
  1122. _p0, err = BytePtrFromString(path)
  1123. if err != nil {
  1124. return
  1125. }
  1126. var _p1 *byte
  1127. _p1, err = BytePtrFromString(link)
  1128. if err != nil {
  1129. return
  1130. }
  1131. _, _, e1 := syscall_syscall6(funcPC(libc_linkat_trampoline), uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1132. if e1 != 0 {
  1133. err = errnoErr(e1)
  1134. }
  1135. return
  1136. }
  1137. func libc_linkat_trampoline()
  1138. //go:linkname libc_linkat libc_linkat
  1139. //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
  1140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1141. func Listen(s int, backlog int) (err error) {
  1142. _, _, e1 := syscall_syscall(funcPC(libc_listen_trampoline), uintptr(s), uintptr(backlog), 0)
  1143. if e1 != 0 {
  1144. err = errnoErr(e1)
  1145. }
  1146. return
  1147. }
  1148. func libc_listen_trampoline()
  1149. //go:linkname libc_listen libc_listen
  1150. //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
  1151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1152. func Mkdir(path string, mode uint32) (err error) {
  1153. var _p0 *byte
  1154. _p0, err = BytePtrFromString(path)
  1155. if err != nil {
  1156. return
  1157. }
  1158. _, _, e1 := syscall_syscall(funcPC(libc_mkdir_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1159. if e1 != 0 {
  1160. err = errnoErr(e1)
  1161. }
  1162. return
  1163. }
  1164. func libc_mkdir_trampoline()
  1165. //go:linkname libc_mkdir libc_mkdir
  1166. //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
  1167. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1168. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1169. var _p0 *byte
  1170. _p0, err = BytePtrFromString(path)
  1171. if err != nil {
  1172. return
  1173. }
  1174. _, _, e1 := syscall_syscall(funcPC(libc_mkdirat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1175. if e1 != 0 {
  1176. err = errnoErr(e1)
  1177. }
  1178. return
  1179. }
  1180. func libc_mkdirat_trampoline()
  1181. //go:linkname libc_mkdirat libc_mkdirat
  1182. //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
  1183. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1184. func Mkfifo(path string, mode uint32) (err error) {
  1185. var _p0 *byte
  1186. _p0, err = BytePtrFromString(path)
  1187. if err != nil {
  1188. return
  1189. }
  1190. _, _, e1 := syscall_syscall(funcPC(libc_mkfifo_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1191. if e1 != 0 {
  1192. err = errnoErr(e1)
  1193. }
  1194. return
  1195. }
  1196. func libc_mkfifo_trampoline()
  1197. //go:linkname libc_mkfifo libc_mkfifo
  1198. //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
  1199. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200. func Mknod(path string, mode uint32, dev int) (err error) {
  1201. var _p0 *byte
  1202. _p0, err = BytePtrFromString(path)
  1203. if err != nil {
  1204. return
  1205. }
  1206. _, _, e1 := syscall_syscall(funcPC(libc_mknod_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1207. if e1 != 0 {
  1208. err = errnoErr(e1)
  1209. }
  1210. return
  1211. }
  1212. func libc_mknod_trampoline()
  1213. //go:linkname libc_mknod libc_mknod
  1214. //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
  1215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1216. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1217. var _p0 *byte
  1218. _p0, err = BytePtrFromString(path)
  1219. if err != nil {
  1220. return
  1221. }
  1222. r0, _, e1 := syscall_syscall(funcPC(libc_open_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1223. fd = int(r0)
  1224. if e1 != 0 {
  1225. err = errnoErr(e1)
  1226. }
  1227. return
  1228. }
  1229. func libc_open_trampoline()
  1230. //go:linkname libc_open libc_open
  1231. //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
  1232. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1233. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  1234. var _p0 *byte
  1235. _p0, err = BytePtrFromString(path)
  1236. if err != nil {
  1237. return
  1238. }
  1239. r0, _, e1 := syscall_syscall6(funcPC(libc_openat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1240. fd = int(r0)
  1241. if e1 != 0 {
  1242. err = errnoErr(e1)
  1243. }
  1244. return
  1245. }
  1246. func libc_openat_trampoline()
  1247. //go:linkname libc_openat libc_openat
  1248. //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
  1249. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1250. func Pathconf(path string, name int) (val int, err error) {
  1251. var _p0 *byte
  1252. _p0, err = BytePtrFromString(path)
  1253. if err != nil {
  1254. return
  1255. }
  1256. r0, _, e1 := syscall_syscall(funcPC(libc_pathconf_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1257. val = int(r0)
  1258. if e1 != 0 {
  1259. err = errnoErr(e1)
  1260. }
  1261. return
  1262. }
  1263. func libc_pathconf_trampoline()
  1264. //go:linkname libc_pathconf libc_pathconf
  1265. //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
  1266. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1267. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1268. var _p0 unsafe.Pointer
  1269. if len(p) > 0 {
  1270. _p0 = unsafe.Pointer(&p[0])
  1271. } else {
  1272. _p0 = unsafe.Pointer(&_zero)
  1273. }
  1274. r0, _, e1 := syscall_syscall6(funcPC(libc_pread_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1275. n = int(r0)
  1276. if e1 != 0 {
  1277. err = errnoErr(e1)
  1278. }
  1279. return
  1280. }
  1281. func libc_pread_trampoline()
  1282. //go:linkname libc_pread libc_pread
  1283. //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
  1284. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1285. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1286. var _p0 unsafe.Pointer
  1287. if len(p) > 0 {
  1288. _p0 = unsafe.Pointer(&p[0])
  1289. } else {
  1290. _p0 = unsafe.Pointer(&_zero)
  1291. }
  1292. r0, _, e1 := syscall_syscall6(funcPC(libc_pwrite_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1293. n = int(r0)
  1294. if e1 != 0 {
  1295. err = errnoErr(e1)
  1296. }
  1297. return
  1298. }
  1299. func libc_pwrite_trampoline()
  1300. //go:linkname libc_pwrite libc_pwrite
  1301. //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
  1302. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1303. func read(fd int, p []byte) (n int, err error) {
  1304. var _p0 unsafe.Pointer
  1305. if len(p) > 0 {
  1306. _p0 = unsafe.Pointer(&p[0])
  1307. } else {
  1308. _p0 = unsafe.Pointer(&_zero)
  1309. }
  1310. r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1311. n = int(r0)
  1312. if e1 != 0 {
  1313. err = errnoErr(e1)
  1314. }
  1315. return
  1316. }
  1317. func libc_read_trampoline()
  1318. //go:linkname libc_read libc_read
  1319. //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
  1320. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1321. func Readlink(path string, buf []byte) (n int, err error) {
  1322. var _p0 *byte
  1323. _p0, err = BytePtrFromString(path)
  1324. if err != nil {
  1325. return
  1326. }
  1327. var _p1 unsafe.Pointer
  1328. if len(buf) > 0 {
  1329. _p1 = unsafe.Pointer(&buf[0])
  1330. } else {
  1331. _p1 = unsafe.Pointer(&_zero)
  1332. }
  1333. r0, _, e1 := syscall_syscall(funcPC(libc_readlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1334. n = int(r0)
  1335. if e1 != 0 {
  1336. err = errnoErr(e1)
  1337. }
  1338. return
  1339. }
  1340. func libc_readlink_trampoline()
  1341. //go:linkname libc_readlink libc_readlink
  1342. //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
  1343. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1344. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1345. var _p0 *byte
  1346. _p0, err = BytePtrFromString(path)
  1347. if err != nil {
  1348. return
  1349. }
  1350. var _p1 unsafe.Pointer
  1351. if len(buf) > 0 {
  1352. _p1 = unsafe.Pointer(&buf[0])
  1353. } else {
  1354. _p1 = unsafe.Pointer(&_zero)
  1355. }
  1356. r0, _, e1 := syscall_syscall6(funcPC(libc_readlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1357. n = int(r0)
  1358. if e1 != 0 {
  1359. err = errnoErr(e1)
  1360. }
  1361. return
  1362. }
  1363. func libc_readlinkat_trampoline()
  1364. //go:linkname libc_readlinkat libc_readlinkat
  1365. //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
  1366. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1367. func Rename(from string, to string) (err error) {
  1368. var _p0 *byte
  1369. _p0, err = BytePtrFromString(from)
  1370. if err != nil {
  1371. return
  1372. }
  1373. var _p1 *byte
  1374. _p1, err = BytePtrFromString(to)
  1375. if err != nil {
  1376. return
  1377. }
  1378. _, _, e1 := syscall_syscall(funcPC(libc_rename_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1379. if e1 != 0 {
  1380. err = errnoErr(e1)
  1381. }
  1382. return
  1383. }
  1384. func libc_rename_trampoline()
  1385. //go:linkname libc_rename libc_rename
  1386. //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
  1387. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1388. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1389. var _p0 *byte
  1390. _p0, err = BytePtrFromString(from)
  1391. if err != nil {
  1392. return
  1393. }
  1394. var _p1 *byte
  1395. _p1, err = BytePtrFromString(to)
  1396. if err != nil {
  1397. return
  1398. }
  1399. _, _, e1 := syscall_syscall6(funcPC(libc_renameat_trampoline), uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1400. if e1 != 0 {
  1401. err = errnoErr(e1)
  1402. }
  1403. return
  1404. }
  1405. func libc_renameat_trampoline()
  1406. //go:linkname libc_renameat libc_renameat
  1407. //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
  1408. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1409. func Revoke(path string) (err error) {
  1410. var _p0 *byte
  1411. _p0, err = BytePtrFromString(path)
  1412. if err != nil {
  1413. return
  1414. }
  1415. _, _, e1 := syscall_syscall(funcPC(libc_revoke_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1416. if e1 != 0 {
  1417. err = errnoErr(e1)
  1418. }
  1419. return
  1420. }
  1421. func libc_revoke_trampoline()
  1422. //go:linkname libc_revoke libc_revoke
  1423. //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
  1424. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1425. func Rmdir(path string) (err error) {
  1426. var _p0 *byte
  1427. _p0, err = BytePtrFromString(path)
  1428. if err != nil {
  1429. return
  1430. }
  1431. _, _, e1 := syscall_syscall(funcPC(libc_rmdir_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1432. if e1 != 0 {
  1433. err = errnoErr(e1)
  1434. }
  1435. return
  1436. }
  1437. func libc_rmdir_trampoline()
  1438. //go:linkname libc_rmdir libc_rmdir
  1439. //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
  1440. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1441. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1442. r0, _, e1 := syscall_syscall(funcPC(libc_lseek_trampoline), uintptr(fd), uintptr(offset), uintptr(whence))
  1443. newoffset = int64(r0)
  1444. if e1 != 0 {
  1445. err = errnoErr(e1)
  1446. }
  1447. return
  1448. }
  1449. func libc_lseek_trampoline()
  1450. //go:linkname libc_lseek libc_lseek
  1451. //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
  1452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1453. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1454. _, _, 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)
  1455. if e1 != 0 {
  1456. err = errnoErr(e1)
  1457. }
  1458. return
  1459. }
  1460. func libc_select_trampoline()
  1461. //go:linkname libc_select libc_select
  1462. //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
  1463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1464. func Setegid(egid int) (err error) {
  1465. _, _, e1 := syscall_syscall(funcPC(libc_setegid_trampoline), uintptr(egid), 0, 0)
  1466. if e1 != 0 {
  1467. err = errnoErr(e1)
  1468. }
  1469. return
  1470. }
  1471. func libc_setegid_trampoline()
  1472. //go:linkname libc_setegid libc_setegid
  1473. //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
  1474. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1475. func Seteuid(euid int) (err error) {
  1476. _, _, e1 := syscall_rawSyscall(funcPC(libc_seteuid_trampoline), uintptr(euid), 0, 0)
  1477. if e1 != 0 {
  1478. err = errnoErr(e1)
  1479. }
  1480. return
  1481. }
  1482. func libc_seteuid_trampoline()
  1483. //go:linkname libc_seteuid libc_seteuid
  1484. //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
  1485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1486. func Setgid(gid int) (err error) {
  1487. _, _, e1 := syscall_rawSyscall(funcPC(libc_setgid_trampoline), uintptr(gid), 0, 0)
  1488. if e1 != 0 {
  1489. err = errnoErr(e1)
  1490. }
  1491. return
  1492. }
  1493. func libc_setgid_trampoline()
  1494. //go:linkname libc_setgid libc_setgid
  1495. //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func Setlogin(name string) (err error) {
  1498. var _p0 *byte
  1499. _p0, err = BytePtrFromString(name)
  1500. if err != nil {
  1501. return
  1502. }
  1503. _, _, e1 := syscall_syscall(funcPC(libc_setlogin_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1504. if e1 != 0 {
  1505. err = errnoErr(e1)
  1506. }
  1507. return
  1508. }
  1509. func libc_setlogin_trampoline()
  1510. //go:linkname libc_setlogin libc_setlogin
  1511. //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
  1512. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1513. func Setpgid(pid int, pgid int) (err error) {
  1514. _, _, e1 := syscall_rawSyscall(funcPC(libc_setpgid_trampoline), uintptr(pid), uintptr(pgid), 0)
  1515. if e1 != 0 {
  1516. err = errnoErr(e1)
  1517. }
  1518. return
  1519. }
  1520. func libc_setpgid_trampoline()
  1521. //go:linkname libc_setpgid libc_setpgid
  1522. //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
  1523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1524. func Setpriority(which int, who int, prio int) (err error) {
  1525. _, _, e1 := syscall_syscall(funcPC(libc_setpriority_trampoline), uintptr(which), uintptr(who), uintptr(prio))
  1526. if e1 != 0 {
  1527. err = errnoErr(e1)
  1528. }
  1529. return
  1530. }
  1531. func libc_setpriority_trampoline()
  1532. //go:linkname libc_setpriority libc_setpriority
  1533. //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
  1534. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1535. func Setprivexec(flag int) (err error) {
  1536. _, _, e1 := syscall_syscall(funcPC(libc_setprivexec_trampoline), uintptr(flag), 0, 0)
  1537. if e1 != 0 {
  1538. err = errnoErr(e1)
  1539. }
  1540. return
  1541. }
  1542. func libc_setprivexec_trampoline()
  1543. //go:linkname libc_setprivexec libc_setprivexec
  1544. //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
  1545. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1546. func Setregid(rgid int, egid int) (err error) {
  1547. _, _, e1 := syscall_rawSyscall(funcPC(libc_setregid_trampoline), uintptr(rgid), uintptr(egid), 0)
  1548. if e1 != 0 {
  1549. err = errnoErr(e1)
  1550. }
  1551. return
  1552. }
  1553. func libc_setregid_trampoline()
  1554. //go:linkname libc_setregid libc_setregid
  1555. //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
  1556. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1557. func Setreuid(ruid int, euid int) (err error) {
  1558. _, _, e1 := syscall_rawSyscall(funcPC(libc_setreuid_trampoline), uintptr(ruid), uintptr(euid), 0)
  1559. if e1 != 0 {
  1560. err = errnoErr(e1)
  1561. }
  1562. return
  1563. }
  1564. func libc_setreuid_trampoline()
  1565. //go:linkname libc_setreuid libc_setreuid
  1566. //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
  1567. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1568. func Setrlimit(which int, lim *Rlimit) (err error) {
  1569. _, _, e1 := syscall_rawSyscall(funcPC(libc_setrlimit_trampoline), uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1570. if e1 != 0 {
  1571. err = errnoErr(e1)
  1572. }
  1573. return
  1574. }
  1575. func libc_setrlimit_trampoline()
  1576. //go:linkname libc_setrlimit libc_setrlimit
  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(funcPC(libc_setsid_trampoline), 0, 0, 0)
  1581. pid = int(r0)
  1582. if e1 != 0 {
  1583. err = errnoErr(e1)
  1584. }
  1585. return
  1586. }
  1587. func libc_setsid_trampoline()
  1588. //go:linkname libc_setsid libc_setsid
  1589. //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
  1590. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1591. func Settimeofday(tp *Timeval) (err error) {
  1592. _, _, e1 := syscall_rawSyscall(funcPC(libc_settimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
  1593. if e1 != 0 {
  1594. err = errnoErr(e1)
  1595. }
  1596. return
  1597. }
  1598. func libc_settimeofday_trampoline()
  1599. //go:linkname libc_settimeofday libc_settimeofday
  1600. //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
  1601. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1602. func Setuid(uid int) (err error) {
  1603. _, _, e1 := syscall_rawSyscall(funcPC(libc_setuid_trampoline), uintptr(uid), 0, 0)
  1604. if e1 != 0 {
  1605. err = errnoErr(e1)
  1606. }
  1607. return
  1608. }
  1609. func libc_setuid_trampoline()
  1610. //go:linkname libc_setuid libc_setuid
  1611. //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
  1612. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1613. func Symlink(path string, link string) (err error) {
  1614. var _p0 *byte
  1615. _p0, err = BytePtrFromString(path)
  1616. if err != nil {
  1617. return
  1618. }
  1619. var _p1 *byte
  1620. _p1, err = BytePtrFromString(link)
  1621. if err != nil {
  1622. return
  1623. }
  1624. _, _, e1 := syscall_syscall(funcPC(libc_symlink_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1625. if e1 != 0 {
  1626. err = errnoErr(e1)
  1627. }
  1628. return
  1629. }
  1630. func libc_symlink_trampoline()
  1631. //go:linkname libc_symlink libc_symlink
  1632. //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
  1633. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1634. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1635. var _p0 *byte
  1636. _p0, err = BytePtrFromString(oldpath)
  1637. if err != nil {
  1638. return
  1639. }
  1640. var _p1 *byte
  1641. _p1, err = BytePtrFromString(newpath)
  1642. if err != nil {
  1643. return
  1644. }
  1645. _, _, e1 := syscall_syscall(funcPC(libc_symlinkat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1646. if e1 != 0 {
  1647. err = errnoErr(e1)
  1648. }
  1649. return
  1650. }
  1651. func libc_symlinkat_trampoline()
  1652. //go:linkname libc_symlinkat libc_symlinkat
  1653. //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
  1654. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1655. func Sync() (err error) {
  1656. _, _, e1 := syscall_syscall(funcPC(libc_sync_trampoline), 0, 0, 0)
  1657. if e1 != 0 {
  1658. err = errnoErr(e1)
  1659. }
  1660. return
  1661. }
  1662. func libc_sync_trampoline()
  1663. //go:linkname libc_sync libc_sync
  1664. //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
  1665. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1666. func Truncate(path string, length int64) (err error) {
  1667. var _p0 *byte
  1668. _p0, err = BytePtrFromString(path)
  1669. if err != nil {
  1670. return
  1671. }
  1672. _, _, e1 := syscall_syscall(funcPC(libc_truncate_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1673. if e1 != 0 {
  1674. err = errnoErr(e1)
  1675. }
  1676. return
  1677. }
  1678. func libc_truncate_trampoline()
  1679. //go:linkname libc_truncate libc_truncate
  1680. //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
  1681. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1682. func Umask(newmask int) (oldmask int) {
  1683. r0, _, _ := syscall_syscall(funcPC(libc_umask_trampoline), uintptr(newmask), 0, 0)
  1684. oldmask = int(r0)
  1685. return
  1686. }
  1687. func libc_umask_trampoline()
  1688. //go:linkname libc_umask libc_umask
  1689. //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
  1690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1691. func Undelete(path string) (err error) {
  1692. var _p0 *byte
  1693. _p0, err = BytePtrFromString(path)
  1694. if err != nil {
  1695. return
  1696. }
  1697. _, _, e1 := syscall_syscall(funcPC(libc_undelete_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1698. if e1 != 0 {
  1699. err = errnoErr(e1)
  1700. }
  1701. return
  1702. }
  1703. func libc_undelete_trampoline()
  1704. //go:linkname libc_undelete libc_undelete
  1705. //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
  1706. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1707. func Unlink(path string) (err error) {
  1708. var _p0 *byte
  1709. _p0, err = BytePtrFromString(path)
  1710. if err != nil {
  1711. return
  1712. }
  1713. _, _, e1 := syscall_syscall(funcPC(libc_unlink_trampoline), uintptr(unsafe.Pointer(_p0)), 0, 0)
  1714. if e1 != 0 {
  1715. err = errnoErr(e1)
  1716. }
  1717. return
  1718. }
  1719. func libc_unlink_trampoline()
  1720. //go:linkname libc_unlink libc_unlink
  1721. //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
  1722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1723. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1724. var _p0 *byte
  1725. _p0, err = BytePtrFromString(path)
  1726. if err != nil {
  1727. return
  1728. }
  1729. _, _, e1 := syscall_syscall(funcPC(libc_unlinkat_trampoline), uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1730. if e1 != 0 {
  1731. err = errnoErr(e1)
  1732. }
  1733. return
  1734. }
  1735. func libc_unlinkat_trampoline()
  1736. //go:linkname libc_unlinkat libc_unlinkat
  1737. //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
  1738. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1739. func Unmount(path string, flags int) (err error) {
  1740. var _p0 *byte
  1741. _p0, err = BytePtrFromString(path)
  1742. if err != nil {
  1743. return
  1744. }
  1745. _, _, e1 := syscall_syscall(funcPC(libc_unmount_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1746. if e1 != 0 {
  1747. err = errnoErr(e1)
  1748. }
  1749. return
  1750. }
  1751. func libc_unmount_trampoline()
  1752. //go:linkname libc_unmount libc_unmount
  1753. //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
  1754. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1755. func write(fd int, p []byte) (n int, err error) {
  1756. var _p0 unsafe.Pointer
  1757. if len(p) > 0 {
  1758. _p0 = unsafe.Pointer(&p[0])
  1759. } else {
  1760. _p0 = unsafe.Pointer(&_zero)
  1761. }
  1762. r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1763. n = int(r0)
  1764. if e1 != 0 {
  1765. err = errnoErr(e1)
  1766. }
  1767. return
  1768. }
  1769. func libc_write_trampoline()
  1770. //go:linkname libc_write libc_write
  1771. //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
  1772. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1773. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1774. r0, _, e1 := syscall_syscall6(funcPC(libc_mmap_trampoline), uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1775. ret = uintptr(r0)
  1776. if e1 != 0 {
  1777. err = errnoErr(e1)
  1778. }
  1779. return
  1780. }
  1781. func libc_mmap_trampoline()
  1782. //go:linkname libc_mmap libc_mmap
  1783. //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
  1784. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1785. func munmap(addr uintptr, length uintptr) (err error) {
  1786. _, _, e1 := syscall_syscall(funcPC(libc_munmap_trampoline), uintptr(addr), uintptr(length), 0)
  1787. if e1 != 0 {
  1788. err = errnoErr(e1)
  1789. }
  1790. return
  1791. }
  1792. func libc_munmap_trampoline()
  1793. //go:linkname libc_munmap libc_munmap
  1794. //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
  1795. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1796. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1797. r0, _, e1 := syscall_syscall(funcPC(libc_read_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1798. n = int(r0)
  1799. if e1 != 0 {
  1800. err = errnoErr(e1)
  1801. }
  1802. return
  1803. }
  1804. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1805. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1806. r0, _, e1 := syscall_syscall(funcPC(libc_write_trampoline), uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1807. n = int(r0)
  1808. if e1 != 0 {
  1809. err = errnoErr(e1)
  1810. }
  1811. return
  1812. }
  1813. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1814. func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
  1815. r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
  1816. sec = int64(r0)
  1817. usec = int32(r1)
  1818. if e1 != 0 {
  1819. err = errnoErr(e1)
  1820. }
  1821. return
  1822. }
  1823. func libc_gettimeofday_trampoline()
  1824. //go:linkname libc_gettimeofday libc_gettimeofday
  1825. //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
  1826. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1827. func Fstat(fd int, stat *Stat_t) (err error) {
  1828. _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1829. if e1 != 0 {
  1830. err = errnoErr(e1)
  1831. }
  1832. return
  1833. }
  1834. func libc_fstat_trampoline()
  1835. //go:linkname libc_fstat libc_fstat
  1836. //go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
  1837. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1838. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  1839. var _p0 *byte
  1840. _p0, err = BytePtrFromString(path)
  1841. if err != nil {
  1842. return
  1843. }
  1844. _, _, e1 := syscall_syscall6(funcPC(libc_fstatat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1845. if e1 != 0 {
  1846. err = errnoErr(e1)
  1847. }
  1848. return
  1849. }
  1850. func libc_fstatat_trampoline()
  1851. //go:linkname libc_fstatat libc_fstatat
  1852. //go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
  1853. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1854. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  1855. _, _, e1 := syscall_syscall(funcPC(libc_fstatfs_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1856. if e1 != 0 {
  1857. err = errnoErr(e1)
  1858. }
  1859. return
  1860. }
  1861. func libc_fstatfs_trampoline()
  1862. //go:linkname libc_fstatfs libc_fstatfs
  1863. //go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
  1864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1865. func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
  1866. r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
  1867. n = int(r0)
  1868. if e1 != 0 {
  1869. err = errnoErr(e1)
  1870. }
  1871. return
  1872. }
  1873. func libc_getfsstat_trampoline()
  1874. //go:linkname libc_getfsstat libc_getfsstat
  1875. //go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
  1876. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1877. func Lstat(path string, stat *Stat_t) (err error) {
  1878. var _p0 *byte
  1879. _p0, err = BytePtrFromString(path)
  1880. if err != nil {
  1881. return
  1882. }
  1883. _, _, e1 := syscall_syscall(funcPC(libc_lstat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1884. if e1 != 0 {
  1885. err = errnoErr(e1)
  1886. }
  1887. return
  1888. }
  1889. func libc_lstat_trampoline()
  1890. //go:linkname libc_lstat libc_lstat
  1891. //go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
  1892. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1893. func Stat(path string, stat *Stat_t) (err error) {
  1894. var _p0 *byte
  1895. _p0, err = BytePtrFromString(path)
  1896. if err != nil {
  1897. return
  1898. }
  1899. _, _, e1 := syscall_syscall(funcPC(libc_stat_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1900. if e1 != 0 {
  1901. err = errnoErr(e1)
  1902. }
  1903. return
  1904. }
  1905. func libc_stat_trampoline()
  1906. //go:linkname libc_stat libc_stat
  1907. //go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
  1908. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1909. func Statfs(path string, stat *Statfs_t) (err error) {
  1910. var _p0 *byte
  1911. _p0, err = BytePtrFromString(path)
  1912. if err != nil {
  1913. return
  1914. }
  1915. _, _, e1 := syscall_syscall(funcPC(libc_statfs_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1916. if e1 != 0 {
  1917. err = errnoErr(e1)
  1918. }
  1919. return
  1920. }
  1921. func libc_statfs_trampoline()
  1922. //go:linkname libc_statfs libc_statfs
  1923. //go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"