fcntl_netbsd_amd64.go 71 KB

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