fcntl_openbsd_386.go 38 KB

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