stdlib_freebsd_arm.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  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_freebsd_arm.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. EXIT_FAILURE = 1 // stdlib.h:73:1:
  15. EXIT_SUCCESS = 0 // stdlib.h:74:1:
  16. RAND_MAX = 0x7fffffff // stdlib.h:80:1:
  17. X_ERRNO_T_DEFINED = 0 // stdlib.h:344:1:
  18. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  19. X_ILP32 = 1 // <predefined>:1:1:
  20. X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
  21. X_MKDTEMP_DECLARED = 0 // stdlib.h:192:1:
  22. X_MKSTEMP_DECLARED = 0 // stdlib.h:196:1:
  23. X_MKTEMP_DECLARED = 0 // stdlib.h:221:1:
  24. X_Nonnull = 0 // cdefs.h:790:1:
  25. X_Null_unspecified = 0 // cdefs.h:792:1:
  26. X_Nullable = 0 // cdefs.h:791:1:
  27. X_RSIZE_T_DEFINED = 0 // stdlib.h:339:1:
  28. X_RUNE_T_DECLARED = 0 // stdlib.h:47:1:
  29. X_SIZE_T_DECLARED = 0 // stdlib.h:53:1:
  30. X_STDLIB_H_ = 0 // stdlib.h:36:1:
  31. X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
  32. X_SYS__TYPES_H_ = 0 // _types.h:32:1:
  33. X_WCHAR_T_DECLARED = 0 // stdlib.h:59:1:
  34. Unix = 1 // <predefined>:367:1:
  35. )
  36. type Ptrdiff_t = int32 /* <builtin>:3:26 */
  37. type Size_t = uint32 /* <builtin>:9:23 */
  38. type Wchar_t = uint32 /* <builtin>:15:24 */
  39. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  40. type X__float128 = float64 /* <builtin>:47:21 */
  41. // -
  42. // SPDX-License-Identifier: BSD-3-Clause
  43. //
  44. // Copyright (c) 1990, 1993
  45. // The Regents of the University of California. All rights reserved.
  46. //
  47. // Redistribution and use in source and binary forms, with or without
  48. // modification, are permitted provided that the following conditions
  49. // are met:
  50. // 1. Redistributions of source code must retain the above copyright
  51. // notice, this list of conditions and the following disclaimer.
  52. // 2. Redistributions in binary form must reproduce the above copyright
  53. // notice, this list of conditions and the following disclaimer in the
  54. // documentation and/or other materials provided with the distribution.
  55. // 3. Neither the name of the University nor the names of its contributors
  56. // may be used to endorse or promote products derived from this software
  57. // without specific prior written permission.
  58. //
  59. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  60. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  61. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  62. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  63. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  64. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  65. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  66. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  67. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  68. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  69. // SUCH DAMAGE.
  70. //
  71. // @(#)stdlib.h 8.5 (Berkeley) 5/19/95
  72. // $FreeBSD$
  73. // -
  74. // SPDX-License-Identifier: BSD-3-Clause
  75. //
  76. // Copyright (c) 1991, 1993
  77. // The Regents of the University of California. All rights reserved.
  78. //
  79. // This code is derived from software contributed to Berkeley by
  80. // Berkeley Software Design, Inc.
  81. //
  82. // Redistribution and use in source and binary forms, with or without
  83. // modification, are permitted provided that the following conditions
  84. // are met:
  85. // 1. Redistributions of source code must retain the above copyright
  86. // notice, this list of conditions and the following disclaimer.
  87. // 2. Redistributions in binary form must reproduce the above copyright
  88. // notice, this list of conditions and the following disclaimer in the
  89. // documentation and/or other materials provided with the distribution.
  90. // 3. Neither the name of the University nor the names of its contributors
  91. // may be used to endorse or promote products derived from this software
  92. // without specific prior written permission.
  93. //
  94. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  95. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  96. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  97. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  98. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  99. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  100. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  101. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  102. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  103. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  104. // SUCH DAMAGE.
  105. //
  106. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  107. // $FreeBSD$
  108. // Testing against Clang-specific extensions.
  109. // This code has been put in place to help reduce the addition of
  110. // compiler specific defines in FreeBSD code. It helps to aid in
  111. // having a compiler-agnostic source tree.
  112. // Compiler memory barriers, specific to gcc and clang.
  113. // XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
  114. // Macro to test if we're using a specific version of gcc or later.
  115. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  116. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  117. // The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
  118. // mode -- there must be no spaces between its arguments, and for nested
  119. // __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
  120. // concatenate double-quoted strings produced by the __STRING macro, but
  121. // this only works with ANSI C.
  122. //
  123. // __XSTRING is like __STRING, but it expands any macros in its argument
  124. // first. It is only available with ANSI C.
  125. // Compiler-dependent macros to help declare dead (non-returning) and
  126. // pure (no side effects) functions, and unused variables. They are
  127. // null except for versions of gcc that are known to support the features
  128. // properly (old versions of gcc-2 supported the dead and pure features
  129. // in a different (wrong) way). If we do not provide an implementation
  130. // for a given compiler, let the compile fail if it is told to use
  131. // a feature that we cannot live without.
  132. // Keywords added in C11.
  133. // Emulation of C11 _Generic(). Unlike the previously defined C11
  134. // keywords, it is not possible to implement this using exactly the same
  135. // syntax. Therefore implement something similar under the name
  136. // __generic(). Unlike _Generic(), this macro can only distinguish
  137. // between a single type, so it requires nested invocations to
  138. // distinguish multiple cases.
  139. // C99 Static array indices in function parameter declarations. Syntax such as:
  140. // void bar(int myArray[static 10]);
  141. // is allowed in C99 but not in C++. Define __min_size appropriately so
  142. // headers using it can be compiled in either language. Use like this:
  143. // void bar(int myArray[__min_size(10)]);
  144. // XXX: should use `#if __STDC_VERSION__ < 199901'.
  145. // C++11 exposes a load of C99 stuff
  146. // GCC 2.95 provides `__restrict' as an extension to C90 to support the
  147. // C99-specific `restrict' type qualifier. We happen to use `__restrict' as
  148. // a way to define the `restrict' type qualifier without disturbing older
  149. // software that is unaware of C99 keywords.
  150. // GNU C version 2.96 adds explicit branch prediction so that
  151. // the CPU back-end can hint the processor and also so that
  152. // code blocks can be reordered such that the predicted path
  153. // sees a more linear flow, thus improving cache behavior, etc.
  154. //
  155. // The following two macros provide us with a way to utilize this
  156. // compiler feature. Use __predict_true() if you expect the expression
  157. // to evaluate to true, and __predict_false() if you expect the
  158. // expression to evaluate to false.
  159. //
  160. // A few notes about usage:
  161. //
  162. // * Generally, __predict_false() error condition checks (unless
  163. // you have some _strong_ reason to do otherwise, in which case
  164. // document it), and/or __predict_true() `no-error' condition
  165. // checks, assuming you want to optimize for the no-error case.
  166. //
  167. // * Other than that, if you don't know the likelihood of a test
  168. // succeeding from empirical or other `hard' evidence, don't
  169. // make predictions.
  170. //
  171. // * These are meant to be used in places that are run `a lot'.
  172. // It is wasteful to make predictions in code that is run
  173. // seldomly (e.g. at subsystem initialization time) as the
  174. // basic block reordering that this affects can often generate
  175. // larger code.
  176. // We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
  177. // require it.
  178. // Given the pointer x to the member m of the struct s, return
  179. // a pointer to the containing structure. When using GCC, we first
  180. // assign pointer x to a local variable, to check that its type is
  181. // compatible with member m.
  182. // Compiler-dependent macros to declare that functions take printf-like
  183. // or scanf-like arguments. They are null except for versions of gcc
  184. // that are known to support the features properly (old versions of gcc-2
  185. // didn't permit keeping the keywords out of the application namespace).
  186. // Compiler-dependent macros that rely on FreeBSD-specific extensions.
  187. // Embed the rcs id of a source file in the resulting library. Note that in
  188. // more recent ELF binutils, we use .ident allowing the ID to be stripped.
  189. // Usage:
  190. // __FBSDID("$FreeBSD$");
  191. // -
  192. // The following definitions are an extension of the behavior originally
  193. // implemented in <sys/_posix.h>, but with a different level of granularity.
  194. // POSIX.1 requires that the macros we test be defined before any standard
  195. // header file is included.
  196. //
  197. // Here's a quick run-down of the versions:
  198. // defined(_POSIX_SOURCE) 1003.1-1988
  199. // _POSIX_C_SOURCE == 1 1003.1-1990
  200. // _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
  201. // _POSIX_C_SOURCE == 199309 1003.1b-1993
  202. // _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
  203. // and the omnibus ISO/IEC 9945-1: 1996
  204. // _POSIX_C_SOURCE == 200112 1003.1-2001
  205. // _POSIX_C_SOURCE == 200809 1003.1-2008
  206. //
  207. // In addition, the X/Open Portability Guide, which is now the Single UNIX
  208. // Specification, defines a feature-test macro which indicates the version of
  209. // that specification, and which subsumes _POSIX_C_SOURCE.
  210. //
  211. // Our macros begin with two underscores to avoid namespace screwage.
  212. // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
  213. // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
  214. // Deal with various X/Open Portability Guides and Single UNIX Spec.
  215. // Deal with all versions of POSIX. The ordering relative to the tests above is
  216. // important.
  217. // -
  218. // Deal with _ANSI_SOURCE:
  219. // If it is defined, and no other compilation environment is explicitly
  220. // requested, then define our internal feature-test macros to zero. This
  221. // makes no difference to the preprocessor (undefined symbols in preprocessing
  222. // expressions are defined to have value zero), but makes it more convenient for
  223. // a test program to print out the values.
  224. //
  225. // If a program mistakenly defines _ANSI_SOURCE and some other macro such as
  226. // _POSIX_C_SOURCE, we will assume that it wants the broader compilation
  227. // environment (and in fact we will never get here).
  228. // User override __EXT1_VISIBLE
  229. // Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
  230. // translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
  231. // Nullability qualifiers: currently only supported by Clang.
  232. // Type Safety Checking
  233. //
  234. // Clang provides additional attributes to enable checking type safety
  235. // properties that cannot be enforced by the C type system.
  236. // Lock annotations.
  237. //
  238. // Clang provides support for doing basic thread-safety tests at
  239. // compile-time, by marking which locks will/should be held when
  240. // entering/leaving a functions.
  241. //
  242. // Furthermore, it is also possible to annotate variables and structure
  243. // members to enforce that they are only accessed when certain locks are
  244. // held.
  245. // Structure implements a lock.
  246. // Function acquires an exclusive or shared lock.
  247. // Function attempts to acquire an exclusive or shared lock.
  248. // Function releases a lock.
  249. // Function asserts that an exclusive or shared lock is held.
  250. // Function requires that an exclusive or shared lock is or is not held.
  251. // Function should not be analyzed.
  252. // Function or variable should not be sanitized, e.g., by AddressSanitizer.
  253. // GCC has the nosanitize attribute, but as a function attribute only, and
  254. // warns on use as a variable attribute.
  255. // Guard variables and structure members by lock.
  256. // Alignment builtins for better type checking and improved code generation.
  257. // Provide fallback versions for other compilers (GCC/Clang < 10):
  258. // -
  259. // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  260. //
  261. // Copyright (c) 2003 Marcel Moolenaar
  262. // All rights reserved.
  263. //
  264. // Redistribution and use in source and binary forms, with or without
  265. // modification, are permitted provided that the following conditions
  266. // are met:
  267. //
  268. // 1. Redistributions of source code must retain the above copyright
  269. // notice, this list of conditions and the following disclaimer.
  270. // 2. Redistributions in binary form must reproduce the above copyright
  271. // notice, this list of conditions and the following disclaimer in the
  272. // documentation and/or other materials provided with the distribution.
  273. //
  274. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  275. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  276. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  277. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  278. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  279. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  280. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  281. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  282. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  283. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  284. //
  285. // $FreeBSD$
  286. // -
  287. // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  288. //
  289. // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  290. // All rights reserved.
  291. //
  292. // Redistribution and use in source and binary forms, with or without
  293. // modification, are permitted provided that the following conditions
  294. // are met:
  295. // 1. Redistributions of source code must retain the above copyright
  296. // notice, this list of conditions and the following disclaimer.
  297. // 2. Redistributions in binary form must reproduce the above copyright
  298. // notice, this list of conditions and the following disclaimer in the
  299. // documentation and/or other materials provided with the distribution.
  300. //
  301. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  302. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  303. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  304. // ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  305. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  306. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  307. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  308. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  309. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  310. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  311. // SUCH DAMAGE.
  312. //
  313. // $FreeBSD$
  314. // -
  315. // SPDX-License-Identifier: BSD-3-Clause
  316. //
  317. // Copyright (c) 1991, 1993
  318. // The Regents of the University of California. All rights reserved.
  319. //
  320. // This code is derived from software contributed to Berkeley by
  321. // Berkeley Software Design, Inc.
  322. //
  323. // Redistribution and use in source and binary forms, with or without
  324. // modification, are permitted provided that the following conditions
  325. // are met:
  326. // 1. Redistributions of source code must retain the above copyright
  327. // notice, this list of conditions and the following disclaimer.
  328. // 2. Redistributions in binary form must reproduce the above copyright
  329. // notice, this list of conditions and the following disclaimer in the
  330. // documentation and/or other materials provided with the distribution.
  331. // 3. Neither the name of the University nor the names of its contributors
  332. // may be used to endorse or promote products derived from this software
  333. // without specific prior written permission.
  334. //
  335. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  336. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  337. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  338. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  339. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  340. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  341. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  342. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  343. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  344. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  345. // SUCH DAMAGE.
  346. //
  347. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  348. // $FreeBSD$
  349. // -
  350. // SPDX-License-Identifier: BSD-4-Clause
  351. //
  352. // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  353. // Copyright (c) 1990, 1993
  354. // The Regents of the University of California. All rights reserved.
  355. //
  356. // Redistribution and use in source and binary forms, with or without
  357. // modification, are permitted provided that the following conditions
  358. // are met:
  359. // 1. Redistributions of source code must retain the above copyright
  360. // notice, this list of conditions and the following disclaimer.
  361. // 2. Redistributions in binary form must reproduce the above copyright
  362. // notice, this list of conditions and the following disclaimer in the
  363. // documentation and/or other materials provided with the distribution.
  364. // 3. All advertising materials mentioning features or use of this software
  365. // must display the following acknowledgement:
  366. // This product includes software developed by the University of
  367. // California, Berkeley and its contributors.
  368. // 4. Neither the name of the University nor the names of its contributors
  369. // may be used to endorse or promote products derived from this software
  370. // without specific prior written permission.
  371. //
  372. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  373. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  374. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  375. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  376. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  377. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  378. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  379. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  380. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  381. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  382. // SUCH DAMAGE.
  383. //
  384. // From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
  385. // From: @(#)types.h 8.3 (Berkeley) 1/5/94
  386. // $FreeBSD$
  387. // Basic types upon which most other types are built.
  388. type X__int8_t = int8 /* _types.h:51:22 */
  389. type X__uint8_t = uint8 /* _types.h:52:24 */
  390. type X__int16_t = int16 /* _types.h:53:17 */
  391. type X__uint16_t = uint16 /* _types.h:54:25 */
  392. type X__int32_t = int32 /* _types.h:55:15 */
  393. type X__uint32_t = uint32 /* _types.h:56:23 */
  394. // LONGLONG
  395. type X__int64_t = int64 /* _types.h:61:20 */
  396. // LONGLONG
  397. type X__uint64_t = uint64 /* _types.h:66:28 */
  398. // Standard type definitions.
  399. type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()...
  400. type X__critical_t = X__int32_t /* _types.h:72:19 */
  401. type X__double_t = float64 /* _types.h:74:17 */
  402. type X__float_t = float32 /* _types.h:75:16 */
  403. type X__intfptr_t = X__int32_t /* _types.h:77:19 */
  404. type X__intmax_t = X__int64_t /* _types.h:78:19 */
  405. type X__intptr_t = X__int32_t /* _types.h:79:19 */
  406. type X__int_fast8_t = X__int32_t /* _types.h:80:19 */
  407. type X__int_fast16_t = X__int32_t /* _types.h:81:19 */
  408. type X__int_fast32_t = X__int32_t /* _types.h:82:19 */
  409. type X__int_fast64_t = X__int64_t /* _types.h:83:19 */
  410. type X__int_least8_t = X__int8_t /* _types.h:84:18 */
  411. type X__int_least16_t = X__int16_t /* _types.h:85:19 */
  412. type X__int_least32_t = X__int32_t /* _types.h:86:19 */
  413. type X__int_least64_t = X__int64_t /* _types.h:87:19 */
  414. type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2
  415. type X__register_t = X__int32_t /* _types.h:89:19 */
  416. type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages)
  417. type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof()
  418. type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error
  419. type X__time_t = X__int64_t /* _types.h:93:19 */ // time()...
  420. type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */
  421. type X__uintmax_t = X__uint64_t /* _types.h:95:20 */
  422. type X__uintptr_t = X__uint32_t /* _types.h:96:20 */
  423. type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */
  424. type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */
  425. type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */
  426. type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */
  427. type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */
  428. type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */
  429. type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */
  430. type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */
  431. type X__u_register_t = X__uint32_t /* _types.h:105:20 */
  432. type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */
  433. type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */
  434. type X__vm_size_t = X__uint32_t /* _types.h:108:20 */
  435. type X___wchar_t = uint32 /* _types.h:110:22 */
  436. // Standard type definitions.
  437. type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
  438. type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
  439. type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
  440. type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
  441. type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
  442. type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
  443. type X__gid_t = X__uint32_t /* _types.h:46:20 */
  444. type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
  445. type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
  446. type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
  447. type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
  448. type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
  449. type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
  450. type X__nl_item = int32 /* _types.h:53:14 */
  451. type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
  452. type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
  453. type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
  454. type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
  455. type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
  456. // signed, because of legacy code
  457. // that uses -1 for RLIM_INFINITY
  458. type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
  459. type X__socklen_t = X__uint32_t /* _types.h:62:20 */
  460. type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed)
  461. type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
  462. type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
  463. type X__uid_t = X__uint32_t /* _types.h:66:20 */
  464. type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
  465. type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
  466. type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
  467. type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
  468. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
  469. // Unusual type definitions.
  470. // rune_t is declared to be an “int” instead of the more natural
  471. // “unsigned long” or “long”. Two things are happening here. It is not
  472. // unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
  473. // it looks like 10646 will be a 31 bit standard. This means that if your
  474. // ints cannot hold 32 bits, you will be in trouble. The reason an int was
  475. // chosen over a long is that the is*() and to*() routines take ints (says
  476. // ANSI C), but they use __ct_rune_t instead of int.
  477. //
  478. // NOTE: rune_t is not covered by ANSI nor other standards, and should not
  479. // be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
  480. // rune_t must be the same type. Also, wint_t should be able to hold all
  481. // members of the largest character set plus one extra value (WEOF), and
  482. // must be at least 16 bits.
  483. type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
  484. type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
  485. type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
  486. // Clang already provides these types as built-ins, but only in C++ mode.
  487. type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
  488. type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
  489. // In C++11, char16_t and char32_t are built-in types.
  490. type X__max_align_t = struct {
  491. F__max_align1 int64
  492. F__max_align2 float64
  493. } /* _types.h:111:3 */
  494. type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
  495. type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
  496. // mbstate_t is an opaque object to keep conversion state during multibyte
  497. // stream conversions.
  498. type X__mbstate_t = struct {
  499. F__ccgo_pad1 [0]uint64
  500. F__mbstate8 [128]uint8
  501. } /* _types.h:124:3 */
  502. type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
  503. // Types for varargs. These are all provided by builtin types these
  504. // days, so centralize their definition.
  505. type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
  506. type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
  507. // When the following macro is defined, the system uses 64-bit inode numbers.
  508. // Programs can use this to avoid including <sys/param.h>, with its associated
  509. // namespace pollution.
  510. type Rune_t = X__rune_t /* stdlib.h:46:18 */
  511. type Div_t = struct {
  512. Fquot int32
  513. Frem int32
  514. } /* stdlib.h:66:3 */
  515. type Ldiv_t = struct {
  516. Fquot int32
  517. Frem int32
  518. } /* stdlib.h:71:3 */
  519. // Functions added in C99 which we make conditionally available in the
  520. // BSD^C89 namespace if the compiler supports `long long'.
  521. // The #if test is more complicated than it ought to be because
  522. // __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long'
  523. // is not supported in the compilation environment (which therefore means
  524. // that it can't really be ISO C99).
  525. //
  526. // (The only other extension made by C99 in thie header is _Exit().)
  527. // LONGLONG
  528. type Lldiv_t = struct {
  529. Fquot int64
  530. Frem int64
  531. } /* stdlib.h:142:3 */ // getsubopt(3) external variable
  532. type Rsize_t = Size_t /* stdlib.h:340:16 */
  533. type Errno_t = int32 /* stdlib.h:345:13 */
  534. // K.3.6
  535. type Constraint_handler_t = uintptr /* stdlib.h:349:14 */
  536. var _ uint8 /* gen.c:2:13: */