signal_openbsd_arm64.go 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361
  1. // Code generated by 'ccgo signal/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 signal/signal_openbsd_arm64.go -pkgname signal', DO NOT EDIT.
  2. package signal
  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. BIG_ENDIAN = 4321 // endian.h:45:1:
  15. BUS_ADRALN = 1 // siginfo.h:83:1:
  16. BUS_ADRERR = 2 // siginfo.h:84:1:
  17. BUS_OBJERR = 3 // siginfo.h:85:1:
  18. BYTE_ORDER = 1234 // endian.h:47:1:
  19. CLD_CONTINUED = 6 // siginfo.h:105:1:
  20. CLD_DUMPED = 3 // siginfo.h:102:1:
  21. CLD_EXITED = 1 // siginfo.h:100:1:
  22. CLD_KILLED = 2 // siginfo.h:101:1:
  23. CLD_STOPPED = 5 // siginfo.h:104:1:
  24. CLD_TRAPPED = 4 // siginfo.h:103:1:
  25. CLK_TCK = 100 // time.h:68:1:
  26. CLOCKS_PER_SEC = 100 // time.h:71:1:
  27. CLOCK_BOOTTIME = 6 // _time.h:40:1:
  28. CLOCK_MONOTONIC = 3 // _time.h:37:1:
  29. CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1:
  30. CLOCK_REALTIME = 0 // _time.h:35:1:
  31. CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1:
  32. CLOCK_UPTIME = 5 // _time.h:39:1:
  33. DST_AUST = 2 // time.h:78:1:
  34. DST_CAN = 6 // time.h:82:1:
  35. DST_EET = 5 // time.h:81:1:
  36. DST_MET = 4 // time.h:80:1:
  37. DST_NONE = 0 // time.h:76:1:
  38. DST_USA = 1 // time.h:77:1:
  39. DST_WET = 3 // time.h:79:1:
  40. EMT_TAGOVF = 1 // siginfo.h:66:1:
  41. FD_SETSIZE = 1024 // select.h:62:1:
  42. FPE_FLTDIV = 3 // siginfo.h:71:1:
  43. FPE_FLTINV = 7 // siginfo.h:75:1:
  44. FPE_FLTOVF = 4 // siginfo.h:72:1:
  45. FPE_FLTRES = 6 // siginfo.h:74:1:
  46. FPE_FLTSUB = 8 // siginfo.h:76:1:
  47. FPE_FLTUND = 5 // siginfo.h:73:1:
  48. FPE_INTDIV = 1 // siginfo.h:69:1:
  49. FPE_INTOVF = 2 // siginfo.h:70:1:
  50. ILL_BADSTK = 8 // siginfo.h:63:1:
  51. ILL_COPROC = 7 // siginfo.h:62:1:
  52. ILL_ILLADR = 3 // siginfo.h:58:1:
  53. ILL_ILLOPC = 1 // siginfo.h:56:1:
  54. ILL_ILLOPN = 2 // siginfo.h:57:1:
  55. ILL_ILLTRP = 4 // siginfo.h:59:1:
  56. ILL_PRVOPC = 5 // siginfo.h:60:1:
  57. ILL_PRVREG = 6 // siginfo.h:61:1:
  58. ITIMER_PROF = 2 // time.h:146:1:
  59. ITIMER_REAL = 0 // time.h:144:1:
  60. ITIMER_VIRTUAL = 1 // time.h:145:1:
  61. LITTLE_ENDIAN = 1234 // endian.h:44:1:
  62. MINSIGSTKSZ = 12288 // signal.h:183:1:
  63. NBBY = 8 // select.h:111:1:
  64. NSIG = 33 // signal.h:48:1:
  65. NSIGBUS = 3 // siginfo.h:86:1:
  66. NSIGCLD = 6 // siginfo.h:106:1:
  67. NSIGEMT = 1 // siginfo.h:67:1:
  68. NSIGFPE = 8 // siginfo.h:77:1:
  69. NSIGILL = 8 // siginfo.h:64:1:
  70. NSIGSEGV = 2 // siginfo.h:81:1:
  71. NSIGTRAP = 2 // siginfo.h:95:1:
  72. PDP_ENDIAN = 3412 // endian.h:46:1:
  73. SA_NOCLDSTOP = 0x0008 // signal.h:132:1:
  74. SA_NOCLDWAIT = 0x0020 // signal.h:130:1:
  75. SA_NODEFER = 0x0010 // signal.h:129:1:
  76. SA_ONSTACK = 0x0001 // signal.h:126:1:
  77. SA_RESETHAND = 0x0004 // signal.h:128:1:
  78. SA_RESTART = 0x0002 // signal.h:127:1:
  79. SA_SIGINFO = 0x0040 // signal.h:134:1:
  80. SEGV_ACCERR = 2 // siginfo.h:80:1:
  81. SEGV_MAPERR = 1 // siginfo.h:79:1:
  82. SIGABRT = 6 // signal.h:56:1:
  83. SIGALRM = 14 // signal.h:67:1:
  84. SIGBUS = 10 // signal.h:63:1:
  85. SIGCHLD = 20 // signal.h:73:1:
  86. SIGCONT = 19 // signal.h:72:1:
  87. SIGEMT = 7 // signal.h:59:1:
  88. SIGFPE = 8 // signal.h:61:1:
  89. SIGHUP = 1 // signal.h:51:1:
  90. SIGILL = 4 // signal.h:54:1:
  91. SIGINFO = 29 // signal.h:85:1:
  92. SIGINT = 2 // signal.h:52:1:
  93. SIGIO = 23 // signal.h:77:1:
  94. SIGIOT = 6 // signal.h:58:1:
  95. SIGKILL = 9 // signal.h:62:1:
  96. SIGPIPE = 13 // signal.h:66:1:
  97. SIGPROF = 27 // signal.h:82:1:
  98. SIGQUIT = 3 // signal.h:53:1:
  99. SIGSEGV = 11 // signal.h:64:1:
  100. SIGSTKSZ = 28672 // signal.h:185:1:
  101. SIGSTOP = 17 // signal.h:70:1:
  102. SIGSYS = 12 // signal.h:65:1:
  103. SIGTERM = 15 // signal.h:68:1:
  104. SIGTHR = 32 // signal.h:90:1:
  105. SIGTRAP = 5 // signal.h:55:1:
  106. SIGTSTP = 18 // signal.h:71:1:
  107. SIGTTIN = 21 // signal.h:74:1:
  108. SIGTTOU = 22 // signal.h:75:1:
  109. SIGURG = 16 // signal.h:69:1:
  110. SIGUSR1 = 30 // signal.h:87:1:
  111. SIGUSR2 = 31 // signal.h:88:1:
  112. SIGVTALRM = 26 // signal.h:81:1:
  113. SIGWINCH = 28 // signal.h:84:1:
  114. SIGXCPU = 24 // signal.h:79:1:
  115. SIGXFSZ = 25 // signal.h:80:1:
  116. SIG_BLOCK = 1 // signal.h:140:1:
  117. SIG_SETMASK = 3 // signal.h:142:1:
  118. SIG_UNBLOCK = 2 // signal.h:141:1:
  119. SI_LWP = -1 // siginfo.h:47:1:
  120. SI_MAXSZ = 128 // siginfo.h:127:1:
  121. SI_NOINFO = 32767 // siginfo.h:45:1:
  122. SI_QUEUE = -2 // siginfo.h:48:1:
  123. SI_TIMER = -3 // siginfo.h:49:1:
  124. SI_USER = 0 // siginfo.h:46:1:
  125. SS_DISABLE = 0x0004 // signal.h:182:1:
  126. SS_ONSTACK = 0x0001 // signal.h:181:1:
  127. SV_INTERRUPT = 2 // signal.h:158:1:
  128. SV_ONSTACK = 1 // signal.h:157:1:
  129. SV_RESETHAND = 4 // signal.h:159:1:
  130. TIMER_ABSTIME = 0x1 // _time.h:62:1:
  131. TIMER_RELTIME = 0x0 // _time.h:61:1:
  132. TIME_UTC = 1 // time.h:179:1:
  133. TRAP_BRKPT = 1 // siginfo.h:93:1:
  134. TRAP_TRACE = 2 // siginfo.h:94:1:
  135. X_BIG_ENDIAN = 4321 // _endian.h:43:1:
  136. X_BYTE_ORDER = 1234 // endian.h:60:1:
  137. X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
  138. X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
  139. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  140. X_INT16_T_DEFINED_ = 0 // types.h:84:1:
  141. X_INT32_T_DEFINED_ = 0 // types.h:94:1:
  142. X_INT64_T_DEFINED_ = 0 // types.h:104:1:
  143. X_INT8_T_DEFINED_ = 0 // types.h:74:1:
  144. X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
  145. X_LOCALE_T_DEFINED_ = 0 // time.h:106:1:
  146. X_LP64 = 1 // <predefined>:1:1:
  147. X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
  148. X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
  149. X_MACHINE_SIGNAL_H_ = 0 // signal.h:37:1:
  150. X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
  151. X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
  152. X_NSIG = 33 // signal.h:45:1:
  153. X_OFF_T_DEFINED_ = 0 // types.h:192:1:
  154. X_PDP_ENDIAN = 3412 // _endian.h:44:1:
  155. X_PID_T_DEFINED_ = 0 // types.h:167:1:
  156. X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
  157. X_QUAD_LOWWORD = 0 // _endian.h:96:1:
  158. X_RET_PROTECTOR = 1 // <predefined>:2:1:
  159. X_SELECT_DEFINED_ = 0 // select.h:126:1:
  160. X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1:
  161. X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
  162. X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
  163. X_STACKALIGNBYTES = 15 // _types.h:54:1:
  164. X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
  165. X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
  166. X_SYS_SELECT_H_ = 0 // select.h:35:1:
  167. X_SYS_SIGINFO_H = 0 // siginfo.h:29:1:
  168. X_SYS_SIGNAL_H_ = 0 // signal.h:41:1:
  169. X_SYS_TIME_H_ = 0 // time.h:36:1:
  170. X_SYS_TYPES_H_ = 0 // types.h:41:1:
  171. X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
  172. X_SYS__TIME_H_ = 0 // _time.h:33:1:
  173. X_SYS__TYPES_H_ = 0 // _types.h:35:1:
  174. X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
  175. X_TIMESPEC_DECLARED = 0 // select.h:48:1:
  176. X_TIMEVAL_DECLARED = 0 // select.h:40:1:
  177. X_TIME_H_ = 0 // time.h:42:1:
  178. X_TIME_T_DEFINED_ = 0 // types.h:182:1:
  179. X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
  180. X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
  181. X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
  182. X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
  183. X_USER_SIGNAL_H = 0 // signal.h:36:1:
  184. Unix = 1 // <predefined>:360:1:
  185. )
  186. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  187. type Size_t = uint64 /* <builtin>:9:23 */
  188. type Wchar_t = int32 /* <builtin>:15:24 */
  189. type X__int128_t = struct {
  190. Flo int64
  191. Fhi int64
  192. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  193. type X__uint128_t = struct {
  194. Flo uint64
  195. Fhi uint64
  196. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  197. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  198. type X__float128 = float64 /* <builtin>:47:21 */
  199. // $OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $
  200. // $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $
  201. // -
  202. // Copyright (c) 1991, 1993
  203. // The Regents of the University of California. All rights reserved.
  204. //
  205. // Redistribution and use in source and binary forms, with or without
  206. // modification, are permitted provided that the following conditions
  207. // are met:
  208. // 1. Redistributions of source code must retain the above copyright
  209. // notice, this list of conditions and the following disclaimer.
  210. // 2. Redistributions in binary form must reproduce the above copyright
  211. // notice, this list of conditions and the following disclaimer in the
  212. // documentation and/or other materials provided with the distribution.
  213. // 3. Neither the name of the University nor the names of its contributors
  214. // may be used to endorse or promote products derived from this software
  215. // without specific prior written permission.
  216. //
  217. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  218. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  219. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  220. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  221. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  222. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  223. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  224. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  225. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  226. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  227. // SUCH DAMAGE.
  228. //
  229. // @(#)signal.h 8.3 (Berkeley) 3/30/94
  230. // $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $
  231. // $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $
  232. // Copyright (c) 1982, 1986, 1989, 1991, 1993
  233. // The Regents of the University of California. All rights reserved.
  234. // (c) UNIX System Laboratories, Inc.
  235. // All or some portions of this file are derived from material licensed
  236. // to the University of California by American Telephone and Telegraph
  237. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  238. // the permission of UNIX System Laboratories, Inc.
  239. //
  240. // Redistribution and use in source and binary forms, with or without
  241. // modification, are permitted provided that the following conditions
  242. // are met:
  243. // 1. Redistributions of source code must retain the above copyright
  244. // notice, this list of conditions and the following disclaimer.
  245. // 2. Redistributions in binary form must reproduce the above copyright
  246. // notice, this list of conditions and the following disclaimer in the
  247. // documentation and/or other materials provided with the distribution.
  248. // 3. Neither the name of the University nor the names of its contributors
  249. // may be used to endorse or promote products derived from this software
  250. // without specific prior written permission.
  251. //
  252. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  253. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  254. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  255. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  256. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  257. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  258. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  259. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  260. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  261. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  262. // SUCH DAMAGE.
  263. //
  264. // @(#)signal.h 8.2 (Berkeley) 1/21/94
  265. // $OpenBSD: signal.h,v 1.2 2017/03/12 17:57:12 kettenis Exp $
  266. // Copyright (c) 1992, 1993
  267. // The Regents of the University of California. All rights reserved.
  268. //
  269. // This code is derived from software contributed to Berkeley by
  270. // Ralph Campbell.
  271. //
  272. // Redistribution and use in source and binary forms, with or without
  273. // modification, are permitted provided that the following conditions
  274. // are met:
  275. // 1. Redistributions of source code must retain the above copyright
  276. // notice, this list of conditions and the following disclaimer.
  277. // 2. Redistributions in binary form must reproduce the above copyright
  278. // notice, this list of conditions and the following disclaimer in the
  279. // documentation and/or other materials provided with the distribution.
  280. // 3. Neither the name of the University nor the names of its contributors
  281. // may be used to endorse or promote products derived from this software
  282. // without specific prior written permission.
  283. //
  284. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  285. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  286. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  287. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  288. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  289. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  290. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  291. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  292. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  293. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  294. // SUCH DAMAGE.
  295. //
  296. // @(#)signal.h 8.1 (Berkeley) 6/10/93
  297. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  298. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  299. // Copyright (c) 1991, 1993
  300. // The Regents of the University of California. All rights reserved.
  301. //
  302. // This code is derived from software contributed to Berkeley by
  303. // Berkeley Software Design, Inc.
  304. //
  305. // Redistribution and use in source and binary forms, with or without
  306. // modification, are permitted provided that the following conditions
  307. // are met:
  308. // 1. Redistributions of source code must retain the above copyright
  309. // notice, this list of conditions and the following disclaimer.
  310. // 2. Redistributions in binary form must reproduce the above copyright
  311. // notice, this list of conditions and the following disclaimer in the
  312. // documentation and/or other materials provided with the distribution.
  313. // 3. Neither the name of the University nor the names of its contributors
  314. // may be used to endorse or promote products derived from this software
  315. // without specific prior written permission.
  316. //
  317. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  318. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  319. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  320. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  321. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  322. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  323. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  324. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  325. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  326. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  327. // SUCH DAMAGE.
  328. //
  329. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  330. // $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
  331. // Macro to test if we're using a specific version of gcc or later.
  332. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  333. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  334. // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  335. // in between its arguments. Do not use __CONCAT on double-quoted strings,
  336. // such as those from the __STRING macro: to concatenate strings just put
  337. // them next to each other.
  338. // GCC1 and some versions of GCC2 declare dead (non-returning) and
  339. // pure (no side effects) functions using "volatile" and "const";
  340. // unfortunately, these then cause warnings under "-ansi -pedantic".
  341. // GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
  342. // work for GNU C++ (modulo a slight glitch in the C++ grammar in
  343. // the distribution version of 2.5.5).
  344. // __returns_twice makes the compiler not assume the function
  345. // only returns once. This affects registerisation of variables:
  346. // even local variables need to be in memory across such a call.
  347. // Example: setjmp()
  348. // __only_inline makes the compiler only use this function definition
  349. // for inlining; references that can't be inlined will be left as
  350. // external references instead of generating a local copy. The
  351. // matching library should include a simple extern definition for
  352. // the function to handle those references. c.f. ctype.h
  353. // GNU C version 2.96 adds explicit branch prediction so that
  354. // the CPU back-end can hint the processor and also so that
  355. // code blocks can be reordered such that the predicted path
  356. // sees a more linear flow, thus improving cache behavior, etc.
  357. //
  358. // The following two macros provide us with a way to utilize this
  359. // compiler feature. Use __predict_true() if you expect the expression
  360. // to evaluate to true, and __predict_false() if you expect the
  361. // expression to evaluate to false.
  362. //
  363. // A few notes about usage:
  364. //
  365. // * Generally, __predict_false() error condition checks (unless
  366. // you have some _strong_ reason to do otherwise, in which case
  367. // document it), and/or __predict_true() `no-error' condition
  368. // checks, assuming you want to optimize for the no-error case.
  369. //
  370. // * Other than that, if you don't know the likelihood of a test
  371. // succeeding from empirical or other `hard' evidence, don't
  372. // make predictions.
  373. //
  374. // * These are meant to be used in places that are run `a lot'.
  375. // It is wasteful to make predictions in code that is run
  376. // seldomly (e.g. at subsystem initialization time) as the
  377. // basic block reordering that this affects can often generate
  378. // larger code.
  379. // Delete pseudo-keywords wherever they are not available or needed.
  380. // The __packed macro indicates that a variable or structure members
  381. // should have the smallest possible alignment, despite any host CPU
  382. // alignment requirements.
  383. //
  384. // The __aligned(x) macro specifies the minimum alignment of a
  385. // variable or structure.
  386. //
  387. // These macros together are useful for describing the layout and
  388. // alignment of messages exchanged with hardware or other systems.
  389. // "The nice thing about standards is that there are so many to choose from."
  390. // There are a number of "feature test macros" specified by (different)
  391. // standards that determine which interfaces and types the header files
  392. // should expose.
  393. //
  394. // Because of inconsistencies in these macros, we define our own
  395. // set in the private name space that end in _VISIBLE. These are
  396. // always defined and so headers can test their values easily.
  397. // Things can get tricky when multiple feature macros are defined.
  398. // We try to take the union of all the features requested.
  399. //
  400. // The following macros are guaranteed to have a value after cdefs.h
  401. // has been included:
  402. // __POSIX_VISIBLE
  403. // __XPG_VISIBLE
  404. // __ISO_C_VISIBLE
  405. // __BSD_VISIBLE
  406. // X/Open Portability Guides and Single Unix Specifications.
  407. // _XOPEN_SOURCE XPG3
  408. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  409. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  410. // _XOPEN_SOURCE == 500 XPG5
  411. // _XOPEN_SOURCE == 520 XPG5v2
  412. // _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
  413. // _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
  414. //
  415. // The XPG spec implies a specific value for _POSIX_C_SOURCE.
  416. // POSIX macros, these checks must follow the XOPEN ones above.
  417. //
  418. // _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
  419. // _POSIX_C_SOURCE == 1 1003.1-1990
  420. // _POSIX_C_SOURCE == 2 1003.2-1992
  421. // _POSIX_C_SOURCE == 199309L 1003.1b-1993
  422. // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
  423. // and the omnibus ISO/IEC 9945-1:1996
  424. // _POSIX_C_SOURCE == 200112L 1003.1-2001
  425. // _POSIX_C_SOURCE == 200809L 1003.1-2008
  426. //
  427. // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
  428. // this may be overridden by the _ISOC99_SOURCE macro later.
  429. // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
  430. // If the user defines it in addition to one of the POSIX or XOPEN
  431. // macros, assume the POSIX/XOPEN macro(s) should take precedence.
  432. // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
  433. // override any of the other macros since they are non-exclusive.
  434. // Finally deal with BSD-specific interfaces that are not covered
  435. // by any standards. We expose these when none of the POSIX or XPG
  436. // macros is defined or if the user explicitly asks for them.
  437. // Default values.
  438. type Sig_atomic_t = int32 /* signal.h:41:13 */
  439. // Information pushed on stack when a signal is delivered.
  440. // This is used by the kernel to restore state following
  441. // execution of the signal handler. It is also made available
  442. // to the handler to allow it to restore state properly if
  443. // a non-standard exit is performed.
  444. type Sigcontext = struct {
  445. F__sc_unused int32
  446. Fsc_mask int32
  447. Fsc_sp uint64
  448. Fsc_lr uint64
  449. Fsc_elr uint64
  450. Fsc_spsr uint64
  451. Fsc_x [30]uint64
  452. Fsc_cookie int64
  453. } /* signal.h:51:1 */
  454. // Language spec says we must list exactly one parameter, even though we
  455. // actually supply three. Ugh!
  456. type Sigset_t = uint32 /* signal.h:104:22 */
  457. // $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $
  458. // Copyright (c) 1997 Theo de Raadt
  459. // All rights reserved.
  460. //
  461. // Redistribution and use in source and binary forms, with or without
  462. // modification, are permitted provided that the following conditions
  463. // are met:
  464. // 1. Redistributions of source code must retain the above copyright
  465. // notice, this list of conditions and the following disclaimer.
  466. // 2. Redistributions in binary form must reproduce the above copyright
  467. // notice, this list of conditions and the following disclaimer in the
  468. // documentation and/or other materials provided with the distribution.
  469. //
  470. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  471. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  472. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  473. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  474. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  475. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  476. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  477. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  478. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  479. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  480. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  481. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  482. // Copyright (c) 1991, 1993
  483. // The Regents of the University of California. All rights reserved.
  484. //
  485. // This code is derived from software contributed to Berkeley by
  486. // Berkeley Software Design, Inc.
  487. //
  488. // Redistribution and use in source and binary forms, with or without
  489. // modification, are permitted provided that the following conditions
  490. // are met:
  491. // 1. Redistributions of source code must retain the above copyright
  492. // notice, this list of conditions and the following disclaimer.
  493. // 2. Redistributions in binary form must reproduce the above copyright
  494. // notice, this list of conditions and the following disclaimer in the
  495. // documentation and/or other materials provided with the distribution.
  496. // 3. Neither the name of the University nor the names of its contributors
  497. // may be used to endorse or promote products derived from this software
  498. // without specific prior written permission.
  499. //
  500. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  501. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  502. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  503. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  504. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  505. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  506. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  507. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  508. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  509. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  510. // SUCH DAMAGE.
  511. //
  512. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  513. type Sigval = struct {
  514. F__ccgo_pad1 [0]uint64
  515. Fsival_int int32
  516. F__ccgo_pad2 [4]byte
  517. } /* siginfo.h:33:1 */
  518. // Negative signal codes are reserved for future use for
  519. // user generated signals.
  520. // The machine dependent signal codes (SIGILL, SIGFPE,
  521. // SIGSEGV, and SIGBUS)
  522. // SIGTRAP signal codes
  523. // SIGCHLD signal codes
  524. // $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $
  525. // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $
  526. // Copyright (c) 1982, 1986, 1993
  527. // The Regents of the University of California. All rights reserved.
  528. //
  529. // Redistribution and use in source and binary forms, with or without
  530. // modification, are permitted provided that the following conditions
  531. // are met:
  532. // 1. Redistributions of source code must retain the above copyright
  533. // notice, this list of conditions and the following disclaimer.
  534. // 2. Redistributions in binary form must reproduce the above copyright
  535. // notice, this list of conditions and the following disclaimer in the
  536. // documentation and/or other materials provided with the distribution.
  537. // 3. Neither the name of the University nor the names of its contributors
  538. // may be used to endorse or promote products derived from this software
  539. // without specific prior written permission.
  540. //
  541. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  542. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  543. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  544. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  545. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  546. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  547. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  548. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  549. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  550. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  551. // SUCH DAMAGE.
  552. //
  553. // @(#)time.h 8.2 (Berkeley) 7/10/94
  554. // $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $
  555. // -
  556. // Copyright (c) 1992, 1993
  557. // The Regents of the University of California. All rights reserved.
  558. //
  559. // Redistribution and use in source and binary forms, with or without
  560. // modification, are permitted provided that the following conditions
  561. // are met:
  562. // 1. Redistributions of source code must retain the above copyright
  563. // notice, this list of conditions and the following disclaimer.
  564. // 2. Redistributions in binary form must reproduce the above copyright
  565. // notice, this list of conditions and the following disclaimer in the
  566. // documentation and/or other materials provided with the distribution.
  567. // 3. Neither the name of the University nor the names of its contributors
  568. // may be used to endorse or promote products derived from this software
  569. // without specific prior written permission.
  570. //
  571. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  572. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  573. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  574. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  575. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  576. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  577. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  578. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  579. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  580. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  581. // SUCH DAMAGE.
  582. //
  583. // @(#)select.h 8.2 (Berkeley) 1/4/94
  584. // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
  585. // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
  586. // -
  587. // Copyright (c) 1982, 1986, 1991, 1993
  588. // The Regents of the University of California. All rights reserved.
  589. // (c) UNIX System Laboratories, Inc.
  590. // All or some portions of this file are derived from material licensed
  591. // to the University of California by American Telephone and Telegraph
  592. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  593. // the permission of UNIX System Laboratories, Inc.
  594. //
  595. // Redistribution and use in source and binary forms, with or without
  596. // modification, are permitted provided that the following conditions
  597. // are met:
  598. // 1. Redistributions of source code must retain the above copyright
  599. // notice, this list of conditions and the following disclaimer.
  600. // 2. Redistributions in binary form must reproduce the above copyright
  601. // notice, this list of conditions and the following disclaimer in the
  602. // documentation and/or other materials provided with the distribution.
  603. // 3. Neither the name of the University nor the names of its contributors
  604. // may be used to endorse or promote products derived from this software
  605. // without specific prior written permission.
  606. //
  607. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  608. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  609. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  610. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  611. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  612. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  613. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  614. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  615. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  616. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  617. // SUCH DAMAGE.
  618. //
  619. // @(#)types.h 8.4 (Berkeley) 1/21/94
  620. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  621. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  622. // Copyright (c) 1991, 1993
  623. // The Regents of the University of California. All rights reserved.
  624. //
  625. // This code is derived from software contributed to Berkeley by
  626. // Berkeley Software Design, Inc.
  627. //
  628. // Redistribution and use in source and binary forms, with or without
  629. // modification, are permitted provided that the following conditions
  630. // are met:
  631. // 1. Redistributions of source code must retain the above copyright
  632. // notice, this list of conditions and the following disclaimer.
  633. // 2. Redistributions in binary form must reproduce the above copyright
  634. // notice, this list of conditions and the following disclaimer in the
  635. // documentation and/or other materials provided with the distribution.
  636. // 3. Neither the name of the University nor the names of its contributors
  637. // may be used to endorse or promote products derived from this software
  638. // without specific prior written permission.
  639. //
  640. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  641. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  642. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  643. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  644. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  645. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  646. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  647. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  648. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  649. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  650. // SUCH DAMAGE.
  651. //
  652. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  653. // $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
  654. // -
  655. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  656. //
  657. // Redistribution and use in source and binary forms, with or without
  658. // modification, are permitted provided that the following conditions
  659. // are met:
  660. // 1. Redistributions of source code must retain the above copyright
  661. // notice, this list of conditions and the following disclaimer.
  662. // 2. Redistributions in binary form must reproduce the above copyright
  663. // notice, this list of conditions and the following disclaimer in the
  664. // documentation and/or other materials provided with the distribution.
  665. //
  666. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  667. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  668. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  669. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  670. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  671. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  672. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  673. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  674. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  675. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  676. // Public definitions for little- and big-endian systems.
  677. // This file should be included as <endian.h> in userspace and as
  678. // <sys/endian.h> in the kernel.
  679. //
  680. // System headers that need endian information but that can't or don't
  681. // want to export the public names here should include <sys/_endian.h>
  682. // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
  683. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  684. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  685. // Copyright (c) 1991, 1993
  686. // The Regents of the University of California. All rights reserved.
  687. //
  688. // This code is derived from software contributed to Berkeley by
  689. // Berkeley Software Design, Inc.
  690. //
  691. // Redistribution and use in source and binary forms, with or without
  692. // modification, are permitted provided that the following conditions
  693. // are met:
  694. // 1. Redistributions of source code must retain the above copyright
  695. // notice, this list of conditions and the following disclaimer.
  696. // 2. Redistributions in binary form must reproduce the above copyright
  697. // notice, this list of conditions and the following disclaimer in the
  698. // documentation and/or other materials provided with the distribution.
  699. // 3. Neither the name of the University nor the names of its contributors
  700. // may be used to endorse or promote products derived from this software
  701. // without specific prior written permission.
  702. //
  703. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  704. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  705. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  706. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  707. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  708. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  709. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  710. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  711. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  712. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  713. // SUCH DAMAGE.
  714. //
  715. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  716. // $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
  717. // -
  718. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  719. //
  720. // Redistribution and use in source and binary forms, with or without
  721. // modification, are permitted provided that the following conditions
  722. // are met:
  723. // 1. Redistributions of source code must retain the above copyright
  724. // notice, this list of conditions and the following disclaimer.
  725. // 2. Redistributions in binary form must reproduce the above copyright
  726. // notice, this list of conditions and the following disclaimer in the
  727. // documentation and/or other materials provided with the distribution.
  728. //
  729. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  730. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  731. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  732. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  733. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  734. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  735. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  736. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  737. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  738. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  739. // Internal endianness macros. This pulls in <machine/endian.h> to
  740. // get the correct setting direction for the platform and sets internal
  741. // ('__' prefix) macros appropriately.
  742. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  743. // -
  744. // Copyright (c) 1990, 1993
  745. // The Regents of the University of California. All rights reserved.
  746. //
  747. // Redistribution and use in source and binary forms, with or without
  748. // modification, are permitted provided that the following conditions
  749. // are met:
  750. // 1. Redistributions of source code must retain the above copyright
  751. // notice, this list of conditions and the following disclaimer.
  752. // 2. Redistributions in binary form must reproduce the above copyright
  753. // notice, this list of conditions and the following disclaimer in the
  754. // documentation and/or other materials provided with the distribution.
  755. // 3. Neither the name of the University nor the names of its contributors
  756. // may be used to endorse or promote products derived from this software
  757. // without specific prior written permission.
  758. //
  759. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  760. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  761. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  762. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  763. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  764. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  765. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  766. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  767. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  768. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  769. // SUCH DAMAGE.
  770. //
  771. // @(#)types.h 8.3 (Berkeley) 1/5/94
  772. // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
  773. // -
  774. // Copyright (c) 1990, 1993
  775. // The Regents of the University of California. All rights reserved.
  776. //
  777. // Redistribution and use in source and binary forms, with or without
  778. // modification, are permitted provided that the following conditions
  779. // are met:
  780. // 1. Redistributions of source code must retain the above copyright
  781. // notice, this list of conditions and the following disclaimer.
  782. // 2. Redistributions in binary form must reproduce the above copyright
  783. // notice, this list of conditions and the following disclaimer in the
  784. // documentation and/or other materials provided with the distribution.
  785. // 3. Neither the name of the University nor the names of its contributors
  786. // may be used to endorse or promote products derived from this software
  787. // without specific prior written permission.
  788. //
  789. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  790. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  791. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  792. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  793. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  794. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  795. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  796. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  797. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  798. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  799. // SUCH DAMAGE.
  800. //
  801. // @(#)types.h 8.3 (Berkeley) 1/5/94
  802. // @(#)ansi.h 8.2 (Berkeley) 1/4/94
  803. // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
  804. // value for all data types (int, long, ...). The result is an
  805. // unsigned long and must be cast to any desired pointer type.
  806. //
  807. // _ALIGNED_POINTER is a boolean macro that checks whether an address
  808. // is valid to fetch data elements of type t from on this architecture.
  809. // This does not reflect the optimal alignment, just the possibility
  810. // (within reasonable limits).
  811. // 7.18.1.1 Exact-width integer types
  812. type X__int8_t = int8 /* _types.h:60:22 */
  813. type X__uint8_t = uint8 /* _types.h:61:24 */
  814. type X__int16_t = int16 /* _types.h:62:17 */
  815. type X__uint16_t = uint16 /* _types.h:63:25 */
  816. type X__int32_t = int32 /* _types.h:64:15 */
  817. type X__uint32_t = uint32 /* _types.h:65:23 */
  818. // LONGLONG
  819. type X__int64_t = int64 /* _types.h:67:20 */
  820. // LONGLONG
  821. type X__uint64_t = uint64 /* _types.h:69:28 */
  822. // 7.18.1.2 Minimum-width integer types
  823. type X__int_least8_t = X__int8_t /* _types.h:72:19 */
  824. type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
  825. type X__int_least16_t = X__int16_t /* _types.h:74:20 */
  826. type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
  827. type X__int_least32_t = X__int32_t /* _types.h:76:20 */
  828. type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
  829. type X__int_least64_t = X__int64_t /* _types.h:78:20 */
  830. type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
  831. // 7.18.1.3 Fastest minimum-width integer types
  832. type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
  833. type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
  834. type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
  835. type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
  836. type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
  837. type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
  838. type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
  839. type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
  840. // 7.18.1.4 Integer types capable of holding object pointers
  841. type X__intptr_t = int64 /* _types.h:104:16 */
  842. type X__uintptr_t = uint64 /* _types.h:105:24 */
  843. // 7.18.1.5 Greatest-width integer types
  844. type X__intmax_t = X__int64_t /* _types.h:108:20 */
  845. type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
  846. // Register size
  847. type X__register_t = int64 /* _types.h:112:16 */
  848. // VM system types
  849. type X__vaddr_t = uint64 /* _types.h:115:24 */
  850. type X__paddr_t = uint64 /* _types.h:116:24 */
  851. type X__vsize_t = uint64 /* _types.h:117:24 */
  852. type X__psize_t = uint64 /* _types.h:118:24 */
  853. // Standard system types
  854. type X__double_t = float64 /* _types.h:121:18 */
  855. type X__float_t = float32 /* _types.h:122:17 */
  856. type X__ptrdiff_t = int64 /* _types.h:123:16 */
  857. type X__size_t = uint64 /* _types.h:124:24 */
  858. type X__ssize_t = int64 /* _types.h:125:16 */
  859. type X__va_list = X__builtin_va_list /* _types.h:127:27 */
  860. // Wide character support types
  861. type X__wchar_t = int32 /* _types.h:137:15 */
  862. type X__wint_t = int32 /* _types.h:140:15 */
  863. type X__rune_t = int32 /* _types.h:141:15 */
  864. type X__wctrans_t = uintptr /* _types.h:142:14 */
  865. type X__wctype_t = uintptr /* _types.h:143:14 */
  866. type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
  867. type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
  868. type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
  869. type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
  870. type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id
  871. type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
  872. type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
  873. type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
  874. type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
  875. type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
  876. type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
  877. type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
  878. type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
  879. type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
  880. type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
  881. type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
  882. type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
  883. type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
  884. type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
  885. type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
  886. type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
  887. type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
  888. type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
  889. type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
  890. type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
  891. type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
  892. type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
  893. type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
  894. // mbstate_t is an opaque object to keep conversion state, during multibyte
  895. // stream conversions. The content must not be referenced by user programs.
  896. type X__mbstate_t = struct {
  897. F__ccgo_pad1 [0]uint64
  898. F__mbstate8 [128]int8
  899. } /* _types.h:75:3 */
  900. // Tell sys/endian.h we have MD variants of the swap macros.
  901. // Note that these macros evaluate their arguments several times.
  902. // Public names
  903. // These are specified to be function-like macros to match the spec
  904. // POSIX names
  905. // original BSD names
  906. // these were exposed here before
  907. // ancient stuff
  908. type U_char = uint8 /* types.h:51:23 */
  909. type U_short = uint16 /* types.h:52:24 */
  910. type U_int = uint32 /* types.h:53:22 */
  911. type U_long = uint64 /* types.h:54:23 */
  912. type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
  913. type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
  914. type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
  915. type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility
  916. type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
  917. type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
  918. // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
  919. // but the rest of the includes are not ready for that yet.
  920. type Int8_t = X__int8_t /* types.h:75:19 */
  921. type Uint8_t = X__uint8_t /* types.h:80:20 */
  922. type Int16_t = X__int16_t /* types.h:85:20 */
  923. type Uint16_t = X__uint16_t /* types.h:90:21 */
  924. type Int32_t = X__int32_t /* types.h:95:20 */
  925. type Uint32_t = X__uint32_t /* types.h:100:21 */
  926. type Int64_t = X__int64_t /* types.h:105:20 */
  927. type Uint64_t = X__uint64_t /* types.h:110:21 */
  928. // BSD-style unsigned bits types
  929. type U_int8_t = X__uint8_t /* types.h:114:19 */
  930. type U_int16_t = X__uint16_t /* types.h:115:20 */
  931. type U_int32_t = X__uint32_t /* types.h:116:20 */
  932. type U_int64_t = X__uint64_t /* types.h:117:20 */
  933. // quads, deprecated in favor of 64 bit int types
  934. type Quad_t = X__int64_t /* types.h:120:19 */
  935. type U_quad_t = X__uint64_t /* types.h:121:20 */
  936. // VM system types
  937. type Vaddr_t = X__vaddr_t /* types.h:125:19 */
  938. type Paddr_t = X__paddr_t /* types.h:126:19 */
  939. type Vsize_t = X__vsize_t /* types.h:127:19 */
  940. type Psize_t = X__psize_t /* types.h:128:19 */
  941. // Standard system types
  942. type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
  943. type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
  944. type Caddr_t = uintptr /* types.h:134:14 */ // core address
  945. type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
  946. type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
  947. type Dev_t = X__dev_t /* types.h:137:18 */ // device number
  948. type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
  949. type Gid_t = X__gid_t /* types.h:139:18 */ // group id
  950. type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
  951. type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
  952. type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
  953. type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
  954. type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
  955. type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
  956. type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
  957. type Uid_t = X__uid_t /* types.h:147:18 */ // user id
  958. type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
  959. type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
  960. type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
  961. type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
  962. // The following types may be defined in multiple header files.
  963. type Clock_t = X__clock_t /* types.h:158:19 */
  964. type Clockid_t = X__clockid_t /* types.h:163:21 */
  965. type Pid_t = X__pid_t /* types.h:168:18 */
  966. type Ssize_t = X__ssize_t /* types.h:178:19 */
  967. type Time_t = X__time_t /* types.h:183:18 */
  968. type Timer_t = X__timer_t /* types.h:188:19 */
  969. type Off_t = X__off_t /* types.h:193:18 */
  970. // Major, minor numbers, dev_t's.
  971. type Timeval = struct {
  972. Ftv_sec Time_t
  973. Ftv_usec Suseconds_t
  974. } /* select.h:41:1 */
  975. type Timespec = struct {
  976. Ftv_sec Time_t
  977. Ftv_nsec int64
  978. } /* select.h:49:1 */
  979. // Select uses bit masks of file descriptors in longs. These macros
  980. // manipulate such bit fields (the filesystem macros use chars).
  981. // FD_SETSIZE may be defined by the user, but the default here should
  982. // be enough for most uses.
  983. // We don't want to pollute the namespace with select(2) internals.
  984. // Non-underscore versions are exposed later #if __BSD_VISIBLE
  985. type X__fd_mask = Uint32_t /* select.h:70:18 */
  986. type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */
  987. type Fd_set = Fd_set1 /* select.h:76:3 */
  988. type Timezone = struct {
  989. Ftz_minuteswest int32
  990. Ftz_dsttime int32
  991. } /* time.h:72:1 */
  992. // Operations on timevals.
  993. // Operations on timespecs.
  994. // Names of the interval timers, and structure
  995. // defining a timer setting.
  996. type Itimerval = struct {
  997. Fit_interval struct {
  998. Ftv_sec Time_t
  999. Ftv_usec Suseconds_t
  1000. }
  1001. Fit_value struct {
  1002. Ftv_sec Time_t
  1003. Ftv_usec Suseconds_t
  1004. }
  1005. } /* time.h:148:1 */
  1006. // clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE})
  1007. type Clockinfo = struct {
  1008. Fhz int32
  1009. Ftick int32
  1010. Fstathz int32
  1011. Fprofhz int32
  1012. } /* time.h:157:1 */
  1013. // $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $
  1014. // $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $
  1015. // Copyright (c) 1989 The Regents of the University of California.
  1016. // All rights reserved.
  1017. //
  1018. // (c) UNIX System Laboratories, Inc.
  1019. // All or some portions of this file are derived from material licensed
  1020. // to the University of California by American Telephone and Telegraph
  1021. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  1022. // the permission of UNIX System Laboratories, Inc.
  1023. //
  1024. // Redistribution and use in source and binary forms, with or without
  1025. // modification, are permitted provided that the following conditions
  1026. // are met:
  1027. // 1. Redistributions of source code must retain the above copyright
  1028. // notice, this list of conditions and the following disclaimer.
  1029. // 2. Redistributions in binary form must reproduce the above copyright
  1030. // notice, this list of conditions and the following disclaimer in the
  1031. // documentation and/or other materials provided with the distribution.
  1032. // 3. Neither the name of the University nor the names of its contributors
  1033. // may be used to endorse or promote products derived from this software
  1034. // without specific prior written permission.
  1035. //
  1036. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1037. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1038. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1039. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1040. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1041. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1042. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1043. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1044. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1045. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1046. // SUCH DAMAGE.
  1047. //
  1048. // @(#)time.h 5.12 (Berkeley) 3/9/91
  1049. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  1050. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  1051. // Copyright (c) 1991, 1993
  1052. // The Regents of the University of California. All rights reserved.
  1053. //
  1054. // This code is derived from software contributed to Berkeley by
  1055. // Berkeley Software Design, Inc.
  1056. //
  1057. // Redistribution and use in source and binary forms, with or without
  1058. // modification, are permitted provided that the following conditions
  1059. // are met:
  1060. // 1. Redistributions of source code must retain the above copyright
  1061. // notice, this list of conditions and the following disclaimer.
  1062. // 2. Redistributions in binary form must reproduce the above copyright
  1063. // notice, this list of conditions and the following disclaimer in the
  1064. // documentation and/or other materials provided with the distribution.
  1065. // 3. Neither the name of the University nor the names of its contributors
  1066. // may be used to endorse or promote products derived from this software
  1067. // without specific prior written permission.
  1068. //
  1069. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1070. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1071. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1072. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1073. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1074. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1075. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1076. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1077. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1078. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1079. // SUCH DAMAGE.
  1080. //
  1081. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  1082. // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $
  1083. // Written by Todd C. Miller, September 9, 2016
  1084. // Public domain.
  1085. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  1086. // -
  1087. // Copyright (c) 1990, 1993
  1088. // The Regents of the University of California. All rights reserved.
  1089. //
  1090. // Redistribution and use in source and binary forms, with or without
  1091. // modification, are permitted provided that the following conditions
  1092. // are met:
  1093. // 1. Redistributions of source code must retain the above copyright
  1094. // notice, this list of conditions and the following disclaimer.
  1095. // 2. Redistributions in binary form must reproduce the above copyright
  1096. // notice, this list of conditions and the following disclaimer in the
  1097. // documentation and/or other materials provided with the distribution.
  1098. // 3. Neither the name of the University nor the names of its contributors
  1099. // may be used to endorse or promote products derived from this software
  1100. // without specific prior written permission.
  1101. //
  1102. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1103. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1104. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1105. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1106. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1107. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1108. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1109. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1110. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1111. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1112. // SUCH DAMAGE.
  1113. //
  1114. // @(#)types.h 8.3 (Berkeley) 1/5/94
  1115. // Frequency of the clock ticks reported by times(). Deprecated - use
  1116. // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.)
  1117. // $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $
  1118. // Copyright (c) 1982, 1986, 1993
  1119. // The Regents of the University of California. All rights reserved.
  1120. //
  1121. // Redistribution and use in source and binary forms, with or without
  1122. // modification, are permitted provided that the following conditions
  1123. // are met:
  1124. // 1. Redistributions of source code must retain the above copyright
  1125. // notice, this list of conditions and the following disclaimer.
  1126. // 2. Redistributions in binary form must reproduce the above copyright
  1127. // notice, this list of conditions and the following disclaimer in the
  1128. // documentation and/or other materials provided with the distribution.
  1129. // 3. Neither the name of the University nor the names of its contributors
  1130. // may be used to endorse or promote products derived from this software
  1131. // without specific prior written permission.
  1132. //
  1133. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1134. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1135. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1136. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1137. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1138. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1139. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1140. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1141. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1142. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1143. // SUCH DAMAGE.
  1144. // Per-process and per-thread clocks encode the PID or TID into the
  1145. // high bits, with the type in the bottom bits
  1146. // Structure defined by POSIX 1003.1b to be like a itimerval,
  1147. // but with timespecs. Used in the timer_*() system calls.
  1148. type Itimerspec = struct {
  1149. Fit_interval struct {
  1150. Ftv_sec Time_t
  1151. Ftv_nsec int64
  1152. }
  1153. Fit_value struct {
  1154. Ftv_sec Time_t
  1155. Ftv_nsec int64
  1156. }
  1157. } /* _time.h:56:1 */
  1158. type Locale_t = uintptr /* time.h:107:14 */
  1159. type Tm = struct {
  1160. Ftm_sec int32
  1161. Ftm_min int32
  1162. Ftm_hour int32
  1163. Ftm_mday int32
  1164. Ftm_mon int32
  1165. Ftm_year int32
  1166. Ftm_wday int32
  1167. Ftm_yday int32
  1168. Ftm_isdst int32
  1169. F__ccgo_pad1 [4]byte
  1170. Ftm_gmtoff int64
  1171. Ftm_zone uintptr
  1172. } /* time.h:111:1 */
  1173. type Siginfo_t = struct {
  1174. Fsi_signo int32
  1175. Fsi_code int32
  1176. Fsi_errno int32
  1177. F__ccgo_pad1 [4]byte
  1178. F_data struct {
  1179. F__ccgo_pad1 [0]uint64
  1180. F_pad [29]int32
  1181. F__ccgo_pad2 [4]byte
  1182. }
  1183. } /* siginfo.h:173:3 */
  1184. // Signal vector "template" used in sigaction call.
  1185. type Sigaction = struct {
  1186. F__sigaction_u struct{ F__sa_handler uintptr }
  1187. Fsa_mask Sigset_t
  1188. Fsa_flags int32
  1189. } /* signal.h:112:1 */
  1190. // if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler.
  1191. // Flags for sigprocmask:
  1192. type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function
  1193. // 4.3 compatibility:
  1194. // Signal vector "template" used in sigvec call.
  1195. type Sigvec = struct {
  1196. Fsv_handler uintptr
  1197. Fsv_mask int32
  1198. Fsv_flags int32
  1199. } /* signal.h:152:1 */
  1200. // Macro for converting signal number to a mask suitable for
  1201. // sigblock().
  1202. // Structure used in sigaltstack call.
  1203. type Sigaltstack = struct {
  1204. Fss_sp uintptr
  1205. Fss_size Size_t
  1206. Fss_flags int32
  1207. F__ccgo_pad1 [4]byte
  1208. } /* signal.h:176:9 */
  1209. // Macro for converting signal number to a mask suitable for
  1210. // sigblock().
  1211. // Structure used in sigaltstack call.
  1212. type Stack_t = Sigaltstack /* signal.h:180:3 */
  1213. type Ucontext_t = Sigcontext /* signal.h:190:27 */
  1214. var _ int8 /* gen.c:2:13: */