netdb_freebsd_386.go 32 KB

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