termios_linux_386.go 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007
  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 -o termios/termios_linux_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. B0 = 0000000
  15. B1000000 = 0010010
  16. B110 = 0000003
  17. B115200 = 0010002
  18. B1152000 = 0010011
  19. B1200 = 0000011
  20. B134 = 0000004
  21. B150 = 0000005
  22. B1500000 = 0010012
  23. B1800 = 0000012
  24. B19200 = 0000016
  25. B200 = 0000006
  26. B2000000 = 0010013
  27. B230400 = 0010003
  28. B2400 = 0000013
  29. B2500000 = 0010014
  30. B300 = 0000007
  31. B3000000 = 0010015
  32. B3500000 = 0010016
  33. B38400 = 0000017
  34. B4000000 = 0010017
  35. B460800 = 0010004
  36. B4800 = 0000014
  37. B50 = 0000001
  38. B500000 = 0010005
  39. B57600 = 0010001
  40. B576000 = 0010006
  41. B600 = 0000010
  42. B75 = 0000002
  43. B921600 = 0010007
  44. B9600 = 0000015
  45. BRKINT = 0000002
  46. BS0 = 0000000
  47. BS1 = 0020000
  48. BSDLY = 0020000
  49. CBAUD = 000000010017
  50. CBAUDEX = 000000010000
  51. CBRK = 0
  52. CDISCARD = 15
  53. CDSUSP = 25
  54. CEOF = 4
  55. CEOL = 0
  56. CEOT = 4
  57. CERASE = 0177
  58. CFLUSH = 15
  59. CIBAUD = 002003600000
  60. CINTR = 3
  61. CKILL = 21
  62. CLNEXT = 22
  63. CLOCAL = 0004000
  64. CMIN = 1
  65. CMSPAR = 010000000000
  66. CQUIT = 034
  67. CR0 = 0000000
  68. CR1 = 0001000
  69. CR2 = 0002000
  70. CR3 = 0003000
  71. CRDLY = 0003000
  72. CREAD = 0000200
  73. CREPRINT = 18
  74. CRPRNT = 18
  75. CRTSCTS = 020000000000
  76. CS5 = 0000000
  77. CS6 = 0000020
  78. CS7 = 0000040
  79. CS8 = 0000060
  80. CSIZE = 0000060
  81. CSTART = 17
  82. CSTATUS = 0
  83. CSTOP = 19
  84. CSTOPB = 0000100
  85. CSUSP = 26
  86. CTIME = 0
  87. CWERASE = 23
  88. ECHO = 0000010
  89. ECHOCTL = 0001000
  90. ECHOE = 0000020
  91. ECHOK = 0000040
  92. ECHOKE = 0004000
  93. ECHONL = 0000100
  94. ECHOPRT = 0002000
  95. EXTA = 14
  96. EXTB = 15
  97. EXTPROC = 0200000
  98. FF0 = 0000000
  99. FF1 = 0100000
  100. FFDLY = 0100000
  101. FLUSHO = 0010000
  102. HUPCL = 0002000
  103. ICANON = 0000002
  104. ICRNL = 0000400
  105. IEXTEN = 0100000
  106. IGNBRK = 0000001
  107. IGNCR = 0000200
  108. IGNPAR = 0000004
  109. IMAXBEL = 0020000
  110. INLCR = 0000100
  111. INPCK = 0000020
  112. ISIG = 0000001
  113. ISTRIP = 0000040
  114. IUCLC = 0001000
  115. IUTF8 = 0040000
  116. IXANY = 0004000
  117. IXOFF = 0010000
  118. IXON = 0002000
  119. NCCS = 32
  120. NL0 = 0000000
  121. NL1 = 0000400
  122. NLDLY = 0000400
  123. NOFLSH = 0000200
  124. OCRNL = 0000010
  125. OFDEL = 0000200
  126. OFILL = 0000100
  127. OLCUC = 0000002
  128. ONLCR = 0000004
  129. ONLRET = 0000040
  130. ONOCR = 0000020
  131. OPOST = 0000001
  132. PARENB = 0000400
  133. PARMRK = 0000010
  134. PARODD = 0001000
  135. PENDIN = 0040000
  136. TAB0 = 0000000
  137. TAB1 = 0004000
  138. TAB2 = 0010000
  139. TAB3 = 0014000
  140. TABDLY = 0014000
  141. TCIFLUSH = 0
  142. TCIOFF = 2
  143. TCIOFLUSH = 2
  144. TCION = 3
  145. TCOFLUSH = 1
  146. TCOOFF = 0
  147. TCOON = 1
  148. TCSADRAIN = 1
  149. TCSAFLUSH = 2
  150. TCSANOW = 0
  151. TIOCSER_TEMT = 0x01
  152. TOSTOP = 0000400
  153. TTYDEF_CFLAG = 1440
  154. TTYDEF_IFLAG = 11554
  155. TTYDEF_LFLAG = 35355
  156. TTYDEF_OFLAG = 6149
  157. TTYDEF_SPEED = 13
  158. VDISCARD = 13
  159. VEOF = 4
  160. VEOL = 11
  161. VEOL2 = 16
  162. VERASE = 2
  163. VINTR = 0
  164. VKILL = 3
  165. VLNEXT = 15
  166. VMIN = 6
  167. VQUIT = 1
  168. VREPRINT = 12
  169. VSTART = 8
  170. VSTOP = 9
  171. VSUSP = 10
  172. VSWTC = 7
  173. VT0 = 0000000
  174. VT1 = 0040000
  175. VTDLY = 0040000
  176. VTIME = 5
  177. VWERASE = 14
  178. XCASE = 0000004
  179. XTABS = 0014000
  180. X_ATFILE_SOURCE = 1
  181. X_BITS_TIME64_H = 1
  182. X_BITS_TYPESIZES_H = 1
  183. X_BITS_TYPES_H = 1
  184. X_DEFAULT_SOURCE = 1
  185. X_FEATURES_H = 1
  186. X_FILE_OFFSET_BITS = 64
  187. X_HAVE_STRUCT_TERMIOS_C_ISPEED = 1
  188. X_HAVE_STRUCT_TERMIOS_C_OSPEED = 1
  189. X_ILP32 = 1
  190. X_POSIX_C_SOURCE = 200809
  191. X_POSIX_SOURCE = 1
  192. X_STDC_PREDEF_H = 1
  193. X_SYS_CDEFS_H = 1
  194. X_SYS_TTYDEFAULTS_H_ = 0
  195. X_TERMIOS_H = 1
  196. I386 = 1
  197. Linux = 1
  198. Unix = 1
  199. )
  200. type Ptrdiff_t = int32 /* <builtin>:3:26 */
  201. type Size_t = uint32 /* <builtin>:9:23 */
  202. type Wchar_t = int32 /* <builtin>:15:24 */
  203. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  204. type X__float128 = float64 /* <builtin>:47:21 */
  205. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  206. // This file is part of the GNU C Library.
  207. //
  208. // The GNU C Library is free software; you can redistribute it and/or
  209. // modify it under the terms of the GNU Lesser General Public
  210. // License as published by the Free Software Foundation; either
  211. // version 2.1 of the License, or (at your option) any later version.
  212. //
  213. // The GNU C Library is distributed in the hope that it will be useful,
  214. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  215. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  216. // Lesser General Public License for more details.
  217. //
  218. // You should have received a copy of the GNU Lesser General Public
  219. // License along with the GNU C Library; if not, see
  220. // <https://www.gnu.org/licenses/>.
  221. // POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
  222. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  223. // This file is part of the GNU C Library.
  224. //
  225. // The GNU C Library is free software; you can redistribute it and/or
  226. // modify it under the terms of the GNU Lesser General Public
  227. // License as published by the Free Software Foundation; either
  228. // version 2.1 of the License, or (at your option) any later version.
  229. //
  230. // The GNU C Library is distributed in the hope that it will be useful,
  231. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  232. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  233. // Lesser General Public License for more details.
  234. //
  235. // You should have received a copy of the GNU Lesser General Public
  236. // License along with the GNU C Library; if not, see
  237. // <https://www.gnu.org/licenses/>.
  238. // These are defined by the user (or the compiler)
  239. // to specify the desired environment:
  240. //
  241. // __STRICT_ANSI__ ISO Standard C.
  242. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  243. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  244. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  245. // __STDC_WANT_LIB_EXT2__
  246. // Extensions to ISO C99 from TR 27431-2:2010.
  247. // __STDC_WANT_IEC_60559_BFP_EXT__
  248. // Extensions to ISO C11 from TS 18661-1:2014.
  249. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  250. // Extensions to ISO C11 from TS 18661-4:2015.
  251. // __STDC_WANT_IEC_60559_TYPES_EXT__
  252. // Extensions to ISO C11 from TS 18661-3:2015.
  253. //
  254. // _POSIX_SOURCE IEEE Std 1003.1.
  255. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  256. // if >=199309L, add IEEE Std 1003.1b-1993;
  257. // if >=199506L, add IEEE Std 1003.1c-1995;
  258. // if >=200112L, all of IEEE 1003.1-2004
  259. // if >=200809L, all of IEEE 1003.1-2008
  260. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  261. // Single Unix conformance is wanted, to 600 for the
  262. // sixth revision, to 700 for the seventh revision.
  263. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  264. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  265. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  266. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  267. // _ATFILE_SOURCE Additional *at interfaces.
  268. // _GNU_SOURCE All of the above, plus GNU extensions.
  269. // _DEFAULT_SOURCE The default set of features (taking precedence over
  270. // __STRICT_ANSI__).
  271. //
  272. // _FORTIFY_SOURCE Add security hardening to many library functions.
  273. // Set to 1 or 2; 2 performs stricter checks than 1.
  274. //
  275. // _REENTRANT, _THREAD_SAFE
  276. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  277. //
  278. // The `-ansi' switch to the GNU C compiler, and standards conformance
  279. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  280. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  281. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  282. // 200809L, as well as enabling miscellaneous functions from BSD and
  283. // SVID. If more than one of these are defined, they accumulate. For
  284. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  285. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  286. //
  287. // These are defined by this file and are used by the
  288. // header files to decide what to declare or define:
  289. //
  290. // __GLIBC_USE (F) Define things from feature set F. This is defined
  291. // to 1 or 0; the subsequent macros are either defined
  292. // or undefined, and those tests should be moved to
  293. // __GLIBC_USE.
  294. // __USE_ISOC11 Define ISO C11 things.
  295. // __USE_ISOC99 Define ISO C99 things.
  296. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  297. // __USE_ISOCXX11 Define ISO C++11 things.
  298. // __USE_POSIX Define IEEE Std 1003.1 things.
  299. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  300. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  301. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  302. // __USE_XOPEN Define XPG things.
  303. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  304. // __USE_UNIX98 Define Single Unix V2 things.
  305. // __USE_XOPEN2K Define XPG6 things.
  306. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  307. // __USE_XOPEN2K8 Define XPG7 things.
  308. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  309. // __USE_LARGEFILE Define correct standard I/O things.
  310. // __USE_LARGEFILE64 Define LFS things with separate names.
  311. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  312. // __USE_MISC Define things from 4.3BSD or System V Unix.
  313. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  314. // __USE_GNU Define GNU extensions.
  315. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  316. //
  317. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  318. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  319. // only for compatibility. All new code should use the other symbols
  320. // to test for features.
  321. //
  322. // All macros listed above as possibly being defined by this file are
  323. // explicitly undefined if they are not explicitly defined.
  324. // Feature-test macros that are not defined by the user or compiler
  325. // but are implied by the other feature-test macros defined (or by the
  326. // lack of any definitions) are defined by the file.
  327. //
  328. // ISO C feature test macros depend on the definition of the macro
  329. // when an affected header is included, not when the first system
  330. // header is included, and so they are handled in
  331. // <bits/libc-header-start.h>, which does not have a multiple include
  332. // guard. Feature test macros that can be handled from the first
  333. // system header included are handled here.
  334. // Undefine everything, so we get a clean slate.
  335. // Suppress kernel-name space pollution unless user expressedly asks
  336. // for it.
  337. // Convenience macro to test the version of gcc.
  338. // Use like this:
  339. // #if __GNUC_PREREQ (2,8)
  340. // ... code requiring gcc 2.8 or later ...
  341. // #endif
  342. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  343. // added in 2.0.
  344. // Similarly for clang. Features added to GCC after version 4.2 may
  345. // or may not also be available in clang, and clang's definitions of
  346. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  347. // features can be queried via __has_extension/__has_feature.
  348. // Whether to use feature set F.
  349. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  350. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  351. // issue a warning; the expectation is that the source is being
  352. // transitioned to use the new macro.
  353. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  354. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  355. // define _DEFAULT_SOURCE.
  356. // This is to enable the ISO C2X extension.
  357. // This is to enable the ISO C11 extension.
  358. // This is to enable the ISO C99 extension.
  359. // This is to enable the ISO C90 Amendment 1:1995 extension.
  360. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  361. // is defined, use POSIX.1-2008 (or another version depending on
  362. // _XOPEN_SOURCE).
  363. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  364. // defined in all multithreaded code. GNU libc has not required this
  365. // for many years. We now treat them as compatibility synonyms for
  366. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  367. // comprehensive support for multithreaded code. Using them never
  368. // lowers the selected level of POSIX conformance, only raises it.
  369. // The function 'gets' existed in C89, but is impossible to use
  370. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  371. // compatibility with various implementations of <cstdio>, this test
  372. // must consider only the value of __cplusplus when compiling C++.
  373. // GNU formerly extended the scanf functions with modified format
  374. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  375. // input using malloc. This extension conflicts with ISO C99, which
  376. // defines %a as a standalone format specifier that reads a floating-
  377. // point number; moreover, POSIX.1-2008 provides the same feature
  378. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  379. //
  380. // We now follow C99 unless GNU extensions are active and the compiler
  381. // is specifically in C89 or C++98 mode (strict or not). For
  382. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  383. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  384. // old extension.
  385. // Get definitions of __STDC_* predefined macros, if the compiler has
  386. // not preincluded this header automatically.
  387. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  388. // This file is part of the GNU C Library.
  389. //
  390. // The GNU C Library is free software; you can redistribute it and/or
  391. // modify it under the terms of the GNU Lesser General Public
  392. // License as published by the Free Software Foundation; either
  393. // version 2.1 of the License, or (at your option) any later version.
  394. //
  395. // The GNU C Library is distributed in the hope that it will be useful,
  396. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  397. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  398. // Lesser General Public License for more details.
  399. //
  400. // You should have received a copy of the GNU Lesser General Public
  401. // License along with the GNU C Library; if not, see
  402. // <https://www.gnu.org/licenses/>.
  403. // This macro indicates that the installed library is the GNU C Library.
  404. // For historic reasons the value now is 6 and this will stay from now
  405. // on. The use of this variable is deprecated. Use __GLIBC__ and
  406. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  407. // GNU C library version and use the values in <gnu/lib-names.h> to get
  408. // the sonames of the shared libraries.
  409. // Major and minor version number of the GNU C library package. Use
  410. // these macros to test for features in specific releases.
  411. // This is here only because every header file already includes this one.
  412. // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  413. // This file is part of the GNU C Library.
  414. //
  415. // The GNU C Library is free software; you can redistribute it and/or
  416. // modify it under the terms of the GNU Lesser General Public
  417. // License as published by the Free Software Foundation; either
  418. // version 2.1 of the License, or (at your option) any later version.
  419. //
  420. // The GNU C Library is distributed in the hope that it will be useful,
  421. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  422. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  423. // Lesser General Public License for more details.
  424. //
  425. // You should have received a copy of the GNU Lesser General Public
  426. // License along with the GNU C Library; if not, see
  427. // <https://www.gnu.org/licenses/>.
  428. // We are almost always included from features.h.
  429. // The GNU libc does not support any K&R compilers or the traditional mode
  430. // of ISO C compilers anymore. Check for some of the combinations not
  431. // anymore supported.
  432. // Some user header file might have defined this before.
  433. // All functions, except those with callbacks or those that
  434. // synchronize memory, are leaf functions.
  435. // GCC can always grok prototypes. For C++ programs we add throw()
  436. // to help it optimize the function calls. But this works only with
  437. // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
  438. // as non-throwing using a function attribute since programs can use
  439. // the -fexceptions options for C code as well.
  440. // Compilers that are not clang may object to
  441. // #if defined __clang__ && __has_extension(...)
  442. // even though they do not need to evaluate the right-hand side of the &&.
  443. // These two macros are not used in glibc anymore. They are kept here
  444. // only because some other projects expect the macros to be defined.
  445. // For these things, GCC behaves the ANSI way normally,
  446. // and the non-ANSI way under -traditional.
  447. // This is not a typedef so `const __ptr_t' does the right thing.
  448. // C++ needs to know that types and declarations are C, not C++.
  449. // Fortify support.
  450. // Support for flexible arrays.
  451. // Headers that should use flexible arrays only if they're "real"
  452. // (e.g. only if they won't affect sizeof()) should test
  453. // #if __glibc_c99_flexarr_available.
  454. // __asm__ ("xyz") is used throughout the headers to rename functions
  455. // at the assembly language level. This is wrapped by the __REDIRECT
  456. // macro, in order to support compilers that can do this some other
  457. // way. When compilers don't support asm-names at all, we have to do
  458. // preprocessor tricks instead (which don't have exactly the right
  459. // semantics, but it's the best we can do).
  460. //
  461. // Example:
  462. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  463. //
  464. // #elif __SOME_OTHER_COMPILER__
  465. //
  466. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  467. // GCC has various useful declarations that can be made with the
  468. // `__attribute__' syntax. All of the ways we use this do fine if
  469. // they are omitted for compilers that don't understand it.
  470. // At some point during the gcc 2.96 development the `malloc' attribute
  471. // for functions was introduced. We don't want to use it unconditionally
  472. // (although this would be possible) since it generates warnings.
  473. // Tell the compiler which arguments to an allocation function
  474. // indicate the size of the allocation.
  475. // At some point during the gcc 2.96 development the `pure' attribute
  476. // for functions was introduced. We don't want to use it unconditionally
  477. // (although this would be possible) since it generates warnings.
  478. // This declaration tells the compiler that the value is constant.
  479. // At some point during the gcc 3.1 development the `used' attribute
  480. // for functions was introduced. We don't want to use it unconditionally
  481. // (although this would be possible) since it generates warnings.
  482. // Since version 3.2, gcc allows marking deprecated functions.
  483. // Since version 4.5, gcc also allows one to specify the message printed
  484. // when a deprecated function is used. clang claims to be gcc 4.2, but
  485. // may also support this feature.
  486. // At some point during the gcc 2.8 development the `format_arg' attribute
  487. // for functions was introduced. We don't want to use it unconditionally
  488. // (although this would be possible) since it generates warnings.
  489. // If several `format_arg' attributes are given for the same function, in
  490. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  491. // all designated arguments are considered.
  492. // At some point during the gcc 2.97 development the `strfmon' format
  493. // attribute for functions was introduced. We don't want to use it
  494. // unconditionally (although this would be possible) since it
  495. // generates warnings.
  496. // The nonull function attribute allows to mark pointer parameters which
  497. // must not be NULL.
  498. // If fortification mode, we warn about unused results of certain
  499. // function calls which can lead to problems.
  500. // Forces a function to be always inlined.
  501. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  502. // it conflicts with this definition. Therefore undefine it first to
  503. // allow either header to be included first.
  504. // Associate error messages with the source location of the call site rather
  505. // than with the source location inside the function.
  506. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  507. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  508. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  509. // older than 4.3 may define these macros and still not guarantee GNU inlining
  510. // semantics.
  511. //
  512. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  513. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  514. // __GNUC_GNU_INLINE__ macro definitions.
  515. // GCC 4.3 and above allow passing all anonymous arguments of an
  516. // __extern_always_inline function to some other vararg function.
  517. // It is possible to compile containing GCC extensions even if GCC is
  518. // run in pedantic mode if the uses are carefully marked using the
  519. // `__extension__' keyword. But this is not generally available before
  520. // version 2.8.
  521. // __restrict is known in EGCS 1.2 and above.
  522. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  523. // array_name[restrict]
  524. // GCC 3.1 supports this.
  525. // Describes a char array whose address can safely be passed as the first
  526. // argument to strncpy and strncat, as the char array is not necessarily
  527. // a NUL-terminated string.
  528. // Undefine (also defined in libc-symbols.h).
  529. // Copies attributes from the declaration or type referenced by
  530. // the argument.
  531. // Determine the wordsize from the preprocessor defines.
  532. // Properties of long double type. ldbl-96 version.
  533. // Copyright (C) 2016-2020 Free Software Foundation, Inc.
  534. // This file is part of the GNU C Library.
  535. //
  536. // The GNU C Library is free software; you can redistribute it and/or
  537. // modify it under the terms of the GNU Lesser General Public
  538. // License published by the Free Software Foundation; either
  539. // version 2.1 of the License, or (at your option) any later version.
  540. //
  541. // The GNU C Library is distributed in the hope that it will be useful,
  542. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  543. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  544. // Lesser General Public License for more details.
  545. //
  546. // You should have received a copy of the GNU Lesser General Public
  547. // License along with the GNU C Library; if not, see
  548. // <https://www.gnu.org/licenses/>.
  549. // long double is distinct from double, so there is nothing to
  550. // define here.
  551. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  552. // intended for use in preprocessor macros.
  553. //
  554. // Note: MESSAGE must be a _single_ string; concatenation of string
  555. // literals is not supported.
  556. // Generic selection (ISO C11) is a C-only feature, available in GCC
  557. // since version 4.9. Previous versions do not provide generic
  558. // selection, even though they might set __STDC_VERSION__ to 201112L,
  559. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  560. // when testing __STDC_VERSION__ for generic selection support.
  561. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  562. // check is required to enable the use of generic selection.
  563. // If we don't have __REDIRECT, prototypes will be missing if
  564. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  565. // Decide whether we can define 'extern inline' functions in headers.
  566. // This is here only because every header file already includes this one.
  567. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  568. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  569. // that will always return failure (and set errno to ENOSYS).
  570. // This file is automatically generated.
  571. // This file selects the right generated file of `__stub_FUNCTION' macros
  572. // based on the architecture being compiled for.
  573. // This file is automatically generated.
  574. // It defines a symbol `__stub_FUNCTION' for each function
  575. // in the C library which is a stub, meaning it will fail
  576. // every time called, usually setting errno to ENOSYS.
  577. // We need `pid_t'.
  578. // bits/types.h -- definitions of __*_t types underlying *_t types.
  579. // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  580. // This file is part of the GNU C Library.
  581. //
  582. // The GNU C Library is free software; you can redistribute it and/or
  583. // modify it under the terms of the GNU Lesser General Public
  584. // License as published by the Free Software Foundation; either
  585. // version 2.1 of the License, or (at your option) any later version.
  586. //
  587. // The GNU C Library is distributed in the hope that it will be useful,
  588. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  589. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  590. // Lesser General Public License for more details.
  591. //
  592. // You should have received a copy of the GNU Lesser General Public
  593. // License along with the GNU C Library; if not, see
  594. // <https://www.gnu.org/licenses/>.
  595. // Never include this file directly; use <sys/types.h> instead.
  596. // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  597. // This file is part of the GNU C Library.
  598. //
  599. // The GNU C Library is free software; you can redistribute it and/or
  600. // modify it under the terms of the GNU Lesser General Public
  601. // License as published by the Free Software Foundation; either
  602. // version 2.1 of the License, or (at your option) any later version.
  603. //
  604. // The GNU C Library is distributed in the hope that it will be useful,
  605. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  606. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  607. // Lesser General Public License for more details.
  608. //
  609. // You should have received a copy of the GNU Lesser General Public
  610. // License along with the GNU C Library; if not, see
  611. // <https://www.gnu.org/licenses/>.
  612. // Determine the wordsize from the preprocessor defines.
  613. // Bit size of the time_t type at glibc build time, x86-64 and x32 case.
  614. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  615. // This file is part of the GNU C Library.
  616. //
  617. // The GNU C Library is free software; you can redistribute it and/or
  618. // modify it under the terms of the GNU Lesser General Public
  619. // License as published by the Free Software Foundation; either
  620. // version 2.1 of the License, or (at your option) any later version.
  621. //
  622. // The GNU C Library is distributed in the hope that it will be useful,
  623. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  624. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  625. // Lesser General Public License for more details.
  626. //
  627. // You should have received a copy of the GNU Lesser General Public
  628. // License along with the GNU C Library; if not, see
  629. // <https://www.gnu.org/licenses/>.
  630. // For others, time size is word size.
  631. // Convenience types.
  632. type X__u_char = uint8 /* types.h:31:23 */
  633. type X__u_short = uint16 /* types.h:32:28 */
  634. type X__u_int = uint32 /* types.h:33:22 */
  635. type X__u_long = uint32 /* types.h:34:27 */
  636. // Fixed-size types, underlying types depend on word size and compiler.
  637. type X__int8_t = int8 /* types.h:37:21 */
  638. type X__uint8_t = uint8 /* types.h:38:23 */
  639. type X__int16_t = int16 /* types.h:39:26 */
  640. type X__uint16_t = uint16 /* types.h:40:28 */
  641. type X__int32_t = int32 /* types.h:41:20 */
  642. type X__uint32_t = uint32 /* types.h:42:22 */
  643. type X__int64_t = int64 /* types.h:47:44 */
  644. type X__uint64_t = uint64 /* types.h:48:46 */
  645. // Smallest types with at least a given width.
  646. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  647. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  648. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  649. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  650. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  651. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  652. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  653. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  654. // quad_t is also 64 bits.
  655. type X__quad_t = int64 /* types.h:66:37 */
  656. type X__u_quad_t = uint64 /* types.h:67:46 */
  657. // Largest integral types.
  658. type X__intmax_t = int64 /* types.h:75:37 */
  659. type X__uintmax_t = uint64 /* types.h:76:46 */
  660. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  661. // macros for each of the OS types we define below. The definitions
  662. // of those macros must use the following macros for underlying types.
  663. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  664. // variants of each of the following integer types on this machine.
  665. //
  666. // 16 -- "natural" 16-bit type (always short)
  667. // 32 -- "natural" 32-bit type (always int)
  668. // 64 -- "natural" 64-bit type (long or long long)
  669. // LONG32 -- 32-bit type, traditionally long
  670. // QUAD -- 64-bit type, traditionally long long
  671. // WORD -- natural type of __WORDSIZE bits (int or long)
  672. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  673. //
  674. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  675. // conventional uses of `long' or `long long' type modifiers match the
  676. // types we define, even when a less-adorned type would be the same size.
  677. // This matters for (somewhat) portably writing printf/scanf formats for
  678. // these types, where using the appropriate l or ll format modifiers can
  679. // make the typedefs and the formats match up across all GNU platforms. If
  680. // we used `long' when it's 64 bits where `long long' is expected, then the
  681. // compiler would warn about the formats not matching the argument types,
  682. // and the programmer changing them to shut up the compiler would break the
  683. // program's portability.
  684. //
  685. // Here we assume what is presently the case in all the GCC configurations
  686. // we support: long long is always 64 bits, long is always word/address size,
  687. // and int is always 32 bits.
  688. // We want __extension__ before typedef's that use nonstandard base types
  689. // such as `long long' in C89 mode.
  690. // bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
  691. // Copyright (C) 2012-2020 Free Software Foundation, Inc.
  692. // This file is part of the GNU C Library.
  693. //
  694. // The GNU C Library is free software; you can redistribute it and/or
  695. // modify it under the terms of the GNU Lesser General Public
  696. // License as published by the Free Software Foundation; either
  697. // version 2.1 of the License, or (at your option) any later version.
  698. //
  699. // The GNU C Library is distributed in the hope that it will be useful,
  700. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  701. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  702. // Lesser General Public License for more details.
  703. //
  704. // You should have received a copy of the GNU Lesser General Public
  705. // License along with the GNU C Library; if not, see
  706. // <https://www.gnu.org/licenses/>.
  707. // See <bits/types.h> for the meaning of these macros. This file exists so
  708. // that <bits/types.h> need not vary across different GNU platforms.
  709. // X32 kernel interface is 64-bit.
  710. // Number of descriptors that can fit in an `fd_set'.
  711. // bits/time64.h -- underlying types for __time64_t. Generic version.
  712. // Copyright (C) 2018-2020 Free Software Foundation, Inc.
  713. // This file is part of the GNU C Library.
  714. //
  715. // The GNU C Library is free software; you can redistribute it and/or
  716. // modify it under the terms of the GNU Lesser General Public
  717. // License as published by the Free Software Foundation; either
  718. // version 2.1 of the License, or (at your option) any later version.
  719. //
  720. // The GNU C Library is distributed in the hope that it will be useful,
  721. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  722. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  723. // Lesser General Public License for more details.
  724. //
  725. // You should have received a copy of the GNU Lesser General Public
  726. // License along with the GNU C Library; if not, see
  727. // <https://www.gnu.org/licenses/>.
  728. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  729. // Define a 64-bit time type alongsize the 32-bit one.
  730. type X__dev_t = X__uint64_t /* types.h:145:25 */ // Type of device numbers.
  731. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  732. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  733. type X__ino_t = uint32 /* types.h:148:25 */ // Type of file serial numbers.
  734. type X__ino64_t = X__uint64_t /* types.h:149:27 */ // Type of file serial numbers (LFS).
  735. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  736. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  737. type X__off_t = int32 /* types.h:152:25 */ // Type of file sizes and offsets.
  738. type X__off64_t = X__int64_t /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  739. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  740. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  741. type X__clock_t = int32 /* types.h:156:27 */ // Type of CPU usage counts.
  742. type X__rlim_t = uint32 /* types.h:157:26 */ // Type for resource measurement.
  743. type X__rlim64_t = X__uint64_t /* types.h:158:28 */ // Type for resource measurement (LFS).
  744. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  745. type X__time_t = int32 /* types.h:160:26 */ // Seconds since the Epoch.
  746. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  747. type X__suseconds_t = int32 /* types.h:162:31 */ // Signed count of microseconds.
  748. type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  749. type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
  750. // Clock ID used in clock and timer functions.
  751. type X__clockid_t = int32 /* types.h:168:29 */
  752. // Timer ID returned by `timer_create'.
  753. type X__timer_t = uintptr /* types.h:171:12 */
  754. // Type to represent block size.
  755. type X__blksize_t = int32 /* types.h:174:29 */
  756. // Types from the Large File Support interface.
  757. // Type to count number of disk blocks.
  758. type X__blkcnt_t = int32 /* types.h:179:28 */
  759. type X__blkcnt64_t = X__int64_t /* types.h:180:30 */
  760. // Type to count file system blocks.
  761. type X__fsblkcnt_t = uint32 /* types.h:183:30 */
  762. type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */
  763. // Type to count file system nodes.
  764. type X__fsfilcnt_t = uint32 /* types.h:187:30 */
  765. type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
  766. // Type of miscellaneous file system fields.
  767. type X__fsword_t = int32 /* types.h:191:28 */
  768. type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error.
  769. // Signed long type used in system calls.
  770. type X__syscall_slong_t = int32 /* types.h:196:33 */
  771. // Unsigned long type used in system calls.
  772. type X__syscall_ulong_t = uint32 /* types.h:198:33 */
  773. // These few don't really vary by system, they always correspond
  774. //
  775. // to one of the other defined types.
  776. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  777. type X__caddr_t = uintptr /* types.h:203:14 */
  778. // Duplicates info from stdint.h but this is used in unistd.h.
  779. type X__intptr_t = int32 /* types.h:206:25 */
  780. // Duplicate info from sys/socket.h.
  781. type X__socklen_t = uint32 /* types.h:209:23 */
  782. // C99: An integer type that can be accessed as an atomic entity,
  783. //
  784. // even in the presence of asynchronous interrupts.
  785. // It is not currently necessary for this to be machine-specific.
  786. type X__sig_atomic_t = int32 /* types.h:214:13 */
  787. // Seconds since the Epoch, visible to user code when time_t is too
  788. //
  789. // narrow only for consistency with the old way of widening too-narrow
  790. // types. User code should never use __time64_t.
  791. type X__time64_t = X__int64_t /* types.h:222:28 */
  792. type Pid_t = X__pid_t /* termios.h:30:17 */
  793. // Get the system-dependent definitions of `struct termios', `tcflag_t',
  794. // `cc_t', `speed_t', and all the macros specifying the flag bits.
  795. // termios type and macro definitions. Linux version.
  796. // Copyright (C) 1993-2020 Free Software Foundation, Inc.
  797. // This file is part of the GNU C Library.
  798. //
  799. // The GNU C Library is free software; you can redistribute it and/or
  800. // modify it under the terms of the GNU Lesser General Public
  801. // License as published by the Free Software Foundation; either
  802. // version 2.1 of the License, or (at your option) any later version.
  803. //
  804. // The GNU C Library is distributed in the hope that it will be useful,
  805. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  806. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  807. // Lesser General Public License for more details.
  808. //
  809. // You should have received a copy of the GNU Lesser General Public
  810. // License along with the GNU C Library; if not, see
  811. // <https://www.gnu.org/licenses/>.
  812. type Cc_t = uint8 /* termios.h:23:23 */
  813. type Speed_t = uint32 /* termios.h:24:22 */
  814. type Tcflag_t = uint32 /* termios.h:25:22 */
  815. // struct termios definition. Linux/generic version.
  816. // Copyright (C) 2019-2020 Free Software Foundation, Inc.
  817. // This file is part of the GNU C Library.
  818. //
  819. // The GNU C Library is free software; you can redistribute it and/or
  820. // modify it under the terms of the GNU Lesser General Public
  821. // License as published by the Free Software Foundation; either
  822. // version 2.1 of the License, or (at your option) any later version.
  823. //
  824. // The GNU C Library is distributed in the hope that it will be useful,
  825. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  826. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  827. // Lesser General Public License for more details.
  828. //
  829. // You should have received a copy of the GNU Lesser General Public
  830. // License along with the GNU C Library. If not, see
  831. // <https://www.gnu.org/licenses/>.
  832. type Termios = struct {
  833. Fc_iflag Tcflag_t
  834. Fc_oflag Tcflag_t
  835. Fc_cflag Tcflag_t
  836. Fc_lflag Tcflag_t
  837. Fc_line Cc_t
  838. Fc_cc [32]Cc_t
  839. F__ccgo_pad1 [3]byte
  840. Fc_ispeed Speed_t
  841. Fc_ospeed Speed_t
  842. } /* termios-struct.h:24:1 */
  843. // -
  844. // Copyright (c) 1982, 1986, 1993
  845. // The Regents of the University of California. All rights reserved.
  846. // (c) UNIX System Laboratories, Inc.
  847. // All or some portions of this file are derived from material licensed
  848. // to the University of California by American Telephone and Telegraph
  849. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  850. // the permission of UNIX System Laboratories, Inc.
  851. //
  852. // Redistribution and use in source and binary forms, with or without
  853. // modification, are permitted provided that the following conditions
  854. // are met:
  855. // 1. Redistributions of source code must retain the above copyright
  856. // notice, this list of conditions and the following disclaimer.
  857. // 2. Redistributions in binary form must reproduce the above copyright
  858. // notice, this list of conditions and the following disclaimer in the
  859. // documentation and/or other materials provided with the distribution.
  860. // 4. Neither the name of the University nor the names of its contributors
  861. // may be used to endorse or promote products derived from this software
  862. // without specific prior written permission.
  863. //
  864. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  865. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  866. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  867. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  868. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  869. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  870. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  871. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  872. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  873. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  874. // SUCH DAMAGE.
  875. //
  876. // @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
  877. // System wide defaults for terminal state. Linux version.
  878. // Defaults on "first" open.
  879. // Control Character Defaults
  880. // compat
  881. // PROTECTED INCLUSION ENDS HERE
  882. // #define TTYDEFCHARS to include an array of default control characters.
  883. var _ int8 /* gen.c:2:13: */