stat_openbsd_arm64.go 49 KB

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