fcntl_netbsd_arm.go 70 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455
  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_netbsd_arm.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 = 0x100 // fcntl.h:297:1:
  15. AT_FDCWD = -100 // fcntl.h:296:1:
  16. AT_REMOVEDIR = 0x800 // fcntl.h:300:1:
  17. AT_SYMLINK_FOLLOW = 0x400 // fcntl.h:299:1:
  18. AT_SYMLINK_NOFOLLOW = 0x200 // fcntl.h:298:1:
  19. BIG_ENDIAN = 4321 // endian.h:101:1:
  20. BYTE_ORDER = 1234 // endian.h:103:1:
  21. FAPPEND = 8 // fcntl.h:156:1:
  22. FASYNC = 64 // fcntl.h:157:1:
  23. FD_CLOEXEC = 1 // fcntl.h:199:1:
  24. FD_SETSIZE = 256 // fd_set.h:59:1:
  25. FNDELAY = 4 // fcntl.h:159:1:
  26. FREAD = 0x00000001 // fcntl.h:78:1:
  27. FWRITE = 0x00000002 // fcntl.h:79:1:
  28. F_CLOSEM = 10 // fcntl.h:191:1:
  29. F_DUPFD = 0 // fcntl.h:177:1:
  30. F_DUPFD_CLOEXEC = 12 // fcntl.h:193:1:
  31. F_GETFD = 1 // fcntl.h:178:1:
  32. F_GETFL = 3 // fcntl.h:180:1:
  33. F_GETLK = 7 // fcntl.h:187:1:
  34. F_GETNOSIGPIPE = 13 // fcntl.h:194:1:
  35. F_GETOWN = 5 // fcntl.h:184:1:
  36. F_MAXFD = 11 // fcntl.h:192:1:
  37. F_PARAM_MASK = 0xfff // fcntl.h:213:1:
  38. F_PARAM_MAX = 4095 // fcntl.h:215:1:
  39. F_RDLCK = 1 // fcntl.h:202:1:
  40. F_SETFD = 2 // fcntl.h:179:1:
  41. F_SETFL = 4 // fcntl.h:181:1:
  42. F_SETLK = 8 // fcntl.h:188:1:
  43. F_SETLKW = 9 // fcntl.h:189:1:
  44. F_SETNOSIGPIPE = 14 // fcntl.h:195:1:
  45. F_SETOWN = 6 // fcntl.h:185:1:
  46. F_UNLCK = 2 // fcntl.h:203:1:
  47. F_WRLCK = 3 // fcntl.h:204:1:
  48. INT16_MAX = 32767 // common_int_limits.h:53:1:
  49. INT16_MIN = -32768 // common_int_limits.h:47:1:
  50. INT32_MAX = 2147483647 // common_int_limits.h:54:1:
  51. INT32_MIN = -2147483648 // common_int_limits.h:48:1:
  52. INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1:
  53. INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1:
  54. INT8_MAX = 127 // common_int_limits.h:52:1:
  55. INT8_MIN = -128 // common_int_limits.h:46:1:
  56. INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1:
  57. INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1:
  58. INTPTR_MAX = 2147483647 // common_int_limits.h:105:1:
  59. INTPTR_MIN = -2147483648 // common_int_limits.h:104:1:
  60. INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1:
  61. INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1:
  62. INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1:
  63. INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1:
  64. INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1:
  65. INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1:
  66. INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1:
  67. INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1:
  68. INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1:
  69. INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1:
  70. INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1:
  71. INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1:
  72. INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1:
  73. INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1:
  74. INT_LEAST8_MAX = 127 // common_int_limits.h:72:1:
  75. INT_LEAST8_MIN = -128 // common_int_limits.h:66:1:
  76. LITTLE_ENDIAN = 1234 // endian.h:100:1:
  77. LOCK_EX = 0x02 // fcntl.h:264:1:
  78. LOCK_NB = 0x04 // fcntl.h:265:1:
  79. LOCK_SH = 0x01 // fcntl.h:263:1:
  80. LOCK_UN = 0x08 // fcntl.h:266:1:
  81. NBBY = 8 // types.h:316:1:
  82. NFDBITS = 32 // fd_set.h:93:1:
  83. NODEVMAJOR = -1 // types.h:258:1:
  84. O_ACCMODE = 0x00000003 // fcntl.h:67:1:
  85. O_ALT_IO = 0x00040000 // fcntl.h:111:1:
  86. O_APPEND = 0x00000008 // fcntl.h:82:1:
  87. O_ASYNC = 0x00000040 // fcntl.h:86:1:
  88. O_CLOEXEC = 0x00400000 // fcntl.h:116:1:
  89. O_CREAT = 0x00000200 // fcntl.h:97:1:
  90. O_DIRECT = 0x00080000 // fcntl.h:112:1:
  91. O_DIRECTORY = 0x00200000 // fcntl.h:115:1:
  92. O_DSYNC = 0x00010000 // fcntl.h:106:1:
  93. O_EXCL = 0x00000800 // fcntl.h:99:1:
  94. O_EXLOCK = 0x00000020 // fcntl.h:85:1:
  95. O_FSYNC = 128 // fcntl.h:158:1:
  96. O_NDELAY = 4 // fcntl.h:160:1:
  97. O_NOCTTY = 0x00008000 // fcntl.h:102:1:
  98. O_NOFOLLOW = 0x00000100 // fcntl.h:94:1:
  99. O_NONBLOCK = 0x00000004 // fcntl.h:81:1:
  100. O_NOSIGPIPE = 0x01000000 // fcntl.h:122:1:
  101. O_RDONLY = 0x00000000 // fcntl.h:64:1:
  102. O_RDWR = 0x00000002 // fcntl.h:66:1:
  103. O_REGULAR = 0x02000000 // fcntl.h:123:1:
  104. O_RSYNC = 0x00020000 // fcntl.h:107:1:
  105. O_SEARCH = 0x00800000 // fcntl.h:119:1:
  106. O_SHLOCK = 0x00000010 // fcntl.h:84:1:
  107. O_SYNC = 0x00000080 // fcntl.h:91:1:
  108. O_TRUNC = 0x00000400 // fcntl.h:98:1:
  109. O_WRONLY = 0x00000001 // fcntl.h:65:1:
  110. PDP_ENDIAN = 3412 // endian.h:102:1:
  111. POSIX_FADV_DONTNEED = 4 // fcntl.h:288:1:
  112. POSIX_FADV_NOREUSE = 5 // fcntl.h:289:1:
  113. POSIX_FADV_NORMAL = 0 // fcntl.h:284:1:
  114. POSIX_FADV_RANDOM = 1 // fcntl.h:285:1:
  115. POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:286:1:
  116. POSIX_FADV_WILLNEED = 3 // fcntl.h:287:1:
  117. PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1:
  118. PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1:
  119. SEEK_CUR = 1 // fcntl.h:274:1:
  120. SEEK_END = 2 // fcntl.h:277:1:
  121. SEEK_SET = 0 // fcntl.h:271:1:
  122. SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1:
  123. SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1:
  124. SIZE_MAX = 4294967295 // common_int_limits.h:128:1:
  125. UINT16_MAX = 65535 // common_int_limits.h:59:1:
  126. UINT32_MAX = 4294967295 // common_int_limits.h:60:1:
  127. UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1:
  128. UINT8_MAX = 255 // common_int_limits.h:58:1:
  129. UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1:
  130. UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1:
  131. UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1:
  132. UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1:
  133. UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1:
  134. UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1:
  135. UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1:
  136. UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1:
  137. UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1:
  138. UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1:
  139. WCHAR_MAX = 2147483647 // wchar_limits.h:50:1:
  140. WCHAR_MIN = -2147483648 // wchar_limits.h:42:1:
  141. WINT_MAX = 2147483647 // wchar_limits.h:68:1:
  142. WINT_MIN = -2147483648 // wchar_limits.h:60:1:
  143. X_ARM_ARCH_4T = 0 // cdefs.h:44:1:
  144. X_ARM_ARCH_5 = 0 // cdefs.h:40:1:
  145. X_ARM_ARCH_5T = 0 // cdefs.h:36:1:
  146. X_ARM_ARCH_6 = 0 // cdefs.h:31:1:
  147. X_ARM_ARCH_7 = 0 // cdefs.h:20:1:
  148. X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1:
  149. X_ARM_ARCH_T2 = 0 // cdefs.h:24:1:
  150. X_ARM_BSWAP_H_ = 0 // bswap.h:4:1:
  151. X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1:
  152. X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1:
  153. X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1:
  154. X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1:
  155. X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1:
  156. X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1:
  157. X_ARM_TYPES_H_ = 0 // types.h:35:1:
  158. X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1:
  159. X_BIG_ENDIAN = 4321 // endian.h:44:1:
  160. X_BSD_INT16_T_ = 0 // types.h:65:1:
  161. X_BSD_INT32_T_ = 0 // types.h:75:1:
  162. X_BSD_INT64_T_ = 0 // types.h:85:1:
  163. X_BSD_INT8_T_ = 0 // types.h:55:1:
  164. X_BSD_INTPTR_T_ = 0 // stdint.h:80:1:
  165. X_BSD_UINT16_T_ = 0 // types.h:70:1:
  166. X_BSD_UINT32_T_ = 0 // types.h:80:1:
  167. X_BSD_UINT64_T_ = 0 // types.h:90:1:
  168. X_BSD_UINT8_T_ = 0 // types.h:60:1:
  169. X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1:
  170. X_BYTE_ORDER = 1234 // endian_machdep.h:7:1:
  171. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  172. X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1:
  173. X_LITTLE_ENDIAN = 1234 // endian.h:43:1:
  174. X_NETBSD_SOURCE = 1 // featuretest.h:70:1:
  175. X_PDP_ENDIAN = 3412 // endian.h:45:1:
  176. X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1:
  177. X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1:
  178. X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1:
  179. X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1:
  180. X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1:
  181. X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1:
  182. X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1:
  183. X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1:
  184. X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1:
  185. X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1:
  186. X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1:
  187. X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1:
  188. X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1:
  189. X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1:
  190. X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1:
  191. X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1:
  192. X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1:
  193. X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1:
  194. X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1:
  195. X_QUAD_HIGHWORD = 1 // endian.h:84:1:
  196. X_QUAD_LOWWORD = 0 // endian.h:85:1:
  197. X_SIZE_T = 0 // types.h:279:1:
  198. X_SYS_ANSI_H_ = 0 // ansi.h:33:1:
  199. X_SYS_BSWAP_H_ = 0 // bswap.h:6:1:
  200. X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1:
  201. X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1:
  202. X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1:
  203. X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1:
  204. X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1:
  205. X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1:
  206. X_SYS_ENDIAN_H_ = 0 // endian.h:35:1:
  207. X_SYS_FCNTL_H_ = 0 // fcntl.h:40:1:
  208. X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1:
  209. X_SYS_STDINT_H_ = 0 // stdint.h:33:1:
  210. X_SYS_TYPES_H_ = 0 // types.h:40:1:
  211. )
  212. type Ptrdiff_t = int32 /* <builtin>:3:26 */
  213. type Size_t = uint32 /* <builtin>:9:23 */
  214. type Wchar_t = int32 /* <builtin>:15:24 */
  215. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  216. type X__float128 = float64 /* <builtin>:47:21 */
  217. // return true if value 'a' fits in type 't'
  218. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  219. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  220. // Public domain.
  221. //
  222. // NOTE: Do not protect this header against multiple inclusion. Doing
  223. // so can have subtle side-effects due to header file inclusion order
  224. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  225. // protect each CPP macro that we want to supply.
  226. // Feature-test macros are defined by several standards, and allow an
  227. // application to specify what symbols they want the system headers to
  228. // expose, and hence what standard they want them to conform to.
  229. // There are two classes of feature-test macros. The first class
  230. // specify complete standards, and if one of these is defined, header
  231. // files will try to conform to the relevant standard. They are:
  232. //
  233. // ANSI macros:
  234. // _ANSI_SOURCE ANSI C89
  235. //
  236. // POSIX macros:
  237. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  238. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  239. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  240. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  241. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  242. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  243. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  244. //
  245. // X/Open macros:
  246. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  247. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  248. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  249. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  250. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  251. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  252. //
  253. // NetBSD macros:
  254. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  255. //
  256. // If more than one of these "major" feature-test macros is defined,
  257. // then the set of facilities provided (and namespace used) is the
  258. // union of that specified by the relevant standards, and in case of
  259. // conflict, the earlier standard in the above list has precedence (so
  260. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  261. // of rename() that's used is the POSIX one). If none of the "major"
  262. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  263. //
  264. // There are also "minor" feature-test macros, which enable extra
  265. // functionality in addition to some base standard. They should be
  266. // defined along with one of the "major" macros. The "minor" macros
  267. // are:
  268. //
  269. // _REENTRANT
  270. // _ISOC99_SOURCE
  271. // _ISOC11_SOURCE
  272. // _LARGEFILE_SOURCE Large File Support
  273. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  274. // $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  275. // -
  276. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  277. // All rights reserved.
  278. //
  279. // This code is derived from software contributed to The NetBSD Foundation
  280. // by Matt Thomas of 3am Software Foundry.
  281. //
  282. // Redistribution and use in source and binary forms, with or without
  283. // modification, are permitted provided that the following conditions
  284. // are met:
  285. // 1. Redistributions of source code must retain the above copyright
  286. // notice, this list of conditions and the following disclaimer.
  287. // 2. Redistributions in binary form must reproduce the above copyright
  288. // notice, this list of conditions and the following disclaimer in the
  289. // documentation and/or other materials provided with the distribution.
  290. //
  291. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  292. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  293. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  294. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  295. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  296. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  297. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  298. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  299. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  300. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  301. // POSSIBILITY OF SUCH DAMAGE.
  302. // $NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
  303. // -
  304. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  305. // All rights reserved.
  306. //
  307. // This code is derived from software contributed to The NetBSD Foundation
  308. // by Joerg Sonnenberger.
  309. //
  310. // Redistribution and use in source and binary forms, with or without
  311. // modification, are permitted provided that the following conditions
  312. // are met:
  313. // 1. Redistributions of source code must retain the above copyright
  314. // notice, this list of conditions and the following disclaimer.
  315. // 2. Redistributions in binary form must reproduce the above copyright
  316. // notice, this list of conditions and the following disclaimer in the
  317. // documentation and/or other materials provided with the distribution.
  318. //
  319. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  320. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  321. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  322. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  323. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  324. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  325. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  326. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  327. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  328. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  329. // POSSIBILITY OF SUCH DAMAGE.
  330. // 7.18.1 Integer types
  331. // 7.18.1.1 Exact-width integer types
  332. type X__int8_t = int8 /* common_int_types.h:45:27 */
  333. type X__uint8_t = uint8 /* common_int_types.h:46:27 */
  334. type X__int16_t = int16 /* common_int_types.h:47:27 */
  335. type X__uint16_t = uint16 /* common_int_types.h:48:27 */
  336. type X__int32_t = int32 /* common_int_types.h:49:27 */
  337. type X__uint32_t = uint32 /* common_int_types.h:50:27 */
  338. type X__int64_t = int64 /* common_int_types.h:51:27 */
  339. type X__uint64_t = uint64 /* common_int_types.h:52:27 */
  340. // 7.18.1.4 Integer types capable of holding object pointers
  341. type X__intptr_t = int32 /* common_int_types.h:58:27 */
  342. type X__uintptr_t = uint32 /* common_int_types.h:59:26 */
  343. // This should have always been an 8-bit type, but since it's been exposed
  344. // to user-space, we don't want ABI breakage there.
  345. type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */
  346. type X__register_t = int32 /* types.h:77:14 */
  347. // $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $
  348. // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
  349. // -
  350. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  351. // All rights reserved.
  352. //
  353. // This code is derived from software contributed to The NetBSD Foundation
  354. // by Matt Thomas of 3am Software Foundry.
  355. //
  356. // Redistribution and use in source and binary forms, with or without
  357. // modification, are permitted provided that the following conditions
  358. // are met:
  359. // 1. Redistributions of source code must retain the above copyright
  360. // notice, this list of conditions and the following disclaimer.
  361. // 2. Redistributions in binary form must reproduce the above copyright
  362. // notice, this list of conditions and the following disclaimer in the
  363. // documentation and/or other materials provided with the distribution.
  364. //
  365. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  366. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  367. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  368. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  369. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  370. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  371. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  372. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  373. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  374. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  375. // POSSIBILITY OF SUCH DAMAGE.
  376. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  377. // * Copyright (c) 1991, 1993
  378. // The Regents of the University of California. All rights reserved.
  379. //
  380. // This code is derived from software contributed to Berkeley by
  381. // Berkeley Software Design, Inc.
  382. //
  383. // Redistribution and use in source and binary forms, with or without
  384. // modification, are permitted provided that the following conditions
  385. // are met:
  386. // 1. Redistributions of source code must retain the above copyright
  387. // notice, this list of conditions and the following disclaimer.
  388. // 2. Redistributions in binary form must reproduce the above copyright
  389. // notice, this list of conditions and the following disclaimer in the
  390. // documentation and/or other materials provided with the distribution.
  391. // 3. Neither the name of the University nor the names of its contributors
  392. // may be used to endorse or promote products derived from this software
  393. // without specific prior written permission.
  394. //
  395. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  396. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  397. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  398. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  399. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  400. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  401. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  402. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  403. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  404. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  405. // SUCH DAMAGE.
  406. //
  407. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  408. // $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  409. // -
  410. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  411. // All rights reserved.
  412. //
  413. // This code is derived from software contributed to The NetBSD Foundation
  414. // by Matt Thomas of 3am Software Foundry.
  415. //
  416. // Redistribution and use in source and binary forms, with or without
  417. // modification, are permitted provided that the following conditions
  418. // are met:
  419. // 1. Redistributions of source code must retain the above copyright
  420. // notice, this list of conditions and the following disclaimer.
  421. // 2. Redistributions in binary form must reproduce the above copyright
  422. // notice, this list of conditions and the following disclaimer in the
  423. // documentation and/or other materials provided with the distribution.
  424. //
  425. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  426. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  427. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  428. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  429. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  430. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  431. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  432. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  433. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  434. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  435. // POSSIBILITY OF SUCH DAMAGE.
  436. // Types which are fundamental to the implementation and may appear in
  437. // more than one standard header are defined here. Standard headers
  438. // then use:
  439. // #ifdef _BSD_SIZE_T_
  440. // typedef _BSD_SIZE_T_ size_t;
  441. // #undef _BSD_SIZE_T_
  442. // #endif
  443. // $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  444. // -
  445. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  446. // All rights reserved.
  447. //
  448. // This code is derived from software contributed to The NetBSD Foundation
  449. // by Matt Thomas of 3am Software Foundry.
  450. //
  451. // Redistribution and use in source and binary forms, with or without
  452. // modification, are permitted provided that the following conditions
  453. // are met:
  454. // 1. Redistributions of source code must retain the above copyright
  455. // notice, this list of conditions and the following disclaimer.
  456. // 2. Redistributions in binary form must reproduce the above copyright
  457. // notice, this list of conditions and the following disclaimer in the
  458. // documentation and/or other materials provided with the distribution.
  459. //
  460. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  461. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  462. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  463. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  464. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  465. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  466. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  467. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  468. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  469. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  470. // POSSIBILITY OF SUCH DAMAGE.
  471. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  472. // -
  473. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  474. // All rights reserved.
  475. //
  476. // This code is derived from software contributed to The NetBSD Foundation
  477. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  478. //
  479. // Redistribution and use in source and binary forms, with or without
  480. // modification, are permitted provided that the following conditions
  481. // are met:
  482. // 1. Redistributions of source code must retain the above copyright
  483. // notice, this list of conditions and the following disclaimer.
  484. // 2. Redistributions in binary form must reproduce the above copyright
  485. // notice, this list of conditions and the following disclaimer in the
  486. // documentation and/or other materials provided with the distribution.
  487. //
  488. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  489. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  490. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  491. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  492. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  493. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  494. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  495. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  496. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  497. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  498. // POSSIBILITY OF SUCH DAMAGE.
  499. // $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $
  500. // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
  501. // -
  502. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  503. // All rights reserved.
  504. //
  505. // This code is derived from software contributed to The NetBSD Foundation
  506. // by Matt Thomas of 3am Software Foundry.
  507. //
  508. // Redistribution and use in source and binary forms, with or without
  509. // modification, are permitted provided that the following conditions
  510. // are met:
  511. // 1. Redistributions of source code must retain the above copyright
  512. // notice, this list of conditions and the following disclaimer.
  513. // 2. Redistributions in binary form must reproduce the above copyright
  514. // notice, this list of conditions and the following disclaimer in the
  515. // documentation and/or other materials provided with the distribution.
  516. //
  517. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  518. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  519. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  520. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  521. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  522. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  523. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  524. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  525. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  526. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  527. // POSSIBILITY OF SUCH DAMAGE.
  528. type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address
  529. type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id
  530. type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address
  531. type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number
  532. type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions
  533. type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset
  534. type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id
  535. type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family
  536. type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length
  537. type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id
  538. type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs)
  539. type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */
  540. type X__wctrans_t = uintptr /* ansi.h:51:32 */
  541. type X__wctype_t = uintptr /* ansi.h:54:31 */
  542. // mbstate_t is an opaque object to keep conversion state, during multibyte
  543. // stream conversions. The content must not be referenced by user programs.
  544. type X__mbstate_t = struct {
  545. F__mbstateL X__int64_t
  546. F__ccgo_pad1 [120]byte
  547. } /* ansi.h:63:3 */
  548. type X__va_list = X__builtin_va_list /* ansi.h:72:27 */
  549. type Int8_t = X__int8_t /* types.h:54:18 */
  550. type Uint8_t = X__uint8_t /* types.h:59:19 */
  551. type Int16_t = X__int16_t /* types.h:64:19 */
  552. type Uint16_t = X__uint16_t /* types.h:69:20 */
  553. type Int32_t = X__int32_t /* types.h:74:19 */
  554. type Uint32_t = X__uint32_t /* types.h:79:20 */
  555. type Int64_t = X__int64_t /* types.h:84:19 */
  556. type Uint64_t = X__uint64_t /* types.h:89:20 */
  557. type U_int8_t = Uint8_t /* types.h:93:18 */
  558. type U_int16_t = Uint16_t /* types.h:94:18 */
  559. type U_int32_t = Uint32_t /* types.h:95:18 */
  560. type U_int64_t = Uint64_t /* types.h:96:18 */
  561. // $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $
  562. // $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $
  563. // Copyright (c) 1987, 1991, 1993
  564. // The Regents of the University of California. All rights reserved.
  565. //
  566. // Redistribution and use in source and binary forms, with or without
  567. // modification, are permitted provided that the following conditions
  568. // are met:
  569. // 1. Redistributions of source code must retain the above copyright
  570. // notice, this list of conditions and the following disclaimer.
  571. // 2. Redistributions in binary form must reproduce the above copyright
  572. // notice, this list of conditions and the following disclaimer in the
  573. // documentation and/or other materials provided with the distribution.
  574. // 3. Neither the name of the University nor the names of its contributors
  575. // may be used to endorse or promote products derived from this software
  576. // without specific prior written permission.
  577. //
  578. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  579. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  580. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  581. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  582. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  583. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  584. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  585. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  586. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  587. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  588. // SUCH DAMAGE.
  589. //
  590. // @(#)endian.h 8.1 (Berkeley) 6/11/93
  591. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  592. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  593. // Public domain.
  594. //
  595. // NOTE: Do not protect this header against multiple inclusion. Doing
  596. // so can have subtle side-effects due to header file inclusion order
  597. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  598. // protect each CPP macro that we want to supply.
  599. // Feature-test macros are defined by several standards, and allow an
  600. // application to specify what symbols they want the system headers to
  601. // expose, and hence what standard they want them to conform to.
  602. // There are two classes of feature-test macros. The first class
  603. // specify complete standards, and if one of these is defined, header
  604. // files will try to conform to the relevant standard. They are:
  605. //
  606. // ANSI macros:
  607. // _ANSI_SOURCE ANSI C89
  608. //
  609. // POSIX macros:
  610. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  611. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  612. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  613. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  614. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  615. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  616. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  617. //
  618. // X/Open macros:
  619. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  620. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  621. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  622. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  623. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  624. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  625. //
  626. // NetBSD macros:
  627. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  628. //
  629. // If more than one of these "major" feature-test macros is defined,
  630. // then the set of facilities provided (and namespace used) is the
  631. // union of that specified by the relevant standards, and in case of
  632. // conflict, the earlier standard in the above list has precedence (so
  633. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  634. // of rename() that's used is the POSIX one). If none of the "major"
  635. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  636. //
  637. // There are also "minor" feature-test macros, which enable extra
  638. // functionality in addition to some base standard. They should be
  639. // defined along with one of the "major" macros. The "minor" macros
  640. // are:
  641. //
  642. // _REENTRANT
  643. // _ISOC99_SOURCE
  644. // _ISOC11_SOURCE
  645. // _LARGEFILE_SOURCE Large File Support
  646. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  647. // Definitions for byte order, according to byte significance from low
  648. // address to high.
  649. // C-family endian-ness definitions
  650. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  651. // -
  652. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  653. // All rights reserved.
  654. //
  655. // This code is derived from software contributed to The NetBSD Foundation
  656. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  657. //
  658. // Redistribution and use in source and binary forms, with or without
  659. // modification, are permitted provided that the following conditions
  660. // are met:
  661. // 1. Redistributions of source code must retain the above copyright
  662. // notice, this list of conditions and the following disclaimer.
  663. // 2. Redistributions in binary form must reproduce the above copyright
  664. // notice, this list of conditions and the following disclaimer in the
  665. // documentation and/or other materials provided with the distribution.
  666. //
  667. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  668. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  669. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  670. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  671. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  672. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  673. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  674. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  675. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  676. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  677. // POSSIBILITY OF SUCH DAMAGE.
  678. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  679. // * Copyright (c) 1991, 1993
  680. // The Regents of the University of California. All rights reserved.
  681. //
  682. // This code is derived from software contributed to Berkeley by
  683. // Berkeley Software Design, Inc.
  684. //
  685. // Redistribution and use in source and binary forms, with or without
  686. // modification, are permitted provided that the following conditions
  687. // are met:
  688. // 1. Redistributions of source code must retain the above copyright
  689. // notice, this list of conditions and the following disclaimer.
  690. // 2. Redistributions in binary form must reproduce the above copyright
  691. // notice, this list of conditions and the following disclaimer in the
  692. // documentation and/or other materials provided with the distribution.
  693. // 3. Neither the name of the University nor the names of its contributors
  694. // may be used to endorse or promote products derived from this software
  695. // without specific prior written permission.
  696. //
  697. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  698. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  699. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  700. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  701. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  702. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  703. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  704. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  705. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  706. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  707. // SUCH DAMAGE.
  708. //
  709. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  710. // $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $
  711. // -
  712. // Copyright (c) 1982, 1986, 1991, 1993, 1994
  713. // The Regents of the University of California. All rights reserved.
  714. // (c) UNIX System Laboratories, Inc.
  715. // All or some portions of this file are derived from material licensed
  716. // to the University of California by American Telephone and Telegraph
  717. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  718. // the permission of UNIX System Laboratories, Inc.
  719. //
  720. // Redistribution and use in source and binary forms, with or without
  721. // modification, are permitted provided that the following conditions
  722. // are met:
  723. // 1. Redistributions of source code must retain the above copyright
  724. // notice, this list of conditions and the following disclaimer.
  725. // 2. Redistributions in binary form must reproduce the above copyright
  726. // notice, this list of conditions and the following disclaimer in the
  727. // documentation and/or other materials provided with the distribution.
  728. // 3. Neither the name of the University nor the names of its contributors
  729. // may be used to endorse or promote products derived from this software
  730. // without specific prior written permission.
  731. //
  732. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  733. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  734. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  735. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  736. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  737. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  738. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  739. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  740. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  741. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  742. // SUCH DAMAGE.
  743. //
  744. // @(#)types.h 8.4 (Berkeley) 1/21/94
  745. type In_addr_t = X__in_addr_t /* endian.h:58:21 */
  746. type In_port_t = X__in_port_t /* endian.h:63:21 */
  747. // $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $
  748. // Written by Manuel Bouyer. Public domain
  749. // $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $
  750. // -
  751. // Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
  752. // All rights reserved.
  753. //
  754. // This code is derived from software contributed to The NetBSD Foundation
  755. // by Klaus Klein.
  756. //
  757. // Redistribution and use in source and binary forms, with or without
  758. // modification, are permitted provided that the following conditions
  759. // are met:
  760. // 1. Redistributions of source code must retain the above copyright
  761. // notice, this list of conditions and the following disclaimer.
  762. // 2. Redistributions in binary form must reproduce the above copyright
  763. // notice, this list of conditions and the following disclaimer in the
  764. // documentation and/or other materials provided with the distribution.
  765. //
  766. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  767. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  768. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  769. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  770. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  771. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  772. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  773. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  774. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  775. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  776. // POSSIBILITY OF SUCH DAMAGE.
  777. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  778. // * Copyright (c) 1991, 1993
  779. // The Regents of the University of California. All rights reserved.
  780. //
  781. // This code is derived from software contributed to Berkeley by
  782. // Berkeley Software Design, Inc.
  783. //
  784. // Redistribution and use in source and binary forms, with or without
  785. // modification, are permitted provided that the following conditions
  786. // are met:
  787. // 1. Redistributions of source code must retain the above copyright
  788. // notice, this list of conditions and the following disclaimer.
  789. // 2. Redistributions in binary form must reproduce the above copyright
  790. // notice, this list of conditions and the following disclaimer in the
  791. // documentation and/or other materials provided with the distribution.
  792. // 3. Neither the name of the University nor the names of its contributors
  793. // may be used to endorse or promote products derived from this software
  794. // without specific prior written permission.
  795. //
  796. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  797. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  798. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  799. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  800. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  801. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  802. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  803. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  804. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  805. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  806. // SUCH DAMAGE.
  807. //
  808. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  809. // $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  810. // -
  811. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  812. // All rights reserved.
  813. //
  814. // This code is derived from software contributed to The NetBSD Foundation
  815. // by Matt Thomas of 3am Software Foundry.
  816. //
  817. // Redistribution and use in source and binary forms, with or without
  818. // modification, are permitted provided that the following conditions
  819. // are met:
  820. // 1. Redistributions of source code must retain the above copyright
  821. // notice, this list of conditions and the following disclaimer.
  822. // 2. Redistributions in binary form must reproduce the above copyright
  823. // notice, this list of conditions and the following disclaimer in the
  824. // documentation and/or other materials provided with the distribution.
  825. //
  826. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  827. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  828. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  829. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  830. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  831. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  832. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  833. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  834. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  835. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  836. // POSSIBILITY OF SUCH DAMAGE.
  837. type Intptr_t = X__intptr_t /* stdint.h:79:20 */
  838. type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */
  839. // $NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  840. // -
  841. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  842. // All rights reserved.
  843. //
  844. // This code is derived from software contributed to The NetBSD Foundation
  845. // by Matt Thomas of 3am Software Foundry.
  846. //
  847. // Redistribution and use in source and binary forms, with or without
  848. // modification, are permitted provided that the following conditions
  849. // are met:
  850. // 1. Redistributions of source code must retain the above copyright
  851. // notice, this list of conditions and the following disclaimer.
  852. // 2. Redistributions in binary form must reproduce the above copyright
  853. // notice, this list of conditions and the following disclaimer in the
  854. // documentation and/or other materials provided with the distribution.
  855. //
  856. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  857. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  858. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  859. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  860. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  861. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  862. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  863. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  864. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  865. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  866. // POSSIBILITY OF SUCH DAMAGE.
  867. // $NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
  868. // -
  869. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  870. // All rights reserved.
  871. //
  872. // This code is derived from software contributed to The NetBSD Foundation
  873. // by Joerg Sonnenberger.
  874. //
  875. // Redistribution and use in source and binary forms, with or without
  876. // modification, are permitted provided that the following conditions
  877. // are met:
  878. // 1. Redistributions of source code must retain the above copyright
  879. // notice, this list of conditions and the following disclaimer.
  880. // 2. Redistributions in binary form must reproduce the above copyright
  881. // notice, this list of conditions and the following disclaimer in the
  882. // documentation and/or other materials provided with the distribution.
  883. //
  884. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  885. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  886. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  887. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  888. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  889. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  890. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  891. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  892. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  893. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  894. // POSSIBILITY OF SUCH DAMAGE.
  895. // 7.18.1 Integer types
  896. // 7.18.1.2 Minimum-width integer types
  897. type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */
  898. type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */
  899. type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */
  900. type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */
  901. type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */
  902. type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */
  903. type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */
  904. type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */
  905. // 7.18.1.3 Fastest minimum-width integer types
  906. type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */
  907. type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */
  908. type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */
  909. type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */
  910. type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */
  911. type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */
  912. type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */
  913. type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */
  914. // 7.18.1.5 Greatest-width integer types
  915. type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */
  916. type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */
  917. type U_char = uint8 /* types.h:101:23 */
  918. type U_short = uint16 /* types.h:102:24 */
  919. type U_int = uint32 /* types.h:103:22 */
  920. type U_long = uint32 /* types.h:104:23 */
  921. type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility
  922. type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility
  923. type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility
  924. type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility
  925. type U_quad_t = Uint64_t /* types.h:112:18 */ // quads
  926. type Quad_t = Int64_t /* types.h:113:18 */
  927. type Qaddr_t = uintptr /* types.h:114:16 */
  928. // The types longlong_t and u_longlong_t exist for use with the
  929. // Sun-derived XDR routines involving these types, and their usage
  930. // in other contexts is discouraged. Further note that these types
  931. // may not be equivalent to "long long" and "unsigned long long",
  932. // they are only guaranteed to be signed and unsigned 64-bit types
  933. // respectively. Portable programs that need 64-bit types should use
  934. // the C99 types int64_t and uint64_t instead.
  935. type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR
  936. type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR
  937. type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count
  938. type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size
  939. type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs)
  940. type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count
  941. // We don't and shouldn't use caddr_t in the kernel anymore
  942. type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address
  943. type Daddr_t = Int64_t /* types.h:154:18 */ // disk address
  944. type Dev_t = Uint64_t /* types.h:157:18 */ // device number
  945. type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number
  946. type Gid_t = X__gid_t /* types.h:161:18 */ // group id
  947. type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id
  948. type Ino_t = Uint64_t /* types.h:166:18 */ // inode number
  949. type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC)
  950. type Mode_t = X__mode_t /* types.h:170:18 */ // permissions
  951. type Nlink_t = Uint32_t /* types.h:174:18 */ // link count
  952. type Off_t = X__off_t /* types.h:177:18 */ // file offset
  953. type Pid_t = X__pid_t /* types.h:182:18 */ // process id
  954. type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id
  955. type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit
  956. type Segsz_t = Int32_t /* types.h:187:18 */ // segment size
  957. type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset
  958. type Uid_t = X__uid_t /* types.h:191:18 */ // user id
  959. type Mqd_t = int32 /* types.h:195:14 */
  960. type Cpuid_t = uint32 /* types.h:197:23 */
  961. type Psetid_t = int32 /* types.h:199:14 */
  962. type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */
  963. // Major, minor numbers, dev_t's.
  964. type X__devmajor_t = Int32_t /* types.h:255:17 */
  965. type X__devminor_t = Int32_t /* types.h:255:31 */
  966. type Clock_t = uint32 /* types.h:268:24 */
  967. type Ssize_t = int32 /* types.h:284:24 */
  968. type Time_t = X__int64_t /* types.h:289:23 */
  969. type Clockid_t = int32 /* types.h:294:26 */
  970. type Timer_t = int32 /* types.h:299:24 */
  971. type Suseconds_t = int32 /* types.h:304:27 */
  972. type Useconds_t = uint32 /* types.h:309:26 */
  973. // $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $
  974. // -
  975. // Copyright (c) 1992, 1993
  976. // The Regents of the University of California. All rights reserved.
  977. //
  978. // Redistribution and use in source and binary forms, with or without
  979. // modification, are permitted provided that the following conditions
  980. // are met:
  981. // 1. Redistributions of source code must retain the above copyright
  982. // notice, this list of conditions and the following disclaimer.
  983. // 2. Redistributions in binary form must reproduce the above copyright
  984. // notice, this list of conditions and the following disclaimer in the
  985. // documentation and/or other materials provided with the distribution.
  986. // 3. Neither the name of the University nor the names of its contributors
  987. // may be used to endorse or promote products derived from this software
  988. // without specific prior written permission.
  989. //
  990. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  991. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  992. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  993. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  994. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  995. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  996. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  997. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  998. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  999. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1000. // SUCH DAMAGE.
  1001. //
  1002. // from: @(#)types.h 8.4 (Berkeley) 1/21/94
  1003. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  1004. // * Copyright (c) 1991, 1993
  1005. // The Regents of the University of California. All rights reserved.
  1006. //
  1007. // This code is derived from software contributed to Berkeley by
  1008. // Berkeley Software Design, Inc.
  1009. //
  1010. // Redistribution and use in source and binary forms, with or without
  1011. // modification, are permitted provided that the following conditions
  1012. // are met:
  1013. // 1. Redistributions of source code must retain the above copyright
  1014. // notice, this list of conditions and the following disclaimer.
  1015. // 2. Redistributions in binary form must reproduce the above copyright
  1016. // notice, this list of conditions and the following disclaimer in the
  1017. // documentation and/or other materials provided with the distribution.
  1018. // 3. Neither the name of the University nor the names of its contributors
  1019. // may be used to endorse or promote products derived from this software
  1020. // without specific prior written permission.
  1021. //
  1022. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1023. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1024. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1025. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1026. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1027. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1028. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1029. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1030. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1031. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1032. // SUCH DAMAGE.
  1033. //
  1034. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  1035. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1036. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1037. // Public domain.
  1038. //
  1039. // NOTE: Do not protect this header against multiple inclusion. Doing
  1040. // so can have subtle side-effects due to header file inclusion order
  1041. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  1042. // protect each CPP macro that we want to supply.
  1043. // Feature-test macros are defined by several standards, and allow an
  1044. // application to specify what symbols they want the system headers to
  1045. // expose, and hence what standard they want them to conform to.
  1046. // There are two classes of feature-test macros. The first class
  1047. // specify complete standards, and if one of these is defined, header
  1048. // files will try to conform to the relevant standard. They are:
  1049. //
  1050. // ANSI macros:
  1051. // _ANSI_SOURCE ANSI C89
  1052. //
  1053. // POSIX macros:
  1054. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  1055. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  1056. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  1057. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  1058. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  1059. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  1060. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1061. //
  1062. // X/Open macros:
  1063. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1064. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1065. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1066. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1067. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1068. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1069. //
  1070. // NetBSD macros:
  1071. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1072. //
  1073. // If more than one of these "major" feature-test macros is defined,
  1074. // then the set of facilities provided (and namespace used) is the
  1075. // union of that specified by the relevant standards, and in case of
  1076. // conflict, the earlier standard in the above list has precedence (so
  1077. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1078. // of rename() that's used is the POSIX one). If none of the "major"
  1079. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1080. //
  1081. // There are also "minor" feature-test macros, which enable extra
  1082. // functionality in addition to some base standard. They should be
  1083. // defined along with one of the "major" macros. The "minor" macros
  1084. // are:
  1085. //
  1086. // _REENTRANT
  1087. // _ISOC99_SOURCE
  1088. // _ISOC11_SOURCE
  1089. // _LARGEFILE_SOURCE Large File Support
  1090. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1091. // $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  1092. // -
  1093. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  1094. // All rights reserved.
  1095. //
  1096. // This code is derived from software contributed to The NetBSD Foundation
  1097. // by Matt Thomas of 3am Software Foundry.
  1098. //
  1099. // Redistribution and use in source and binary forms, with or without
  1100. // modification, are permitted provided that the following conditions
  1101. // are met:
  1102. // 1. Redistributions of source code must retain the above copyright
  1103. // notice, this list of conditions and the following disclaimer.
  1104. // 2. Redistributions in binary form must reproduce the above copyright
  1105. // notice, this list of conditions and the following disclaimer in the
  1106. // documentation and/or other materials provided with the distribution.
  1107. //
  1108. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1109. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1110. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1111. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1112. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1113. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1114. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1115. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1116. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1117. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1118. // POSSIBILITY OF SUCH DAMAGE.
  1119. // Implementation dependent defines, hidden from user space.
  1120. // POSIX does not specify them.
  1121. type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */
  1122. // 32 = 2 ^ 5
  1123. // Select uses bit fields of file descriptors. These macros manipulate
  1124. // such bit fields. Note: FD_SETSIZE may be defined by the user.
  1125. type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */
  1126. // 32 = 2 ^ 5
  1127. // Select uses bit fields of file descriptors. These macros manipulate
  1128. // such bit fields. Note: FD_SETSIZE may be defined by the user.
  1129. type Fd_set = Fd_set1 /* fd_set.h:68:3 */
  1130. // Expose our internals if we are not required to hide them.
  1131. type Kauth_cred_t = uintptr /* types.h:318:27 */
  1132. type Pri_t = int32 /* types.h:320:13 */
  1133. // $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil Exp $
  1134. // -
  1135. // Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
  1136. // All rights reserved.
  1137. //
  1138. // This code is derived from software contributed to The NetBSD Foundation
  1139. // by Nathan J. Williams.
  1140. //
  1141. // Redistribution and use in source and binary forms, with or without
  1142. // modification, are permitted provided that the following conditions
  1143. // are met:
  1144. // 1. Redistributions of source code must retain the above copyright
  1145. // notice, this list of conditions and the following disclaimer.
  1146. // 2. Redistributions in binary form must reproduce the above copyright
  1147. // notice, this list of conditions and the following disclaimer in the
  1148. // documentation and/or other materials provided with the distribution.
  1149. //
  1150. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1151. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1152. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1153. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1154. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1155. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1156. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1157. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1158. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1159. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1160. // POSSIBILITY OF SUCH DAMAGE.
  1161. // We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the
  1162. // POSIX spinlock object.
  1163. //
  1164. // C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer.
  1165. // This does not work for volatile types. Since C++ does not touch the guts
  1166. // of those types, we do not include volatile in the C++ definitions.
  1167. type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */
  1168. type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */
  1169. // Copied from PTQ_HEAD in pthread_queue.h
  1170. type Pthread_queue_struct_t = struct {
  1171. Fptqh_first uintptr
  1172. Fptqh_last uintptr
  1173. } /* pthread_types.h:61:1 */
  1174. type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */
  1175. type X__pthread_attr_st = struct {
  1176. Fpta_magic uint32
  1177. Fpta_flags int32
  1178. Fpta_private uintptr
  1179. } /* pthread_types.h:65:1 */
  1180. type X__pthread_mutex_st = struct {
  1181. Fptm_magic uint32
  1182. Fptm_errorcheck X__pthread_spin_t
  1183. F__8 struct {
  1184. F__ccgo_pad1 [0]uint32
  1185. Fptm_ceiling uint8
  1186. F__ccgo_pad2 [3]byte
  1187. }
  1188. Fptm_owner Pthread_t
  1189. Fptm_waiters uintptr
  1190. Fptm_recursed uint32
  1191. Fptm_spare2 uintptr
  1192. } /* pthread_types.h:66:1 */
  1193. type X__pthread_mutexattr_st = struct {
  1194. Fptma_magic uint32
  1195. Fptma_private uintptr
  1196. } /* pthread_types.h:67:1 */
  1197. type X__pthread_cond_st = struct {
  1198. Fptc_magic uint32
  1199. Fptc_lock X__pthread_spin_t
  1200. Fptc_waiters Pthread_queue_t
  1201. Fptc_mutex uintptr
  1202. Fptc_private uintptr
  1203. } /* pthread_types.h:68:1 */
  1204. type X__pthread_condattr_st = struct {
  1205. Fptca_magic uint32
  1206. Fptca_private uintptr
  1207. } /* pthread_types.h:69:1 */
  1208. type X__pthread_rwlock_st = struct {
  1209. Fptr_magic uint32
  1210. Fptr_interlock X__pthread_spin_t
  1211. Fptr_rblocked Pthread_queue_t
  1212. Fptr_wblocked Pthread_queue_t
  1213. Fptr_nreaders uint32
  1214. Fptr_owner Pthread_t
  1215. Fptr_private uintptr
  1216. } /* pthread_types.h:71:1 */
  1217. type X__pthread_rwlockattr_st = struct {
  1218. Fptra_magic uint32
  1219. Fptra_private uintptr
  1220. } /* pthread_types.h:72:1 */
  1221. type X__pthread_barrier_st = struct {
  1222. Fptb_magic uint32
  1223. Fptb_lock Pthread_spin_t
  1224. Fptb_waiters Pthread_queue_t
  1225. Fptb_initcount uint32
  1226. Fptb_curcount uint32
  1227. Fptb_generation uint32
  1228. Fptb_private uintptr
  1229. } /* pthread_types.h:73:1 */
  1230. type X__pthread_barrierattr_st = struct {
  1231. Fptba_magic uint32
  1232. Fptba_private uintptr
  1233. } /* pthread_types.h:74:1 */
  1234. type Pthread_t = uintptr /* pthread_types.h:76:29 */
  1235. type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */
  1236. type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */
  1237. type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */
  1238. type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */
  1239. type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */
  1240. type X__pthread_once_st = struct {
  1241. Fpto_mutex Pthread_mutex_t
  1242. Fpto_done int32
  1243. } /* pthread_types.h:82:9 */
  1244. type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */
  1245. type X__pthread_spinlock_st = struct {
  1246. Fpts_magic uint32
  1247. Fpts_spin X__pthread_spin_t
  1248. Fpts_flags int32
  1249. } /* pthread_types.h:83:9 */
  1250. type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */
  1251. type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */
  1252. type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */
  1253. type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */
  1254. type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */
  1255. type Pthread_key_t = int32 /* pthread_types.h:88:13 */
  1256. // File status flags: these are used by open(2), fcntl(2).
  1257. // They are also used (indirectly) in the kernel file structure f_flags,
  1258. // which is a superset of the open/fcntl flags. Open flags and f_flags
  1259. // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
  1260. // Open/fcntl flags begin with O_; kernel-internal flags begin with F.
  1261. // open-only flags
  1262. // Kernel encoding of open mode; separate read and write bits that are
  1263. // independently testable: 1 greater than the above.
  1264. //
  1265. // XXX
  1266. // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
  1267. // which was documented to use FREAD/FWRITE, continues to work.
  1268. // path component
  1269. // defined by POSIX 1003.1; BSD default, but required to be bitwise distinct
  1270. // The O_* flags used to have only F* names, which were used in the kernel
  1271. // and by fcntl. We retain the F* names for the kernel f_flags field
  1272. // and for backward compatibility for fcntl.
  1273. // Constants used for fcntl(2)
  1274. // command values
  1275. // file descriptor flags (F_GETFD, F_SETFD)
  1276. // record locking flags (F_GETLK, F_SETLK, F_SETLKW)
  1277. // Constants for fcntl's passed to the underlying fs - like ioctl's.
  1278. // Define command macros for operations which, if implemented, must be
  1279. // the same for all fs's.
  1280. // Define command macros for fs-specific commands.
  1281. // Advisory file segment locking data type -
  1282. // information passed to system by user
  1283. type Flock = struct {
  1284. Fl_start X__off_t
  1285. Fl_len X__off_t
  1286. Fl_pid X__pid_t
  1287. Fl_type int16
  1288. Fl_whence int16
  1289. } /* fcntl.h:252:1 */
  1290. var _ uint8 /* gen.c:2:13: */