fcntl_openbsd_amd64.go 38 KB

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