fcntl_darwin_amd64.go 100 KB

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