stat_openbsd_amd64.go 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  1. // Code generated by 'ccgo sys/stat/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 sys/stat/stat_openbsd_amd64.go -pkgname stat', DO NOT EDIT.
  2. package stat
  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. ACCESSPERMS = 511 // stat.h:151:1:
  15. ALLPERMS = 4095 // stat.h:153:1:
  16. BIG_ENDIAN = 4321 // endian.h:45:1:
  17. BYTE_ORDER = 1234 // endian.h:47:1:
  18. CLK_TCK = 100 // time.h:68:1:
  19. CLOCKS_PER_SEC = 100 // time.h:71:1:
  20. CLOCK_BOOTTIME = 6 // _time.h:40:1:
  21. CLOCK_MONOTONIC = 3 // _time.h:37:1:
  22. CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1:
  23. CLOCK_REALTIME = 0 // _time.h:35:1:
  24. CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1:
  25. CLOCK_UPTIME = 5 // _time.h:39:1:
  26. DEFFILEMODE = 438 // stat.h:155:1:
  27. DST_AUST = 2 // time.h:78:1:
  28. DST_CAN = 6 // time.h:82:1:
  29. DST_EET = 5 // time.h:81:1:
  30. DST_MET = 4 // time.h:80:1:
  31. DST_NONE = 0 // time.h:76:1:
  32. DST_USA = 1 // time.h:77:1:
  33. DST_WET = 3 // time.h:79:1:
  34. FD_SETSIZE = 1024 // select.h:62:1:
  35. ITIMER_PROF = 2 // time.h:146:1:
  36. ITIMER_REAL = 0 // time.h:144:1:
  37. ITIMER_VIRTUAL = 1 // time.h:145:1:
  38. LITTLE_ENDIAN = 1234 // endian.h:44:1:
  39. NBBY = 8 // select.h:111:1:
  40. PDP_ENDIAN = 3412 // endian.h:46:1:
  41. SF_APPEND = 0x00040000 // stat.h:175:1:
  42. SF_ARCHIVED = 0x00010000 // stat.h:173:1:
  43. SF_IMMUTABLE = 0x00020000 // stat.h:174:1:
  44. SF_SETTABLE = 0xffff0000 // stat.h:172:1:
  45. S_BLKSIZE = 512 // stat.h:157:1:
  46. S_IEXEC = 64 // stat.h:108:1:
  47. S_IFBLK = 0060000 // stat.h:126:1:
  48. S_IFCHR = 0020000 // stat.h:124:1:
  49. S_IFDIR = 0040000 // stat.h:125:1:
  50. S_IFIFO = 0010000 // stat.h:123:1:
  51. S_IFLNK = 0120000 // stat.h:128:1:
  52. S_IFMT = 0170000 // stat.h:122:1:
  53. S_IFREG = 0100000 // stat.h:127:1:
  54. S_IFSOCK = 0140000 // stat.h:129:1:
  55. S_IREAD = 256 // stat.h:106:1:
  56. S_IRGRP = 0000040 // stat.h:112:1:
  57. S_IROTH = 0000004 // stat.h:117:1:
  58. S_IRUSR = 0000400 // stat.h:101:1:
  59. S_IRWXG = 0000070 // stat.h:111:1:
  60. S_IRWXO = 0000007 // stat.h:116:1:
  61. S_IRWXU = 0000700 // stat.h:100:1:
  62. S_ISGID = 0002000 // stat.h:95:1:
  63. S_ISTXT = 0001000 // stat.h:97:1:
  64. S_ISUID = 0004000 // stat.h:94:1:
  65. S_ISVTX = 0001000 // stat.h:130:1:
  66. S_IWGRP = 0000020 // stat.h:113:1:
  67. S_IWOTH = 0000002 // stat.h:118:1:
  68. S_IWRITE = 128 // stat.h:107:1:
  69. S_IWUSR = 0000200 // stat.h:102:1:
  70. S_IXGRP = 0000010 // stat.h:114:1:
  71. S_IXOTH = 0000001 // stat.h:119:1:
  72. S_IXUSR = 0000100 // stat.h:103:1:
  73. TIMER_ABSTIME = 0x1 // _time.h:62:1:
  74. TIMER_RELTIME = 0x0 // _time.h:61:1:
  75. TIME_UTC = 1 // time.h:179:1:
  76. UF_APPEND = 0x00000004 // stat.h:167:1:
  77. UF_IMMUTABLE = 0x00000002 // stat.h:166:1:
  78. UF_NODUMP = 0x00000001 // stat.h:165:1:
  79. UF_OPAQUE = 0x00000008 // stat.h:168:1:
  80. UF_SETTABLE = 0x0000ffff // stat.h:164:1:
  81. UTIME_NOW = -2 // stat.h:188:1:
  82. UTIME_OMIT = -1 // stat.h:189:1:
  83. X_BIG_ENDIAN = 4321 // _endian.h:43:1:
  84. X_BYTE_ORDER = 1234 // endian.h:58:1:
  85. X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
  86. X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
  87. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  88. X_INT16_T_DEFINED_ = 0 // types.h:84:1:
  89. X_INT32_T_DEFINED_ = 0 // types.h:94:1:
  90. X_INT64_T_DEFINED_ = 0 // types.h:104:1:
  91. X_INT8_T_DEFINED_ = 0 // types.h:74:1:
  92. X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
  93. X_LOCALE_T_DEFINED_ = 0 // time.h:106:1:
  94. X_LP64 = 1 // <predefined>:1:1:
  95. X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
  96. X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
  97. X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
  98. X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
  99. X_OFF_T_DEFINED_ = 0 // types.h:192:1:
  100. X_PDP_ENDIAN = 3412 // _endian.h:44:1:
  101. X_PID_T_DEFINED_ = 0 // types.h:167:1:
  102. X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
  103. X_QUAD_LOWWORD = 0 // _endian.h:96:1:
  104. X_RET_PROTECTOR = 1 // <predefined>:2:1:
  105. X_SELECT_DEFINED_ = 0 // select.h:126:1:
  106. X_SIGSET_T_DEFINED_ = 0 // select.h:121:1:
  107. X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
  108. X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
  109. X_STACKALIGNBYTES = 15 // _types.h:49:1:
  110. X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
  111. X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
  112. X_SYS_SELECT_H_ = 0 // select.h:35:1:
  113. X_SYS_STAT_H_ = 0 // stat.h:41:1:
  114. X_SYS_TIME_H_ = 0 // time.h:36:1:
  115. X_SYS_TYPES_H_ = 0 // types.h:41:1:
  116. X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
  117. X_SYS__TIME_H_ = 0 // _time.h:33:1:
  118. X_SYS__TYPES_H_ = 0 // _types.h:35:1:
  119. X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
  120. X_TIMESPEC_DECLARED = 0 // select.h:48:1:
  121. X_TIMEVAL_DECLARED = 0 // select.h:40:1:
  122. X_TIME_H_ = 0 // time.h:42:1:
  123. X_TIME_T_DEFINED_ = 0 // types.h:182:1:
  124. X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
  125. X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
  126. X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
  127. X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
  128. Unix = 1 // <predefined>:344:1:
  129. )
  130. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  131. type Size_t = uint64 /* <builtin>:9:23 */
  132. type Wchar_t = int32 /* <builtin>:15:24 */
  133. type X__int128_t = struct {
  134. Flo int64
  135. Fhi int64
  136. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  137. type X__uint128_t = struct {
  138. Flo uint64
  139. Fhi uint64
  140. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  141. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  142. type X__float128 = float64 /* <builtin>:47:21 */
  143. // $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $
  144. // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $
  145. // -
  146. // Copyright (c) 1982, 1986, 1989, 1993
  147. // The Regents of the University of California. All rights reserved.
  148. // (c) UNIX System Laboratories, Inc.
  149. // All or some portions of this file are derived from material licensed
  150. // to the University of California by American Telephone and Telegraph
  151. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  152. // the permission of UNIX System Laboratories, Inc.
  153. //
  154. // Redistribution and use in source and binary forms, with or without
  155. // modification, are permitted provided that the following conditions
  156. // are met:
  157. // 1. Redistributions of source code must retain the above copyright
  158. // notice, this list of conditions and the following disclaimer.
  159. // 2. Redistributions in binary form must reproduce the above copyright
  160. // notice, this list of conditions and the following disclaimer in the
  161. // documentation and/or other materials provided with the distribution.
  162. // 3. Neither the name of the University nor the names of its contributors
  163. // may be used to endorse or promote products derived from this software
  164. // without specific prior written permission.
  165. //
  166. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  167. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  168. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  169. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  170. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  171. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  172. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  173. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  174. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  175. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  176. // SUCH DAMAGE.
  177. //
  178. // @(#)stat.h 8.9 (Berkeley) 8/17/94
  179. // $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $
  180. // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $
  181. // Copyright (c) 1982, 1986, 1993
  182. // The Regents of the University of California. All rights reserved.
  183. //
  184. // Redistribution and use in source and binary forms, with or without
  185. // modification, are permitted provided that the following conditions
  186. // are met:
  187. // 1. Redistributions of source code must retain the above copyright
  188. // notice, this list of conditions and the following disclaimer.
  189. // 2. Redistributions in binary form must reproduce the above copyright
  190. // notice, this list of conditions and the following disclaimer in the
  191. // documentation and/or other materials provided with the distribution.
  192. // 3. Neither the name of the University nor the names of its contributors
  193. // may be used to endorse or promote products derived from this software
  194. // without specific prior written permission.
  195. //
  196. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  197. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  198. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  199. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  200. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  201. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  202. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  203. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  204. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  205. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  206. // SUCH DAMAGE.
  207. //
  208. // @(#)time.h 8.2 (Berkeley) 7/10/94
  209. // $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $
  210. // -
  211. // Copyright (c) 1992, 1993
  212. // The Regents of the University of California. All rights reserved.
  213. //
  214. // Redistribution and use in source and binary forms, with or without
  215. // modification, are permitted provided that the following conditions
  216. // are met:
  217. // 1. Redistributions of source code must retain the above copyright
  218. // notice, this list of conditions and the following disclaimer.
  219. // 2. Redistributions in binary form must reproduce the above copyright
  220. // notice, this list of conditions and the following disclaimer in the
  221. // documentation and/or other materials provided with the distribution.
  222. // 3. Neither the name of the University nor the names of its contributors
  223. // may be used to endorse or promote products derived from this software
  224. // without specific prior written permission.
  225. //
  226. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  227. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  228. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  229. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  230. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  231. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  232. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  233. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  234. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  235. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  236. // SUCH DAMAGE.
  237. //
  238. // @(#)select.h 8.2 (Berkeley) 1/4/94
  239. // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
  240. // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
  241. // -
  242. // Copyright (c) 1982, 1986, 1991, 1993
  243. // The Regents of the University of California. All rights reserved.
  244. // (c) UNIX System Laboratories, Inc.
  245. // All or some portions of this file are derived from material licensed
  246. // to the University of California by American Telephone and Telegraph
  247. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  248. // the permission of UNIX System Laboratories, Inc.
  249. //
  250. // Redistribution and use in source and binary forms, with or without
  251. // modification, are permitted provided that the following conditions
  252. // are met:
  253. // 1. Redistributions of source code must retain the above copyright
  254. // notice, this list of conditions and the following disclaimer.
  255. // 2. Redistributions in binary form must reproduce the above copyright
  256. // notice, this list of conditions and the following disclaimer in the
  257. // documentation and/or other materials provided with the distribution.
  258. // 3. Neither the name of the University nor the names of its contributors
  259. // may be used to endorse or promote products derived from this software
  260. // without specific prior written permission.
  261. //
  262. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  263. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  264. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  265. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  266. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  267. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  268. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  269. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  270. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  271. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  272. // SUCH DAMAGE.
  273. //
  274. // @(#)types.h 8.4 (Berkeley) 1/21/94
  275. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  276. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  277. // Copyright (c) 1991, 1993
  278. // The Regents of the University of California. All rights reserved.
  279. //
  280. // This code is derived from software contributed to Berkeley by
  281. // Berkeley Software Design, Inc.
  282. //
  283. // Redistribution and use in source and binary forms, with or without
  284. // modification, are permitted provided that the following conditions
  285. // are met:
  286. // 1. Redistributions of source code must retain the above copyright
  287. // notice, this list of conditions and the following disclaimer.
  288. // 2. Redistributions in binary form must reproduce the above copyright
  289. // notice, this list of conditions and the following disclaimer in the
  290. // documentation and/or other materials provided with the distribution.
  291. // 3. Neither the name of the University nor the names of its contributors
  292. // may be used to endorse or promote products derived from this software
  293. // without specific prior written permission.
  294. //
  295. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  296. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  297. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  298. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  299. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  300. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  301. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  302. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  303. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  304. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  305. // SUCH DAMAGE.
  306. //
  307. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  308. // $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
  309. // Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
  310. // Public domain.
  311. // Macro to test if we're using a specific version of gcc or later.
  312. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  313. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  314. // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  315. // in between its arguments. Do not use __CONCAT on double-quoted strings,
  316. // such as those from the __STRING macro: to concatenate strings just put
  317. // them next to each other.
  318. // GCC1 and some versions of GCC2 declare dead (non-returning) and
  319. // pure (no side effects) functions using "volatile" and "const";
  320. // unfortunately, these then cause warnings under "-ansi -pedantic".
  321. // GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
  322. // work for GNU C++ (modulo a slight glitch in the C++ grammar in
  323. // the distribution version of 2.5.5).
  324. // __returns_twice makes the compiler not assume the function
  325. // only returns once. This affects registerisation of variables:
  326. // even local variables need to be in memory across such a call.
  327. // Example: setjmp()
  328. // __only_inline makes the compiler only use this function definition
  329. // for inlining; references that can't be inlined will be left as
  330. // external references instead of generating a local copy. The
  331. // matching library should include a simple extern definition for
  332. // the function to handle those references. c.f. ctype.h
  333. // GNU C version 2.96 adds explicit branch prediction so that
  334. // the CPU back-end can hint the processor and also so that
  335. // code blocks can be reordered such that the predicted path
  336. // sees a more linear flow, thus improving cache behavior, etc.
  337. //
  338. // The following two macros provide us with a way to utilize this
  339. // compiler feature. Use __predict_true() if you expect the expression
  340. // to evaluate to true, and __predict_false() if you expect the
  341. // expression to evaluate to false.
  342. //
  343. // A few notes about usage:
  344. //
  345. // * Generally, __predict_false() error condition checks (unless
  346. // you have some _strong_ reason to do otherwise, in which case
  347. // document it), and/or __predict_true() `no-error' condition
  348. // checks, assuming you want to optimize for the no-error case.
  349. //
  350. // * Other than that, if you don't know the likelihood of a test
  351. // succeeding from empirical or other `hard' evidence, don't
  352. // make predictions.
  353. //
  354. // * These are meant to be used in places that are run `a lot'.
  355. // It is wasteful to make predictions in code that is run
  356. // seldomly (e.g. at subsystem initialization time) as the
  357. // basic block reordering that this affects can often generate
  358. // larger code.
  359. // Delete pseudo-keywords wherever they are not available or needed.
  360. // The __packed macro indicates that a variable or structure members
  361. // should have the smallest possible alignment, despite any host CPU
  362. // alignment requirements.
  363. //
  364. // The __aligned(x) macro specifies the minimum alignment of a
  365. // variable or structure.
  366. //
  367. // These macros together are useful for describing the layout and
  368. // alignment of messages exchanged with hardware or other systems.
  369. // "The nice thing about standards is that there are so many to choose from."
  370. // There are a number of "feature test macros" specified by (different)
  371. // standards that determine which interfaces and types the header files
  372. // should expose.
  373. //
  374. // Because of inconsistencies in these macros, we define our own
  375. // set in the private name space that end in _VISIBLE. These are
  376. // always defined and so headers can test their values easily.
  377. // Things can get tricky when multiple feature macros are defined.
  378. // We try to take the union of all the features requested.
  379. //
  380. // The following macros are guaranteed to have a value after cdefs.h
  381. // has been included:
  382. // __POSIX_VISIBLE
  383. // __XPG_VISIBLE
  384. // __ISO_C_VISIBLE
  385. // __BSD_VISIBLE
  386. // X/Open Portability Guides and Single Unix Specifications.
  387. // _XOPEN_SOURCE XPG3
  388. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  389. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  390. // _XOPEN_SOURCE == 500 XPG5
  391. // _XOPEN_SOURCE == 520 XPG5v2
  392. // _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
  393. // _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
  394. //
  395. // The XPG spec implies a specific value for _POSIX_C_SOURCE.
  396. // POSIX macros, these checks must follow the XOPEN ones above.
  397. //
  398. // _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
  399. // _POSIX_C_SOURCE == 1 1003.1-1990
  400. // _POSIX_C_SOURCE == 2 1003.2-1992
  401. // _POSIX_C_SOURCE == 199309L 1003.1b-1993
  402. // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
  403. // and the omnibus ISO/IEC 9945-1:1996
  404. // _POSIX_C_SOURCE == 200112L 1003.1-2001
  405. // _POSIX_C_SOURCE == 200809L 1003.1-2008
  406. //
  407. // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
  408. // this may be overridden by the _ISOC99_SOURCE macro later.
  409. // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
  410. // If the user defines it in addition to one of the POSIX or XOPEN
  411. // macros, assume the POSIX/XOPEN macro(s) should take precedence.
  412. // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
  413. // override any of the other macros since they are non-exclusive.
  414. // Finally deal with BSD-specific interfaces that are not covered
  415. // by any standards. We expose these when none of the POSIX or XPG
  416. // macros is defined or if the user explicitly asks for them.
  417. // Default values.
  418. // $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
  419. // -
  420. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  421. //
  422. // Redistribution and use in source and binary forms, with or without
  423. // modification, are permitted provided that the following conditions
  424. // are met:
  425. // 1. Redistributions of source code must retain the above copyright
  426. // notice, this list of conditions and the following disclaimer.
  427. // 2. Redistributions in binary form must reproduce the above copyright
  428. // notice, this list of conditions and the following disclaimer in the
  429. // documentation and/or other materials provided with the distribution.
  430. //
  431. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  432. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  433. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  434. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  435. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  436. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  437. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  438. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  439. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  440. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  441. // Public definitions for little- and big-endian systems.
  442. // This file should be included as <endian.h> in userspace and as
  443. // <sys/endian.h> in the kernel.
  444. //
  445. // System headers that need endian information but that can't or don't
  446. // want to export the public names here should include <sys/_endian.h>
  447. // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
  448. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  449. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  450. // Copyright (c) 1991, 1993
  451. // The Regents of the University of California. All rights reserved.
  452. //
  453. // This code is derived from software contributed to Berkeley by
  454. // Berkeley Software Design, Inc.
  455. //
  456. // Redistribution and use in source and binary forms, with or without
  457. // modification, are permitted provided that the following conditions
  458. // are met:
  459. // 1. Redistributions of source code must retain the above copyright
  460. // notice, this list of conditions and the following disclaimer.
  461. // 2. Redistributions in binary form must reproduce the above copyright
  462. // notice, this list of conditions and the following disclaimer in the
  463. // documentation and/or other materials provided with the distribution.
  464. // 3. Neither the name of the University nor the names of its contributors
  465. // may be used to endorse or promote products derived from this software
  466. // without specific prior written permission.
  467. //
  468. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  469. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  470. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  471. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  472. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  473. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  474. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  475. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  476. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  477. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  478. // SUCH DAMAGE.
  479. //
  480. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  481. // $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
  482. // -
  483. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  484. //
  485. // Redistribution and use in source and binary forms, with or without
  486. // modification, are permitted provided that the following conditions
  487. // are met:
  488. // 1. Redistributions of source code must retain the above copyright
  489. // notice, this list of conditions and the following disclaimer.
  490. // 2. Redistributions in binary form must reproduce the above copyright
  491. // notice, this list of conditions and the following disclaimer in the
  492. // documentation and/or other materials provided with the distribution.
  493. //
  494. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  495. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  496. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  497. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  498. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  499. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  500. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  501. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  502. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  503. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  504. // Internal endianness macros. This pulls in <machine/endian.h> to
  505. // get the correct setting direction for the platform and sets internal
  506. // ('__' prefix) macros appropriately.
  507. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  508. // -
  509. // Copyright (c) 1990, 1993
  510. // The Regents of the University of California. All rights reserved.
  511. //
  512. // Redistribution and use in source and binary forms, with or without
  513. // modification, are permitted provided that the following conditions
  514. // are met:
  515. // 1. Redistributions of source code must retain the above copyright
  516. // notice, this list of conditions and the following disclaimer.
  517. // 2. Redistributions in binary form must reproduce the above copyright
  518. // notice, this list of conditions and the following disclaimer in the
  519. // documentation and/or other materials provided with the distribution.
  520. // 3. Neither the name of the University nor the names of its contributors
  521. // may be used to endorse or promote products derived from this software
  522. // without specific prior written permission.
  523. //
  524. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  525. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  526. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  527. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  528. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  529. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  530. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  531. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  532. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  533. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  534. // SUCH DAMAGE.
  535. //
  536. // @(#)types.h 8.3 (Berkeley) 1/5/94
  537. // $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $
  538. // -
  539. // Copyright (c) 1990, 1993
  540. // The Regents of the University of California. All rights reserved.
  541. //
  542. // Redistribution and use in source and binary forms, with or without
  543. // modification, are permitted provided that the following conditions
  544. // are met:
  545. // 1. Redistributions of source code must retain the above copyright
  546. // notice, this list of conditions and the following disclaimer.
  547. // 2. Redistributions in binary form must reproduce the above copyright
  548. // notice, this list of conditions and the following disclaimer in the
  549. // documentation and/or other materials provided with the distribution.
  550. // 3. Neither the name of the University nor the names of its contributors
  551. // may be used to endorse or promote products derived from this software
  552. // without specific prior written permission.
  553. //
  554. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  555. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  556. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  557. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  558. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  559. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  560. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  561. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  562. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  563. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  564. // SUCH DAMAGE.
  565. //
  566. // @(#)types.h 8.3 (Berkeley) 1/5/94
  567. // @(#)ansi.h 8.2 (Berkeley) 1/4/94
  568. // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
  569. // value for all data types (int, long, ...). The result is an
  570. // unsigned long and must be cast to any desired pointer type.
  571. //
  572. // _ALIGNED_POINTER is a boolean macro that checks whether an address
  573. // is valid to fetch data elements of type t from on this architecture.
  574. // This does not reflect the optimal alignment, just the possibility
  575. // (within reasonable limits).
  576. // 7.18.1.1 Exact-width integer types
  577. type X__int8_t = int8 /* _types.h:61:22 */
  578. type X__uint8_t = uint8 /* _types.h:62:24 */
  579. type X__int16_t = int16 /* _types.h:63:17 */
  580. type X__uint16_t = uint16 /* _types.h:64:25 */
  581. type X__int32_t = int32 /* _types.h:65:15 */
  582. type X__uint32_t = uint32 /* _types.h:66:23 */
  583. type X__int64_t = int64 /* _types.h:67:20 */
  584. type X__uint64_t = uint64 /* _types.h:68:28 */
  585. // 7.18.1.2 Minimum-width integer types
  586. type X__int_least8_t = X__int8_t /* _types.h:71:19 */
  587. type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
  588. type X__int_least16_t = X__int16_t /* _types.h:73:20 */
  589. type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
  590. type X__int_least32_t = X__int32_t /* _types.h:75:20 */
  591. type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
  592. type X__int_least64_t = X__int64_t /* _types.h:77:20 */
  593. type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
  594. // 7.18.1.3 Fastest minimum-width integer types
  595. type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
  596. type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
  597. type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
  598. type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
  599. type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
  600. type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
  601. type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
  602. type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
  603. // 7.18.1.4 Integer types capable of holding object pointers
  604. type X__intptr_t = int64 /* _types.h:103:16 */
  605. type X__uintptr_t = uint64 /* _types.h:104:24 */
  606. // 7.18.1.5 Greatest-width integer types
  607. type X__intmax_t = X__int64_t /* _types.h:107:20 */
  608. type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
  609. // Register size
  610. type X__register_t = int64 /* _types.h:111:16 */
  611. // VM system types
  612. type X__vaddr_t = uint64 /* _types.h:114:24 */
  613. type X__paddr_t = uint64 /* _types.h:115:24 */
  614. type X__vsize_t = uint64 /* _types.h:116:24 */
  615. type X__psize_t = uint64 /* _types.h:117:24 */
  616. // Standard system types
  617. type X__double_t = float64 /* _types.h:120:18 */
  618. type X__float_t = float32 /* _types.h:121:17 */
  619. type X__ptrdiff_t = int64 /* _types.h:122:16 */
  620. type X__size_t = uint64 /* _types.h:123:24 */
  621. type X__ssize_t = int64 /* _types.h:124:16 */
  622. type X__va_list = X__builtin_va_list /* _types.h:126:27 */
  623. // Wide character support types
  624. type X__wchar_t = int32 /* _types.h:133:15 */
  625. type X__wint_t = int32 /* _types.h:135:15 */
  626. type X__rune_t = int32 /* _types.h:136:15 */
  627. type X__wctrans_t = uintptr /* _types.h:137:14 */
  628. type X__wctype_t = uintptr /* _types.h:138:14 */
  629. type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
  630. type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
  631. type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
  632. type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
  633. type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id
  634. type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
  635. type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
  636. type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
  637. type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
  638. type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
  639. type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
  640. type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
  641. type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
  642. type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
  643. type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
  644. type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
  645. type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
  646. type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
  647. type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
  648. type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
  649. type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
  650. type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
  651. type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
  652. type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
  653. type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
  654. type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
  655. type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
  656. type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
  657. // mbstate_t is an opaque object to keep conversion state, during multibyte
  658. // stream conversions. The content must not be referenced by user programs.
  659. type X__mbstate_t = struct {
  660. F__ccgo_pad1 [0]uint64
  661. F__mbstate8 [128]int8
  662. } /* _types.h:75:3 */
  663. // Tell sys/endian.h we have MD variants of the swap macros.
  664. // Note that these macros evaluate their arguments several times.
  665. // Public names
  666. // These are specified to be function-like macros to match the spec
  667. // POSIX names
  668. // original BSD names
  669. // these were exposed here before
  670. // ancient stuff
  671. type U_char = uint8 /* types.h:51:23 */
  672. type U_short = uint16 /* types.h:52:24 */
  673. type U_int = uint32 /* types.h:53:22 */
  674. type U_long = uint64 /* types.h:54:23 */
  675. type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
  676. type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
  677. type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
  678. type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility
  679. type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
  680. type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
  681. // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
  682. // but the rest of the includes are not ready for that yet.
  683. type Int8_t = X__int8_t /* types.h:75:19 */
  684. type Uint8_t = X__uint8_t /* types.h:80:20 */
  685. type Int16_t = X__int16_t /* types.h:85:20 */
  686. type Uint16_t = X__uint16_t /* types.h:90:21 */
  687. type Int32_t = X__int32_t /* types.h:95:20 */
  688. type Uint32_t = X__uint32_t /* types.h:100:21 */
  689. type Int64_t = X__int64_t /* types.h:105:20 */
  690. type Uint64_t = X__uint64_t /* types.h:110:21 */
  691. // BSD-style unsigned bits types
  692. type U_int8_t = X__uint8_t /* types.h:114:19 */
  693. type U_int16_t = X__uint16_t /* types.h:115:20 */
  694. type U_int32_t = X__uint32_t /* types.h:116:20 */
  695. type U_int64_t = X__uint64_t /* types.h:117:20 */
  696. // quads, deprecated in favor of 64 bit int types
  697. type Quad_t = X__int64_t /* types.h:120:19 */
  698. type U_quad_t = X__uint64_t /* types.h:121:20 */
  699. // VM system types
  700. type Vaddr_t = X__vaddr_t /* types.h:125:19 */
  701. type Paddr_t = X__paddr_t /* types.h:126:19 */
  702. type Vsize_t = X__vsize_t /* types.h:127:19 */
  703. type Psize_t = X__psize_t /* types.h:128:19 */
  704. // Standard system types
  705. type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
  706. type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
  707. type Caddr_t = uintptr /* types.h:134:14 */ // core address
  708. type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
  709. type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
  710. type Dev_t = X__dev_t /* types.h:137:18 */ // device number
  711. type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
  712. type Gid_t = X__gid_t /* types.h:139:18 */ // group id
  713. type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
  714. type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
  715. type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
  716. type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
  717. type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
  718. type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
  719. type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
  720. type Uid_t = X__uid_t /* types.h:147:18 */ // user id
  721. type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
  722. type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
  723. type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
  724. type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
  725. // The following types may be defined in multiple header files.
  726. type Clock_t = X__clock_t /* types.h:158:19 */
  727. type Clockid_t = X__clockid_t /* types.h:163:21 */
  728. type Pid_t = X__pid_t /* types.h:168:18 */
  729. type Ssize_t = X__ssize_t /* types.h:178:19 */
  730. type Time_t = X__time_t /* types.h:183:18 */
  731. type Timer_t = X__timer_t /* types.h:188:19 */
  732. type Off_t = X__off_t /* types.h:193:18 */
  733. // Major, minor numbers, dev_t's.
  734. type Timeval = struct {
  735. Ftv_sec Time_t
  736. Ftv_usec Suseconds_t
  737. } /* select.h:41:1 */
  738. type Timespec = struct {
  739. Ftv_sec Time_t
  740. Ftv_nsec int64
  741. } /* select.h:49:1 */
  742. // Select uses bit masks of file descriptors in longs. These macros
  743. // manipulate such bit fields (the filesystem macros use chars).
  744. // FD_SETSIZE may be defined by the user, but the default here should
  745. // be enough for most uses.
  746. // We don't want to pollute the namespace with select(2) internals.
  747. // Non-underscore versions are exposed later #if __BSD_VISIBLE
  748. type X__fd_mask = Uint32_t /* select.h:70:18 */
  749. type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */
  750. type Fd_set = Fd_set1 /* select.h:76:3 */
  751. type Sigset_t = uint32 /* select.h:122:22 */
  752. type Timezone = struct {
  753. Ftz_minuteswest int32
  754. Ftz_dsttime int32
  755. } /* time.h:72:1 */
  756. // Operations on timevals.
  757. // Operations on timespecs.
  758. // Names of the interval timers, and structure
  759. // defining a timer setting.
  760. type Itimerval = struct {
  761. Fit_interval struct {
  762. Ftv_sec Time_t
  763. Ftv_usec Suseconds_t
  764. }
  765. Fit_value struct {
  766. Ftv_sec Time_t
  767. Ftv_usec Suseconds_t
  768. }
  769. } /* time.h:148:1 */
  770. // clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE})
  771. type Clockinfo = struct {
  772. Fhz int32
  773. Ftick int32
  774. Fstathz int32
  775. Fprofhz int32
  776. } /* time.h:157:1 */
  777. // $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $
  778. // $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $
  779. // Copyright (c) 1989 The Regents of the University of California.
  780. // All rights reserved.
  781. //
  782. // (c) UNIX System Laboratories, Inc.
  783. // All or some portions of this file are derived from material licensed
  784. // to the University of California by American Telephone and Telegraph
  785. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  786. // the permission of UNIX System Laboratories, Inc.
  787. //
  788. // Redistribution and use in source and binary forms, with or without
  789. // modification, are permitted provided that the following conditions
  790. // are met:
  791. // 1. Redistributions of source code must retain the above copyright
  792. // notice, this list of conditions and the following disclaimer.
  793. // 2. Redistributions in binary form must reproduce the above copyright
  794. // notice, this list of conditions and the following disclaimer in the
  795. // documentation and/or other materials provided with the distribution.
  796. // 3. Neither the name of the University nor the names of its contributors
  797. // may be used to endorse or promote products derived from this software
  798. // without specific prior written permission.
  799. //
  800. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  801. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  802. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  803. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  804. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  805. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  806. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  807. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  808. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  809. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  810. // SUCH DAMAGE.
  811. //
  812. // @(#)time.h 5.12 (Berkeley) 3/9/91
  813. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  814. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  815. // Copyright (c) 1991, 1993
  816. // The Regents of the University of California. All rights reserved.
  817. //
  818. // This code is derived from software contributed to Berkeley by
  819. // Berkeley Software Design, Inc.
  820. //
  821. // Redistribution and use in source and binary forms, with or without
  822. // modification, are permitted provided that the following conditions
  823. // are met:
  824. // 1. Redistributions of source code must retain the above copyright
  825. // notice, this list of conditions and the following disclaimer.
  826. // 2. Redistributions in binary form must reproduce the above copyright
  827. // notice, this list of conditions and the following disclaimer in the
  828. // documentation and/or other materials provided with the distribution.
  829. // 3. Neither the name of the University nor the names of its contributors
  830. // may be used to endorse or promote products derived from this software
  831. // without specific prior written permission.
  832. //
  833. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  834. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  835. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  836. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  837. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  838. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  839. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  840. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  841. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  842. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  843. // SUCH DAMAGE.
  844. //
  845. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  846. // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $
  847. // Written by Todd C. Miller, September 9, 2016
  848. // Public domain.
  849. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  850. // -
  851. // Copyright (c) 1990, 1993
  852. // The Regents of the University of California. All rights reserved.
  853. //
  854. // Redistribution and use in source and binary forms, with or without
  855. // modification, are permitted provided that the following conditions
  856. // are met:
  857. // 1. Redistributions of source code must retain the above copyright
  858. // notice, this list of conditions and the following disclaimer.
  859. // 2. Redistributions in binary form must reproduce the above copyright
  860. // notice, this list of conditions and the following disclaimer in the
  861. // documentation and/or other materials provided with the distribution.
  862. // 3. Neither the name of the University nor the names of its contributors
  863. // may be used to endorse or promote products derived from this software
  864. // without specific prior written permission.
  865. //
  866. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  867. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  868. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  869. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  870. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  871. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  872. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  873. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  874. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  875. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  876. // SUCH DAMAGE.
  877. //
  878. // @(#)types.h 8.3 (Berkeley) 1/5/94
  879. // Frequency of the clock ticks reported by times(). Deprecated - use
  880. // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.)
  881. // $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $
  882. // Copyright (c) 1982, 1986, 1993
  883. // The Regents of the University of California. All rights reserved.
  884. //
  885. // Redistribution and use in source and binary forms, with or without
  886. // modification, are permitted provided that the following conditions
  887. // are met:
  888. // 1. Redistributions of source code must retain the above copyright
  889. // notice, this list of conditions and the following disclaimer.
  890. // 2. Redistributions in binary form must reproduce the above copyright
  891. // notice, this list of conditions and the following disclaimer in the
  892. // documentation and/or other materials provided with the distribution.
  893. // 3. Neither the name of the University nor the names of its contributors
  894. // may be used to endorse or promote products derived from this software
  895. // without specific prior written permission.
  896. //
  897. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  898. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  899. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  900. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  901. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  902. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  903. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  904. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  905. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  906. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  907. // SUCH DAMAGE.
  908. // Per-process and per-thread clocks encode the PID or TID into the
  909. // high bits, with the type in the bottom bits
  910. // Structure defined by POSIX 1003.1b to be like a itimerval,
  911. // but with timespecs. Used in the timer_*() system calls.
  912. type Itimerspec = struct {
  913. Fit_interval struct {
  914. Ftv_sec Time_t
  915. Ftv_nsec int64
  916. }
  917. Fit_value struct {
  918. Ftv_sec Time_t
  919. Ftv_nsec int64
  920. }
  921. } /* _time.h:56:1 */
  922. type Locale_t = uintptr /* time.h:107:14 */
  923. type Tm = struct {
  924. Ftm_sec int32
  925. Ftm_min int32
  926. Ftm_hour int32
  927. Ftm_mday int32
  928. Ftm_mon int32
  929. Ftm_year int32
  930. Ftm_wday int32
  931. Ftm_yday int32
  932. Ftm_isdst int32
  933. F__ccgo_pad1 [4]byte
  934. Ftm_gmtoff int64
  935. Ftm_zone uintptr
  936. } /* time.h:111:1 */
  937. type Stat = struct {
  938. Fst_mode Mode_t
  939. Fst_dev Dev_t
  940. Fst_ino Ino_t
  941. Fst_nlink Nlink_t
  942. Fst_uid Uid_t
  943. Fst_gid Gid_t
  944. Fst_rdev Dev_t
  945. Fst_atim struct {
  946. Ftv_sec Time_t
  947. Ftv_nsec int64
  948. }
  949. Fst_mtim struct {
  950. Ftv_sec Time_t
  951. Ftv_nsec int64
  952. }
  953. Fst_ctim struct {
  954. Ftv_sec Time_t
  955. Ftv_nsec int64
  956. }
  957. Fst_size Off_t
  958. Fst_blocks Blkcnt_t
  959. Fst_blksize Blksize_t
  960. Fst_flags U_int32_t
  961. Fst_gen U_int32_t
  962. F__ccgo_pad1 [4]byte
  963. F__st_birthtim struct {
  964. Ftv_sec Time_t
  965. Ftv_nsec int64
  966. }
  967. } /* stat.h:45:1 */
  968. var _ int8 /* gen.c:2:13: */