stat_openbsd_386.go 49 KB

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