fcntl_openbsd_arm64.go 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  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_arm64.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:60: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:4:1:
  83. X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
  84. X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
  85. X_MAX_PAGE_SHIFT = 12 // _types.h:57: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:54: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>:360: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.1 2016/12/17 23:38:33 patrick Exp $
  195. // Macro to test if we're using a specific version of gcc or later.
  196. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  197. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  198. // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  199. // in between its arguments. Do not use __CONCAT on double-quoted strings,
  200. // such as those from the __STRING macro: to concatenate strings just put
  201. // them next to each other.
  202. // GCC1 and some versions of GCC2 declare dead (non-returning) and
  203. // pure (no side effects) functions using "volatile" and "const";
  204. // unfortunately, these then cause warnings under "-ansi -pedantic".
  205. // GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
  206. // work for GNU C++ (modulo a slight glitch in the C++ grammar in
  207. // the distribution version of 2.5.5).
  208. // __returns_twice makes the compiler not assume the function
  209. // only returns once. This affects registerisation of variables:
  210. // even local variables need to be in memory across such a call.
  211. // Example: setjmp()
  212. // __only_inline makes the compiler only use this function definition
  213. // for inlining; references that can't be inlined will be left as
  214. // external references instead of generating a local copy. The
  215. // matching library should include a simple extern definition for
  216. // the function to handle those references. c.f. ctype.h
  217. // GNU C version 2.96 adds explicit branch prediction so that
  218. // the CPU back-end can hint the processor and also so that
  219. // code blocks can be reordered such that the predicted path
  220. // sees a more linear flow, thus improving cache behavior, etc.
  221. //
  222. // The following two macros provide us with a way to utilize this
  223. // compiler feature. Use __predict_true() if you expect the expression
  224. // to evaluate to true, and __predict_false() if you expect the
  225. // expression to evaluate to false.
  226. //
  227. // A few notes about usage:
  228. //
  229. // * Generally, __predict_false() error condition checks (unless
  230. // you have some _strong_ reason to do otherwise, in which case
  231. // document it), and/or __predict_true() `no-error' condition
  232. // checks, assuming you want to optimize for the no-error case.
  233. //
  234. // * Other than that, if you don't know the likelihood of a test
  235. // succeeding from empirical or other `hard' evidence, don't
  236. // make predictions.
  237. //
  238. // * These are meant to be used in places that are run `a lot'.
  239. // It is wasteful to make predictions in code that is run
  240. // seldomly (e.g. at subsystem initialization time) as the
  241. // basic block reordering that this affects can often generate
  242. // larger code.
  243. // Delete pseudo-keywords wherever they are not available or needed.
  244. // The __packed macro indicates that a variable or structure members
  245. // should have the smallest possible alignment, despite any host CPU
  246. // alignment requirements.
  247. //
  248. // The __aligned(x) macro specifies the minimum alignment of a
  249. // variable or structure.
  250. //
  251. // These macros together are useful for describing the layout and
  252. // alignment of messages exchanged with hardware or other systems.
  253. // "The nice thing about standards is that there are so many to choose from."
  254. // There are a number of "feature test macros" specified by (different)
  255. // standards that determine which interfaces and types the header files
  256. // should expose.
  257. //
  258. // Because of inconsistencies in these macros, we define our own
  259. // set in the private name space that end in _VISIBLE. These are
  260. // always defined and so headers can test their values easily.
  261. // Things can get tricky when multiple feature macros are defined.
  262. // We try to take the union of all the features requested.
  263. //
  264. // The following macros are guaranteed to have a value after cdefs.h
  265. // has been included:
  266. // __POSIX_VISIBLE
  267. // __XPG_VISIBLE
  268. // __ISO_C_VISIBLE
  269. // __BSD_VISIBLE
  270. // X/Open Portability Guides and Single Unix Specifications.
  271. // _XOPEN_SOURCE XPG3
  272. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  273. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  274. // _XOPEN_SOURCE == 500 XPG5
  275. // _XOPEN_SOURCE == 520 XPG5v2
  276. // _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
  277. // _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
  278. //
  279. // The XPG spec implies a specific value for _POSIX_C_SOURCE.
  280. // POSIX macros, these checks must follow the XOPEN ones above.
  281. //
  282. // _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
  283. // _POSIX_C_SOURCE == 1 1003.1-1990
  284. // _POSIX_C_SOURCE == 2 1003.2-1992
  285. // _POSIX_C_SOURCE == 199309L 1003.1b-1993
  286. // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
  287. // and the omnibus ISO/IEC 9945-1:1996
  288. // _POSIX_C_SOURCE == 200112L 1003.1-2001
  289. // _POSIX_C_SOURCE == 200809L 1003.1-2008
  290. //
  291. // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
  292. // this may be overridden by the _ISOC99_SOURCE macro later.
  293. // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
  294. // If the user defines it in addition to one of the POSIX or XOPEN
  295. // macros, assume the POSIX/XOPEN macro(s) should take precedence.
  296. // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
  297. // override any of the other macros since they are non-exclusive.
  298. // Finally deal with BSD-specific interfaces that are not covered
  299. // by any standards. We expose these when none of the POSIX or XPG
  300. // macros is defined or if the user explicitly asks for them.
  301. // Default values.
  302. // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
  303. // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
  304. // -
  305. // Copyright (c) 1982, 1986, 1991, 1993
  306. // The Regents of the University of California. All rights reserved.
  307. // (c) UNIX System Laboratories, Inc.
  308. // All or some portions of this file are derived from material licensed
  309. // to the University of California by American Telephone and Telegraph
  310. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  311. // the permission of UNIX System Laboratories, Inc.
  312. //
  313. // Redistribution and use in source and binary forms, with or without
  314. // modification, are permitted provided that the following conditions
  315. // are met:
  316. // 1. Redistributions of source code must retain the above copyright
  317. // notice, this list of conditions and the following disclaimer.
  318. // 2. Redistributions in binary form must reproduce the above copyright
  319. // notice, this list of conditions and the following disclaimer in the
  320. // documentation and/or other materials provided with the distribution.
  321. // 3. Neither the name of the University nor the names of its contributors
  322. // may be used to endorse or promote products derived from this software
  323. // without specific prior written permission.
  324. //
  325. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  326. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  327. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  328. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  329. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  330. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  331. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  332. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  333. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  334. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  335. // SUCH DAMAGE.
  336. //
  337. // @(#)types.h 8.4 (Berkeley) 1/21/94
  338. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  339. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  340. // Copyright (c) 1991, 1993
  341. // The Regents of the University of California. All rights reserved.
  342. //
  343. // This code is derived from software contributed to Berkeley by
  344. // Berkeley Software Design, Inc.
  345. //
  346. // Redistribution and use in source and binary forms, with or without
  347. // modification, are permitted provided that the following conditions
  348. // are met:
  349. // 1. Redistributions of source code must retain the above copyright
  350. // notice, this list of conditions and the following disclaimer.
  351. // 2. Redistributions in binary form must reproduce the above copyright
  352. // notice, this list of conditions and the following disclaimer in the
  353. // documentation and/or other materials provided with the distribution.
  354. // 3. Neither the name of the University nor the names of its contributors
  355. // may be used to endorse or promote products derived from this software
  356. // without specific prior written permission.
  357. //
  358. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  359. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  360. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  361. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  362. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  363. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  364. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  365. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  366. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  367. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  368. // SUCH DAMAGE.
  369. //
  370. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  371. // $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
  372. // -
  373. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  374. //
  375. // Redistribution and use in source and binary forms, with or without
  376. // modification, are permitted provided that the following conditions
  377. // are met:
  378. // 1. Redistributions of source code must retain the above copyright
  379. // notice, this list of conditions and the following disclaimer.
  380. // 2. Redistributions in binary form must reproduce the above copyright
  381. // notice, this list of conditions and the following disclaimer in the
  382. // documentation and/or other materials provided with the distribution.
  383. //
  384. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  385. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  386. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  387. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  388. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  389. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  390. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  391. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  392. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  393. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  394. // Public definitions for little- and big-endian systems.
  395. // This file should be included as <endian.h> in userspace and as
  396. // <sys/endian.h> in the kernel.
  397. //
  398. // System headers that need endian information but that can't or don't
  399. // want to export the public names here should include <sys/_endian.h>
  400. // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
  401. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  402. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  403. // Copyright (c) 1991, 1993
  404. // The Regents of the University of California. All rights reserved.
  405. //
  406. // This code is derived from software contributed to Berkeley by
  407. // Berkeley Software Design, Inc.
  408. //
  409. // Redistribution and use in source and binary forms, with or without
  410. // modification, are permitted provided that the following conditions
  411. // are met:
  412. // 1. Redistributions of source code must retain the above copyright
  413. // notice, this list of conditions and the following disclaimer.
  414. // 2. Redistributions in binary form must reproduce the above copyright
  415. // notice, this list of conditions and the following disclaimer in the
  416. // documentation and/or other materials provided with the distribution.
  417. // 3. Neither the name of the University nor the names of its contributors
  418. // may be used to endorse or promote products derived from this software
  419. // without specific prior written permission.
  420. //
  421. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  422. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  423. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  424. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  425. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  426. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  427. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  428. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  429. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  430. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  431. // SUCH DAMAGE.
  432. //
  433. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  434. // $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
  435. // -
  436. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  437. //
  438. // Redistribution and use in source and binary forms, with or without
  439. // modification, are permitted provided that the following conditions
  440. // are met:
  441. // 1. Redistributions of source code must retain the above copyright
  442. // notice, this list of conditions and the following disclaimer.
  443. // 2. Redistributions in binary form must reproduce the above copyright
  444. // notice, this list of conditions and the following disclaimer in the
  445. // documentation and/or other materials provided with the distribution.
  446. //
  447. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  448. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  449. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  450. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  451. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  452. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  453. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  454. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  455. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  456. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  457. // Internal endianness macros. This pulls in <machine/endian.h> to
  458. // get the correct setting direction for the platform and sets internal
  459. // ('__' prefix) macros appropriately.
  460. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  461. // -
  462. // Copyright (c) 1990, 1993
  463. // The Regents of the University of California. All rights reserved.
  464. //
  465. // Redistribution and use in source and binary forms, with or without
  466. // modification, are permitted provided that the following conditions
  467. // are met:
  468. // 1. Redistributions of source code must retain the above copyright
  469. // notice, this list of conditions and the following disclaimer.
  470. // 2. Redistributions in binary form must reproduce the above copyright
  471. // notice, this list of conditions and the following disclaimer in the
  472. // documentation and/or other materials provided with the distribution.
  473. // 3. Neither the name of the University nor the names of its contributors
  474. // may be used to endorse or promote products derived from this software
  475. // without specific prior written permission.
  476. //
  477. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  478. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  479. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  480. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  481. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  482. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  483. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  484. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  485. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  486. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  487. // SUCH DAMAGE.
  488. //
  489. // @(#)types.h 8.3 (Berkeley) 1/5/94
  490. // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
  491. // -
  492. // Copyright (c) 1990, 1993
  493. // The Regents of the University of California. All rights reserved.
  494. //
  495. // Redistribution and use in source and binary forms, with or without
  496. // modification, are permitted provided that the following conditions
  497. // are met:
  498. // 1. Redistributions of source code must retain the above copyright
  499. // notice, this list of conditions and the following disclaimer.
  500. // 2. Redistributions in binary form must reproduce the above copyright
  501. // notice, this list of conditions and the following disclaimer in the
  502. // documentation and/or other materials provided with the distribution.
  503. // 3. Neither the name of the University nor the names of its contributors
  504. // may be used to endorse or promote products derived from this software
  505. // without specific prior written permission.
  506. //
  507. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  508. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  509. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  510. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  511. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  512. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  513. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  514. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  515. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  516. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  517. // SUCH DAMAGE.
  518. //
  519. // @(#)types.h 8.3 (Berkeley) 1/5/94
  520. // @(#)ansi.h 8.2 (Berkeley) 1/4/94
  521. // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
  522. // value for all data types (int, long, ...). The result is an
  523. // unsigned long and must be cast to any desired pointer type.
  524. //
  525. // _ALIGNED_POINTER is a boolean macro that checks whether an address
  526. // is valid to fetch data elements of type t from on this architecture.
  527. // This does not reflect the optimal alignment, just the possibility
  528. // (within reasonable limits).
  529. // 7.18.1.1 Exact-width integer types
  530. type X__int8_t = int8 /* _types.h:60:22 */
  531. type X__uint8_t = uint8 /* _types.h:61:24 */
  532. type X__int16_t = int16 /* _types.h:62:17 */
  533. type X__uint16_t = uint16 /* _types.h:63:25 */
  534. type X__int32_t = int32 /* _types.h:64:15 */
  535. type X__uint32_t = uint32 /* _types.h:65:23 */
  536. // LONGLONG
  537. type X__int64_t = int64 /* _types.h:67:20 */
  538. // LONGLONG
  539. type X__uint64_t = uint64 /* _types.h:69:28 */
  540. // 7.18.1.2 Minimum-width integer types
  541. type X__int_least8_t = X__int8_t /* _types.h:72:19 */
  542. type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
  543. type X__int_least16_t = X__int16_t /* _types.h:74:20 */
  544. type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
  545. type X__int_least32_t = X__int32_t /* _types.h:76:20 */
  546. type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
  547. type X__int_least64_t = X__int64_t /* _types.h:78:20 */
  548. type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
  549. // 7.18.1.3 Fastest minimum-width integer types
  550. type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
  551. type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
  552. type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
  553. type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
  554. type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
  555. type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
  556. type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
  557. type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
  558. // 7.18.1.4 Integer types capable of holding object pointers
  559. type X__intptr_t = int64 /* _types.h:104:16 */
  560. type X__uintptr_t = uint64 /* _types.h:105:24 */
  561. // 7.18.1.5 Greatest-width integer types
  562. type X__intmax_t = X__int64_t /* _types.h:108:20 */
  563. type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
  564. // Register size
  565. type X__register_t = int64 /* _types.h:112:16 */
  566. // VM system types
  567. type X__vaddr_t = uint64 /* _types.h:115:24 */
  568. type X__paddr_t = uint64 /* _types.h:116:24 */
  569. type X__vsize_t = uint64 /* _types.h:117:24 */
  570. type X__psize_t = uint64 /* _types.h:118:24 */
  571. // Standard system types
  572. type X__double_t = float64 /* _types.h:121:18 */
  573. type X__float_t = float32 /* _types.h:122:17 */
  574. type X__ptrdiff_t = int64 /* _types.h:123:16 */
  575. type X__size_t = uint64 /* _types.h:124:24 */
  576. type X__ssize_t = int64 /* _types.h:125:16 */
  577. type X__va_list = X__builtin_va_list /* _types.h:127:27 */
  578. // Wide character support types
  579. type X__wchar_t = int32 /* _types.h:137:15 */
  580. type X__wint_t = int32 /* _types.h:140:15 */
  581. type X__rune_t = int32 /* _types.h:141:15 */
  582. type X__wctrans_t = uintptr /* _types.h:142:14 */
  583. type X__wctype_t = uintptr /* _types.h:143: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: */