signal_openbsd_amd64.go 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384
  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_amd64.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_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: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_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:49: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>:344: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.9 2016/05/10 18:39:42 deraadt Exp $
  266. // $NetBSD: signal.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $
  267. // Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
  268. // All rights reserved.
  269. //
  270. // Redistribution and use in source and binary forms, with or without
  271. // modification, are permitted provided that the following conditions
  272. // are met:
  273. // 1. Redistributions of source code must retain the above copyright
  274. // notice, this list of conditions and the following disclaimer.
  275. // 2. Redistributions in binary form must reproduce the above copyright
  276. // notice, this list of conditions and the following disclaimer in the
  277. // documentation and/or other materials provided with the distribution.
  278. // 3. Neither the name of the University nor the names of its contributors
  279. // may be used to endorse or promote products derived from this software
  280. // without specific prior written permission.
  281. //
  282. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  283. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  284. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  285. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  286. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  287. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  288. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  289. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  290. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  291. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  292. // SUCH DAMAGE.
  293. //
  294. // @(#)signal.h 7.16 (Berkeley) 3/17/91
  295. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  296. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  297. // Copyright (c) 1991, 1993
  298. // The Regents of the University of California. All rights reserved.
  299. //
  300. // This code is derived from software contributed to Berkeley by
  301. // Berkeley Software Design, Inc.
  302. //
  303. // Redistribution and use in source and binary forms, with or without
  304. // modification, are permitted provided that the following conditions
  305. // are met:
  306. // 1. Redistributions of source code must retain the above copyright
  307. // notice, this list of conditions and the following disclaimer.
  308. // 2. Redistributions in binary form must reproduce the above copyright
  309. // notice, this list of conditions and the following disclaimer in the
  310. // documentation and/or other materials provided with the distribution.
  311. // 3. Neither the name of the University nor the names of its contributors
  312. // may be used to endorse or promote products derived from this software
  313. // without specific prior written permission.
  314. //
  315. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  316. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  317. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  318. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  319. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  320. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  321. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  322. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  323. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  324. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  325. // SUCH DAMAGE.
  326. //
  327. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  328. // $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
  329. // Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
  330. // Public domain.
  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:40: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. Fsc_rdi int64
  446. Fsc_rsi int64
  447. Fsc_rdx int64
  448. Fsc_rcx int64
  449. Fsc_r8 int64
  450. Fsc_r9 int64
  451. Fsc_r10 int64
  452. Fsc_r11 int64
  453. Fsc_r12 int64
  454. Fsc_r13 int64
  455. Fsc_r14 int64
  456. Fsc_r15 int64
  457. Fsc_rbp int64
  458. Fsc_rbx int64
  459. Fsc_rax int64
  460. Fsc_gs int64
  461. Fsc_fs int64
  462. Fsc_es int64
  463. Fsc_ds int64
  464. Fsc_trapno int64
  465. Fsc_err int64
  466. Fsc_rip int64
  467. Fsc_cs int64
  468. Fsc_rflags int64
  469. Fsc_rsp int64
  470. Fsc_ss int64
  471. Fsc_fpstate uintptr
  472. F__sc_unused int32
  473. Fsc_mask int32
  474. Fsc_cookie int64
  475. } /* signal.h:54:1 */
  476. // Language spec says we must list exactly one parameter, even though we
  477. // actually supply three. Ugh!
  478. type Sigset_t = uint32 /* signal.h:104:22 */
  479. // $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $
  480. // Copyright (c) 1997 Theo de Raadt
  481. // All rights reserved.
  482. //
  483. // Redistribution and use in source and binary forms, with or without
  484. // modification, are permitted provided that the following conditions
  485. // are met:
  486. // 1. Redistributions of source code must retain the above copyright
  487. // notice, this list of conditions and the following disclaimer.
  488. // 2. Redistributions in binary form must reproduce the above copyright
  489. // notice, this list of conditions and the following disclaimer in the
  490. // documentation and/or other materials provided with the distribution.
  491. //
  492. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  493. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  494. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  495. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  496. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  497. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  498. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  499. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  500. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  501. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  502. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  503. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  504. // Copyright (c) 1991, 1993
  505. // The Regents of the University of California. All rights reserved.
  506. //
  507. // This code is derived from software contributed to Berkeley by
  508. // Berkeley Software Design, Inc.
  509. //
  510. // Redistribution and use in source and binary forms, with or without
  511. // modification, are permitted provided that the following conditions
  512. // are met:
  513. // 1. Redistributions of source code must retain the above copyright
  514. // notice, this list of conditions and the following disclaimer.
  515. // 2. Redistributions in binary form must reproduce the above copyright
  516. // notice, this list of conditions and the following disclaimer in the
  517. // documentation and/or other materials provided with the distribution.
  518. // 3. Neither the name of the University nor the names of its contributors
  519. // may be used to endorse or promote products derived from this software
  520. // without specific prior written permission.
  521. //
  522. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  523. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  524. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  525. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  526. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  527. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  528. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  529. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  530. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  531. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  532. // SUCH DAMAGE.
  533. //
  534. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  535. type Sigval = struct {
  536. F__ccgo_pad1 [0]uint64
  537. Fsival_int int32
  538. F__ccgo_pad2 [4]byte
  539. } /* siginfo.h:33:1 */
  540. // Negative signal codes are reserved for future use for
  541. // user generated signals.
  542. // The machine dependent signal codes (SIGILL, SIGFPE,
  543. // SIGSEGV, and SIGBUS)
  544. // SIGTRAP signal codes
  545. // SIGCHLD signal codes
  546. // $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $
  547. // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $
  548. // Copyright (c) 1982, 1986, 1993
  549. // The Regents of the University of California. All rights reserved.
  550. //
  551. // Redistribution and use in source and binary forms, with or without
  552. // modification, are permitted provided that the following conditions
  553. // are met:
  554. // 1. Redistributions of source code must retain the above copyright
  555. // notice, this list of conditions and the following disclaimer.
  556. // 2. Redistributions in binary form must reproduce the above copyright
  557. // notice, this list of conditions and the following disclaimer in the
  558. // documentation and/or other materials provided with the distribution.
  559. // 3. Neither the name of the University nor the names of its contributors
  560. // may be used to endorse or promote products derived from this software
  561. // without specific prior written permission.
  562. //
  563. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  564. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  565. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  566. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  567. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  568. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  569. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  570. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  571. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  572. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  573. // SUCH DAMAGE.
  574. //
  575. // @(#)time.h 8.2 (Berkeley) 7/10/94
  576. // $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $
  577. // -
  578. // Copyright (c) 1992, 1993
  579. // The Regents of the University of California. All rights reserved.
  580. //
  581. // Redistribution and use in source and binary forms, with or without
  582. // modification, are permitted provided that the following conditions
  583. // are met:
  584. // 1. Redistributions of source code must retain the above copyright
  585. // notice, this list of conditions and the following disclaimer.
  586. // 2. Redistributions in binary form must reproduce the above copyright
  587. // notice, this list of conditions and the following disclaimer in the
  588. // documentation and/or other materials provided with the distribution.
  589. // 3. Neither the name of the University nor the names of its contributors
  590. // may be used to endorse or promote products derived from this software
  591. // without specific prior written permission.
  592. //
  593. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  594. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  595. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  596. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  597. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  598. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  599. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  600. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  601. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  602. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  603. // SUCH DAMAGE.
  604. //
  605. // @(#)select.h 8.2 (Berkeley) 1/4/94
  606. // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
  607. // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
  608. // -
  609. // Copyright (c) 1982, 1986, 1991, 1993
  610. // The Regents of the University of California. All rights reserved.
  611. // (c) UNIX System Laboratories, Inc.
  612. // All or some portions of this file are derived from material licensed
  613. // to the University of California by American Telephone and Telegraph
  614. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  615. // the permission of UNIX System Laboratories, Inc.
  616. //
  617. // Redistribution and use in source and binary forms, with or without
  618. // modification, are permitted provided that the following conditions
  619. // are met:
  620. // 1. Redistributions of source code must retain the above copyright
  621. // notice, this list of conditions and the following disclaimer.
  622. // 2. Redistributions in binary form must reproduce the above copyright
  623. // notice, this list of conditions and the following disclaimer in the
  624. // documentation and/or other materials provided with the distribution.
  625. // 3. Neither the name of the University nor the names of its contributors
  626. // may be used to endorse or promote products derived from this software
  627. // without specific prior written permission.
  628. //
  629. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  630. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  631. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  632. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  633. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  634. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  635. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  636. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  637. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  638. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  639. // SUCH DAMAGE.
  640. //
  641. // @(#)types.h 8.4 (Berkeley) 1/21/94
  642. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  643. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  644. // Copyright (c) 1991, 1993
  645. // The Regents of the University of California. All rights reserved.
  646. //
  647. // This code is derived from software contributed to Berkeley by
  648. // Berkeley Software Design, Inc.
  649. //
  650. // Redistribution and use in source and binary forms, with or without
  651. // modification, are permitted provided that the following conditions
  652. // are met:
  653. // 1. Redistributions of source code must retain the above copyright
  654. // notice, this list of conditions and the following disclaimer.
  655. // 2. Redistributions in binary form must reproduce the above copyright
  656. // notice, this list of conditions and the following disclaimer in the
  657. // documentation and/or other materials provided with the distribution.
  658. // 3. Neither the name of the University nor the names of its contributors
  659. // may be used to endorse or promote products derived from this software
  660. // without specific prior written permission.
  661. //
  662. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  663. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  664. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  665. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  666. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  667. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  668. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  669. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  670. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  671. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  672. // SUCH DAMAGE.
  673. //
  674. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  675. // $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
  676. // -
  677. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  678. //
  679. // Redistribution and use in source and binary forms, with or without
  680. // modification, are permitted provided that the following conditions
  681. // are met:
  682. // 1. Redistributions of source code must retain the above copyright
  683. // notice, this list of conditions and the following disclaimer.
  684. // 2. Redistributions in binary form must reproduce the above copyright
  685. // notice, this list of conditions and the following disclaimer in the
  686. // documentation and/or other materials provided with the distribution.
  687. //
  688. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  689. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  690. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  691. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  692. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  693. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  694. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  695. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  696. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  697. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  698. // Public definitions for little- and big-endian systems.
  699. // This file should be included as <endian.h> in userspace and as
  700. // <sys/endian.h> in the kernel.
  701. //
  702. // System headers that need endian information but that can't or don't
  703. // want to export the public names here should include <sys/_endian.h>
  704. // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
  705. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  706. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  707. // Copyright (c) 1991, 1993
  708. // The Regents of the University of California. All rights reserved.
  709. //
  710. // This code is derived from software contributed to Berkeley by
  711. // Berkeley Software Design, Inc.
  712. //
  713. // Redistribution and use in source and binary forms, with or without
  714. // modification, are permitted provided that the following conditions
  715. // are met:
  716. // 1. Redistributions of source code must retain the above copyright
  717. // notice, this list of conditions and the following disclaimer.
  718. // 2. Redistributions in binary form must reproduce the above copyright
  719. // notice, this list of conditions and the following disclaimer in the
  720. // documentation and/or other materials provided with the distribution.
  721. // 3. Neither the name of the University nor the names of its contributors
  722. // may be used to endorse or promote products derived from this software
  723. // without specific prior written permission.
  724. //
  725. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  726. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  727. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  728. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  729. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  730. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  731. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  732. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  733. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  734. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  735. // SUCH DAMAGE.
  736. //
  737. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  738. // $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
  739. // -
  740. // Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
  741. //
  742. // Redistribution and use in source and binary forms, with or without
  743. // modification, are permitted provided that the following conditions
  744. // are met:
  745. // 1. Redistributions of source code must retain the above copyright
  746. // notice, this list of conditions and the following disclaimer.
  747. // 2. Redistributions in binary form must reproduce the above copyright
  748. // notice, this list of conditions and the following disclaimer in the
  749. // documentation and/or other materials provided with the distribution.
  750. //
  751. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  752. // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  753. // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  754. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  755. // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  756. // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  757. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  758. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  759. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  760. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  761. // Internal endianness macros. This pulls in <machine/endian.h> to
  762. // get the correct setting direction for the platform and sets internal
  763. // ('__' prefix) macros appropriately.
  764. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  765. // -
  766. // Copyright (c) 1990, 1993
  767. // The Regents of the University of California. All rights reserved.
  768. //
  769. // Redistribution and use in source and binary forms, with or without
  770. // modification, are permitted provided that the following conditions
  771. // are met:
  772. // 1. Redistributions of source code must retain the above copyright
  773. // notice, this list of conditions and the following disclaimer.
  774. // 2. Redistributions in binary form must reproduce the above copyright
  775. // notice, this list of conditions and the following disclaimer in the
  776. // documentation and/or other materials provided with the distribution.
  777. // 3. Neither the name of the University nor the names of its contributors
  778. // may be used to endorse or promote products derived from this software
  779. // without specific prior written permission.
  780. //
  781. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  782. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  783. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  784. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  785. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  786. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  787. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  788. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  789. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  790. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  791. // SUCH DAMAGE.
  792. //
  793. // @(#)types.h 8.3 (Berkeley) 1/5/94
  794. // $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $
  795. // -
  796. // Copyright (c) 1990, 1993
  797. // The Regents of the University of California. All rights reserved.
  798. //
  799. // Redistribution and use in source and binary forms, with or without
  800. // modification, are permitted provided that the following conditions
  801. // are met:
  802. // 1. Redistributions of source code must retain the above copyright
  803. // notice, this list of conditions and the following disclaimer.
  804. // 2. Redistributions in binary form must reproduce the above copyright
  805. // notice, this list of conditions and the following disclaimer in the
  806. // documentation and/or other materials provided with the distribution.
  807. // 3. Neither the name of the University nor the names of its contributors
  808. // may be used to endorse or promote products derived from this software
  809. // without specific prior written permission.
  810. //
  811. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  812. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  813. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  814. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  815. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  816. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  817. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  818. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  819. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  820. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  821. // SUCH DAMAGE.
  822. //
  823. // @(#)types.h 8.3 (Berkeley) 1/5/94
  824. // @(#)ansi.h 8.2 (Berkeley) 1/4/94
  825. // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
  826. // value for all data types (int, long, ...). The result is an
  827. // unsigned long and must be cast to any desired pointer type.
  828. //
  829. // _ALIGNED_POINTER is a boolean macro that checks whether an address
  830. // is valid to fetch data elements of type t from on this architecture.
  831. // This does not reflect the optimal alignment, just the possibility
  832. // (within reasonable limits).
  833. // 7.18.1.1 Exact-width integer types
  834. type X__int8_t = int8 /* _types.h:61:22 */
  835. type X__uint8_t = uint8 /* _types.h:62:24 */
  836. type X__int16_t = int16 /* _types.h:63:17 */
  837. type X__uint16_t = uint16 /* _types.h:64:25 */
  838. type X__int32_t = int32 /* _types.h:65:15 */
  839. type X__uint32_t = uint32 /* _types.h:66:23 */
  840. type X__int64_t = int64 /* _types.h:67:20 */
  841. type X__uint64_t = uint64 /* _types.h:68:28 */
  842. // 7.18.1.2 Minimum-width integer types
  843. type X__int_least8_t = X__int8_t /* _types.h:71:19 */
  844. type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
  845. type X__int_least16_t = X__int16_t /* _types.h:73:20 */
  846. type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
  847. type X__int_least32_t = X__int32_t /* _types.h:75:20 */
  848. type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
  849. type X__int_least64_t = X__int64_t /* _types.h:77:20 */
  850. type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
  851. // 7.18.1.3 Fastest minimum-width integer types
  852. type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
  853. type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
  854. type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
  855. type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
  856. type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
  857. type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
  858. type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
  859. type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
  860. // 7.18.1.4 Integer types capable of holding object pointers
  861. type X__intptr_t = int64 /* _types.h:103:16 */
  862. type X__uintptr_t = uint64 /* _types.h:104:24 */
  863. // 7.18.1.5 Greatest-width integer types
  864. type X__intmax_t = X__int64_t /* _types.h:107:20 */
  865. type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
  866. // Register size
  867. type X__register_t = int64 /* _types.h:111:16 */
  868. // VM system types
  869. type X__vaddr_t = uint64 /* _types.h:114:24 */
  870. type X__paddr_t = uint64 /* _types.h:115:24 */
  871. type X__vsize_t = uint64 /* _types.h:116:24 */
  872. type X__psize_t = uint64 /* _types.h:117:24 */
  873. // Standard system types
  874. type X__double_t = float64 /* _types.h:120:18 */
  875. type X__float_t = float32 /* _types.h:121:17 */
  876. type X__ptrdiff_t = int64 /* _types.h:122:16 */
  877. type X__size_t = uint64 /* _types.h:123:24 */
  878. type X__ssize_t = int64 /* _types.h:124:16 */
  879. type X__va_list = X__builtin_va_list /* _types.h:126:27 */
  880. // Wide character support types
  881. type X__wchar_t = int32 /* _types.h:133:15 */
  882. type X__wint_t = int32 /* _types.h:135:15 */
  883. type X__rune_t = int32 /* _types.h:136:15 */
  884. type X__wctrans_t = uintptr /* _types.h:137:14 */
  885. type X__wctype_t = uintptr /* _types.h:138:14 */
  886. type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
  887. type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
  888. type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
  889. type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
  890. type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id
  891. type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
  892. type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
  893. type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
  894. type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
  895. type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
  896. type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
  897. type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
  898. type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
  899. type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
  900. type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
  901. type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
  902. type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
  903. type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
  904. type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
  905. type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
  906. type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
  907. type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
  908. type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
  909. type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
  910. type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
  911. type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
  912. type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
  913. type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
  914. // mbstate_t is an opaque object to keep conversion state, during multibyte
  915. // stream conversions. The content must not be referenced by user programs.
  916. type X__mbstate_t = struct {
  917. F__ccgo_pad1 [0]uint64
  918. F__mbstate8 [128]int8
  919. } /* _types.h:75:3 */
  920. // Tell sys/endian.h we have MD variants of the swap macros.
  921. // Note that these macros evaluate their arguments several times.
  922. // Public names
  923. // These are specified to be function-like macros to match the spec
  924. // POSIX names
  925. // original BSD names
  926. // these were exposed here before
  927. // ancient stuff
  928. type U_char = uint8 /* types.h:51:23 */
  929. type U_short = uint16 /* types.h:52:24 */
  930. type U_int = uint32 /* types.h:53:22 */
  931. type U_long = uint64 /* types.h:54:23 */
  932. type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
  933. type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
  934. type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
  935. type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility
  936. type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
  937. type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
  938. // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
  939. // but the rest of the includes are not ready for that yet.
  940. type Int8_t = X__int8_t /* types.h:75:19 */
  941. type Uint8_t = X__uint8_t /* types.h:80:20 */
  942. type Int16_t = X__int16_t /* types.h:85:20 */
  943. type Uint16_t = X__uint16_t /* types.h:90:21 */
  944. type Int32_t = X__int32_t /* types.h:95:20 */
  945. type Uint32_t = X__uint32_t /* types.h:100:21 */
  946. type Int64_t = X__int64_t /* types.h:105:20 */
  947. type Uint64_t = X__uint64_t /* types.h:110:21 */
  948. // BSD-style unsigned bits types
  949. type U_int8_t = X__uint8_t /* types.h:114:19 */
  950. type U_int16_t = X__uint16_t /* types.h:115:20 */
  951. type U_int32_t = X__uint32_t /* types.h:116:20 */
  952. type U_int64_t = X__uint64_t /* types.h:117:20 */
  953. // quads, deprecated in favor of 64 bit int types
  954. type Quad_t = X__int64_t /* types.h:120:19 */
  955. type U_quad_t = X__uint64_t /* types.h:121:20 */
  956. // VM system types
  957. type Vaddr_t = X__vaddr_t /* types.h:125:19 */
  958. type Paddr_t = X__paddr_t /* types.h:126:19 */
  959. type Vsize_t = X__vsize_t /* types.h:127:19 */
  960. type Psize_t = X__psize_t /* types.h:128:19 */
  961. // Standard system types
  962. type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
  963. type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
  964. type Caddr_t = uintptr /* types.h:134:14 */ // core address
  965. type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
  966. type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
  967. type Dev_t = X__dev_t /* types.h:137:18 */ // device number
  968. type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
  969. type Gid_t = X__gid_t /* types.h:139:18 */ // group id
  970. type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
  971. type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
  972. type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
  973. type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
  974. type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
  975. type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
  976. type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
  977. type Uid_t = X__uid_t /* types.h:147:18 */ // user id
  978. type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
  979. type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
  980. type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
  981. type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
  982. // The following types may be defined in multiple header files.
  983. type Clock_t = X__clock_t /* types.h:158:19 */
  984. type Clockid_t = X__clockid_t /* types.h:163:21 */
  985. type Pid_t = X__pid_t /* types.h:168:18 */
  986. type Ssize_t = X__ssize_t /* types.h:178:19 */
  987. type Time_t = X__time_t /* types.h:183:18 */
  988. type Timer_t = X__timer_t /* types.h:188:19 */
  989. type Off_t = X__off_t /* types.h:193:18 */
  990. // Major, minor numbers, dev_t's.
  991. type Timeval = struct {
  992. Ftv_sec Time_t
  993. Ftv_usec Suseconds_t
  994. } /* select.h:41:1 */
  995. type Timespec = struct {
  996. Ftv_sec Time_t
  997. Ftv_nsec int64
  998. } /* select.h:49:1 */
  999. // Select uses bit masks of file descriptors in longs. These macros
  1000. // manipulate such bit fields (the filesystem macros use chars).
  1001. // FD_SETSIZE may be defined by the user, but the default here should
  1002. // be enough for most uses.
  1003. // We don't want to pollute the namespace with select(2) internals.
  1004. // Non-underscore versions are exposed later #if __BSD_VISIBLE
  1005. type X__fd_mask = Uint32_t /* select.h:70:18 */
  1006. type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */
  1007. type Fd_set = Fd_set1 /* select.h:76:3 */
  1008. type Timezone = struct {
  1009. Ftz_minuteswest int32
  1010. Ftz_dsttime int32
  1011. } /* time.h:72:1 */
  1012. // Operations on timevals.
  1013. // Operations on timespecs.
  1014. // Names of the interval timers, and structure
  1015. // defining a timer setting.
  1016. type Itimerval = struct {
  1017. Fit_interval struct {
  1018. Ftv_sec Time_t
  1019. Ftv_usec Suseconds_t
  1020. }
  1021. Fit_value struct {
  1022. Ftv_sec Time_t
  1023. Ftv_usec Suseconds_t
  1024. }
  1025. } /* time.h:148:1 */
  1026. // clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE})
  1027. type Clockinfo = struct {
  1028. Fhz int32
  1029. Ftick int32
  1030. Fstathz int32
  1031. Fprofhz int32
  1032. } /* time.h:157:1 */
  1033. // $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $
  1034. // $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $
  1035. // Copyright (c) 1989 The Regents of the University of California.
  1036. // All rights reserved.
  1037. //
  1038. // (c) UNIX System Laboratories, Inc.
  1039. // All or some portions of this file are derived from material licensed
  1040. // to the University of California by American Telephone and Telegraph
  1041. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  1042. // the permission of UNIX System Laboratories, Inc.
  1043. //
  1044. // Redistribution and use in source and binary forms, with or without
  1045. // modification, are permitted provided that the following conditions
  1046. // are met:
  1047. // 1. Redistributions of source code must retain the above copyright
  1048. // notice, this list of conditions and the following disclaimer.
  1049. // 2. Redistributions in binary form must reproduce the above copyright
  1050. // notice, this list of conditions and the following disclaimer in the
  1051. // documentation and/or other materials provided with the distribution.
  1052. // 3. Neither the name of the University nor the names of its contributors
  1053. // may be used to endorse or promote products derived from this software
  1054. // without specific prior written permission.
  1055. //
  1056. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1057. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1058. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1059. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1060. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1061. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1062. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1063. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1064. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1065. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1066. // SUCH DAMAGE.
  1067. //
  1068. // @(#)time.h 5.12 (Berkeley) 3/9/91
  1069. // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  1070. // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  1071. // Copyright (c) 1991, 1993
  1072. // The Regents of the University of California. All rights reserved.
  1073. //
  1074. // This code is derived from software contributed to Berkeley by
  1075. // Berkeley Software Design, Inc.
  1076. //
  1077. // Redistribution and use in source and binary forms, with or without
  1078. // modification, are permitted provided that the following conditions
  1079. // are met:
  1080. // 1. Redistributions of source code must retain the above copyright
  1081. // notice, this list of conditions and the following disclaimer.
  1082. // 2. Redistributions in binary form must reproduce the above copyright
  1083. // notice, this list of conditions and the following disclaimer in the
  1084. // documentation and/or other materials provided with the distribution.
  1085. // 3. Neither the name of the University nor the names of its contributors
  1086. // may be used to endorse or promote products derived from this software
  1087. // without specific prior written permission.
  1088. //
  1089. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1090. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1091. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1092. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1093. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1094. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1095. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1096. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1097. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1098. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1099. // SUCH DAMAGE.
  1100. //
  1101. // @(#)cdefs.h 8.7 (Berkeley) 1/21/94
  1102. // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $
  1103. // Written by Todd C. Miller, September 9, 2016
  1104. // Public domain.
  1105. // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  1106. // -
  1107. // Copyright (c) 1990, 1993
  1108. // The Regents of the University of California. All rights reserved.
  1109. //
  1110. // Redistribution and use in source and binary forms, with or without
  1111. // modification, are permitted provided that the following conditions
  1112. // are met:
  1113. // 1. Redistributions of source code must retain the above copyright
  1114. // notice, this list of conditions and the following disclaimer.
  1115. // 2. Redistributions in binary form must reproduce the above copyright
  1116. // notice, this list of conditions and the following disclaimer in the
  1117. // documentation and/or other materials provided with the distribution.
  1118. // 3. Neither the name of the University nor the names of its contributors
  1119. // may be used to endorse or promote products derived from this software
  1120. // without specific prior written permission.
  1121. //
  1122. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1123. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1124. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1125. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1126. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1127. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1128. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1129. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1130. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1131. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1132. // SUCH DAMAGE.
  1133. //
  1134. // @(#)types.h 8.3 (Berkeley) 1/5/94
  1135. // Frequency of the clock ticks reported by times(). Deprecated - use
  1136. // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.)
  1137. // $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $
  1138. // Copyright (c) 1982, 1986, 1993
  1139. // The Regents of the University of California. All rights reserved.
  1140. //
  1141. // Redistribution and use in source and binary forms, with or without
  1142. // modification, are permitted provided that the following conditions
  1143. // are met:
  1144. // 1. Redistributions of source code must retain the above copyright
  1145. // notice, this list of conditions and the following disclaimer.
  1146. // 2. Redistributions in binary form must reproduce the above copyright
  1147. // notice, this list of conditions and the following disclaimer in the
  1148. // documentation and/or other materials provided with the distribution.
  1149. // 3. Neither the name of the University nor the names of its contributors
  1150. // may be used to endorse or promote products derived from this software
  1151. // without specific prior written permission.
  1152. //
  1153. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1154. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1155. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1156. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1157. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1158. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1159. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1160. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1161. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1162. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1163. // SUCH DAMAGE.
  1164. // Per-process and per-thread clocks encode the PID or TID into the
  1165. // high bits, with the type in the bottom bits
  1166. // Structure defined by POSIX 1003.1b to be like a itimerval,
  1167. // but with timespecs. Used in the timer_*() system calls.
  1168. type Itimerspec = struct {
  1169. Fit_interval struct {
  1170. Ftv_sec Time_t
  1171. Ftv_nsec int64
  1172. }
  1173. Fit_value struct {
  1174. Ftv_sec Time_t
  1175. Ftv_nsec int64
  1176. }
  1177. } /* _time.h:56:1 */
  1178. type Locale_t = uintptr /* time.h:107:14 */
  1179. type Tm = struct {
  1180. Ftm_sec int32
  1181. Ftm_min int32
  1182. Ftm_hour int32
  1183. Ftm_mday int32
  1184. Ftm_mon int32
  1185. Ftm_year int32
  1186. Ftm_wday int32
  1187. Ftm_yday int32
  1188. Ftm_isdst int32
  1189. F__ccgo_pad1 [4]byte
  1190. Ftm_gmtoff int64
  1191. Ftm_zone uintptr
  1192. } /* time.h:111:1 */
  1193. type Siginfo_t = struct {
  1194. Fsi_signo int32
  1195. Fsi_code int32
  1196. Fsi_errno int32
  1197. F__ccgo_pad1 [4]byte
  1198. F_data struct {
  1199. F__ccgo_pad1 [0]uint64
  1200. F_pad [29]int32
  1201. F__ccgo_pad2 [4]byte
  1202. }
  1203. } /* siginfo.h:173:3 */
  1204. // Signal vector "template" used in sigaction call.
  1205. type Sigaction = struct {
  1206. F__sigaction_u struct{ F__sa_handler uintptr }
  1207. Fsa_mask Sigset_t
  1208. Fsa_flags int32
  1209. } /* signal.h:112:1 */
  1210. // if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler.
  1211. // Flags for sigprocmask:
  1212. type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function
  1213. // 4.3 compatibility:
  1214. // Signal vector "template" used in sigvec call.
  1215. type Sigvec = struct {
  1216. Fsv_handler uintptr
  1217. Fsv_mask int32
  1218. Fsv_flags int32
  1219. } /* signal.h:152:1 */
  1220. // Macro for converting signal number to a mask suitable for
  1221. // sigblock().
  1222. // Structure used in sigaltstack call.
  1223. type Sigaltstack = struct {
  1224. Fss_sp uintptr
  1225. Fss_size Size_t
  1226. Fss_flags int32
  1227. F__ccgo_pad1 [4]byte
  1228. } /* signal.h:176:9 */
  1229. // Macro for converting signal number to a mask suitable for
  1230. // sigblock().
  1231. // Structure used in sigaltstack call.
  1232. type Stack_t = Sigaltstack /* signal.h:180:3 */
  1233. type Ucontext_t = Sigcontext /* signal.h:190:27 */
  1234. var _ int8 /* gen.c:2:13: */