stdlib_netbsd_amd64.go 76 KB

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