stdlib_openbsd_arm64.go 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  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_openbsd_arm64.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:45:1:
  15. BYTE_ORDER = 1234 // endian.h:47:1:
  16. EXIT_FAILURE = 1 // stdlib.h:80:1:
  17. EXIT_SUCCESS = 0 // stdlib.h:81:1:
  18. LITTLE_ENDIAN = 1234 // endian.h:44:1:
  19. PDP_ENDIAN = 3412 // endian.h:46:1:
  20. RAND_MAX = 0x7fffffff // stdlib.h:83:1:
  21. X_BIG_ENDIAN = 4321 // _endian.h:43:1:
  22. X_BYTE_ORDER = 1234 // endian.h:60:1:
  23. X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
  24. X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
  25. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  26. X_INT16_T_DEFINED_ = 0 // types.h:84:1:
  27. X_INT32_T_DEFINED_ = 0 // types.h:94:1:
  28. X_INT64_T_DEFINED_ = 0 // types.h:104:1:
  29. X_INT8_T_DEFINED_ = 0 // types.h:74:1:
  30. X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
  31. X_LP64 = 1 // <predefined>:1:1:
  32. X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
  33. X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
  34. X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
  35. X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
  36. X_OFF_T_DEFINED_ = 0 // types.h:192:1:
  37. X_PDP_ENDIAN = 3412 // _endian.h:44:1:
  38. X_PID_T_DEFINED_ = 0 // types.h:167:1:
  39. X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
  40. X_QUAD_LOWWORD = 0 // _endian.h:96:1:
  41. X_RET_PROTECTOR = 1 // <predefined>:2:1:
  42. X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
  43. X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
  44. X_STACKALIGNBYTES = 15 // _types.h:54:1:
  45. X_STDLIB_H_ = 0 // stdlib.h:36:1:
  46. X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
  47. X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
  48. X_SYS_TYPES_H_ = 0 // types.h:41:1:
  49. X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
  50. X_SYS__TYPES_H_ = 0 // _types.h:35:1:
  51. X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
  52. X_TIME_T_DEFINED_ = 0 // types.h:182:1:
  53. X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
  54. X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
  55. X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
  56. X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
  57. X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1:
  58. Unix = 1 // <predefined>:360:1:
  59. )
  60. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  61. type Size_t = uint64 /* <builtin>:9:23 */
  62. type Wchar_t = int32 /* <builtin>:15:24 */
  63. type X__int128_t = struct {
  64. Flo int64
  65. Fhi int64
  66. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  67. type X__uint128_t = struct {
  68. Flo uint64
  69. Fhi uint64
  70. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  71. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  72. type X__float128 = float64 /* <builtin>:47:21 */
  73. // $OpenBSD: stdlib.h,v 1.76 2019/05/10 15:03:24 otto Exp $
  74. // $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $
  75. // -
  76. // Copyright (c) 1990 The Regents of the University of California.
  77. // All rights reserved.
  78. //
  79. // Redistribution and use in source and binary forms, with or without
  80. // modification, are permitted provided that the following conditions
  81. // are met:
  82. // 1. Redistributions of source code must retain the above copyright
  83. // notice, this list of conditions and the following disclaimer.
  84. // 2. Redistributions in binary form must reproduce the above copyright
  85. // notice, this list of conditions and the following disclaimer in the
  86. // documentation and/or other materials provided with the distribution.
  87. // 3. Neither the name of the University nor the names of its contributors
  88. // may be used to endorse or promote products derived from this software
  89. // without specific prior written permission.
  90. //
  91. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  92. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  93. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  94. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  95. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  96. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  97. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  98. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  99. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  100. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  101. // SUCH DAMAGE.
  102. //
  103. // @(#)stdlib.h 5.13 (Berkeley) 6/4/91
  104. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  105. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  106. // Copyright (c) 1991, 1993
  107. // The Regents of the University of California. All rights reserved.
  108. //
  109. // This code is derived from software contributed to Berkeley by
  110. // Berkeley Software Design, Inc.
  111. //
  112. // Redistribution and use in source and binary forms, with or without
  113. // modification, are permitted provided that the following conditions
  114. // are met:
  115. // 1. Redistributions of source code must retain the above copyright
  116. // notice, this list of conditions and the following disclaimer.
  117. // 2. Redistributions in binary form must reproduce the above copyright
  118. // notice, this list of conditions and the following disclaimer in the
  119. // documentation and/or other materials provided with the distribution.
  120. // 3. Neither the name of the University nor the names of its contributors
  121. // may be used to endorse or promote products derived from this software
  122. // without specific prior written permission.
  123. //
  124. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  125. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  126. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  127. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  128. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  129. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  130. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  131. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  132. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  133. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  134. // SUCH DAMAGE.
  135. //
  136. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  137. // $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
  138. // Macro to test if we're using a specific version of gcc or later.
  139. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  140. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  141. // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  142. // in between its arguments. Do not use __CONCAT on double-quoted strings,
  143. // such as those from the __STRING macro: to concatenate strings just put
  144. // them next to each other.
  145. // GCC1 and some versions of GCC2 declare dead (non-returning) and
  146. // pure (no side effects) functions using "volatile" and "const";
  147. // unfortunately, these then cause warnings under "-ansi -pedantic".
  148. // GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
  149. // work for GNU C++ (modulo a slight glitch in the C++ grammar in
  150. // the distribution version of 2.5.5).
  151. // __returns_twice makes the compiler not assume the function
  152. // only returns once. This affects registerisation of variables:
  153. // even local variables need to be in memory across such a call.
  154. // Example: setjmp()
  155. // __only_inline makes the compiler only use this function definition
  156. // for inlining; references that can't be inlined will be left as
  157. // external references instead of generating a local copy. The
  158. // matching library should include a simple extern definition for
  159. // the function to handle those references. c.f. ctype.h
  160. // GNU C version 2.96 adds explicit branch prediction so that
  161. // the CPU back-end can hint the processor and also so that
  162. // code blocks can be reordered such that the predicted path
  163. // sees a more linear flow, thus improving cache behavior, etc.
  164. //
  165. // The following two macros provide us with a way to utilize this
  166. // compiler feature. Use __predict_true() if you expect the expression
  167. // to evaluate to true, and __predict_false() if you expect the
  168. // expression to evaluate to false.
  169. //
  170. // A few notes about usage:
  171. //
  172. // * Generally, __predict_false() error condition checks (unless
  173. // you have some _strong_ reason to do otherwise, in which case
  174. // document it), and/or __predict_true() `no-error' condition
  175. // checks, assuming you want to optimize for the no-error case.
  176. //
  177. // * Other than that, if you don't know the likelihood of a test
  178. // succeeding from empirical or other `hard' evidence, don't
  179. // make predictions.
  180. //
  181. // * These are meant to be used in places that are run `a lot'.
  182. // It is wasteful to make predictions in code that is run
  183. // seldomly (e.g. at subsystem initialization time) as the
  184. // basic block reordering that this affects can often generate
  185. // larger code.
  186. // Delete pseudo-keywords wherever they are not available or needed.
  187. // The __packed macro indicates that a variable or structure members
  188. // should have the smallest possible alignment, despite any host CPU
  189. // alignment requirements.
  190. //
  191. // The __aligned(x) macro specifies the minimum alignment of a
  192. // variable or structure.
  193. //
  194. // These macros together are useful for describing the layout and
  195. // alignment of messages exchanged with hardware or other systems.
  196. // "The nice thing about standards is that there are so many to choose from."
  197. // There are a number of "feature test macros" specified by (different)
  198. // standards that determine which interfaces and types the header files
  199. // should expose.
  200. //
  201. // Because of inconsistencies in these macros, we define our own
  202. // set in the private name space that end in _VISIBLE. These are
  203. // always defined and so headers can test their values easily.
  204. // Things can get tricky when multiple feature macros are defined.
  205. // We try to take the union of all the features requested.
  206. //
  207. // The following macros are guaranteed to have a value after cdefs.h
  208. // has been included:
  209. // __POSIX_VISIBLE
  210. // __XPG_VISIBLE
  211. // __ISO_C_VISIBLE
  212. // __BSD_VISIBLE
  213. // X/Open Portability Guides and Single Unix Specifications.
  214. // _XOPEN_SOURCE XPG3
  215. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  216. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  217. // _XOPEN_SOURCE == 500 XPG5
  218. // _XOPEN_SOURCE == 520 XPG5v2
  219. // _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
  220. // _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
  221. //
  222. // The XPG spec implies a specific value for _POSIX_C_SOURCE.
  223. // POSIX macros, these checks must follow the XOPEN ones above.
  224. //
  225. // _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
  226. // _POSIX_C_SOURCE == 1 1003.1-1990
  227. // _POSIX_C_SOURCE == 2 1003.2-1992
  228. // _POSIX_C_SOURCE == 199309L 1003.1b-1993
  229. // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
  230. // and the omnibus ISO/IEC 9945-1:1996
  231. // _POSIX_C_SOURCE == 200112L 1003.1-2001
  232. // _POSIX_C_SOURCE == 200809L 1003.1-2008
  233. //
  234. // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
  235. // this may be overridden by the _ISOC99_SOURCE macro later.
  236. // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
  237. // If the user defines it in addition to one of the POSIX or XOPEN
  238. // macros, assume the POSIX/XOPEN macro(s) should take precedence.
  239. // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
  240. // override any of the other macros since they are non-exclusive.
  241. // Finally deal with BSD-specific interfaces that are not covered
  242. // by any standards. We expose these when none of the POSIX or XPG
  243. // macros is defined or if the user explicitly asks for them.
  244. // Default values.
  245. // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $
  246. // Written by Todd C. Miller, September 9, 2016
  247. // Public domain.
  248. // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
  249. // -
  250. // Copyright (c) 1990, 1993
  251. // The Regents of the University of California. All rights reserved.
  252. //
  253. // Redistribution and use in source and binary forms, with or without
  254. // modification, are permitted provided that the following conditions
  255. // are met:
  256. // 1. Redistributions of source code must retain the above copyright
  257. // notice, this list of conditions and the following disclaimer.
  258. // 2. Redistributions in binary form must reproduce the above copyright
  259. // notice, this list of conditions and the following disclaimer in the
  260. // documentation and/or other materials provided with the distribution.
  261. // 3. Neither the name of the University nor the names of its contributors
  262. // may be used to endorse or promote products derived from this software
  263. // without specific prior written permission.
  264. //
  265. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  266. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  267. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  268. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  269. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  270. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  271. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  272. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  273. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  274. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  275. // SUCH DAMAGE.
  276. //
  277. // @(#)types.h 8.3 (Berkeley) 1/5/94
  278. // @(#)ansi.h 8.2 (Berkeley) 1/4/94
  279. // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
  280. // value for all data types (int, long, ...). The result is an
  281. // unsigned long and must be cast to any desired pointer type.
  282. //
  283. // _ALIGNED_POINTER is a boolean macro that checks whether an address
  284. // is valid to fetch data elements of type t from on this architecture.
  285. // This does not reflect the optimal alignment, just the possibility
  286. // (within reasonable limits).
  287. // 7.18.1.1 Exact-width integer types
  288. type X__int8_t = int8 /* _types.h:60:22 */
  289. type X__uint8_t = uint8 /* _types.h:61:24 */
  290. type X__int16_t = int16 /* _types.h:62:17 */
  291. type X__uint16_t = uint16 /* _types.h:63:25 */
  292. type X__int32_t = int32 /* _types.h:64:15 */
  293. type X__uint32_t = uint32 /* _types.h:65:23 */
  294. // LONGLONG
  295. type X__int64_t = int64 /* _types.h:67:20 */
  296. // LONGLONG
  297. type X__uint64_t = uint64 /* _types.h:69:28 */
  298. // 7.18.1.2 Minimum-width integer types
  299. type X__int_least8_t = X__int8_t /* _types.h:72:19 */
  300. type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
  301. type X__int_least16_t = X__int16_t /* _types.h:74:20 */
  302. type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
  303. type X__int_least32_t = X__int32_t /* _types.h:76:20 */
  304. type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
  305. type X__int_least64_t = X__int64_t /* _types.h:78:20 */
  306. type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
  307. // 7.18.1.3 Fastest minimum-width integer types
  308. type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
  309. type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
  310. type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
  311. type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
  312. type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
  313. type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
  314. type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
  315. type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
  316. // 7.18.1.4 Integer types capable of holding object pointers
  317. type X__intptr_t = int64 /* _types.h:104:16 */
  318. type X__uintptr_t = uint64 /* _types.h:105:24 */
  319. // 7.18.1.5 Greatest-width integer types
  320. type X__intmax_t = X__int64_t /* _types.h:108:20 */
  321. type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
  322. // Register size
  323. type X__register_t = int64 /* _types.h:112:16 */
  324. // VM system types
  325. type X__vaddr_t = uint64 /* _types.h:115:24 */
  326. type X__paddr_t = uint64 /* _types.h:116:24 */
  327. type X__vsize_t = uint64 /* _types.h:117:24 */
  328. type X__psize_t = uint64 /* _types.h:118:24 */
  329. // Standard system types
  330. type X__double_t = float64 /* _types.h:121:18 */
  331. type X__float_t = float32 /* _types.h:122:17 */
  332. type X__ptrdiff_t = int64 /* _types.h:123:16 */
  333. type X__size_t = uint64 /* _types.h:124:24 */
  334. type X__ssize_t = int64 /* _types.h:125:16 */
  335. type X__va_list = X__builtin_va_list /* _types.h:127:27 */
  336. // Wide character support types
  337. type X__wchar_t = int32 /* _types.h:137:15 */
  338. type X__wint_t = int32 /* _types.h:140:15 */
  339. type X__rune_t = int32 /* _types.h:141:15 */
  340. type X__wctrans_t = uintptr /* _types.h:142:14 */
  341. type X__wctype_t = uintptr /* _types.h:143:14 */
  342. // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
  343. // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
  344. // -
  345. // Copyright (c) 1982, 1986, 1991, 1993
  346. // The Regents of the University of California. All rights reserved.
  347. // (c) UNIX System Laboratories, Inc.
  348. // All or some portions of this file are derived from material licensed
  349. // to the University of California by American Telephone and Telegraph
  350. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  351. // the permission of UNIX System Laboratories, Inc.
  352. //
  353. // Redistribution and use in source and binary forms, with or without
  354. // modification, are permitted provided that the following conditions
  355. // are met:
  356. // 1. Redistributions of source code must retain the above copyright
  357. // notice, this list of conditions and the following disclaimer.
  358. // 2. Redistributions in binary form must reproduce the above copyright
  359. // notice, this list of conditions and the following disclaimer in the
  360. // documentation and/or other materials provided with the distribution.
  361. // 3. Neither the name of the University nor the names of its contributors
  362. // may be used to endorse or promote products derived from this software
  363. // without specific prior written permission.
  364. //
  365. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  366. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  367. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  368. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  369. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  370. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  371. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  372. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  373. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  374. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  375. // SUCH DAMAGE.
  376. //
  377. // @(#)types.h 8.4 (Berkeley) 1/21/94
  378. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  379. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  380. // Copyright (c) 1991, 1993
  381. // The Regents of the University of California. All rights reserved.
  382. //
  383. // This code is derived from software contributed to Berkeley by
  384. // Berkeley Software Design, Inc.
  385. //
  386. // Redistribution and use in source and binary forms, with or without
  387. // modification, are permitted provided that the following conditions
  388. // are met:
  389. // 1. Redistributions of source code must retain the above copyright
  390. // notice, this list of conditions and the following disclaimer.
  391. // 2. Redistributions in binary form must reproduce the above copyright
  392. // notice, this list of conditions and the following disclaimer in the
  393. // documentation and/or other materials provided with the distribution.
  394. // 3. Neither the name of the University nor the names of its contributors
  395. // may be used to endorse or promote products derived from this software
  396. // without specific prior written permission.
  397. //
  398. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  399. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  400. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  401. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  402. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  403. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  404. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  405. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  406. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  407. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  408. // SUCH DAMAGE.
  409. //
  410. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  411. // $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
  412. // -
  413. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  414. //
  415. // Redistribution and use in source and binary forms, with or without
  416. // modification, are permitted provided that the following conditions
  417. // are met:
  418. // 1. Redistributions of source code must retain the above copyright
  419. // notice, this list of conditions and the following disclaimer.
  420. // 2. Redistributions in binary form must reproduce the above copyright
  421. // notice, this list of conditions and the following disclaimer in the
  422. // documentation and/or other materials provided with the distribution.
  423. //
  424. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  425. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  426. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  427. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  428. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  429. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  430. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  431. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  432. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  433. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  434. // Public definitions for little- and big-endian systems.
  435. // This file should be included as <endian.h> in userspace and as
  436. // <sys/endian.h> in the kernel.
  437. //
  438. // System headers that need endian information but that can't or don't
  439. // want to export the public names here should include <sys/_endian.h>
  440. // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
  441. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  442. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  443. // Copyright (c) 1991, 1993
  444. // The Regents of the University of California. All rights reserved.
  445. //
  446. // This code is derived from software contributed to Berkeley by
  447. // Berkeley Software Design, Inc.
  448. //
  449. // Redistribution and use in source and binary forms, with or without
  450. // modification, are permitted provided that the following conditions
  451. // are met:
  452. // 1. Redistributions of source code must retain the above copyright
  453. // notice, this list of conditions and the following disclaimer.
  454. // 2. Redistributions in binary form must reproduce the above copyright
  455. // notice, this list of conditions and the following disclaimer in the
  456. // documentation and/or other materials provided with the distribution.
  457. // 3. Neither the name of the University nor the names of its contributors
  458. // may be used to endorse or promote products derived from this software
  459. // without specific prior written permission.
  460. //
  461. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  462. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  463. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  464. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  465. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  466. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  467. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  468. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  469. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  470. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  471. // SUCH DAMAGE.
  472. //
  473. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  474. // $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
  475. // -
  476. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  477. //
  478. // Redistribution and use in source and binary forms, with or without
  479. // modification, are permitted provided that the following conditions
  480. // are met:
  481. // 1. Redistributions of source code must retain the above copyright
  482. // notice, this list of conditions and the following disclaimer.
  483. // 2. Redistributions in binary form must reproduce the above copyright
  484. // notice, this list of conditions and the following disclaimer in the
  485. // documentation and/or other materials provided with the distribution.
  486. //
  487. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  488. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  489. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  490. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  491. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  492. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  493. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  494. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  495. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  496. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  497. // Internal endianness macros. This pulls in <machine/endian.h> to
  498. // get the correct setting direction for the platform and sets internal
  499. // ('__' prefix) macros appropriately.
  500. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  501. // -
  502. // Copyright (c) 1990, 1993
  503. // The Regents of the University of California. All rights reserved.
  504. //
  505. // Redistribution and use in source and binary forms, with or without
  506. // modification, are permitted provided that the following conditions
  507. // are met:
  508. // 1. Redistributions of source code must retain the above copyright
  509. // notice, this list of conditions and the following disclaimer.
  510. // 2. Redistributions in binary form must reproduce the above copyright
  511. // notice, this list of conditions and the following disclaimer in the
  512. // documentation and/or other materials provided with the distribution.
  513. // 3. Neither the name of the University nor the names of its contributors
  514. // may be used to endorse or promote products derived from this software
  515. // without specific prior written permission.
  516. //
  517. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  518. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  519. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  520. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  521. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  522. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  523. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  524. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  525. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  526. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  527. // SUCH DAMAGE.
  528. //
  529. // @(#)types.h 8.3 (Berkeley) 1/5/94
  530. // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
  531. // -
  532. // Copyright (c) 1990, 1993
  533. // The Regents of the University of California. All rights reserved.
  534. //
  535. // Redistribution and use in source and binary forms, with or without
  536. // modification, are permitted provided that the following conditions
  537. // are met:
  538. // 1. Redistributions of source code must retain the above copyright
  539. // notice, this list of conditions and the following disclaimer.
  540. // 2. Redistributions in binary form must reproduce the above copyright
  541. // notice, this list of conditions and the following disclaimer in the
  542. // documentation and/or other materials provided with the distribution.
  543. // 3. Neither the name of the University nor the names of its contributors
  544. // may be used to endorse or promote products derived from this software
  545. // without specific prior written permission.
  546. //
  547. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  548. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  549. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  550. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  551. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  552. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  553. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  554. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  555. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  556. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  557. // SUCH DAMAGE.
  558. //
  559. // @(#)types.h 8.3 (Berkeley) 1/5/94
  560. // @(#)ansi.h 8.2 (Berkeley) 1/4/94
  561. type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
  562. type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
  563. type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
  564. type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
  565. type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id
  566. type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
  567. type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
  568. type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
  569. type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
  570. type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
  571. type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
  572. type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
  573. type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
  574. type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
  575. type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
  576. type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
  577. type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
  578. type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
  579. type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
  580. type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
  581. type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
  582. type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
  583. type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
  584. type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
  585. type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
  586. type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
  587. type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
  588. type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
  589. // mbstate_t is an opaque object to keep conversion state, during multibyte
  590. // stream conversions. The content must not be referenced by user programs.
  591. type X__mbstate_t = struct {
  592. F__ccgo_pad1 [0]uint64
  593. F__mbstate8 [128]int8
  594. } /* _types.h:75:3 */
  595. // Tell sys/endian.h we have MD variants of the swap macros.
  596. // Note that these macros evaluate their arguments several times.
  597. // Public names
  598. // These are specified to be function-like macros to match the spec
  599. // POSIX names
  600. // original BSD names
  601. // these were exposed here before
  602. // ancient stuff
  603. type U_char = uint8 /* types.h:51:23 */
  604. type U_short = uint16 /* types.h:52:24 */
  605. type U_int = uint32 /* types.h:53:22 */
  606. type U_long = uint64 /* types.h:54:23 */
  607. type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
  608. type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
  609. type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
  610. type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility
  611. type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
  612. type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
  613. // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
  614. // but the rest of the includes are not ready for that yet.
  615. type Int8_t = X__int8_t /* types.h:75:19 */
  616. type Uint8_t = X__uint8_t /* types.h:80:20 */
  617. type Int16_t = X__int16_t /* types.h:85:20 */
  618. type Uint16_t = X__uint16_t /* types.h:90:21 */
  619. type Int32_t = X__int32_t /* types.h:95:20 */
  620. type Uint32_t = X__uint32_t /* types.h:100:21 */
  621. type Int64_t = X__int64_t /* types.h:105:20 */
  622. type Uint64_t = X__uint64_t /* types.h:110:21 */
  623. // BSD-style unsigned bits types
  624. type U_int8_t = X__uint8_t /* types.h:114:19 */
  625. type U_int16_t = X__uint16_t /* types.h:115:20 */
  626. type U_int32_t = X__uint32_t /* types.h:116:20 */
  627. type U_int64_t = X__uint64_t /* types.h:117:20 */
  628. // quads, deprecated in favor of 64 bit int types
  629. type Quad_t = X__int64_t /* types.h:120:19 */
  630. type U_quad_t = X__uint64_t /* types.h:121:20 */
  631. // VM system types
  632. type Vaddr_t = X__vaddr_t /* types.h:125:19 */
  633. type Paddr_t = X__paddr_t /* types.h:126:19 */
  634. type Vsize_t = X__vsize_t /* types.h:127:19 */
  635. type Psize_t = X__psize_t /* types.h:128:19 */
  636. // Standard system types
  637. type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
  638. type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
  639. type Caddr_t = uintptr /* types.h:134:14 */ // core address
  640. type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
  641. type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
  642. type Dev_t = X__dev_t /* types.h:137:18 */ // device number
  643. type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
  644. type Gid_t = X__gid_t /* types.h:139:18 */ // group id
  645. type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
  646. type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
  647. type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
  648. type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
  649. type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
  650. type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
  651. type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
  652. type Uid_t = X__uid_t /* types.h:147:18 */ // user id
  653. type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
  654. type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
  655. type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
  656. type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
  657. // The following types may be defined in multiple header files.
  658. type Clock_t = X__clock_t /* types.h:158:19 */
  659. type Clockid_t = X__clockid_t /* types.h:163:21 */
  660. type Pid_t = X__pid_t /* types.h:168:18 */
  661. type Ssize_t = X__ssize_t /* types.h:178:19 */
  662. type Time_t = X__time_t /* types.h:183:18 */
  663. type Timer_t = X__timer_t /* types.h:188:19 */
  664. type Off_t = X__off_t /* types.h:193:18 */
  665. type Div_t = struct {
  666. Fquot int32
  667. Frem int32
  668. } /* stdlib.h:59:3 */
  669. type Ldiv_t = struct {
  670. Fquot int64
  671. Frem int64
  672. } /* stdlib.h:64:3 */
  673. type Lldiv_t = struct {
  674. Fquot int64
  675. Frem int64
  676. } /* stdlib.h:70:3 */
  677. type Qdiv_t = struct {
  678. Fquot Quad_t
  679. Frem Quad_t
  680. } /* stdlib.h:77:3 */
  681. var _ int8 /* gen.c:2:13: */