signal_openbsd_386.go 62 KB

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