fcntl_darwin_arm64.go 101 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080
  1. // Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
  2. package fcntl
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. AT_EACCESS = 0x0010 // fcntl.h:168:1:
  15. AT_FDCWD = -2 // fcntl.h:163:1:
  16. AT_FDONLY = 0x0400 // fcntl.h:174:1:
  17. AT_REALDEV = 0x0200 // fcntl.h:173:1:
  18. AT_REMOVEDIR = 0x0080 // fcntl.h:171:1:
  19. AT_SYMLINK_FOLLOW = 0x0040 // fcntl.h:170:1:
  20. AT_SYMLINK_NOFOLLOW = 0x0020 // fcntl.h:169:1:
  21. AT_SYMLINK_NOFOLLOW_ANY = 0x0800 // fcntl.h:175:1:
  22. CPF_IGNORE_MODE = 0x0002 // fcntl.h:208:1:
  23. CPF_MASK = 3 // fcntl.h:209:1:
  24. CPF_OVERWRITE = 0x0001 // fcntl.h:207:1:
  25. FAPPEND = 8 // fcntl.h:193:1:
  26. FASYNC = 64 // fcntl.h:194:1:
  27. FCNTL_FS_SPECIFIC_BASE = 0x00010000 // fcntl.h:315:1:
  28. FD_CLOEXEC = 1 // fcntl.h:324:1:
  29. FFDSYNC = 4194304 // fcntl.h:196:1:
  30. FFSYNC = 128 // fcntl.h:195:1:
  31. FNDELAY = 4 // fcntl.h:198:1:
  32. FNONBLOCK = 4 // fcntl.h:197:1:
  33. FREAD = 0x00000001 // fcntl.h:110:1:
  34. FWRITE = 0x00000002 // fcntl.h:111:1:
  35. F_ADDFILESIGS = 61 // fcntl.h:253:1:
  36. F_ADDFILESIGS_FOR_DYLD_SIM = 83 // fcntl.h:292:1:
  37. F_ADDFILESIGS_INFO = 103 // fcntl.h:309:1:
  38. F_ADDFILESIGS_RETURN = 97 // fcntl.h:298:1:
  39. F_ADDFILESUPPL = 104 // fcntl.h:310:1:
  40. F_ADDSIGS = 59 // fcntl.h:250:1:
  41. F_ALLOCATEALL = 0x00000004 // fcntl.h:348:1:
  42. F_ALLOCATECONTIG = 0x00000002 // fcntl.h:347:1:
  43. F_BARRIERFSYNC = 85 // fcntl.h:295:1:
  44. F_CHECK_LV = 98 // fcntl.h:299:1:
  45. F_CHKCLEAN = 41 // fcntl.h:232:1:
  46. F_DUPFD = 0 // fcntl.h:217:1:
  47. F_DUPFD_CLOEXEC = 67 // fcntl.h:320:1:
  48. F_FINDSIGS = 78 // fcntl.h:289:1:
  49. F_FLUSH_DATA = 40 // fcntl.h:231:1:
  50. F_FREEZE_FS = 53 // fcntl.h:245:1:
  51. F_FSRESERVED = 106 // fcntl.h:312:1:
  52. F_FULLFSYNC = 51 // fcntl.h:243:1:
  53. F_GETCODEDIR = 72 // fcntl.h:277:1:
  54. F_GETFD = 1 // fcntl.h:218:1:
  55. F_GETFL = 3 // fcntl.h:220:1:
  56. F_GETLK = 7 // fcntl.h:224:1:
  57. F_GETLKPID = 66 // fcntl.h:263:1:
  58. F_GETNOSIGPIPE = 74 // fcntl.h:280:1:
  59. F_GETOWN = 5 // fcntl.h:222:1:
  60. F_GETPATH = 50 // fcntl.h:242:1:
  61. F_GETPATH_MTMINFO = 71 // fcntl.h:275:1:
  62. F_GETPATH_NOFIRMLINK = 102 // fcntl.h:307:1:
  63. F_GETPROTECTIONCLASS = 63 // fcntl.h:258:1:
  64. F_GETPROTECTIONLEVEL = 77 // fcntl.h:287:1:
  65. F_GETSIGSINFO = 105 // fcntl.h:311:1:
  66. F_GLOBAL_NOCACHE = 55 // fcntl.h:247:1:
  67. F_LOG2PHYS = 49 // fcntl.h:241:1:
  68. F_LOG2PHYS_EXT = 65 // fcntl.h:261:1:
  69. F_NOCACHE = 48 // fcntl.h:240:1:
  70. F_NODIRECT = 62 // fcntl.h:255:1:
  71. F_PATHPKG_CHECK = 52 // fcntl.h:244:1:
  72. F_PEOFPOSMODE = 3 // fcntl.h:352:1:
  73. F_PREALLOCATE = 42 // fcntl.h:233:1:
  74. F_PUNCHHOLE = 99 // fcntl.h:301:1:
  75. F_RDADVISE = 44 // fcntl.h:235:1:
  76. F_RDAHEAD = 45 // fcntl.h:236:1:
  77. F_RDLCK = 1 // fcntl.h:327:1:
  78. F_SETBACKINGSTORE = 70 // fcntl.h:274:1:
  79. F_SETFD = 2 // fcntl.h:219:1:
  80. F_SETFL = 4 // fcntl.h:221:1:
  81. F_SETLK = 8 // fcntl.h:225:1:
  82. F_SETLKW = 9 // fcntl.h:226:1:
  83. F_SETLKWTIMEOUT = 10 // fcntl.h:228:1:
  84. F_SETNOSIGPIPE = 73 // fcntl.h:279:1:
  85. F_SETOWN = 6 // fcntl.h:223:1:
  86. F_SETPROTECTIONCLASS = 64 // fcntl.h:259:1:
  87. F_SETSIZE = 43 // fcntl.h:234:1:
  88. F_SINGLE_WRITER = 76 // fcntl.h:284:1:
  89. F_SPECULATIVE_READ = 101 // fcntl.h:305:1:
  90. F_THAW_FS = 54 // fcntl.h:246:1:
  91. F_TRANSCODEKEY = 75 // fcntl.h:282:1:
  92. F_TRIM_ACTIVE_FILE = 100 // fcntl.h:303:1:
  93. F_UNLCK = 2 // fcntl.h:328:1:
  94. F_VOLPOSMODE = 4 // fcntl.h:354:1:
  95. F_WRLCK = 3 // fcntl.h:329:1:
  96. GETSIGSINFO_PLATFORM_BINARY = 1 // fcntl.h:444:1:
  97. LOCK_EX = 0x02 // fcntl.h:456:1:
  98. LOCK_NB = 0x04 // fcntl.h:457:1:
  99. LOCK_SH = 0x01 // fcntl.h:455:1:
  100. LOCK_UN = 0x08 // fcntl.h:458:1:
  101. MAC_OS_VERSION_11_0 = 110000 // AvailabilityVersions.h:238:1:
  102. MAC_OS_VERSION_12_0 = 120000 // AvailabilityVersions.h:239:1:
  103. MAC_OS_X_VERSION_10_0 = 1000 // AvailabilityVersions.h:206:1:
  104. MAC_OS_X_VERSION_10_1 = 1010 // AvailabilityVersions.h:207:1:
  105. MAC_OS_X_VERSION_10_10 = 101000 // AvailabilityVersions.h:216:1:
  106. MAC_OS_X_VERSION_10_10_2 = 101002 // AvailabilityVersions.h:217:1:
  107. MAC_OS_X_VERSION_10_10_3 = 101003 // AvailabilityVersions.h:218:1:
  108. MAC_OS_X_VERSION_10_11 = 101100 // AvailabilityVersions.h:219:1:
  109. MAC_OS_X_VERSION_10_11_2 = 101102 // AvailabilityVersions.h:220:1:
  110. MAC_OS_X_VERSION_10_11_3 = 101103 // AvailabilityVersions.h:221:1:
  111. MAC_OS_X_VERSION_10_11_4 = 101104 // AvailabilityVersions.h:222:1:
  112. MAC_OS_X_VERSION_10_12 = 101200 // AvailabilityVersions.h:223:1:
  113. MAC_OS_X_VERSION_10_12_1 = 101201 // AvailabilityVersions.h:224:1:
  114. MAC_OS_X_VERSION_10_12_2 = 101202 // AvailabilityVersions.h:225:1:
  115. MAC_OS_X_VERSION_10_12_4 = 101204 // AvailabilityVersions.h:226:1:
  116. MAC_OS_X_VERSION_10_13 = 101300 // AvailabilityVersions.h:227:1:
  117. MAC_OS_X_VERSION_10_13_1 = 101301 // AvailabilityVersions.h:228:1:
  118. MAC_OS_X_VERSION_10_13_2 = 101302 // AvailabilityVersions.h:229:1:
  119. MAC_OS_X_VERSION_10_13_4 = 101304 // AvailabilityVersions.h:230:1:
  120. MAC_OS_X_VERSION_10_14 = 101400 // AvailabilityVersions.h:231:1:
  121. MAC_OS_X_VERSION_10_14_1 = 101401 // AvailabilityVersions.h:232:1:
  122. MAC_OS_X_VERSION_10_14_4 = 101404 // AvailabilityVersions.h:233:1:
  123. MAC_OS_X_VERSION_10_14_6 = 101406 // AvailabilityVersions.h:234:1:
  124. MAC_OS_X_VERSION_10_15 = 101500 // AvailabilityVersions.h:235:1:
  125. MAC_OS_X_VERSION_10_15_1 = 101501 // AvailabilityVersions.h:236:1:
  126. MAC_OS_X_VERSION_10_16 = 101600 // AvailabilityVersions.h:237:1:
  127. MAC_OS_X_VERSION_10_2 = 1020 // AvailabilityVersions.h:208:1:
  128. MAC_OS_X_VERSION_10_3 = 1030 // AvailabilityVersions.h:209:1:
  129. MAC_OS_X_VERSION_10_4 = 1040 // AvailabilityVersions.h:210:1:
  130. MAC_OS_X_VERSION_10_5 = 1050 // AvailabilityVersions.h:211:1:
  131. MAC_OS_X_VERSION_10_6 = 1060 // AvailabilityVersions.h:212:1:
  132. MAC_OS_X_VERSION_10_7 = 1070 // AvailabilityVersions.h:213:1:
  133. MAC_OS_X_VERSION_10_8 = 1080 // AvailabilityVersions.h:214:1:
  134. MAC_OS_X_VERSION_10_9 = 1090 // AvailabilityVersions.h:215:1:
  135. O_ACCMODE = 0x0003 // fcntl.h:99:1:
  136. O_ALERT = 0x20000000 // fcntl.h:537:1:
  137. O_APPEND = 0x00000008 // fcntl.h:114:1:
  138. O_ASYNC = 0x00000040 // fcntl.h:121:1:
  139. O_CLOEXEC = 0x01000000 // fcntl.h:150:1:
  140. O_CREAT = 0x00000200 // fcntl.h:125:1:
  141. O_DIRECTORY = 0x00100000 // fcntl.h:138:1:
  142. O_DP_GETRAWENCRYPTED = 0x0001 // fcntl.h:181:1:
  143. O_DP_GETRAWUNENCRYPTED = 0x0002 // fcntl.h:182:1:
  144. O_DSYNC = 0x400000 // _o_dsync.h:29:1:
  145. O_EVTONLY = 0x00008000 // fcntl.h:130:1:
  146. O_EXCL = 0x00000800 // fcntl.h:127:1:
  147. O_EXLOCK = 0x00000020 // fcntl.h:120:1:
  148. O_FSYNC = 128 // fcntl.h:122:1:
  149. O_NDELAY = 4 // fcntl.h:199:1:
  150. O_NOCTTY = 0x00020000 // fcntl.h:134:1:
  151. O_NOFOLLOW = 0x00000100 // fcntl.h:123:1:
  152. O_NOFOLLOW_ANY = 0x20000000 // fcntl.h:155:1:
  153. O_NONBLOCK = 0x00000004 // fcntl.h:113:1:
  154. O_POPUP = 0x80000000 // fcntl.h:536:1:
  155. O_RDONLY = 0x0000 // fcntl.h:96:1:
  156. O_RDWR = 0x0002 // fcntl.h:98:1:
  157. O_SHLOCK = 0x00000010 // fcntl.h:119:1:
  158. O_SYMLINK = 0x00200000 // fcntl.h:142:1:
  159. O_SYNC = 0x0080 // _o_sync.h:29:1:
  160. O_TRUNC = 0x00000400 // fcntl.h:126:1:
  161. O_WRONLY = 0x0001 // fcntl.h:97:1:
  162. SEEK_CUR = 1 // _seek_set.h:34:1:
  163. SEEK_DATA = 4 // _seek_set.h:44:1:
  164. SEEK_END = 2 // _seek_set.h:35:1:
  165. SEEK_HOLE = 3 // _seek_set.h:40:1:
  166. SEEK_SET = 0 // _seek_set.h:33:1:
  167. S_IEXEC = 64 // _s_ifmt.h:72:1:
  168. S_IFBLK = 0060000 // _s_ifmt.h:39:1:
  169. S_IFCHR = 0020000 // _s_ifmt.h:37:1:
  170. S_IFDIR = 0040000 // _s_ifmt.h:38:1:
  171. S_IFIFO = 0010000 // _s_ifmt.h:36:1:
  172. S_IFLNK = 0120000 // _s_ifmt.h:41:1:
  173. S_IFMT = 0170000 // _s_ifmt.h:35:1:
  174. S_IFREG = 0100000 // _s_ifmt.h:40:1:
  175. S_IFSOCK = 0140000 // _s_ifmt.h:42:1:
  176. S_IFWHT = 0160000 // _s_ifmt.h:44:1:
  177. S_IREAD = 256 // _s_ifmt.h:70:1:
  178. S_IRGRP = 0000040 // _s_ifmt.h:55:1:
  179. S_IROTH = 0000004 // _s_ifmt.h:60:1:
  180. S_IRUSR = 0000400 // _s_ifmt.h:50:1:
  181. S_IRWXG = 0000070 // _s_ifmt.h:54:1:
  182. S_IRWXO = 0000007 // _s_ifmt.h:59:1:
  183. S_IRWXU = 0000700 // _s_ifmt.h:49:1:
  184. S_ISGID = 0002000 // _s_ifmt.h:65:1:
  185. S_ISTXT = 512 // _s_ifmt.h:69:1:
  186. S_ISUID = 0004000 // _s_ifmt.h:64:1:
  187. S_ISVTX = 0001000 // _s_ifmt.h:66:1:
  188. S_IWGRP = 0000020 // _s_ifmt.h:56:1:
  189. S_IWOTH = 0000002 // _s_ifmt.h:61:1:
  190. S_IWRITE = 128 // _s_ifmt.h:71:1:
  191. S_IWUSR = 0000200 // _s_ifmt.h:51:1:
  192. S_IXGRP = 0000010 // _s_ifmt.h:57:1:
  193. S_IXOTH = 0000001 // _s_ifmt.h:62:1:
  194. S_IXUSR = 0000100 // _s_ifmt.h:52:1:
  195. USER_FSIGNATURES_CDHASH_LEN = 20 // fcntl.h:401:1:
  196. X_ARM_MACHTYPES_H_ = 0 // types.h:43:1:
  197. X_BSD_ARM__TYPES_H_ = 0 // _types.h:5:1:
  198. X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1:
  199. X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1:
  200. X_CDEFS_H_ = 0 // cdefs.h:68:1:
  201. X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:774:1:
  202. X_DARWIN_FEATURE_ONLY_64_BIT_INODE = 1 // cdefs.h:784:1:
  203. X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:800:1:
  204. X_DARWIN_FEATURE_ONLY_VERS_1050 = 1 // cdefs.h:792:1:
  205. X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:808:1:
  206. X_FILESEC_T = 0 // _filesec_t.h:29:1:
  207. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  208. X_INT16_T = 0 // _int16_t.h:29:1:
  209. X_INT32_T = 0 // _int32_t.h:29:1:
  210. X_INT64_T = 0 // _int64_t.h:29:1:
  211. X_INT8_T = 0 // _int8_t.h:29:1:
  212. X_INTPTR_T = 0 // _intptr_t.h:29:1:
  213. X_LP64 = 1 // <predefined>:1:1:
  214. X_MACHTYPES_H_ = 0 // types.h:44:1:
  215. X_MODE_T = 0 // _mode_t.h:29:1:
  216. X_Nonnull = 0 // cdefs.h:268:1:
  217. X_Null_unspecified = 0 // cdefs.h:271:1:
  218. X_Nullable = 0 // cdefs.h:265:1:
  219. X_OFF_T = 0 // _off_t.h:29:1:
  220. X_PID_T = 0 // _pid_t.h:29:1:
  221. X_SIZE_T = 0 // _size_t.h:29:1:
  222. X_SYS_FCNTL_H_ = 0 // fcntl.h:71:1:
  223. X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1:
  224. X_SYS__TYPES_H_ = 0 // _types.h:30:1:
  225. X_UINTPTR_T = 0 // _uintptr_t.h:29:1:
  226. X_U_INT16_T = 0 // _u_int16_t.h:29:1:
  227. X_U_INT32_T = 0 // _u_int32_t.h:29:1:
  228. X_U_INT64_T = 0 // _u_int64_t.h:29:1:
  229. X_U_INT8_T = 0 // _u_int8_t.h:29:1:
  230. )
  231. const ( /* fcntl.h:547:1: */
  232. FILESEC_OWNER = 1
  233. FILESEC_GROUP = 2
  234. FILESEC_UUID = 3
  235. FILESEC_MODE = 4
  236. FILESEC_ACL = 5
  237. FILESEC_GRPUUID = 6
  238. // XXX these are private to the implementation
  239. FILESEC_ACL_RAW = 100
  240. FILESEC_ACL_ALLOCSIZE = 101
  241. )
  242. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  243. type Size_t = uint64 /* <builtin>:9:23 */
  244. type Wchar_t = int32 /* <builtin>:15:24 */
  245. type X__int128_t = struct {
  246. Flo int64
  247. Fhi int64
  248. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  249. type X__uint128_t = struct {
  250. Flo uint64
  251. Fhi uint64
  252. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  253. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  254. type X__float128 = float64 /* <builtin>:47:21 */
  255. var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
  256. // Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  257. //
  258. // @APPLE_LICENSE_HEADER_START@
  259. //
  260. // This file contains Original Code and/or Modifications of Original Code
  261. // as defined in and that are subject to the Apple Public Source License
  262. // Version 2.0 (the 'License'). You may not use this file except in
  263. // compliance with the License. Please obtain a copy of the License at
  264. // http://www.opensource.apple.com/apsl/ and read it before using this
  265. // file.
  266. //
  267. // The Original Code and all software distributed under the License are
  268. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  269. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  270. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  271. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  272. // Please see the License for the specific language governing rights and
  273. // limitations under the License.
  274. //
  275. // @APPLE_LICENSE_HEADER_END@
  276. // Copyright (c) 2000-2013 Apple Inc. All rights reserved.
  277. //
  278. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  279. //
  280. // This file contains Original Code and/or Modifications of Original Code
  281. // as defined in and that are subject to the Apple Public Source License
  282. // Version 2.0 (the 'License'). You may not use this file except in
  283. // compliance with the License. The rights granted to you under the License
  284. // may not be used to create, or enable the creation or redistribution of,
  285. // unlawful or unlicensed copies of an Apple operating system, or to
  286. // circumvent, violate, or enable the circumvention or violation of, any
  287. // terms of an Apple operating system software license agreement.
  288. //
  289. // Please obtain a copy of the License at
  290. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  291. //
  292. // The Original Code and all software distributed under the License are
  293. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  294. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  295. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  296. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  297. // Please see the License for the specific language governing rights and
  298. // limitations under the License.
  299. //
  300. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  301. // Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
  302. // -
  303. // Copyright (c) 1983, 1990, 1993
  304. // The Regents of the University of California. All rights reserved.
  305. // (c) UNIX System Laboratories, Inc.
  306. // All or some portions of this file are derived from material licensed
  307. // to the University of California by American Telephone and Telegraph
  308. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  309. // the permission of UNIX System Laboratories, Inc.
  310. //
  311. // Redistribution and use in source and binary forms, with or without
  312. // modification, are permitted provided that the following conditions
  313. // are met:
  314. // 1. Redistributions of source code must retain the above copyright
  315. // notice, this list of conditions and the following disclaimer.
  316. // 2. Redistributions in binary form must reproduce the above copyright
  317. // notice, this list of conditions and the following disclaimer in the
  318. // documentation and/or other materials provided with the distribution.
  319. // 3. All advertising materials mentioning features or use of this software
  320. // must display the following acknowledgement:
  321. // This product includes software developed by the University of
  322. // California, Berkeley and its contributors.
  323. // 4. Neither the name of the University nor the names of its contributors
  324. // may be used to endorse or promote products derived from this software
  325. // without specific prior written permission.
  326. //
  327. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  328. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  329. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  330. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  331. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  332. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  333. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  334. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  335. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  336. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  337. // SUCH DAMAGE.
  338. //
  339. // @(#)fcntl.h 8.3 (Berkeley) 1/21/94
  340. // This file includes the definitions for open and fcntl
  341. // described by POSIX for <fcntl.h>; it also includes
  342. // related kernel definitions.
  343. // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  344. //
  345. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  346. //
  347. // This file contains Original Code and/or Modifications of Original Code
  348. // as defined in and that are subject to the Apple Public Source License
  349. // Version 2.0 (the 'License'). You may not use this file except in
  350. // compliance with the License. The rights granted to you under the License
  351. // may not be used to create, or enable the creation or redistribution of,
  352. // unlawful or unlicensed copies of an Apple operating system, or to
  353. // circumvent, violate, or enable the circumvention or violation of, any
  354. // terms of an Apple operating system software license agreement.
  355. //
  356. // Please obtain a copy of the License at
  357. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  358. //
  359. // The Original Code and all software distributed under the License are
  360. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  361. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  362. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  363. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  364. // Please see the License for the specific language governing rights and
  365. // limitations under the License.
  366. //
  367. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  368. // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  369. //
  370. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  371. //
  372. // This file contains Original Code and/or Modifications of Original Code
  373. // as defined in and that are subject to the Apple Public Source License
  374. // Version 2.0 (the 'License'). You may not use this file except in
  375. // compliance with the License. The rights granted to you under the License
  376. // may not be used to create, or enable the creation or redistribution of,
  377. // unlawful or unlicensed copies of an Apple operating system, or to
  378. // circumvent, violate, or enable the circumvention or violation of, any
  379. // terms of an Apple operating system software license agreement.
  380. //
  381. // Please obtain a copy of the License at
  382. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  383. //
  384. // The Original Code and all software distributed under the License are
  385. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  386. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  387. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  388. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  389. // Please see the License for the specific language governing rights and
  390. // limitations under the License.
  391. //
  392. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  393. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  394. // Copyright (c) 1991, 1993
  395. // The Regents of the University of California. All rights reserved.
  396. //
  397. // This code is derived from software contributed to Berkeley by
  398. // Berkeley Software Design, Inc.
  399. //
  400. // Redistribution and use in source and binary forms, with or without
  401. // modification, are permitted provided that the following conditions
  402. // are met:
  403. // 1. Redistributions of source code must retain the above copyright
  404. // notice, this list of conditions and the following disclaimer.
  405. // 2. Redistributions in binary form must reproduce the above copyright
  406. // notice, this list of conditions and the following disclaimer in the
  407. // documentation and/or other materials provided with the distribution.
  408. // 3. All advertising materials mentioning features or use of this software
  409. // must display the following acknowledgement:
  410. // This product includes software developed by the University of
  411. // California, Berkeley and its contributors.
  412. // 4. Neither the name of the University nor the names of its contributors
  413. // may be used to endorse or promote products derived from this software
  414. // without specific prior written permission.
  415. //
  416. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  417. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  418. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  419. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  420. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  421. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  422. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  423. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  424. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  425. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  426. // SUCH DAMAGE.
  427. //
  428. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  429. // This SDK is designed to work with clang and specific versions of
  430. // gcc >= 4.0 with Apple's patch sets
  431. // Compatibility with compilers and environments that don't support compiler
  432. // feature checking function-like macros.
  433. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  434. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  435. // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  436. // in between its arguments. __CONCAT can also concatenate double-quoted
  437. // strings produced by the __STRING macro, but this only works with ANSI C.
  438. // In non-ANSI C environments, new programs will want ANSI-only C keywords
  439. // deleted from the program and old programs will want them left alone.
  440. // When using a compiler other than gcc, programs using the ANSI C keywords
  441. // const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
  442. // When using "gcc -traditional", we assume that this is the intent; if
  443. // __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
  444. // __pure2 can be used for functions that are only a function of their scalar
  445. // arguments (meaning they can't dereference pointers).
  446. //
  447. // __stateful_pure can be used for functions that have no side effects,
  448. // but depend on the state of the memory.
  449. // __unused denotes variables and functions that may not be used, preventing
  450. // the compiler from warning about it if not used.
  451. // __used forces variables and functions to be included even if it appears
  452. // to the compiler that they are not used (and would thust be discarded).
  453. // __cold marks code used for debugging or that is rarely taken
  454. // and tells the compiler to optimize for size and outline code.
  455. // __exported denotes symbols that should be exported even when symbols
  456. // are hidden by default.
  457. // __exported_push/_exported_pop are pragmas used to delimit a range of
  458. // symbols that should be exported even when symbols are hidden by default.
  459. // __deprecated causes the compiler to produce a warning when encountering
  460. // code using the deprecated functionality.
  461. // __deprecated_msg() does the same, and compilers that support it will print
  462. // a message along with the deprecation warning.
  463. // This may require turning on such warning with the -Wdeprecated flag.
  464. // __deprecated_enum_msg() should be used on enums, and compilers that support
  465. // it will print the deprecation warning.
  466. // __kpi_deprecated() specifically indicates deprecation of kernel programming
  467. // interfaces in Kernel.framework used by KEXTs.
  468. // __unavailable causes the compiler to error out when encountering
  469. // code using the tagged function
  470. // Delete pseudo-keywords wherever they are not available or needed.
  471. // We use `__restrict' as a way to define the `restrict' type qualifier
  472. // without disturbing older software that is unaware of C99 keywords.
  473. // Compatibility with compilers and environments that don't support the
  474. // nullability feature.
  475. // __disable_tail_calls causes the compiler to not perform tail call
  476. // optimization inside the marked function.
  477. // __not_tail_called causes the compiler to prevent tail call optimization
  478. // on statically bound calls to the function. It has no effect on indirect
  479. // calls. Virtual functions, objective-c methods, and functions marked as
  480. // "always_inline" cannot be marked as __not_tail_called.
  481. // __result_use_check warns callers of a function that not using the function
  482. // return value is a bug, i.e. dismissing malloc() return value results in a
  483. // memory leak.
  484. // __swift_unavailable causes the compiler to mark a symbol as specifically
  485. // unavailable in Swift, regardless of any other availability in C.
  486. // __abortlike is the attribute to put on functions like abort() that are
  487. // typically used to mark assertions. These optimize the codegen
  488. // for outlining while still maintaining debugability.
  489. // Declaring inline functions within headers is error-prone due to differences
  490. // across various versions of the C language and extensions. __header_inline
  491. // can be used to declare inline functions within system headers. In cases
  492. // where you want to force inlining instead of letting the compiler make
  493. // the decision, you can use __header_always_inline.
  494. //
  495. // Be aware that using inline for functions which compilers may also provide
  496. // builtins can behave differently under various compilers. If you intend to
  497. // provide an inline version of such a function, you may want to use a macro
  498. // instead.
  499. //
  500. // The check for !__GNUC__ || __clang__ is because gcc doesn't correctly
  501. // support c99 inline in some cases:
  502. // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965
  503. // Compiler-dependent macros that bracket portions of code where the
  504. // "-Wunreachable-code" warning should be ignored. Please use sparingly.
  505. // Compiler-dependent macros to declare that functions take printf-like
  506. // or scanf-like arguments. They are null except for versions of gcc
  507. // that are known to support the features properly. Functions declared
  508. // with these attributes will cause compilation warnings if there is a
  509. // mismatch between the format string and subsequent function parameter
  510. // types.
  511. // Source compatibility only, ID string not emitted in object file
  512. // __alloc_size can be used to label function arguments that represent the
  513. // size of memory that the function allocates and returns. The one-argument
  514. // form labels a single argument that gives the allocation size (where the
  515. // arguments are numbered from 1):
  516. //
  517. // void *malloc(size_t __size) __alloc_size(1);
  518. //
  519. // The two-argument form handles the case where the size is calculated as the
  520. // product of two arguments:
  521. //
  522. // void *calloc(size_t __count, size_t __size) __alloc_size(1,2);
  523. // COMPILATION ENVIRONMENTS -- see compat(5) for additional detail
  524. //
  525. // DEFAULT By default newly complied code will get POSIX APIs plus
  526. // Apple API extensions in scope.
  527. //
  528. // Most users will use this compilation environment to avoid
  529. // behavioral differences between 32 and 64 bit code.
  530. //
  531. // LEGACY Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple
  532. // API extensions in scope.
  533. //
  534. // This is generally equivalent to the Tiger release compilation
  535. // environment, except that it cannot be applied to 64 bit code;
  536. // its use is discouraged.
  537. //
  538. // We expect this environment to be deprecated in the future.
  539. //
  540. // STRICT Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
  541. // available APIs to exactly the set of APIs defined by the
  542. // corresponding standard, based on the value defined.
  543. //
  544. // A correct, portable definition for _POSIX_C_SOURCE is 200112L.
  545. // A correct, portable definition for _XOPEN_SOURCE is 600L.
  546. //
  547. // Apple API extensions are not visible in this environment,
  548. // which can cause Apple specific code to fail to compile,
  549. // or behave incorrectly if prototypes are not in scope or
  550. // warnings about missing prototypes are not enabled or ignored.
  551. //
  552. // In any compilation environment, for correct symbol resolution to occur,
  553. // function prototypes must be in scope. It is recommended that all Apple
  554. // tools users add either the "-Wall" or "-Wimplicit-function-declaration"
  555. // compiler flags to their projects to be warned when a function is being
  556. // used without a prototype in scope.
  557. // These settings are particular to each product.
  558. // Platform: MacOSX
  559. // The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
  560. // legacy code to use the old symbol, thus maintaining binary compatibility
  561. // while new code can use a standards compliant version of the same function.
  562. //
  563. // __DARWIN_ALIAS is used by itself if the function signature has not
  564. // changed, it is used along with a #ifdef check for __DARWIN_UNIX03
  565. // if the signature has changed. Because the __LP64__ environment
  566. // only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be
  567. // defined, but causes __DARWIN_ALIAS to do no symbol mangling.
  568. //
  569. // As a special case, when XCode is used to target a specific version of the
  570. // OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
  571. // will be defined by the compiler, with the digits representing major version
  572. // time 100 + minor version times 10 (e.g. 10.5 := 1050). If we are targeting
  573. // pre-10.5, and it is the default compilation environment, revert the
  574. // compilation environment to pre-__DARWIN_UNIX03.
  575. // symbol suffixes used for symbol versioning
  576. // symbol versioning macros
  577. // symbol release macros
  578. // Copyright (c) 2010 Apple Inc. All rights reserved.
  579. //
  580. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  581. //
  582. // This file contains Original Code and/or Modifications of Original Code
  583. // as defined in and that are subject to the Apple Public Source License
  584. // Version 2.0 (the 'License'). You may not use this file except in
  585. // compliance with the License. The rights granted to you under the License
  586. // may not be used to create, or enable the creation or redistribution of,
  587. // unlawful or unlicensed copies of an Apple operating system, or to
  588. // circumvent, violate, or enable the circumvention or violation of, any
  589. // terms of an Apple operating system software license agreement.
  590. //
  591. // Please obtain a copy of the License at
  592. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  593. //
  594. // The Original Code and all software distributed under the License are
  595. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  596. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  597. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  598. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  599. // Please see the License for the specific language governing rights and
  600. // limitations under the License.
  601. //
  602. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  603. // POSIX.1 requires that the macros we test be defined before any standard
  604. // header file is included. This permits us to convert values for feature
  605. // testing, as necessary, using only _POSIX_C_SOURCE.
  606. //
  607. // Here's a quick run-down of the versions:
  608. // defined(_POSIX_SOURCE) 1003.1-1988
  609. // _POSIX_C_SOURCE == 1L 1003.1-1990
  610. // _POSIX_C_SOURCE == 2L 1003.2-1992 C Language Binding Option
  611. // _POSIX_C_SOURCE == 199309L 1003.1b-1993
  612. // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
  613. // and the omnibus ISO/IEC 9945-1: 1996
  614. // _POSIX_C_SOURCE == 200112L 1003.1-2001
  615. // _POSIX_C_SOURCE == 200809L 1003.1-2008
  616. //
  617. // In addition, the X/Open Portability Guide, which is now the Single UNIX
  618. // Specification, defines a feature-test macro which indicates the version of
  619. // that specification, and which subsumes _POSIX_C_SOURCE.
  620. // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L.
  621. // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L.
  622. // Deal with various X/Open Portability Guides and Single UNIX Spec.
  623. // Deal with all versions of POSIX. The ordering relative to the tests above is
  624. // important.
  625. // POSIX C deprecation macros
  626. // Copyright (c) 2010 Apple Inc. All rights reserved.
  627. //
  628. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  629. //
  630. // This file contains Original Code and/or Modifications of Original Code
  631. // as defined in and that are subject to the Apple Public Source License
  632. // Version 2.0 (the 'License'). You may not use this file except in
  633. // compliance with the License. The rights granted to you under the License
  634. // may not be used to create, or enable the creation or redistribution of,
  635. // unlawful or unlicensed copies of an Apple operating system, or to
  636. // circumvent, violate, or enable the circumvention or violation of, any
  637. // terms of an Apple operating system software license agreement.
  638. //
  639. // Please obtain a copy of the License at
  640. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  641. //
  642. // The Original Code and all software distributed under the License are
  643. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  644. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  645. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  646. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  647. // Please see the License for the specific language governing rights and
  648. // limitations under the License.
  649. //
  650. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  651. // Set a single macro which will always be defined and can be used to determine
  652. // the appropriate namespace. For POSIX, these values will correspond to
  653. // _POSIX_C_SOURCE value. Currently there are two additional levels corresponding
  654. // to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)
  655. // If the developer has neither requested a strict language mode nor a version
  656. // of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part
  657. // of __DARWIN_C_FULL.
  658. // long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and
  659. // c99 still want long longs. While not perfect, we allow long longs for
  660. // g++.
  661. // ****************************************
  662. //
  663. // Public darwin-specific feature macros
  664. //
  665. // _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and
  666. // structures modified for 64-bit inodes (like struct stat) will be used.
  667. // _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only
  668. // be 64-bit; there is no support for 32-bit ino_t when this macro is defined
  669. // (and non-zero). There is no struct stat64 either, as the regular
  670. // struct stat will already be the 64-bit version.
  671. // _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated
  672. // in 10.5 exists; no pre-10.5 variants are available.
  673. // _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API
  674. // are available (the legacy BSD APIs are not available)
  675. // _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,
  676. // and specifies the conformance level (3 is SUSv3)
  677. // This macro casts away the qualifier from the variable
  678. //
  679. // Note: use at your own risk, removing qualifiers can result in
  680. // catastrophic run-time failures.
  681. // __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be
  682. // used from other compilation units, but not other libraries or executables.
  683. // We intentionally define to nothing pointer attributes which do not have an
  684. // impact on the ABI. __indexable and __bidi_indexable are not defined because
  685. // of the ABI incompatibility that makes the diagnostic preferable.
  686. // Similarly, we intentionally define to nothing the
  687. // __ptrcheck_abi_assume_single and __ptrcheck_abi_assume_unsafe_indexable
  688. // macros because they do not lead to an ABI incompatibility. However, we do not
  689. // define the indexable and unsafe_indexable ones because the diagnostic is
  690. // better than the silent ABI break.
  691. // __unsafe_forge intrinsics are defined as regular C casts.
  692. // decay operates normally; attribute is meaningless without pointer checks.
  693. // Architecture validation for current SDK
  694. // Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS
  695. //
  696. // This provides more advanced type checking on compilers supporting
  697. // the proper extensions, even in C.
  698. // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  699. //
  700. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  701. //
  702. // This file contains Original Code and/or Modifications of Original Code
  703. // as defined in and that are subject to the Apple Public Source License
  704. // Version 2.0 (the 'License'). You may not use this file except in
  705. // compliance with the License. The rights granted to you under the License
  706. // may not be used to create, or enable the creation or redistribution of,
  707. // unlawful or unlicensed copies of an Apple operating system, or to
  708. // circumvent, violate, or enable the circumvention or violation of, any
  709. // terms of an Apple operating system software license agreement.
  710. //
  711. // Please obtain a copy of the License at
  712. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  713. //
  714. // The Original Code and all software distributed under the License are
  715. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  716. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  717. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  718. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  719. // Please see the License for the specific language governing rights and
  720. // limitations under the License.
  721. //
  722. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  723. // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  724. // This header file contains integer types. It's intended to also contain
  725. // flotaing point and other arithmetic types, as needed, later.
  726. type X__int8_t = int8 /* _types.h:15:33 */
  727. type X__uint8_t = uint8 /* _types.h:19:33 */
  728. type X__int16_t = int16 /* _types.h:20:33 */
  729. type X__uint16_t = uint16 /* _types.h:21:33 */
  730. type X__int32_t = int32 /* _types.h:22:33 */
  731. type X__uint32_t = uint32 /* _types.h:23:33 */
  732. type X__int64_t = int64 /* _types.h:24:33 */
  733. type X__uint64_t = uint64 /* _types.h:25:33 */
  734. type X__darwin_intptr_t = int64 /* _types.h:27:33 */
  735. type X__darwin_natural_t = uint32 /* _types.h:28:33 */
  736. // The rune type below is declared to be an ``int'' instead of the more natural
  737. // ``unsigned long'' or ``long''. Two things are happening here. It is not
  738. // unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
  739. // it looks like 10646 will be a 31 bit standard. This means that if your
  740. // ints cannot hold 32 bits, you will be in trouble. The reason an int was
  741. // chosen over a long is that the is*() and to*() routines take ints (says
  742. // ANSI C), but they use __darwin_ct_rune_t instead of int. By changing it
  743. // here, you lose a bit of ANSI conformance, but your programs will still
  744. // work.
  745. //
  746. // NOTE: rune_t is not covered by ANSI nor other standards, and should not
  747. // be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
  748. // rune_t must be the same type. Also wint_t must be no narrower than
  749. // wchar_t, and should also be able to hold all members of the largest
  750. // character set plus one extra value (WEOF). wint_t must be at least 16 bits.
  751. type X__darwin_ct_rune_t = int32 /* _types.h:48:33 */ // ct_rune_t
  752. // mbstate_t is an opaque object to keep conversion state, during multibyte
  753. // stream conversions. The content must not be referenced by user programs.
  754. type X__mbstate_t = struct {
  755. F__ccgo_pad1 [0]uint64
  756. F__mbstate8 [128]int8
  757. } /* _types.h:57:3 */
  758. type X__darwin_mbstate_t = X__mbstate_t /* _types.h:59:33 */ // mbstate_t
  759. type X__darwin_ptrdiff_t = int64 /* _types.h:62:33 */ // ptr1 - ptr2
  760. type X__darwin_size_t = uint64 /* _types.h:70:33 */ // sizeof()
  761. type X__darwin_va_list = X__builtin_va_list /* _types.h:76:33 */ // va_list
  762. type X__darwin_wchar_t = int32 /* _types.h:82:33 */ // wchar_t
  763. type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:87:33 */ // rune_t
  764. type X__darwin_wint_t = int32 /* _types.h:90:33 */ // wint_t
  765. type X__darwin_clock_t = uint64 /* _types.h:95:33 */ // clock()
  766. type X__darwin_socklen_t = X__uint32_t /* _types.h:96:33 */ // socklen_t (duh)
  767. type X__darwin_ssize_t = int64 /* _types.h:97:33 */ // byte count or error
  768. type X__darwin_time_t = int64 /* _types.h:98:33 */ // time()
  769. // Type definitions; takes common type definitions that must be used
  770. // in multiple header files due to [XSI], removes them from the system
  771. // space, and puts them in the implementation space.
  772. type X__darwin_blkcnt_t = X__int64_t /* _types.h:55:25 */ // total blocks
  773. type X__darwin_blksize_t = X__int32_t /* _types.h:56:25 */ // preferred block size
  774. type X__darwin_dev_t = X__int32_t /* _types.h:57:25 */ // dev_t
  775. type X__darwin_fsblkcnt_t = uint32 /* _types.h:58:25 */ // Used by statvfs and fstatvfs
  776. type X__darwin_fsfilcnt_t = uint32 /* _types.h:59:25 */ // Used by statvfs and fstatvfs
  777. type X__darwin_gid_t = X__uint32_t /* _types.h:60:25 */ // [???] process and group IDs
  778. type X__darwin_id_t = X__uint32_t /* _types.h:61:25 */ // [XSI] pid_t, uid_t, or gid_t
  779. type X__darwin_ino64_t = X__uint64_t /* _types.h:62:25 */ // [???] Used for 64 bit inodes
  780. type X__darwin_ino_t = X__darwin_ino64_t /* _types.h:64:26 */ // [???] Used for inodes
  781. type X__darwin_mach_port_name_t = X__darwin_natural_t /* _types.h:68:28 */ // Used by mach
  782. type X__darwin_mach_port_t = X__darwin_mach_port_name_t /* _types.h:69:35 */ // Used by mach
  783. type X__darwin_mode_t = X__uint16_t /* _types.h:70:25 */ // [???] Some file attributes
  784. type X__darwin_off_t = X__int64_t /* _types.h:71:25 */ // [???] Used for file sizes
  785. type X__darwin_pid_t = X__int32_t /* _types.h:72:25 */ // [???] process and group IDs
  786. type X__darwin_sigset_t = X__uint32_t /* _types.h:73:25 */ // [???] signal set
  787. type X__darwin_suseconds_t = X__int32_t /* _types.h:74:25 */ // [???] microseconds
  788. type X__darwin_uid_t = X__uint32_t /* _types.h:75:25 */ // [???] user IDs
  789. type X__darwin_useconds_t = X__uint32_t /* _types.h:76:25 */ // [???] microseconds
  790. type X__darwin_uuid_t = [16]uint8 /* _types.h:77:25 */
  791. type X__darwin_uuid_string_t = [37]int8 /* _types.h:78:17 */
  792. // Copyright (c) 2003-2013 Apple Inc. All rights reserved.
  793. //
  794. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  795. //
  796. // This file contains Original Code and/or Modifications of Original Code
  797. // as defined in and that are subject to the Apple Public Source License
  798. // Version 2.0 (the 'License'). You may not use this file except in
  799. // compliance with the License. The rights granted to you under the License
  800. // may not be used to create, or enable the creation or redistribution of,
  801. // unlawful or unlicensed copies of an Apple operating system, or to
  802. // circumvent, violate, or enable the circumvention or violation of, any
  803. // terms of an Apple operating system software license agreement.
  804. //
  805. // Please obtain a copy of the License at
  806. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  807. //
  808. // The Original Code and all software distributed under the License are
  809. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  810. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  811. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  812. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  813. // Please see the License for the specific language governing rights and
  814. // limitations under the License.
  815. //
  816. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  817. // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  818. //
  819. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  820. //
  821. // This file contains Original Code and/or Modifications of Original Code
  822. // as defined in and that are subject to the Apple Public Source License
  823. // Version 2.0 (the 'License'). You may not use this file except in
  824. // compliance with the License. The rights granted to you under the License
  825. // may not be used to create, or enable the creation or redistribution of,
  826. // unlawful or unlicensed copies of an Apple operating system, or to
  827. // circumvent, violate, or enable the circumvention or violation of, any
  828. // terms of an Apple operating system software license agreement.
  829. //
  830. // Please obtain a copy of the License at
  831. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  832. //
  833. // The Original Code and all software distributed under the License are
  834. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  835. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  836. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  837. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  838. // Please see the License for the specific language governing rights and
  839. // limitations under the License.
  840. //
  841. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  842. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  843. // Copyright (c) 1991, 1993
  844. // The Regents of the University of California. All rights reserved.
  845. //
  846. // This code is derived from software contributed to Berkeley by
  847. // Berkeley Software Design, Inc.
  848. //
  849. // Redistribution and use in source and binary forms, with or without
  850. // modification, are permitted provided that the following conditions
  851. // are met:
  852. // 1. Redistributions of source code must retain the above copyright
  853. // notice, this list of conditions and the following disclaimer.
  854. // 2. Redistributions in binary form must reproduce the above copyright
  855. // notice, this list of conditions and the following disclaimer in the
  856. // documentation and/or other materials provided with the distribution.
  857. // 3. All advertising materials mentioning features or use of this software
  858. // must display the following acknowledgement:
  859. // This product includes software developed by the University of
  860. // California, Berkeley and its contributors.
  861. // 4. Neither the name of the University nor the names of its contributors
  862. // may be used to endorse or promote products derived from this software
  863. // without specific prior written permission.
  864. //
  865. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  866. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  867. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  868. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  869. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  870. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  871. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  872. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  873. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  874. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  875. // SUCH DAMAGE.
  876. //
  877. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  878. // pthread opaque structures
  879. type X__darwin_pthread_handler_rec = struct {
  880. F__routine uintptr
  881. F__arg uintptr
  882. F__next uintptr
  883. } /* _pthread_types.h:57:1 */
  884. type X_opaque_pthread_attr_t = struct {
  885. F__sig int64
  886. F__opaque [56]int8
  887. } /* _pthread_types.h:63:1 */
  888. type X_opaque_pthread_cond_t = struct {
  889. F__sig int64
  890. F__opaque [40]int8
  891. } /* _pthread_types.h:68:1 */
  892. type X_opaque_pthread_condattr_t = struct {
  893. F__sig int64
  894. F__opaque [8]int8
  895. } /* _pthread_types.h:73:1 */
  896. type X_opaque_pthread_mutex_t = struct {
  897. F__sig int64
  898. F__opaque [56]int8
  899. } /* _pthread_types.h:78:1 */
  900. type X_opaque_pthread_mutexattr_t = struct {
  901. F__sig int64
  902. F__opaque [8]int8
  903. } /* _pthread_types.h:83:1 */
  904. type X_opaque_pthread_once_t = struct {
  905. F__sig int64
  906. F__opaque [8]int8
  907. } /* _pthread_types.h:88:1 */
  908. type X_opaque_pthread_rwlock_t = struct {
  909. F__sig int64
  910. F__opaque [192]int8
  911. } /* _pthread_types.h:93:1 */
  912. type X_opaque_pthread_rwlockattr_t = struct {
  913. F__sig int64
  914. F__opaque [16]int8
  915. } /* _pthread_types.h:98:1 */
  916. type X_opaque_pthread_t = struct {
  917. F__sig int64
  918. F__cleanup_stack uintptr
  919. F__opaque [8176]int8
  920. } /* _pthread_types.h:103:1 */
  921. type X__darwin_pthread_attr_t = X_opaque_pthread_attr_t /* _pthread_types.h:109:39 */
  922. type X__darwin_pthread_cond_t = X_opaque_pthread_cond_t /* _pthread_types.h:110:39 */
  923. type X__darwin_pthread_condattr_t = X_opaque_pthread_condattr_t /* _pthread_types.h:111:43 */
  924. type X__darwin_pthread_key_t = uint64 /* _pthread_types.h:112:23 */
  925. type X__darwin_pthread_mutex_t = X_opaque_pthread_mutex_t /* _pthread_types.h:113:40 */
  926. type X__darwin_pthread_mutexattr_t = X_opaque_pthread_mutexattr_t /* _pthread_types.h:114:44 */
  927. type X__darwin_pthread_once_t = X_opaque_pthread_once_t /* _pthread_types.h:115:39 */
  928. type X__darwin_pthread_rwlock_t = X_opaque_pthread_rwlock_t /* _pthread_types.h:116:41 */
  929. type X__darwin_pthread_rwlockattr_t = X_opaque_pthread_rwlockattr_t /* _pthread_types.h:117:45 */
  930. type X__darwin_pthread_t = uintptr /* _pthread_types.h:118:34 */
  931. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  932. //
  933. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  934. //
  935. // This file contains Original Code and/or Modifications of Original Code
  936. // as defined in and that are subject to the Apple Public Source License
  937. // Version 2.0 (the 'License'). You may not use this file except in
  938. // compliance with the License. The rights granted to you under the License
  939. // may not be used to create, or enable the creation or redistribution of,
  940. // unlawful or unlicensed copies of an Apple operating system, or to
  941. // circumvent, violate, or enable the circumvention or violation of, any
  942. // terms of an Apple operating system software license agreement.
  943. //
  944. // Please obtain a copy of the License at
  945. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  946. //
  947. // The Original Code and all software distributed under the License are
  948. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  949. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  950. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  951. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  952. // Please see the License for the specific language governing rights and
  953. // limitations under the License.
  954. //
  955. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  956. // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  957. //
  958. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  959. //
  960. // This file contains Original Code and/or Modifications of Original Code
  961. // as defined in and that are subject to the Apple Public Source License
  962. // Version 2.0 (the 'License'). You may not use this file except in
  963. // compliance with the License. The rights granted to you under the License
  964. // may not be used to create, or enable the creation or redistribution of,
  965. // unlawful or unlicensed copies of an Apple operating system, or to
  966. // circumvent, violate, or enable the circumvention or violation of, any
  967. // terms of an Apple operating system software license agreement.
  968. //
  969. // Please obtain a copy of the License at
  970. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  971. //
  972. // The Original Code and all software distributed under the License are
  973. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  974. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  975. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  976. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  977. // Please see the License for the specific language governing rights and
  978. // limitations under the License.
  979. //
  980. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  981. type Mode_t = X__darwin_mode_t /* _mode_t.h:31:33 */
  982. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  983. //
  984. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  985. //
  986. // This file contains Original Code and/or Modifications of Original Code
  987. // as defined in and that are subject to the Apple Public Source License
  988. // Version 2.0 (the 'License'). You may not use this file except in
  989. // compliance with the License. The rights granted to you under the License
  990. // may not be used to create, or enable the creation or redistribution of,
  991. // unlawful or unlicensed copies of an Apple operating system, or to
  992. // circumvent, violate, or enable the circumvention or violation of, any
  993. // terms of an Apple operating system software license agreement.
  994. //
  995. // Please obtain a copy of the License at
  996. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  997. //
  998. // The Original Code and all software distributed under the License are
  999. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1000. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1001. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1002. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1003. // Please see the License for the specific language governing rights and
  1004. // limitations under the License.
  1005. //
  1006. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1007. // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  1008. //
  1009. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1010. //
  1011. // This file contains Original Code and/or Modifications of Original Code
  1012. // as defined in and that are subject to the Apple Public Source License
  1013. // Version 2.0 (the 'License'). You may not use this file except in
  1014. // compliance with the License. The rights granted to you under the License
  1015. // may not be used to create, or enable the creation or redistribution of,
  1016. // unlawful or unlicensed copies of an Apple operating system, or to
  1017. // circumvent, violate, or enable the circumvention or violation of, any
  1018. // terms of an Apple operating system software license agreement.
  1019. //
  1020. // Please obtain a copy of the License at
  1021. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1022. //
  1023. // The Original Code and all software distributed under the License are
  1024. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1025. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1026. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1027. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1028. // Please see the License for the specific language governing rights and
  1029. // limitations under the License.
  1030. //
  1031. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1032. type Off_t = X__darwin_off_t /* _off_t.h:31:33 */
  1033. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1034. //
  1035. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1036. //
  1037. // This file contains Original Code and/or Modifications of Original Code
  1038. // as defined in and that are subject to the Apple Public Source License
  1039. // Version 2.0 (the 'License'). You may not use this file except in
  1040. // compliance with the License. The rights granted to you under the License
  1041. // may not be used to create, or enable the creation or redistribution of,
  1042. // unlawful or unlicensed copies of an Apple operating system, or to
  1043. // circumvent, violate, or enable the circumvention or violation of, any
  1044. // terms of an Apple operating system software license agreement.
  1045. //
  1046. // Please obtain a copy of the License at
  1047. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1048. //
  1049. // The Original Code and all software distributed under the License are
  1050. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1051. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1052. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1053. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1054. // Please see the License for the specific language governing rights and
  1055. // limitations under the License.
  1056. //
  1057. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1058. // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
  1059. //
  1060. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1061. //
  1062. // This file contains Original Code and/or Modifications of Original Code
  1063. // as defined in and that are subject to the Apple Public Source License
  1064. // Version 2.0 (the 'License'). You may not use this file except in
  1065. // compliance with the License. The rights granted to you under the License
  1066. // may not be used to create, or enable the creation or redistribution of,
  1067. // unlawful or unlicensed copies of an Apple operating system, or to
  1068. // circumvent, violate, or enable the circumvention or violation of, any
  1069. // terms of an Apple operating system software license agreement.
  1070. //
  1071. // Please obtain a copy of the License at
  1072. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1073. //
  1074. // The Original Code and all software distributed under the License are
  1075. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1076. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1077. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1078. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1079. // Please see the License for the specific language governing rights and
  1080. // limitations under the License.
  1081. //
  1082. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1083. type Pid_t = X__darwin_pid_t /* _pid_t.h:31:31 */
  1084. // File status flags: these are used by open(2), fcntl(2).
  1085. // They are also used (indirectly) in the kernel file structure f_flags,
  1086. // which is a superset of the open/fcntl flags. Open flags and f_flags
  1087. // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
  1088. // Open/fcntl flags begin with O_; kernel-internal flags begin with F.
  1089. // open-only flags
  1090. // Kernel encoding of open mode; separate read and write bits that are
  1091. // independently testable: 1 greater than the above.
  1092. //
  1093. // XXX
  1094. // FREAD and FWRITE are excluded from the #ifdef KERNEL so that TIOCFLUSH,
  1095. // which was documented to use FREAD/FWRITE, continues to work.
  1096. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1097. //
  1098. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1099. //
  1100. // This file contains Original Code and/or Modifications of Original Code
  1101. // as defined in and that are subject to the Apple Public Source License
  1102. // Version 2.0 (the 'License'). You may not use this file except in
  1103. // compliance with the License. The rights granted to you under the License
  1104. // may not be used to create, or enable the creation or redistribution of,
  1105. // unlawful or unlicensed copies of an Apple operating system, or to
  1106. // circumvent, violate, or enable the circumvention or violation of, any
  1107. // terms of an Apple operating system software license agreement.
  1108. //
  1109. // Please obtain a copy of the License at
  1110. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1111. //
  1112. // The Original Code and all software distributed under the License are
  1113. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1114. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1115. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1116. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1117. // Please see the License for the specific language governing rights and
  1118. // limitations under the License.
  1119. //
  1120. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1121. // O_DSYNC 0x00400000 /* synch I/O data integrity */
  1122. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1123. //
  1124. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1125. //
  1126. // This file contains Original Code and/or Modifications of Original Code
  1127. // as defined in and that are subject to the Apple Public Source License
  1128. // Version 2.0 (the 'License'). You may not use this file except in
  1129. // compliance with the License. The rights granted to you under the License
  1130. // may not be used to create, or enable the creation or redistribution of,
  1131. // unlawful or unlicensed copies of an Apple operating system, or to
  1132. // circumvent, violate, or enable the circumvention or violation of, any
  1133. // terms of an Apple operating system software license agreement.
  1134. //
  1135. // Please obtain a copy of the License at
  1136. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1137. //
  1138. // The Original Code and all software distributed under the License are
  1139. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1140. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1141. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1142. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1143. // Please see the License for the specific language governing rights and
  1144. // limitations under the License.
  1145. //
  1146. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1147. // Descriptor value for the current working directory
  1148. // Flags for the at functions
  1149. // Data Protection Flags
  1150. // The O_* flags used to have only F* names, which were used in the kernel
  1151. // and by fcntl. We retain the F* names for the kernel f_flags field
  1152. // and for backward compatibility for fcntl.
  1153. // Flags used for copyfile(2)
  1154. // Constants used for fcntl(2)
  1155. // command values
  1156. // 46,47 used to be F_READBOOTSTRAP and F_WRITEBOOTSTRAP
  1157. // should not be used (i.e. its ok to temporaily create cached pages)
  1158. // See F_DUPFD_CLOEXEC below for 67
  1159. // may be broken into smaller chunks with throttling in between
  1160. // FS-specific fcntl()'s numbers begin at 0x00010000 and go up
  1161. // file descriptor flags (F_GETFD, F_SETFD)
  1162. // record locking flags (F_GETLK, F_SETLK, F_SETLKW)
  1163. // [XSI] The values used for l_whence shall be defined as described
  1164. // in <unistd.h>
  1165. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1166. //
  1167. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1168. //
  1169. // This file contains Original Code and/or Modifications of Original Code
  1170. // as defined in and that are subject to the Apple Public Source License
  1171. // Version 2.0 (the 'License'). You may not use this file except in
  1172. // compliance with the License. The rights granted to you under the License
  1173. // may not be used to create, or enable the creation or redistribution of,
  1174. // unlawful or unlicensed copies of an Apple operating system, or to
  1175. // circumvent, violate, or enable the circumvention or violation of, any
  1176. // terms of an Apple operating system software license agreement.
  1177. //
  1178. // Please obtain a copy of the License at
  1179. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1180. //
  1181. // The Original Code and all software distributed under the License are
  1182. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1183. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1184. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1185. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1186. // Please see the License for the specific language governing rights and
  1187. // limitations under the License.
  1188. //
  1189. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1190. // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  1191. //
  1192. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1193. //
  1194. // This file contains Original Code and/or Modifications of Original Code
  1195. // as defined in and that are subject to the Apple Public Source License
  1196. // Version 2.0 (the 'License'). You may not use this file except in
  1197. // compliance with the License. The rights granted to you under the License
  1198. // may not be used to create, or enable the creation or redistribution of,
  1199. // unlawful or unlicensed copies of an Apple operating system, or to
  1200. // circumvent, violate, or enable the circumvention or violation of, any
  1201. // terms of an Apple operating system software license agreement.
  1202. //
  1203. // Please obtain a copy of the License at
  1204. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1205. //
  1206. // The Original Code and all software distributed under the License are
  1207. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1208. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1209. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1210. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1211. // Please see the License for the specific language governing rights and
  1212. // limitations under the License.
  1213. //
  1214. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1215. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1216. // Copyright (c) 1991, 1993
  1217. // The Regents of the University of California. All rights reserved.
  1218. //
  1219. // This code is derived from software contributed to Berkeley by
  1220. // Berkeley Software Design, Inc.
  1221. //
  1222. // Redistribution and use in source and binary forms, with or without
  1223. // modification, are permitted provided that the following conditions
  1224. // are met:
  1225. // 1. Redistributions of source code must retain the above copyright
  1226. // notice, this list of conditions and the following disclaimer.
  1227. // 2. Redistributions in binary form must reproduce the above copyright
  1228. // notice, this list of conditions and the following disclaimer in the
  1229. // documentation and/or other materials provided with the distribution.
  1230. // 3. All advertising materials mentioning features or use of this software
  1231. // must display the following acknowledgement:
  1232. // This product includes software developed by the University of
  1233. // California, Berkeley and its contributors.
  1234. // 4. Neither the name of the University nor the names of its contributors
  1235. // may be used to endorse or promote products derived from this software
  1236. // without specific prior written permission.
  1237. //
  1238. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1239. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1240. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1241. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1242. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1243. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1244. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1245. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1246. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1247. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1248. // SUCH DAMAGE.
  1249. //
  1250. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  1251. // whence values for lseek(2)
  1252. // [XSI] The symbolic names for file modes for use as values of mode_t
  1253. // shall be defined as described in <sys/stat.h>
  1254. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1255. //
  1256. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1257. //
  1258. // This file contains Original Code and/or Modifications of Original Code
  1259. // as defined in and that are subject to the Apple Public Source License
  1260. // Version 2.0 (the 'License'). You may not use this file except in
  1261. // compliance with the License. The rights granted to you under the License
  1262. // may not be used to create, or enable the creation or redistribution of,
  1263. // unlawful or unlicensed copies of an Apple operating system, or to
  1264. // circumvent, violate, or enable the circumvention or violation of, any
  1265. // terms of an Apple operating system software license agreement.
  1266. //
  1267. // Please obtain a copy of the License at
  1268. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1269. //
  1270. // The Original Code and all software distributed under the License are
  1271. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1272. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1273. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1274. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1275. // Please see the License for the specific language governing rights and
  1276. // limitations under the License.
  1277. //
  1278. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1279. // [XSI] The symbolic names for file modes for use as values of mode_t
  1280. // shall be defined as described in <sys/stat.h>
  1281. // File type
  1282. // File mode
  1283. // Read, write, execute/search by owner
  1284. // Read, write, execute/search by group
  1285. // Read, write, execute/search by others
  1286. // allocate flags (F_PREALLOCATE)
  1287. // Position Modes (fst_posmode) for F_PREALLOCATE
  1288. // we can keep them in sync should we desire
  1289. // Advisory file segment locking data type -
  1290. // information passed to system by user
  1291. type Flock = struct {
  1292. Fl_start Off_t
  1293. Fl_len Off_t
  1294. Fl_pid Pid_t
  1295. Fl_type int16
  1296. Fl_whence int16
  1297. } /* fcntl.h:361:1 */
  1298. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1299. //
  1300. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1301. //
  1302. // This file contains Original Code and/or Modifications of Original Code
  1303. // as defined in and that are subject to the Apple Public Source License
  1304. // Version 2.0 (the 'License'). You may not use this file except in
  1305. // compliance with the License. The rights granted to you under the License
  1306. // may not be used to create, or enable the creation or redistribution of,
  1307. // unlawful or unlicensed copies of an Apple operating system, or to
  1308. // circumvent, violate, or enable the circumvention or violation of, any
  1309. // terms of an Apple operating system software license agreement.
  1310. //
  1311. // Please obtain a copy of the License at
  1312. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1313. //
  1314. // The Original Code and all software distributed under the License are
  1315. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1316. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1317. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1318. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1319. // Please see the License for the specific language governing rights and
  1320. // limitations under the License.
  1321. //
  1322. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1323. // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  1324. //
  1325. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1326. //
  1327. // This file contains Original Code and/or Modifications of Original Code
  1328. // as defined in and that are subject to the Apple Public Source License
  1329. // Version 2.0 (the 'License'). You may not use this file except in
  1330. // compliance with the License. The rights granted to you under the License
  1331. // may not be used to create, or enable the creation or redistribution of,
  1332. // unlawful or unlicensed copies of an Apple operating system, or to
  1333. // circumvent, violate, or enable the circumvention or violation of, any
  1334. // terms of an Apple operating system software license agreement.
  1335. //
  1336. // Please obtain a copy of the License at
  1337. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1338. //
  1339. // The Original Code and all software distributed under the License are
  1340. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1341. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1342. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1343. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1344. // Please see the License for the specific language governing rights and
  1345. // limitations under the License.
  1346. //
  1347. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1348. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1349. // Copyright (c) 2000-2008 Apple Inc. All rights reserved.
  1350. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1351. // Copyright (c) 1990, 1993
  1352. // The Regents of the University of California. All rights reserved.
  1353. //
  1354. // Redistribution and use in source and binary forms, with or without
  1355. // modification, are permitted provided that the following conditions
  1356. // are met:
  1357. // 1. Redistributions of source code must retain the above copyright
  1358. // notice, this list of conditions and the following disclaimer.
  1359. // 2. Redistributions in binary form must reproduce the above copyright
  1360. // notice, this list of conditions and the following disclaimer in the
  1361. // documentation and/or other materials provided with the distribution.
  1362. // 3. All advertising materials mentioning features or use of this software
  1363. // must display the following acknowledgement:
  1364. // This product includes software developed by the University of
  1365. // California, Berkeley and its contributors.
  1366. // 4. Neither the name of the University nor the names of its contributors
  1367. // may be used to endorse or promote products derived from this software
  1368. // without specific prior written permission.
  1369. //
  1370. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1371. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1372. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1373. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1374. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1375. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1376. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1377. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1378. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1379. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1380. // SUCH DAMAGE.
  1381. //
  1382. // @(#)types.h 8.3 (Berkeley) 1/5/94
  1383. // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  1384. // Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  1385. //
  1386. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1387. //
  1388. // This file contains Original Code and/or Modifications of Original Code
  1389. // as defined in and that are subject to the Apple Public Source License
  1390. // Version 2.0 (the 'License'). You may not use this file except in
  1391. // compliance with the License. The rights granted to you under the License
  1392. // may not be used to create, or enable the creation or redistribution of,
  1393. // unlawful or unlicensed copies of an Apple operating system, or to
  1394. // circumvent, violate, or enable the circumvention or violation of, any
  1395. // terms of an Apple operating system software license agreement.
  1396. //
  1397. // Please obtain a copy of the License at
  1398. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1399. //
  1400. // The Original Code and all software distributed under the License are
  1401. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1402. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1403. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1404. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1405. // Please see the License for the specific language governing rights and
  1406. // limitations under the License.
  1407. //
  1408. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1409. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1410. // Copyright (c) 1991, 1993
  1411. // The Regents of the University of California. All rights reserved.
  1412. //
  1413. // This code is derived from software contributed to Berkeley by
  1414. // Berkeley Software Design, Inc.
  1415. //
  1416. // Redistribution and use in source and binary forms, with or without
  1417. // modification, are permitted provided that the following conditions
  1418. // are met:
  1419. // 1. Redistributions of source code must retain the above copyright
  1420. // notice, this list of conditions and the following disclaimer.
  1421. // 2. Redistributions in binary form must reproduce the above copyright
  1422. // notice, this list of conditions and the following disclaimer in the
  1423. // documentation and/or other materials provided with the distribution.
  1424. // 3. All advertising materials mentioning features or use of this software
  1425. // must display the following acknowledgement:
  1426. // This product includes software developed by the University of
  1427. // California, Berkeley and its contributors.
  1428. // 4. Neither the name of the University nor the names of its contributors
  1429. // may be used to endorse or promote products derived from this software
  1430. // without specific prior written permission.
  1431. //
  1432. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1433. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1434. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1435. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1436. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1437. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1438. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1439. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1440. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1441. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1442. // SUCH DAMAGE.
  1443. //
  1444. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  1445. // Basic integral types. Omit the typedef if
  1446. // not possible for a machine/compiler combination.
  1447. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1448. //
  1449. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1450. //
  1451. // This file contains Original Code and/or Modifications of Original Code
  1452. // as defined in and that are subject to the Apple Public Source License
  1453. // Version 2.0 (the 'License'). You may not use this file except in
  1454. // compliance with the License. The rights granted to you under the License
  1455. // may not be used to create, or enable the creation or redistribution of,
  1456. // unlawful or unlicensed copies of an Apple operating system, or to
  1457. // circumvent, violate, or enable the circumvention or violation of, any
  1458. // terms of an Apple operating system software license agreement.
  1459. //
  1460. // Please obtain a copy of the License at
  1461. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1462. //
  1463. // The Original Code and all software distributed under the License are
  1464. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1465. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1466. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1467. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1468. // Please see the License for the specific language governing rights and
  1469. // limitations under the License.
  1470. //
  1471. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1472. type Int8_t = int8 /* _int8_t.h:30:31 */
  1473. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1474. //
  1475. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1476. //
  1477. // This file contains Original Code and/or Modifications of Original Code
  1478. // as defined in and that are subject to the Apple Public Source License
  1479. // Version 2.0 (the 'License'). You may not use this file except in
  1480. // compliance with the License. The rights granted to you under the License
  1481. // may not be used to create, or enable the creation or redistribution of,
  1482. // unlawful or unlicensed copies of an Apple operating system, or to
  1483. // circumvent, violate, or enable the circumvention or violation of, any
  1484. // terms of an Apple operating system software license agreement.
  1485. //
  1486. // Please obtain a copy of the License at
  1487. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1488. //
  1489. // The Original Code and all software distributed under the License are
  1490. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1491. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1492. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1493. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1494. // Please see the License for the specific language governing rights and
  1495. // limitations under the License.
  1496. //
  1497. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1498. type Int16_t = int16 /* _int16_t.h:30:33 */
  1499. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1500. //
  1501. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1502. //
  1503. // This file contains Original Code and/or Modifications of Original Code
  1504. // as defined in and that are subject to the Apple Public Source License
  1505. // Version 2.0 (the 'License'). You may not use this file except in
  1506. // compliance with the License. The rights granted to you under the License
  1507. // may not be used to create, or enable the creation or redistribution of,
  1508. // unlawful or unlicensed copies of an Apple operating system, or to
  1509. // circumvent, violate, or enable the circumvention or violation of, any
  1510. // terms of an Apple operating system software license agreement.
  1511. //
  1512. // Please obtain a copy of the License at
  1513. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1514. //
  1515. // The Original Code and all software distributed under the License are
  1516. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1517. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1518. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1519. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1520. // Please see the License for the specific language governing rights and
  1521. // limitations under the License.
  1522. //
  1523. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1524. type Int32_t = int32 /* _int32_t.h:30:33 */
  1525. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1526. //
  1527. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1528. //
  1529. // This file contains Original Code and/or Modifications of Original Code
  1530. // as defined in and that are subject to the Apple Public Source License
  1531. // Version 2.0 (the 'License'). You may not use this file except in
  1532. // compliance with the License. The rights granted to you under the License
  1533. // may not be used to create, or enable the creation or redistribution of,
  1534. // unlawful or unlicensed copies of an Apple operating system, or to
  1535. // circumvent, violate, or enable the circumvention or violation of, any
  1536. // terms of an Apple operating system software license agreement.
  1537. //
  1538. // Please obtain a copy of the License at
  1539. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1540. //
  1541. // The Original Code and all software distributed under the License are
  1542. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1543. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1544. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1545. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1546. // Please see the License for the specific language governing rights and
  1547. // limitations under the License.
  1548. //
  1549. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1550. type Int64_t = int64 /* _int64_t.h:30:33 */
  1551. // Copyright (c) 2016 Apple Inc. All rights reserved.
  1552. //
  1553. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1554. //
  1555. // This file contains Original Code and/or Modifications of Original Code
  1556. // as defined in and that are subject to the Apple Public Source License
  1557. // Version 2.0 (the 'License'). You may not use this file except in
  1558. // compliance with the License. The rights granted to you under the License
  1559. // may not be used to create, or enable the creation or redistribution of,
  1560. // unlawful or unlicensed copies of an Apple operating system, or to
  1561. // circumvent, violate, or enable the circumvention or violation of, any
  1562. // terms of an Apple operating system software license agreement.
  1563. //
  1564. // Please obtain a copy of the License at
  1565. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1566. //
  1567. // The Original Code and all software distributed under the License are
  1568. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1569. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1570. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1571. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1572. // Please see the License for the specific language governing rights and
  1573. // limitations under the License.
  1574. //
  1575. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1576. type U_int8_t = uint8 /* _u_int8_t.h:30:33 */
  1577. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1578. //
  1579. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1580. //
  1581. // This file contains Original Code and/or Modifications of Original Code
  1582. // as defined in and that are subject to the Apple Public Source License
  1583. // Version 2.0 (the 'License'). You may not use this file except in
  1584. // compliance with the License. The rights granted to you under the License
  1585. // may not be used to create, or enable the creation or redistribution of,
  1586. // unlawful or unlicensed copies of an Apple operating system, or to
  1587. // circumvent, violate, or enable the circumvention or violation of, any
  1588. // terms of an Apple operating system software license agreement.
  1589. //
  1590. // Please obtain a copy of the License at
  1591. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1592. //
  1593. // The Original Code and all software distributed under the License are
  1594. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1595. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1596. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1597. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1598. // Please see the License for the specific language governing rights and
  1599. // limitations under the License.
  1600. //
  1601. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1602. type U_int16_t = uint16 /* _u_int16_t.h:30:41 */
  1603. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1604. //
  1605. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1606. //
  1607. // This file contains Original Code and/or Modifications of Original Code
  1608. // as defined in and that are subject to the Apple Public Source License
  1609. // Version 2.0 (the 'License'). You may not use this file except in
  1610. // compliance with the License. The rights granted to you under the License
  1611. // may not be used to create, or enable the creation or redistribution of,
  1612. // unlawful or unlicensed copies of an Apple operating system, or to
  1613. // circumvent, violate, or enable the circumvention or violation of, any
  1614. // terms of an Apple operating system software license agreement.
  1615. //
  1616. // Please obtain a copy of the License at
  1617. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1618. //
  1619. // The Original Code and all software distributed under the License are
  1620. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1621. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1622. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1623. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1624. // Please see the License for the specific language governing rights and
  1625. // limitations under the License.
  1626. //
  1627. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1628. type U_int32_t = uint32 /* _u_int32_t.h:30:33 */
  1629. // Copyright (c) 2012 Apple Inc. All rights reserved.
  1630. //
  1631. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1632. //
  1633. // This file contains Original Code and/or Modifications of Original Code
  1634. // as defined in and that are subject to the Apple Public Source License
  1635. // Version 2.0 (the 'License'). You may not use this file except in
  1636. // compliance with the License. The rights granted to you under the License
  1637. // may not be used to create, or enable the creation or redistribution of,
  1638. // unlawful or unlicensed copies of an Apple operating system, or to
  1639. // circumvent, violate, or enable the circumvention or violation of, any
  1640. // terms of an Apple operating system software license agreement.
  1641. //
  1642. // Please obtain a copy of the License at
  1643. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1644. //
  1645. // The Original Code and all software distributed under the License are
  1646. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1647. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1648. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1649. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1650. // Please see the License for the specific language governing rights and
  1651. // limitations under the License.
  1652. //
  1653. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1654. type U_int64_t = uint64 /* _u_int64_t.h:30:33 */
  1655. type Register_t = Int64_t /* types.h:66:33 */
  1656. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1657. //
  1658. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1659. //
  1660. // This file contains Original Code and/or Modifications of Original Code
  1661. // as defined in and that are subject to the Apple Public Source License
  1662. // Version 2.0 (the 'License'). You may not use this file except in
  1663. // compliance with the License. The rights granted to you under the License
  1664. // may not be used to create, or enable the creation or redistribution of,
  1665. // unlawful or unlicensed copies of an Apple operating system, or to
  1666. // circumvent, violate, or enable the circumvention or violation of, any
  1667. // terms of an Apple operating system software license agreement.
  1668. //
  1669. // Please obtain a copy of the License at
  1670. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1671. //
  1672. // The Original Code and all software distributed under the License are
  1673. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1674. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1675. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1676. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1677. // Please see the License for the specific language governing rights and
  1678. // limitations under the License.
  1679. //
  1680. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1681. // Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  1682. //
  1683. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1684. //
  1685. // This file contains Original Code and/or Modifications of Original Code
  1686. // as defined in and that are subject to the Apple Public Source License
  1687. // Version 2.0 (the 'License'). You may not use this file except in
  1688. // compliance with the License. The rights granted to you under the License
  1689. // may not be used to create, or enable the creation or redistribution of,
  1690. // unlawful or unlicensed copies of an Apple operating system, or to
  1691. // circumvent, violate, or enable the circumvention or violation of, any
  1692. // terms of an Apple operating system software license agreement.
  1693. //
  1694. // Please obtain a copy of the License at
  1695. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1696. //
  1697. // The Original Code and all software distributed under the License are
  1698. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1699. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1700. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1701. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1702. // Please see the License for the specific language governing rights and
  1703. // limitations under the License.
  1704. //
  1705. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1706. // Copyright 1995 NeXT Computer, Inc. All rights reserved.
  1707. type Intptr_t = X__darwin_intptr_t /* _intptr_t.h:32:33 */
  1708. // Copyright (c) 2003-2012 Apple Inc. All rights reserved.
  1709. //
  1710. // @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  1711. //
  1712. // This file contains Original Code and/or Modifications of Original Code
  1713. // as defined in and that are subject to the Apple Public Source License
  1714. // Version 2.0 (the 'License'). You may not use this file except in
  1715. // compliance with the License. The rights granted to you under the License
  1716. // may not be used to create, or enable the creation or redistribution of,
  1717. // unlawful or unlicensed copies of an Apple operating system, or to
  1718. // circumvent, violate, or enable the circumvention or violation of, any
  1719. // terms of an Apple operating system software license agreement.
  1720. //
  1721. // Please obtain a copy of the License at
  1722. // http://www.opensource.apple.com/apsl/ and read it before using this file.
  1723. //
  1724. // The Original Code and all software distributed under the License are
  1725. // distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  1726. // EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  1727. // INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  1728. // FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  1729. // Please see the License for the specific language governing rights and
  1730. // limitations under the License.
  1731. //
  1732. // @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  1733. type Uintptr_t = uint64 /* _uintptr_t.h:34:33 */
  1734. // These types are used for reserving the largest possible size.
  1735. type User_addr_t = U_int64_t /* types.h:77:33 */
  1736. type User_size_t = U_int64_t /* types.h:78:33 */
  1737. type User_ssize_t = Int64_t /* types.h:79:33 */
  1738. type User_long_t = Int64_t /* types.h:80:33 */
  1739. type User_ulong_t = U_int64_t /* types.h:81:33 */
  1740. type User_time_t = Int64_t /* types.h:82:33 */
  1741. type User_off_t = Int64_t /* types.h:83:33 */
  1742. // This defines the size of syscall arguments after copying into the kernel:
  1743. type Syscall_arg_t = U_int64_t /* types.h:104:33 */
  1744. type Timespec = struct {
  1745. Ftv_sec X__darwin_time_t
  1746. Ftv_nsec int64
  1747. } /* _timespec.h:33:1 */
  1748. // Advisory file segment locking with time out -
  1749. // Information passed to system by user for F_SETLKWTIMEOUT
  1750. type Flocktimeout = struct {
  1751. Ffl struct {
  1752. Fl_start Off_t
  1753. Fl_len Off_t
  1754. Fl_pid Pid_t
  1755. Fl_type int16
  1756. Fl_whence int16
  1757. }
  1758. Ftimeout struct {
  1759. Ftv_sec X__darwin_time_t
  1760. Ftv_nsec int64
  1761. }
  1762. } /* fcntl.h:376:1 */
  1763. // advisory file read data type -
  1764. // information passed by user to system
  1765. type Radvisory = struct {
  1766. Fra_offset Off_t
  1767. Fra_count int32
  1768. F__ccgo_pad1 [4]byte
  1769. } /* fcntl.h:389:1 */
  1770. // detached code signatures data type -
  1771. // information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
  1772. // F_ADDFILESIGS is a shortcut for files that contain their own signature and
  1773. // doesn't require mapping of the file in order to load the signature.
  1774. type Fsignatures = struct {
  1775. Ffs_file_start Off_t
  1776. Ffs_blob_start uintptr
  1777. Ffs_blob_size Size_t
  1778. Ffs_fsignatures_size Size_t
  1779. Ffs_cdhash [20]int8
  1780. Ffs_hash_type int32
  1781. } /* fcntl.h:402:9 */
  1782. // detached code signatures data type -
  1783. // information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
  1784. // F_ADDFILESIGS is a shortcut for files that contain their own signature and
  1785. // doesn't require mapping of the file in order to load the signature.
  1786. type Fsignatures_t = Fsignatures /* fcntl.h:412:3 */
  1787. type Fsupplement = struct {
  1788. Ffs_file_start Off_t
  1789. Ffs_blob_start Off_t
  1790. Ffs_blob_size Size_t
  1791. Ffs_orig_fd int32
  1792. F__ccgo_pad1 [4]byte
  1793. } /* fcntl.h:414:9 */
  1794. type Fsupplement_t = Fsupplement /* fcntl.h:419:3 */
  1795. // DYLD needs to check if the object is allowed to be combined
  1796. // into the main binary. This is done between the code signature
  1797. // is loaded and dyld is doing all the work to process the LOAD commands.
  1798. //
  1799. // While this could be done in F_ADDFILESIGS.* family the hook into
  1800. // the MAC module doesn't say no when LV isn't enabled and then that
  1801. // is cached on the vnode, and the MAC module never gets change once
  1802. // a process that library validation enabled.
  1803. type Fchecklv = struct {
  1804. Flv_file_start Off_t
  1805. Flv_error_message_size Size_t
  1806. Flv_error_message uintptr
  1807. } /* fcntl.h:433:9 */
  1808. // DYLD needs to check if the object is allowed to be combined
  1809. // into the main binary. This is done between the code signature
  1810. // is loaded and dyld is doing all the work to process the LOAD commands.
  1811. //
  1812. // While this could be done in F_ADDFILESIGS.* family the hook into
  1813. // the MAC module doesn't say no when LV isn't enabled and then that
  1814. // is cached on the vnode, and the MAC module never gets change once
  1815. // a process that library validation enabled.
  1816. type Fchecklv_t = Fchecklv /* fcntl.h:437:3 */
  1817. // At this time F_GETSIGSINFO can only indicate platformness.
  1818. // As additional requestable information is defined, new keys will be added and the
  1819. // fgetsigsinfo_t structure will be lengthened to add space for the additional information
  1820. // fgetsigsinfo_t used by F_GETSIGSINFO command
  1821. type Fgetsigsinfo = struct {
  1822. Ffg_file_start Off_t
  1823. Ffg_info_request int32
  1824. Ffg_sig_is_platform int32
  1825. } /* fcntl.h:447:9 */
  1826. // At this time F_GETSIGSINFO can only indicate platformness.
  1827. // As additional requestable information is defined, new keys will be added and the
  1828. // fgetsigsinfo_t structure will be lengthened to add space for the additional information
  1829. // fgetsigsinfo_t used by F_GETSIGSINFO command
  1830. type Fgetsigsinfo_t = Fgetsigsinfo /* fcntl.h:451:3 */
  1831. // lock operations for flock(2)
  1832. // fstore_t type used by F_PREALLOCATE command
  1833. type Fstore = struct {
  1834. Ffst_flags uint32
  1835. Ffst_posmode int32
  1836. Ffst_offset Off_t
  1837. Ffst_length Off_t
  1838. Ffst_bytesalloc Off_t
  1839. } /* fcntl.h:462:9 */
  1840. // lock operations for flock(2)
  1841. // fstore_t type used by F_PREALLOCATE command
  1842. type Fstore_t = Fstore /* fcntl.h:468:3 */
  1843. // fpunchhole_t used by F_PUNCHHOLE
  1844. type Fpunchhole = struct {
  1845. Ffp_flags uint32
  1846. Freserved uint32
  1847. Ffp_offset Off_t
  1848. Ffp_length Off_t
  1849. } /* fcntl.h:471:9 */
  1850. // fpunchhole_t used by F_PUNCHHOLE
  1851. type Fpunchhole_t = Fpunchhole /* fcntl.h:476:3 */
  1852. // factive_file_trim_t used by F_TRIM_ACTIVE_FILE
  1853. type Ftrimactivefile = struct {
  1854. Ffta_offset Off_t
  1855. Ffta_length Off_t
  1856. } /* fcntl.h:479:9 */
  1857. // factive_file_trim_t used by F_TRIM_ACTIVE_FILE
  1858. type Ftrimactivefile_t = Ftrimactivefile /* fcntl.h:482:3 */
  1859. // fspecread_t used by F_SPECULATIVE_READ
  1860. type Fspecread = struct {
  1861. Ffsr_flags uint32
  1862. Freserved uint32
  1863. Ffsr_offset Off_t
  1864. Ffsr_length Off_t
  1865. } /* fcntl.h:485:9 */
  1866. // fspecread_t used by F_SPECULATIVE_READ
  1867. type Fspecread_t = Fspecread /* fcntl.h:490:3 */
  1868. // fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands
  1869. type Fbootstraptransfer = struct {
  1870. Ffbt_offset Off_t
  1871. Ffbt_length Size_t
  1872. Ffbt_buffer uintptr
  1873. } /* fcntl.h:494:9 */
  1874. // fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands
  1875. type Fbootstraptransfer_t = Fbootstraptransfer /* fcntl.h:498:3 */
  1876. // For F_LOG2PHYS this information is passed back to user
  1877. // Currently only devoffset is returned - that is the VOP_BMAP
  1878. // result - the disk device address corresponding to the
  1879. // current file offset (likely set with an lseek).
  1880. //
  1881. // The flags could hold an indication of whether the # of
  1882. // contiguous bytes reflects the true extent length on disk,
  1883. // or is an advisory value that indicates there is at least that
  1884. // many bytes contiguous. For some filesystems it might be too
  1885. // inefficient to provide anything beyond the advisory value.
  1886. // Flags and contiguous bytes return values are not yet implemented.
  1887. // For them the fcntl will nedd to switch from using BMAP to CMAP
  1888. // and a per filesystem type flag will be needed to interpret the
  1889. // contiguous bytes count result from CMAP.
  1890. //
  1891. // F_LOG2PHYS_EXT is a variant of F_LOG2PHYS that uses a passed in
  1892. // file offset and length instead of the current file offset.
  1893. // F_LOG2PHYS_EXT operates on the same structure as F_LOG2PHYS, but
  1894. // treats it as an in/out.
  1895. type Log2phys = struct {
  1896. Fl2p_flags uint32
  1897. F__ccgo_pad1 [4]byte
  1898. Fl2p_contigbytes Off_t
  1899. Fl2p_devoffset Off_t
  1900. } /* fcntl.h:524:1 */
  1901. type Filesec_t = uintptr /* _filesec_t.h:31:25 */
  1902. type Filesec_property_t = uint32 /* fcntl.h:558:3 */
  1903. var _ int8 /* gen.c:2:13: */