termios_freebsd_386.go 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  1. // Code generated by 'ccgo termios/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 termios/termios_freebsd_386.go -pkgname termios', DO NOT EDIT.
  2. package termios
  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. ALTWERASE = 0x00000200 // _termios.h:171:1:
  15. B0 = 0 // _termios.h:186:1:
  16. B1000000 = 1000000 // _termios.h:213:1:
  17. B110 = 110 // _termios.h:189:1:
  18. B115200 = 115200 // _termios.h:208:1:
  19. B1200 = 1200 // _termios.h:195:1:
  20. B134 = 134 // _termios.h:190:1:
  21. B14400 = 14400 // _termios.h:204:1:
  22. B150 = 150 // _termios.h:191:1:
  23. B1500000 = 1500000 // _termios.h:214:1:
  24. B1800 = 1800 // _termios.h:196:1:
  25. B19200 = 19200 // _termios.h:200:1:
  26. B200 = 200 // _termios.h:192:1:
  27. B2000000 = 2000000 // _termios.h:215:1:
  28. B230400 = 230400 // _termios.h:209:1:
  29. B2400 = 2400 // _termios.h:197:1:
  30. B2500000 = 2500000 // _termios.h:216:1:
  31. B28800 = 28800 // _termios.h:205:1:
  32. B300 = 300 // _termios.h:193:1:
  33. B3000000 = 3000000 // _termios.h:217:1:
  34. B3500000 = 3500000 // _termios.h:218:1:
  35. B38400 = 38400 // _termios.h:201:1:
  36. B4000000 = 4000000 // _termios.h:219:1:
  37. B460800 = 460800 // _termios.h:210:1:
  38. B4800 = 4800 // _termios.h:198:1:
  39. B50 = 50 // _termios.h:187:1:
  40. B500000 = 500000 // _termios.h:211:1:
  41. B57600 = 57600 // _termios.h:206:1:
  42. B600 = 600 // _termios.h:194:1:
  43. B7200 = 7200 // _termios.h:203:1:
  44. B75 = 75 // _termios.h:188:1:
  45. B76800 = 76800 // _termios.h:207:1:
  46. B921600 = 921600 // _termios.h:212:1:
  47. B9600 = 9600 // _termios.h:199:1:
  48. BRKINT = 0x00000002 // _termios.h:86:1:
  49. CBRK = 255 // ttydefaults.h:89:1:
  50. CCAR_OFLOW = 0x00100000 // _termios.h:145:1:
  51. CCTS_OFLOW = 0x00010000 // _termios.h:140:1:
  52. CDISCARD = 15 // ttydefaults.h:84:1:
  53. CDSR_OFLOW = 0x00080000 // _termios.h:144:1:
  54. CDSUSP = 25 // ttydefaults.h:80:1:
  55. CDTR_IFLOW = 0x00040000 // _termios.h:143:1:
  56. CEOF = 4 // ttydefaults.h:69:1:
  57. CEOL = 0xff // ttydefaults.h:70:1:
  58. CEOT = 4 // ttydefaults.h:87:1:
  59. CERASE = 127 // ttydefaults.h:71:1:
  60. CERASE2 = 8 // ttydefaults.h:72:1:
  61. CFLUSH = 15 // ttydefaults.h:91:1:
  62. CIGNORE = 0x00000001 // _termios.h:126:1:
  63. CINTR = 3 // ttydefaults.h:73:1:
  64. CKILL = 21 // ttydefaults.h:75:1:
  65. CLNEXT = 22 // ttydefaults.h:83:1:
  66. CLOCAL = 0x00008000 // _termios.h:138:1:
  67. CMIN = 1 // ttydefaults.h:76:1:
  68. CNO_RTSDTR = 0x00200000 // _termios.h:146:1:
  69. CQUIT = 28 // ttydefaults.h:77:1:
  70. CREAD = 0x00000800 // _termios.h:134:1:
  71. CREPRINT = 18 // ttydefaults.h:86:1:
  72. CRPRNT = 18 // ttydefaults.h:90:1:
  73. CRTSCTS = 196608 // _termios.h:141:1:
  74. CRTS_IFLOW = 0x00020000 // _termios.h:142:1:
  75. CS5 = 0x00000000 // _termios.h:129:1:
  76. CS6 = 0x00000100 // _termios.h:130:1:
  77. CS7 = 0x00000200 // _termios.h:131:1:
  78. CS8 = 0x00000300 // _termios.h:132:1:
  79. CSIZE = 0x00000300 // _termios.h:128:1:
  80. CSTART = 17 // ttydefaults.h:81:1:
  81. CSTATUS = 20 // ttydefaults.h:74:1:
  82. CSTOP = 19 // ttydefaults.h:82:1:
  83. CSTOPB = 0x00000400 // _termios.h:133:1:
  84. CSUSP = 26 // ttydefaults.h:78:1:
  85. CTIME = 0 // ttydefaults.h:79:1:
  86. CWERASE = 23 // ttydefaults.h:85:1:
  87. ECHO = 0x00000008 // _termios.h:162:1:
  88. ECHOCTL = 0x00000040 // _termios.h:166:1:
  89. ECHOE = 0x00000002 // _termios.h:160:1:
  90. ECHOK = 0x00000004 // _termios.h:161:1:
  91. ECHOKE = 0x00000001 // _termios.h:158:1:
  92. ECHONL = 0x00000010 // _termios.h:163:1:
  93. ECHOPRT = 0x00000020 // _termios.h:165:1:
  94. EXTA = 19200 // _termios.h:220:1:
  95. EXTB = 38400 // _termios.h:221:1:
  96. EXTPROC = 0x00000800 // _termios.h:174:1:
  97. FLUSHO = 0x00800000 // _termios.h:177:1:
  98. H4DISC = 7 // ttycom.h:135:1:
  99. HUPCL = 0x00004000 // _termios.h:137:1:
  100. ICANON = 0x00000100 // _termios.h:169:1:
  101. ICRNL = 0x00000100 // _termios.h:93:1:
  102. IEXTEN = 0x00000400 // _termios.h:173:1:
  103. IGNBRK = 0x00000001 // _termios.h:85:1:
  104. IGNCR = 0x00000080 // _termios.h:92:1:
  105. IGNPAR = 0x00000004 // _termios.h:87:1:
  106. IMAXBEL = 0x00002000 // _termios.h:100:1:
  107. INLCR = 0x00000040 // _termios.h:91:1:
  108. INPCK = 0x00000010 // _termios.h:89:1:
  109. IOCPARM_MASK = 8191 // ioccom.h:49:1:
  110. IOCPARM_MAX = 8192 // ioccom.h:54:1:
  111. IOCPARM_SHIFT = 13 // ioccom.h:48:1:
  112. IOC_DIRMASK = 3758096384 // ioccom.h:60:1:
  113. IOC_IN = 0x80000000 // ioccom.h:58:1:
  114. IOC_INOUT = 3221225472 // ioccom.h:59:1:
  115. IOC_OUT = 0x40000000 // ioccom.h:57:1:
  116. IOC_VOID = 0x20000000 // ioccom.h:56:1:
  117. ISIG = 0x00000080 // _termios.h:168:1:
  118. ISTRIP = 0x00000020 // _termios.h:90:1:
  119. IXANY = 0x00000800 // _termios.h:97:1:
  120. IXOFF = 0x00000400 // _termios.h:95:1:
  121. IXON = 0x00000200 // _termios.h:94:1:
  122. MDMBUF = 1048576 // termios.h:52:1:
  123. NCCS = 20 // _termios.h:78:1:
  124. NETGRAPHDISC = 6 // ttycom.h:134:1:
  125. NOFLSH = 0x80000000 // _termios.h:181:1:
  126. NOKERNINFO = 0x02000000 // _termios.h:178:1:
  127. OCRNL = 0x00000010 // _termios.h:117:1:
  128. ONLCR = 0x00000002 // _termios.h:108:1:
  129. ONLRET = 0x00000040 // _termios.h:119:1:
  130. ONOCR = 0x00000020 // _termios.h:118:1:
  131. ONOEOT = 0x00000008 // _termios.h:114:1:
  132. OPOST = 0x00000001 // _termios.h:106:1:
  133. OXTABS = 4 // termios.h:51:1:
  134. PARENB = 0x00001000 // _termios.h:135:1:
  135. PARMRK = 0x00000008 // _termios.h:88:1:
  136. PARODD = 0x00002000 // _termios.h:136:1:
  137. PENDIN = 0x20000000 // _termios.h:179:1:
  138. PPPDISC = 5 // ttycom.h:133:1:
  139. SLIPDISC = 4 // ttycom.h:132:1:
  140. TAB0 = 0x00000000 // _termios.h:112:1:
  141. TAB3 = 0x00000004 // _termios.h:113:1:
  142. TABDLY = 0x00000004 // _termios.h:111:1:
  143. TCIFLUSH = 1 // termios.h:69:1:
  144. TCIOFF = 3 // termios.h:74:1:
  145. TCIOFLUSH = 3 // termios.h:71:1:
  146. TCION = 4 // termios.h:75:1:
  147. TCOFLUSH = 2 // termios.h:70:1:
  148. TCOOFF = 1 // termios.h:72:1:
  149. TCOON = 2 // termios.h:73:1:
  150. TCSADRAIN = 1 // termios.h:63:1:
  151. TCSAFLUSH = 2 // termios.h:64:1:
  152. TCSANOW = 0 // termios.h:62:1:
  153. TCSASOFT = 0x10 // termios.h:66:1:
  154. TIOCM_CAR = 64 // ttycom.h:103:1:
  155. TIOCM_CD = 64 // ttycom.h:102:1:
  156. TIOCM_CTS = 0040 // ttycom.h:98:1:
  157. TIOCM_DCD = 0100 // ttycom.h:99:1:
  158. TIOCM_DSR = 0400 // ttycom.h:101:1:
  159. TIOCM_DTR = 0002 // ttycom.h:94:1:
  160. TIOCM_LE = 0001 // ttycom.h:93:1:
  161. TIOCM_RI = 0200 // ttycom.h:100:1:
  162. TIOCM_RNG = 128 // ttycom.h:104:1:
  163. TIOCM_RTS = 0004 // ttycom.h:95:1:
  164. TIOCM_SR = 0020 // ttycom.h:97:1:
  165. TIOCM_ST = 0010 // ttycom.h:96:1:
  166. TIOCPKT_DATA = 0x00 // ttycom.h:111:1:
  167. TIOCPKT_DOSTOP = 0x20 // ttycom.h:117:1:
  168. TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:112:1:
  169. TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:113:1:
  170. TIOCPKT_IOCTL = 0x40 // ttycom.h:118:1:
  171. TIOCPKT_NOSTOP = 0x10 // ttycom.h:116:1:
  172. TIOCPKT_START = 0x08 // ttycom.h:115:1:
  173. TIOCPKT_STOP = 0x04 // ttycom.h:114:1:
  174. TOSTOP = 0x00400000 // _termios.h:175:1:
  175. TTYDEF_CFLAG = 19200 // ttydefaults.h:55:1:
  176. TTYDEF_IFLAG = 11010 // ttydefaults.h:49:1:
  177. TTYDEF_LFLAG = 1483 // ttydefaults.h:54:1:
  178. TTYDEF_LFLAG_ECHO = 1483 // ttydefaults.h:52:1:
  179. TTYDEF_LFLAG_NOECHO = 1408 // ttydefaults.h:51:1:
  180. TTYDEF_OFLAG = 3 // ttydefaults.h:50:1:
  181. TTYDEF_SPEED = 9600 // ttydefaults.h:56:1:
  182. TTYDISC = 0 // ttycom.h:131:1:
  183. VDISCARD = 15 // _termios.h:70:1:
  184. VDSUSP = 11 // _termios.h:64:1:
  185. VEOF = 0 // _termios.h:45:1:
  186. VEOL = 1 // _termios.h:46:1:
  187. VEOL2 = 2 // _termios.h:48:1:
  188. VERASE = 3 // _termios.h:50:1:
  189. VERASE2 = 7 // _termios.h:57:1:
  190. VINTR = 8 // _termios.h:60:1:
  191. VKILL = 5 // _termios.h:54:1:
  192. VLNEXT = 14 // _termios.h:69:1:
  193. VMIN = 16 // _termios.h:72:1:
  194. VQUIT = 9 // _termios.h:61:1:
  195. VREPRINT = 6 // _termios.h:56:1:
  196. VSTART = 12 // _termios.h:66:1:
  197. VSTATUS = 18 // _termios.h:75:1:
  198. VSTOP = 13 // _termios.h:67:1:
  199. VSUSP = 10 // _termios.h:62:1:
  200. VTIME = 17 // _termios.h:73:1:
  201. VWERASE = 4 // _termios.h:52:1:
  202. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  203. X_ILP32 = 1 // <predefined>:1:1:
  204. X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1:
  205. X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
  206. X_Nonnull = 0 // cdefs.h:790:1:
  207. X_Null_unspecified = 0 // cdefs.h:792:1:
  208. X_Nullable = 0 // cdefs.h:791:1:
  209. X_PID_T_DECLARED = 0 // termios.h:47:1:
  210. X_POSIX_VDISABLE = 0xff // _termios.h:80:1:
  211. X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
  212. X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1:
  213. X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1:
  214. X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1:
  215. X_SYS__TERMIOS_H_ = 0 // _termios.h:36:1:
  216. X_SYS__TYPES_H_ = 0 // _types.h:32:1:
  217. X_SYS__WINSIZE_H_ = 0 // _winsize.h:36:1:
  218. X_TERMIOS_H_ = 0 // termios.h:36:1:
  219. I386 = 1 // <predefined>:335:1:
  220. Unix = 1 // <predefined>:336:1:
  221. )
  222. type Ptrdiff_t = int32 /* <builtin>:3:26 */
  223. type Size_t = uint32 /* <builtin>:9:23 */
  224. type Wchar_t = int32 /* <builtin>:15:24 */
  225. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  226. type X__float128 = float64 /* <builtin>:47:21 */
  227. // -
  228. // SPDX-License-Identifier: BSD-3-Clause
  229. //
  230. // Copyright (c) 1988, 1989, 1993, 1994
  231. // The Regents of the University of California. All rights reserved.
  232. //
  233. // Redistribution and use in source and binary forms, with or without
  234. // modification, are permitted provided that the following conditions
  235. // are met:
  236. // 1. Redistributions of source code must retain the above copyright
  237. // notice, this list of conditions and the following disclaimer.
  238. // 2. Redistributions in binary form must reproduce the above copyright
  239. // notice, this list of conditions and the following disclaimer in the
  240. // documentation and/or other materials provided with the distribution.
  241. // 3. Neither the name of the University nor the names of its contributors
  242. // may be used to endorse or promote products derived from this software
  243. // without specific prior written permission.
  244. //
  245. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  246. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  247. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  248. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  249. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  250. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  251. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  252. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  253. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  254. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  255. // SUCH DAMAGE.
  256. //
  257. // @(#)termios.h 8.3 (Berkeley) 3/28/94
  258. // $FreeBSD$
  259. // -
  260. // SPDX-License-Identifier: BSD-3-Clause
  261. //
  262. // Copyright (c) 1991, 1993
  263. // The Regents of the University of California. All rights reserved.
  264. //
  265. // This code is derived from software contributed to Berkeley by
  266. // Berkeley Software Design, Inc.
  267. //
  268. // Redistribution and use in source and binary forms, with or without
  269. // modification, are permitted provided that the following conditions
  270. // are met:
  271. // 1. Redistributions of source code must retain the above copyright
  272. // notice, this list of conditions and the following disclaimer.
  273. // 2. Redistributions in binary form must reproduce the above copyright
  274. // notice, this list of conditions and the following disclaimer in the
  275. // documentation and/or other materials provided with the distribution.
  276. // 3. Neither the name of the University nor the names of its contributors
  277. // may be used to endorse or promote products derived from this software
  278. // without specific prior written permission.
  279. //
  280. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  281. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  282. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  283. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  284. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  285. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  286. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  287. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  288. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  289. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  290. // SUCH DAMAGE.
  291. //
  292. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  293. // $FreeBSD$
  294. // Testing against Clang-specific extensions.
  295. // This code has been put in place to help reduce the addition of
  296. // compiler specific defines in FreeBSD code. It helps to aid in
  297. // having a compiler-agnostic source tree.
  298. // Compiler memory barriers, specific to gcc and clang.
  299. // XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
  300. // Macro to test if we're using a specific version of gcc or later.
  301. // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  302. // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  303. // The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
  304. // mode -- there must be no spaces between its arguments, and for nested
  305. // __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
  306. // concatenate double-quoted strings produced by the __STRING macro, but
  307. // this only works with ANSI C.
  308. //
  309. // __XSTRING is like __STRING, but it expands any macros in its argument
  310. // first. It is only available with ANSI C.
  311. // Compiler-dependent macros to help declare dead (non-returning) and
  312. // pure (no side effects) functions, and unused variables. They are
  313. // null except for versions of gcc that are known to support the features
  314. // properly (old versions of gcc-2 supported the dead and pure features
  315. // in a different (wrong) way). If we do not provide an implementation
  316. // for a given compiler, let the compile fail if it is told to use
  317. // a feature that we cannot live without.
  318. // Keywords added in C11.
  319. // Emulation of C11 _Generic(). Unlike the previously defined C11
  320. // keywords, it is not possible to implement this using exactly the same
  321. // syntax. Therefore implement something similar under the name
  322. // __generic(). Unlike _Generic(), this macro can only distinguish
  323. // between a single type, so it requires nested invocations to
  324. // distinguish multiple cases.
  325. // C99 Static array indices in function parameter declarations. Syntax such as:
  326. // void bar(int myArray[static 10]);
  327. // is allowed in C99 but not in C++. Define __min_size appropriately so
  328. // headers using it can be compiled in either language. Use like this:
  329. // void bar(int myArray[__min_size(10)]);
  330. // XXX: should use `#if __STDC_VERSION__ < 199901'.
  331. // C++11 exposes a load of C99 stuff
  332. // GCC 2.95 provides `__restrict' as an extension to C90 to support the
  333. // C99-specific `restrict' type qualifier. We happen to use `__restrict' as
  334. // a way to define the `restrict' type qualifier without disturbing older
  335. // software that is unaware of C99 keywords.
  336. // GNU C version 2.96 adds explicit branch prediction so that
  337. // the CPU back-end can hint the processor and also so that
  338. // code blocks can be reordered such that the predicted path
  339. // sees a more linear flow, thus improving cache behavior, etc.
  340. //
  341. // The following two macros provide us with a way to utilize this
  342. // compiler feature. Use __predict_true() if you expect the expression
  343. // to evaluate to true, and __predict_false() if you expect the
  344. // expression to evaluate to false.
  345. //
  346. // A few notes about usage:
  347. //
  348. // * Generally, __predict_false() error condition checks (unless
  349. // you have some _strong_ reason to do otherwise, in which case
  350. // document it), and/or __predict_true() `no-error' condition
  351. // checks, assuming you want to optimize for the no-error case.
  352. //
  353. // * Other than that, if you don't know the likelihood of a test
  354. // succeeding from empirical or other `hard' evidence, don't
  355. // make predictions.
  356. //
  357. // * These are meant to be used in places that are run `a lot'.
  358. // It is wasteful to make predictions in code that is run
  359. // seldomly (e.g. at subsystem initialization time) as the
  360. // basic block reordering that this affects can often generate
  361. // larger code.
  362. // We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
  363. // require it.
  364. // Given the pointer x to the member m of the struct s, return
  365. // a pointer to the containing structure. When using GCC, we first
  366. // assign pointer x to a local variable, to check that its type is
  367. // compatible with member m.
  368. // Compiler-dependent macros to declare that functions take printf-like
  369. // or scanf-like arguments. They are null except for versions of gcc
  370. // that are known to support the features properly (old versions of gcc-2
  371. // didn't permit keeping the keywords out of the application namespace).
  372. // Compiler-dependent macros that rely on FreeBSD-specific extensions.
  373. // Embed the rcs id of a source file in the resulting library. Note that in
  374. // more recent ELF binutils, we use .ident allowing the ID to be stripped.
  375. // Usage:
  376. // __FBSDID("$FreeBSD$");
  377. // -
  378. // The following definitions are an extension of the behavior originally
  379. // implemented in <sys/_posix.h>, but with a different level of granularity.
  380. // POSIX.1 requires that the macros we test be defined before any standard
  381. // header file is included.
  382. //
  383. // Here's a quick run-down of the versions:
  384. // defined(_POSIX_SOURCE) 1003.1-1988
  385. // _POSIX_C_SOURCE == 1 1003.1-1990
  386. // _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
  387. // _POSIX_C_SOURCE == 199309 1003.1b-1993
  388. // _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
  389. // and the omnibus ISO/IEC 9945-1: 1996
  390. // _POSIX_C_SOURCE == 200112 1003.1-2001
  391. // _POSIX_C_SOURCE == 200809 1003.1-2008
  392. //
  393. // In addition, the X/Open Portability Guide, which is now the Single UNIX
  394. // Specification, defines a feature-test macro which indicates the version of
  395. // that specification, and which subsumes _POSIX_C_SOURCE.
  396. //
  397. // Our macros begin with two underscores to avoid namespace screwage.
  398. // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
  399. // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
  400. // Deal with various X/Open Portability Guides and Single UNIX Spec.
  401. // Deal with all versions of POSIX. The ordering relative to the tests above is
  402. // important.
  403. // -
  404. // Deal with _ANSI_SOURCE:
  405. // If it is defined, and no other compilation environment is explicitly
  406. // requested, then define our internal feature-test macros to zero. This
  407. // makes no difference to the preprocessor (undefined symbols in preprocessing
  408. // expressions are defined to have value zero), but makes it more convenient for
  409. // a test program to print out the values.
  410. //
  411. // If a program mistakenly defines _ANSI_SOURCE and some other macro such as
  412. // _POSIX_C_SOURCE, we will assume that it wants the broader compilation
  413. // environment (and in fact we will never get here).
  414. // User override __EXT1_VISIBLE
  415. // Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
  416. // translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
  417. // Nullability qualifiers: currently only supported by Clang.
  418. // Type Safety Checking
  419. //
  420. // Clang provides additional attributes to enable checking type safety
  421. // properties that cannot be enforced by the C type system.
  422. // Lock annotations.
  423. //
  424. // Clang provides support for doing basic thread-safety tests at
  425. // compile-time, by marking which locks will/should be held when
  426. // entering/leaving a functions.
  427. //
  428. // Furthermore, it is also possible to annotate variables and structure
  429. // members to enforce that they are only accessed when certain locks are
  430. // held.
  431. // Structure implements a lock.
  432. // Function acquires an exclusive or shared lock.
  433. // Function attempts to acquire an exclusive or shared lock.
  434. // Function releases a lock.
  435. // Function asserts that an exclusive or shared lock is held.
  436. // Function requires that an exclusive or shared lock is or is not held.
  437. // Function should not be analyzed.
  438. // Function or variable should not be sanitized, e.g., by AddressSanitizer.
  439. // GCC has the nosanitize attribute, but as a function attribute only, and
  440. // warns on use as a variable attribute.
  441. // Guard variables and structure members by lock.
  442. // Alignment builtins for better type checking and improved code generation.
  443. // Provide fallback versions for other compilers (GCC/Clang < 10):
  444. // -
  445. // SPDX-License-Identifier: BSD-3-Clause
  446. //
  447. // Copyright (c) 1988, 1989, 1993, 1994
  448. // The Regents of the University of California. All rights reserved.
  449. //
  450. // Redistribution and use in source and binary forms, with or without
  451. // modification, are permitted provided that the following conditions
  452. // are met:
  453. // 1. Redistributions of source code must retain the above copyright
  454. // notice, this list of conditions and the following disclaimer.
  455. // 2. Redistributions in binary form must reproduce the above copyright
  456. // notice, this list of conditions and the following disclaimer in the
  457. // documentation and/or other materials provided with the distribution.
  458. // 3. Neither the name of the University nor the names of its contributors
  459. // may be used to endorse or promote products derived from this software
  460. // without specific prior written permission.
  461. //
  462. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  463. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  464. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  465. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  466. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  467. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  468. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  469. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  470. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  471. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  472. // SUCH DAMAGE.
  473. //
  474. // @(#)termios.h 8.3 (Berkeley) 3/28/94
  475. // $FreeBSD$
  476. // Special Control Characters
  477. //
  478. // Index into c_cc[] character array.
  479. //
  480. // Name Subscript Enabled by
  481. // 7 ex-spare 1
  482. // 19 spare 2
  483. // Input flags - software input processing
  484. // Output flags - software output processing
  485. // Control flags - hardware control of terminal
  486. // "Local" flags - dumping ground for other state
  487. //
  488. // Warning: some flags in this structure begin with
  489. // the letter "I" and look like they belong in the
  490. // input flag.
  491. // Standard speeds
  492. type Tcflag_t = uint32 /* _termios.h:224:22 */
  493. type Cc_t = uint8 /* _termios.h:225:23 */
  494. type Speed_t = uint32 /* _termios.h:226:22 */
  495. type Termios = struct {
  496. Fc_iflag Tcflag_t
  497. Fc_oflag Tcflag_t
  498. Fc_cflag Tcflag_t
  499. Fc_lflag Tcflag_t
  500. Fc_cc [20]Cc_t
  501. Fc_ispeed Speed_t
  502. Fc_ospeed Speed_t
  503. } /* _termios.h:228:1 */
  504. // -
  505. // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  506. //
  507. // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  508. // All rights reserved.
  509. //
  510. // Redistribution and use in source and binary forms, with or without
  511. // modification, are permitted provided that the following conditions
  512. // are met:
  513. // 1. Redistributions of source code must retain the above copyright
  514. // notice, this list of conditions and the following disclaimer.
  515. // 2. Redistributions in binary form must reproduce the above copyright
  516. // notice, this list of conditions and the following disclaimer in the
  517. // documentation and/or other materials provided with the distribution.
  518. //
  519. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  520. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  521. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  522. // ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  523. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  524. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  525. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  526. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  527. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  528. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  529. // SUCH DAMAGE.
  530. //
  531. // $FreeBSD$
  532. // -
  533. // SPDX-License-Identifier: BSD-3-Clause
  534. //
  535. // Copyright (c) 1991, 1993
  536. // The Regents of the University of California. All rights reserved.
  537. //
  538. // This code is derived from software contributed to Berkeley by
  539. // Berkeley Software Design, Inc.
  540. //
  541. // Redistribution and use in source and binary forms, with or without
  542. // modification, are permitted provided that the following conditions
  543. // are met:
  544. // 1. Redistributions of source code must retain the above copyright
  545. // notice, this list of conditions and the following disclaimer.
  546. // 2. Redistributions in binary form must reproduce the above copyright
  547. // notice, this list of conditions and the following disclaimer in the
  548. // documentation and/or other materials provided with the distribution.
  549. // 3. Neither the name of the University nor the names of its contributors
  550. // may be used to endorse or promote products derived from this software
  551. // without specific prior written permission.
  552. //
  553. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  554. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  555. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  556. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  557. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  558. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  559. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  560. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  561. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  562. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  563. // SUCH DAMAGE.
  564. //
  565. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  566. // $FreeBSD$
  567. // -
  568. // This file is in the public domain.
  569. // $FreeBSD$
  570. // -
  571. // SPDX-License-Identifier: BSD-4-Clause
  572. //
  573. // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  574. // Copyright (c) 1990, 1993
  575. // The Regents of the University of California. All rights reserved.
  576. //
  577. // Redistribution and use in source and binary forms, with or without
  578. // modification, are permitted provided that the following conditions
  579. // are met:
  580. // 1. Redistributions of source code must retain the above copyright
  581. // notice, this list of conditions and the following disclaimer.
  582. // 2. Redistributions in binary form must reproduce the above copyright
  583. // notice, this list of conditions and the following disclaimer in the
  584. // documentation and/or other materials provided with the distribution.
  585. // 3. All advertising materials mentioning features or use of this software
  586. // must display the following acknowledgement:
  587. // This product includes software developed by the University of
  588. // California, Berkeley and its contributors.
  589. // 4. 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. // From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
  606. // From: @(#)types.h 8.3 (Berkeley) 1/5/94
  607. // $FreeBSD$
  608. // -
  609. // This file is in the public domain.
  610. // $FreeBSD$
  611. // -
  612. // SPDX-License-Identifier: BSD-3-Clause
  613. //
  614. // Copyright (c) 1988, 1993
  615. // The Regents of the University of California. All rights reserved.
  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. // @(#)limits.h 8.3 (Berkeley) 1/4/94
  642. // $FreeBSD$
  643. // According to ANSI (section 2.2.4.2), the values below must be usable by
  644. // #if preprocessing directives. Additionally, the expression must have the
  645. // same type as would an expression that is an object of the corresponding
  646. // type converted according to the integral promotions. The subtraction for
  647. // INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
  648. // unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
  649. // max value for an unsigned long long
  650. // Minimum signal stack size.
  651. // Basic types upon which most other types are built.
  652. type X__int8_t = int8 /* _types.h:55:22 */
  653. type X__uint8_t = uint8 /* _types.h:56:24 */
  654. type X__int16_t = int16 /* _types.h:57:17 */
  655. type X__uint16_t = uint16 /* _types.h:58:25 */
  656. type X__int32_t = int32 /* _types.h:59:15 */
  657. type X__uint32_t = uint32 /* _types.h:60:23 */
  658. type X__int64_t = int64 /* _types.h:66:20 */
  659. type X__uint64_t = uint64 /* _types.h:68:28 */
  660. // Standard type definitions.
  661. type X__clock_t = uint32 /* _types.h:84:23 */
  662. type X__critical_t = X__int32_t /* _types.h:85:19 */
  663. type X__double_t = float64 /* _types.h:87:21 */
  664. type X__float_t = float64 /* _types.h:88:21 */
  665. type X__intfptr_t = X__int32_t /* _types.h:90:19 */
  666. type X__intptr_t = X__int32_t /* _types.h:91:19 */
  667. type X__intmax_t = X__int64_t /* _types.h:93:19 */
  668. type X__int_fast8_t = X__int32_t /* _types.h:94:19 */
  669. type X__int_fast16_t = X__int32_t /* _types.h:95:19 */
  670. type X__int_fast32_t = X__int32_t /* _types.h:96:19 */
  671. type X__int_fast64_t = X__int64_t /* _types.h:97:19 */
  672. type X__int_least8_t = X__int8_t /* _types.h:98:18 */
  673. type X__int_least16_t = X__int16_t /* _types.h:99:19 */
  674. type X__int_least32_t = X__int32_t /* _types.h:100:19 */
  675. type X__int_least64_t = X__int64_t /* _types.h:101:19 */
  676. type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */
  677. type X__register_t = X__int32_t /* _types.h:113:19 */
  678. type X__segsz_t = X__int32_t /* _types.h:114:19 */
  679. type X__size_t = X__uint32_t /* _types.h:115:20 */
  680. type X__ssize_t = X__int32_t /* _types.h:116:19 */
  681. type X__time_t = X__int32_t /* _types.h:117:19 */
  682. type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */
  683. type X__uintptr_t = X__uint32_t /* _types.h:119:20 */
  684. type X__uintmax_t = X__uint64_t /* _types.h:121:20 */
  685. type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */
  686. type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */
  687. type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */
  688. type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */
  689. type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */
  690. type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
  691. type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
  692. type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
  693. type X__u_register_t = X__uint32_t /* _types.h:136:20 */
  694. type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */
  695. type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */
  696. type X__vm_size_t = X__uint32_t /* _types.h:139:20 */
  697. type X___wchar_t = int32 /* _types.h:141:14 */
  698. // Standard type definitions.
  699. type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
  700. type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
  701. type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
  702. type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
  703. type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
  704. type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
  705. type X__gid_t = X__uint32_t /* _types.h:46:20 */
  706. type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
  707. type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
  708. type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
  709. type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
  710. type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
  711. type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
  712. type X__nl_item = int32 /* _types.h:53:14 */
  713. type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
  714. type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
  715. type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
  716. type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
  717. type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
  718. // signed, because of legacy code
  719. // that uses -1 for RLIM_INFINITY
  720. type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
  721. type X__socklen_t = X__uint32_t /* _types.h:62:20 */
  722. type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed)
  723. type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
  724. type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
  725. type X__uid_t = X__uint32_t /* _types.h:66:20 */
  726. type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
  727. type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
  728. type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
  729. type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
  730. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
  731. // Unusual type definitions.
  732. // rune_t is declared to be an “int” instead of the more natural
  733. // “unsigned long” or “long”. Two things are happening here. It is not
  734. // unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
  735. // it looks like 10646 will be a 31 bit standard. This means that if your
  736. // ints cannot hold 32 bits, you will be in trouble. The reason an int was
  737. // chosen over a long is that the is*() and to*() routines take ints (says
  738. // ANSI C), but they use __ct_rune_t instead of int.
  739. //
  740. // NOTE: rune_t is not covered by ANSI nor other standards, and should not
  741. // be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
  742. // rune_t must be the same type. Also, wint_t should be able to hold all
  743. // members of the largest character set plus one extra value (WEOF), and
  744. // must be at least 16 bits.
  745. type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
  746. type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
  747. type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
  748. // Clang already provides these types as built-ins, but only in C++ mode.
  749. type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
  750. type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
  751. // In C++11, char16_t and char32_t are built-in types.
  752. type X__max_align_t = struct {
  753. F__max_align1 int64
  754. F__max_align2 float64
  755. } /* _types.h:111:3 */
  756. type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
  757. type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
  758. // mbstate_t is an opaque object to keep conversion state during multibyte
  759. // stream conversions.
  760. type X__mbstate_t = struct {
  761. F__ccgo_pad1 [0]uint32
  762. F__mbstate8 [128]int8
  763. } /* _types.h:124:3 */
  764. type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
  765. // Types for varargs. These are all provided by builtin types these
  766. // days, so centralize their definition.
  767. type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
  768. type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
  769. // When the following macro is defined, the system uses 64-bit inode numbers.
  770. // Programs can use this to avoid including <sys/param.h>, with its associated
  771. // namespace pollution.
  772. // -
  773. // SPDX-License-Identifier: BSD-3-Clause
  774. //
  775. // Copyright (c) 1988, 1989, 1993, 1994
  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. // @(#)ttycom.h 8.1 (Berkeley) 3/28/94
  803. // $FreeBSD$
  804. // Window/terminal size structure. This information is stored by the kernel
  805. // in order to provide a consistent interface, but is not used by the kernel.
  806. type Winsize = struct {
  807. Fws_row uint16
  808. Fws_col uint16
  809. Fws_xpixel uint16
  810. Fws_ypixel uint16
  811. } /* _winsize.h:42:1 */
  812. type Pid_t = X__pid_t /* termios.h:46:18 */
  813. // -
  814. // SPDX-License-Identifier: BSD-3-Clause
  815. //
  816. // Copyright (c) 1988, 1989, 1993, 1994
  817. // The Regents of the University of California. All rights reserved.
  818. //
  819. // Redistribution and use in source and binary forms, with or without
  820. // modification, are permitted provided that the following conditions
  821. // are met:
  822. // 1. Redistributions of source code must retain the above copyright
  823. // notice, this list of conditions and the following disclaimer.
  824. // 2. Redistributions in binary form must reproduce the above copyright
  825. // notice, this list of conditions and the following disclaimer in the
  826. // documentation and/or other materials provided with the distribution.
  827. // 3. Neither the name of the University nor the names of its contributors
  828. // may be used to endorse or promote products derived from this software
  829. // without specific prior written permission.
  830. //
  831. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  832. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  833. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  834. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  835. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  836. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  837. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  838. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  839. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  840. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  841. // SUCH DAMAGE.
  842. //
  843. // @(#)ttycom.h 8.1 (Berkeley) 3/28/94
  844. // $FreeBSD$
  845. // Tty ioctl's except for those supported only for backwards compatibility
  846. // with the old tty driver.
  847. // 0-2 compat
  848. // 3-7 unused
  849. // 8-10 compat
  850. // 11-12 unused
  851. // 17-18 compat
  852. // 23-25 unused
  853. // 29-85 unused
  854. // 88 unused
  855. // 89-91 conflicts: tun and tap
  856. // 92-93 tun and tap
  857. // 94-97 conflicts: tun and tap
  858. // 100 unused
  859. // 105 unused
  860. // 116-117 compat
  861. // 124-127 compat
  862. // -
  863. // SPDX-License-Identifier: BSD-3-Clause
  864. //
  865. // Copyright (c) 1982, 1986, 1993
  866. // The Regents of the University of California. All rights reserved.
  867. // (c) UNIX System Laboratories, Inc.
  868. // All or some portions of this file are derived from material licensed
  869. // to the University of California by American Telephone and Telegraph
  870. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  871. // the permission of UNIX System Laboratories, Inc.
  872. //
  873. // Redistribution and use in source and binary forms, with or without
  874. // modification, are permitted provided that the following conditions
  875. // are met:
  876. // 1. Redistributions of source code must retain the above copyright
  877. // notice, this list of conditions and the following disclaimer.
  878. // 2. Redistributions in binary form must reproduce the above copyright
  879. // notice, this list of conditions and the following disclaimer in the
  880. // documentation and/or other materials provided with the distribution.
  881. // 3. Neither the name of the University nor the names of its contributors
  882. // may be used to endorse or promote products derived from this software
  883. // without specific prior written permission.
  884. //
  885. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  886. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  887. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  888. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  889. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  890. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  891. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  892. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  893. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  894. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  895. // SUCH DAMAGE.
  896. //
  897. // @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
  898. // $FreeBSD$
  899. // System wide defaults for terminal state.
  900. // Defaults on "first" open.
  901. // Control Character Defaults
  902. // XXX: A lot of code uses lowercase characters, but control-character
  903. // conversion is actually only valid when applied to uppercase
  904. // characters. We just treat lowercase characters as if they were
  905. // inserted as uppercase.
  906. // compat
  907. // PROTECTED INCLUSION ENDS HERE
  908. // #define TTYDEFCHARS to include an array of default control characters.
  909. var _ int8 /* gen.c:2:13: */