termios_linux_riscv64.go 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196
  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_riscv64.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_LP64 = 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. Linux = 1
  197. Unix = 1
  198. )
  199. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  200. type Size_t = uint64 /* <builtin>:9:23 */
  201. type Wchar_t = int32 /* <builtin>:15:24 */
  202. type X__int128_t = struct {
  203. Flo int64
  204. Fhi int64
  205. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  206. type X__uint128_t = struct {
  207. Flo uint64
  208. Fhi uint64
  209. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  210. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  211. type X__float128 = float64 /* <builtin>:47:21 */
  212. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  213. // This file is part of the GNU C Library.
  214. //
  215. // The GNU C Library is free software; you can redistribute it and/or
  216. // modify it under the terms of the GNU Lesser General Public
  217. // License as published by the Free Software Foundation; either
  218. // version 2.1 of the License, or (at your option) any later version.
  219. //
  220. // The GNU C Library is distributed in the hope that it will be useful,
  221. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  222. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  223. // Lesser General Public License for more details.
  224. //
  225. // You should have received a copy of the GNU Lesser General Public
  226. // License along with the GNU C Library; if not, see
  227. // <https://www.gnu.org/licenses/>.
  228. // POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
  229. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  230. // This file is part of the GNU C Library.
  231. //
  232. // The GNU C Library is free software; you can redistribute it and/or
  233. // modify it under the terms of the GNU Lesser General Public
  234. // License as published by the Free Software Foundation; either
  235. // version 2.1 of the License, or (at your option) any later version.
  236. //
  237. // The GNU C Library is distributed in the hope that it will be useful,
  238. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  239. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  240. // Lesser General Public License for more details.
  241. //
  242. // You should have received a copy of the GNU Lesser General Public
  243. // License along with the GNU C Library; if not, see
  244. // <https://www.gnu.org/licenses/>.
  245. // These are defined by the user (or the compiler)
  246. // to specify the desired environment:
  247. //
  248. // __STRICT_ANSI__ ISO Standard C.
  249. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  250. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  251. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  252. // __STDC_WANT_LIB_EXT2__
  253. // Extensions to ISO C99 from TR 27431-2:2010.
  254. // __STDC_WANT_IEC_60559_BFP_EXT__
  255. // Extensions to ISO C11 from TS 18661-1:2014.
  256. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  257. // Extensions to ISO C11 from TS 18661-4:2015.
  258. // __STDC_WANT_IEC_60559_TYPES_EXT__
  259. // Extensions to ISO C11 from TS 18661-3:2015.
  260. // __STDC_WANT_IEC_60559_EXT__
  261. // ISO C2X interfaces defined only in Annex F.
  262. //
  263. // _POSIX_SOURCE IEEE Std 1003.1.
  264. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  265. // if >=199309L, add IEEE Std 1003.1b-1993;
  266. // if >=199506L, add IEEE Std 1003.1c-1995;
  267. // if >=200112L, all of IEEE 1003.1-2004
  268. // if >=200809L, all of IEEE 1003.1-2008
  269. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  270. // Single Unix conformance is wanted, to 600 for the
  271. // sixth revision, to 700 for the seventh revision.
  272. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  273. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  274. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  275. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  276. // _ATFILE_SOURCE Additional *at interfaces.
  277. // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
  278. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  279. // _GNU_SOURCE All of the above, plus GNU extensions.
  280. // _DEFAULT_SOURCE The default set of features (taking precedence over
  281. // __STRICT_ANSI__).
  282. //
  283. // _FORTIFY_SOURCE Add security hardening to many library functions.
  284. // Set to 1 or 2; 2 performs stricter checks than 1.
  285. //
  286. // _REENTRANT, _THREAD_SAFE
  287. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  288. //
  289. // The `-ansi' switch to the GNU C compiler, and standards conformance
  290. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  291. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  292. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  293. // 200809L, as well as enabling miscellaneous functions from BSD and
  294. // SVID. If more than one of these are defined, they accumulate. For
  295. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  296. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  297. //
  298. // These are defined by this file and are used by the
  299. // header files to decide what to declare or define:
  300. //
  301. // __GLIBC_USE (F) Define things from feature set F. This is defined
  302. // to 1 or 0; the subsequent macros are either defined
  303. // or undefined, and those tests should be moved to
  304. // __GLIBC_USE.
  305. // __USE_ISOC11 Define ISO C11 things.
  306. // __USE_ISOC99 Define ISO C99 things.
  307. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  308. // __USE_ISOCXX11 Define ISO C++11 things.
  309. // __USE_POSIX Define IEEE Std 1003.1 things.
  310. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  311. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  312. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  313. // __USE_XOPEN Define XPG things.
  314. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  315. // __USE_UNIX98 Define Single Unix V2 things.
  316. // __USE_XOPEN2K Define XPG6 things.
  317. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  318. // __USE_XOPEN2K8 Define XPG7 things.
  319. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  320. // __USE_LARGEFILE Define correct standard I/O things.
  321. // __USE_LARGEFILE64 Define LFS things with separate names.
  322. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  323. // __USE_MISC Define things from 4.3BSD or System V Unix.
  324. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  325. // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
  326. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  327. // __USE_GNU Define GNU extensions.
  328. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  329. //
  330. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  331. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  332. // only for compatibility. All new code should use the other symbols
  333. // to test for features.
  334. //
  335. // All macros listed above as possibly being defined by this file are
  336. // explicitly undefined if they are not explicitly defined.
  337. // Feature-test macros that are not defined by the user or compiler
  338. // but are implied by the other feature-test macros defined (or by the
  339. // lack of any definitions) are defined by the file.
  340. //
  341. // ISO C feature test macros depend on the definition of the macro
  342. // when an affected header is included, not when the first system
  343. // header is included, and so they are handled in
  344. // <bits/libc-header-start.h>, which does not have a multiple include
  345. // guard. Feature test macros that can be handled from the first
  346. // system header included are handled here.
  347. // Undefine everything, so we get a clean slate.
  348. // Suppress kernel-name space pollution unless user expressedly asks
  349. // for it.
  350. // Convenience macro to test the version of gcc.
  351. // Use like this:
  352. // #if __GNUC_PREREQ (2,8)
  353. // ... code requiring gcc 2.8 or later ...
  354. // #endif
  355. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  356. // added in 2.0.
  357. // Similarly for clang. Features added to GCC after version 4.2 may
  358. // or may not also be available in clang, and clang's definitions of
  359. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  360. // features can be queried via __has_extension/__has_feature.
  361. // Whether to use feature set F.
  362. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  363. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  364. // issue a warning; the expectation is that the source is being
  365. // transitioned to use the new macro.
  366. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  367. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  368. // define _DEFAULT_SOURCE.
  369. // This is to enable the ISO C2X extension.
  370. // This is to enable the ISO C11 extension.
  371. // This is to enable the ISO C99 extension.
  372. // This is to enable the ISO C90 Amendment 1:1995 extension.
  373. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  374. // is defined, use POSIX.1-2008 (or another version depending on
  375. // _XOPEN_SOURCE).
  376. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  377. // defined in all multithreaded code. GNU libc has not required this
  378. // for many years. We now treat them as compatibility synonyms for
  379. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  380. // comprehensive support for multithreaded code. Using them never
  381. // lowers the selected level of POSIX conformance, only raises it.
  382. // Features part to handle 64-bit time_t support.
  383. // Copyright (C) 2021 Free Software Foundation, Inc.
  384. // This file is part of the GNU C Library.
  385. //
  386. // The GNU C Library is free software; you can redistribute it and/or
  387. // modify it under the terms of the GNU Lesser General Public
  388. // License as published by the Free Software Foundation; either
  389. // version 2.1 of the License, or (at your option) any later version.
  390. //
  391. // The GNU C Library is distributed in the hope that it will be useful,
  392. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  393. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  394. // Lesser General Public License for more details.
  395. //
  396. // You should have received a copy of the GNU Lesser General Public
  397. // License along with the GNU C Library; if not, see
  398. // <https://www.gnu.org/licenses/>.
  399. // We need to know the word size in order to check the time size.
  400. // Determine the wordsize from the preprocessor defines. RISC-V version.
  401. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  402. // This file is part of the GNU C Library.
  403. //
  404. // The GNU C Library is free software; you can redistribute it and/or
  405. // modify it under the terms of the GNU Lesser General Public
  406. // License as published by the Free Software Foundation; either
  407. // version 2.1 of the License, or (at your option) any later version.
  408. //
  409. // The GNU C Library is distributed in the hope that it will be useful,
  410. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  411. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  412. // Lesser General Public License for more details.
  413. //
  414. // You should have received a copy of the GNU Lesser General Public
  415. // License along with the GNU C Library. If not, see
  416. // <https://www.gnu.org/licenses/>.
  417. // Bit size of the time_t type at glibc build time, RISC-V case.
  418. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  419. // This file is part of the GNU C Library.
  420. //
  421. // The GNU C Library is free software; you can redistribute it and/or
  422. // modify it under the terms of the GNU Lesser General Public
  423. // License as published by the Free Software Foundation; either
  424. // version 2.1 of the License, or (at your option) any later version.
  425. //
  426. // The GNU C Library is distributed in the hope that it will be useful,
  427. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  428. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  429. // Lesser General Public License for more details.
  430. //
  431. // You should have received a copy of the GNU Lesser General Public
  432. // License along with the GNU C Library; if not, see
  433. // <https://www.gnu.org/licenses/>.
  434. // Determine the wordsize from the preprocessor defines. RISC-V version.
  435. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  436. // This file is part of the GNU C Library.
  437. //
  438. // The GNU C Library is free software; you can redistribute it and/or
  439. // modify it under the terms of the GNU Lesser General Public
  440. // License as published by the Free Software Foundation; either
  441. // version 2.1 of the License, or (at your option) any later version.
  442. //
  443. // The GNU C Library is distributed in the hope that it will be useful,
  444. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  445. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  446. // Lesser General Public License for more details.
  447. //
  448. // You should have received a copy of the GNU Lesser General Public
  449. // License along with the GNU C Library. If not, see
  450. // <https://www.gnu.org/licenses/>.
  451. // RV32 and RV64 both use 64-bit time_t
  452. // The function 'gets' existed in C89, but is impossible to use
  453. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  454. // compatibility with various implementations of <cstdio>, this test
  455. // must consider only the value of __cplusplus when compiling C++.
  456. // GNU formerly extended the scanf functions with modified format
  457. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  458. // input using malloc. This extension conflicts with ISO C99, which
  459. // defines %a as a standalone format specifier that reads a floating-
  460. // point number; moreover, POSIX.1-2008 provides the same feature
  461. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  462. //
  463. // We now follow C99 unless GNU extensions are active and the compiler
  464. // is specifically in C89 or C++98 mode (strict or not). For
  465. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  466. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  467. // old extension.
  468. // Get definitions of __STDC_* predefined macros, if the compiler has
  469. // not preincluded this header automatically.
  470. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  471. // This file is part of the GNU C Library.
  472. //
  473. // The GNU C Library is free software; you can redistribute it and/or
  474. // modify it under the terms of the GNU Lesser General Public
  475. // License as published by the Free Software Foundation; either
  476. // version 2.1 of the License, or (at your option) any later version.
  477. //
  478. // The GNU C Library is distributed in the hope that it will be useful,
  479. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  480. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  481. // Lesser General Public License for more details.
  482. //
  483. // You should have received a copy of the GNU Lesser General Public
  484. // License along with the GNU C Library; if not, see
  485. // <https://www.gnu.org/licenses/>.
  486. // This macro indicates that the installed library is the GNU C Library.
  487. // For historic reasons the value now is 6 and this will stay from now
  488. // on. The use of this variable is deprecated. Use __GLIBC__ and
  489. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  490. // GNU C library version and use the values in <gnu/lib-names.h> to get
  491. // the sonames of the shared libraries.
  492. // Major and minor version number of the GNU C library package. Use
  493. // these macros to test for features in specific releases.
  494. // This is here only because every header file already includes this one.
  495. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  496. // This file is part of the GNU C Library.
  497. //
  498. // The GNU C Library is free software; you can redistribute it and/or
  499. // modify it under the terms of the GNU Lesser General Public
  500. // License as published by the Free Software Foundation; either
  501. // version 2.1 of the License, or (at your option) any later version.
  502. //
  503. // The GNU C Library is distributed in the hope that it will be useful,
  504. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  505. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  506. // Lesser General Public License for more details.
  507. //
  508. // You should have received a copy of the GNU Lesser General Public
  509. // License along with the GNU C Library; if not, see
  510. // <https://www.gnu.org/licenses/>.
  511. // We are almost always included from features.h.
  512. // The GNU libc does not support any K&R compilers or the traditional mode
  513. // of ISO C compilers anymore. Check for some of the combinations not
  514. // supported anymore.
  515. // Some user header file might have defined this before.
  516. // Compilers that lack __has_attribute may object to
  517. // #if defined __has_attribute && __has_attribute (...)
  518. // even though they do not need to evaluate the right-hand side of the &&.
  519. // Similarly for __has_builtin, etc.
  520. // All functions, except those with callbacks or those that
  521. // synchronize memory, are leaf functions.
  522. // GCC can always grok prototypes. For C++ programs we add throw()
  523. // to help it optimize the function calls. But this only works with
  524. // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
  525. // as non-throwing using a function attribute since programs can use
  526. // the -fexceptions options for C code as well.
  527. // These two macros are not used in glibc anymore. They are kept here
  528. // only because some other projects expect the macros to be defined.
  529. // For these things, GCC behaves the ANSI way normally,
  530. // and the non-ANSI way under -traditional.
  531. // This is not a typedef so `const __ptr_t' does the right thing.
  532. // C++ needs to know that types and declarations are C, not C++.
  533. // Fortify support.
  534. // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
  535. // Support for flexible arrays.
  536. // Headers that should use flexible arrays only if they're "real"
  537. // (e.g. only if they won't affect sizeof()) should test
  538. // #if __glibc_c99_flexarr_available.
  539. // __asm__ ("xyz") is used throughout the headers to rename functions
  540. // at the assembly language level. This is wrapped by the __REDIRECT
  541. // macro, in order to support compilers that can do this some other
  542. // way. When compilers don't support asm-names at all, we have to do
  543. // preprocessor tricks instead (which don't have exactly the right
  544. // semantics, but it's the best we can do).
  545. //
  546. // Example:
  547. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  548. //
  549. // #elif __SOME_OTHER_COMPILER__
  550. //
  551. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  552. // GCC and clang have various useful declarations that can be made with
  553. // the '__attribute__' syntax. All of the ways we use this do fine if
  554. // they are omitted for compilers that don't understand it.
  555. // At some point during the gcc 2.96 development the `malloc' attribute
  556. // for functions was introduced. We don't want to use it unconditionally
  557. // (although this would be possible) since it generates warnings.
  558. // Tell the compiler which arguments to an allocation function
  559. // indicate the size of the allocation.
  560. // At some point during the gcc 2.96 development the `pure' attribute
  561. // for functions was introduced. We don't want to use it unconditionally
  562. // (although this would be possible) since it generates warnings.
  563. // This declaration tells the compiler that the value is constant.
  564. // At some point during the gcc 3.1 development the `used' attribute
  565. // for functions was introduced. We don't want to use it unconditionally
  566. // (although this would be possible) since it generates warnings.
  567. // Since version 3.2, gcc allows marking deprecated functions.
  568. // Since version 4.5, gcc also allows one to specify the message printed
  569. // when a deprecated function is used. clang claims to be gcc 4.2, but
  570. // may also support this feature.
  571. // At some point during the gcc 2.8 development the `format_arg' attribute
  572. // for functions was introduced. We don't want to use it unconditionally
  573. // (although this would be possible) since it generates warnings.
  574. // If several `format_arg' attributes are given for the same function, in
  575. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  576. // all designated arguments are considered.
  577. // At some point during the gcc 2.97 development the `strfmon' format
  578. // attribute for functions was introduced. We don't want to use it
  579. // unconditionally (although this would be possible) since it
  580. // generates warnings.
  581. // The nonnull function attribute marks pointer parameters that
  582. // must not be NULL.
  583. // The returns_nonnull function attribute marks the return type of the function
  584. // as always being non-null.
  585. // If fortification mode, we warn about unused results of certain
  586. // function calls which can lead to problems.
  587. // Forces a function to be always inlined.
  588. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  589. // it conflicts with this definition. Therefore undefine it first to
  590. // allow either header to be included first.
  591. // Associate error messages with the source location of the call site rather
  592. // than with the source location inside the function.
  593. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  594. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  595. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  596. // older than 4.3 may define these macros and still not guarantee GNU inlining
  597. // semantics.
  598. //
  599. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  600. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  601. // __GNUC_GNU_INLINE__ macro definitions.
  602. // GCC 4.3 and above allow passing all anonymous arguments of an
  603. // __extern_always_inline function to some other vararg function.
  604. // It is possible to compile containing GCC extensions even if GCC is
  605. // run in pedantic mode if the uses are carefully marked using the
  606. // `__extension__' keyword. But this is not generally available before
  607. // version 2.8.
  608. // __restrict is known in EGCS 1.2 and above, and in clang.
  609. // It works also in C++ mode (outside of arrays), but only when spelled
  610. // as '__restrict', not 'restrict'.
  611. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  612. // array_name[restrict]
  613. // GCC 3.1 and clang support this.
  614. // This syntax is not usable in C++ mode.
  615. // Describes a char array whose address can safely be passed as the first
  616. // argument to strncpy and strncat, as the char array is not necessarily
  617. // a NUL-terminated string.
  618. // Undefine (also defined in libc-symbols.h).
  619. // Copies attributes from the declaration or type referenced by
  620. // the argument.
  621. // The #ifndef lets Gnulib avoid including these on non-glibc
  622. // platforms, where the includes typically do not exist.
  623. // Determine the wordsize from the preprocessor defines. RISC-V version.
  624. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  625. // This file is part of the GNU C Library.
  626. //
  627. // The GNU C Library is free software; you can redistribute it and/or
  628. // modify it under the terms of the GNU Lesser General Public
  629. // License as published by the Free Software Foundation; either
  630. // version 2.1 of the License, or (at your option) any later version.
  631. //
  632. // The GNU C Library is distributed in the hope that it will be useful,
  633. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  634. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  635. // Lesser General Public License for more details.
  636. //
  637. // You should have received a copy of the GNU Lesser General Public
  638. // License along with the GNU C Library. If not, see
  639. // <https://www.gnu.org/licenses/>.
  640. // Properties of long double type. ldbl-128 version.
  641. // Copyright (C) 2016-2021 Free Software Foundation, Inc.
  642. // This file is part of the GNU C Library.
  643. //
  644. // The GNU C Library is free software; you can redistribute it and/or
  645. // modify it under the terms of the GNU Lesser General Public
  646. // License published by the Free Software Foundation; either
  647. // version 2.1 of the License, or (at your option) any later version.
  648. //
  649. // The GNU C Library is distributed in the hope that it will be useful,
  650. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  651. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  652. // Lesser General Public License for more details.
  653. //
  654. // You should have received a copy of the GNU Lesser General Public
  655. // License along with the GNU C Library; if not, see
  656. // <https://www.gnu.org/licenses/>.
  657. // long double is distinct from double, so there is nothing to
  658. // define here.
  659. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  660. // intended for use in preprocessor macros.
  661. //
  662. // Note: MESSAGE must be a _single_ string; concatenation of string
  663. // literals is not supported.
  664. // Generic selection (ISO C11) is a C-only feature, available in GCC
  665. // since version 4.9. Previous versions do not provide generic
  666. // selection, even though they might set __STDC_VERSION__ to 201112L,
  667. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  668. // when testing __STDC_VERSION__ for generic selection support.
  669. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  670. // check is required to enable the use of generic selection.
  671. // Designates a 1-based positional argument ref-index of pointer type
  672. // that can be used to access size-index elements of the pointed-to
  673. // array according to access mode, or at least one element when
  674. // size-index is not provided:
  675. // access (access-mode, <ref-index> [, <size-index>])
  676. // Designates dealloc as a function to call to deallocate objects
  677. // allocated by the declared function.
  678. // Specify that a function such as setjmp or vfork may return
  679. // twice.
  680. // If we don't have __REDIRECT, prototypes will be missing if
  681. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  682. // Decide whether we can define 'extern inline' functions in headers.
  683. // This is here only because every header file already includes this one.
  684. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  685. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  686. // that will always return failure (and set errno to ENOSYS).
  687. // This file is automatically generated.
  688. // This file selects the right generated file of `__stub_FUNCTION' macros
  689. // based on the architecture being compiled for.
  690. // Determine the wordsize from the preprocessor defines. RISC-V version.
  691. // Copyright (C) 2002-2021 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. // This file is automatically generated.
  708. // It defines a symbol `__stub_FUNCTION' for each function
  709. // in the C library which is a stub, meaning it will fail
  710. // every time called, usually setting errno to ENOSYS.
  711. // We need `pid_t'.
  712. // bits/types.h -- definitions of __*_t types underlying *_t types.
  713. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  714. // This file is part of the GNU C Library.
  715. //
  716. // The GNU C Library is free software; you can redistribute it and/or
  717. // modify it under the terms of the GNU Lesser General Public
  718. // License as published by the Free Software Foundation; either
  719. // version 2.1 of the License, or (at your option) any later version.
  720. //
  721. // The GNU C Library is distributed in the hope that it will be useful,
  722. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  723. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  724. // Lesser General Public License for more details.
  725. //
  726. // You should have received a copy of the GNU Lesser General Public
  727. // License along with the GNU C Library; if not, see
  728. // <https://www.gnu.org/licenses/>.
  729. // Never include this file directly; use <sys/types.h> instead.
  730. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  731. // This file is part of the GNU C Library.
  732. //
  733. // The GNU C Library is free software; you can redistribute it and/or
  734. // modify it under the terms of the GNU Lesser General Public
  735. // License as published by the Free Software Foundation; either
  736. // version 2.1 of the License, or (at your option) any later version.
  737. //
  738. // The GNU C Library is distributed in the hope that it will be useful,
  739. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  740. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  741. // Lesser General Public License for more details.
  742. //
  743. // You should have received a copy of the GNU Lesser General Public
  744. // License along with the GNU C Library; if not, see
  745. // <https://www.gnu.org/licenses/>.
  746. // Determine the wordsize from the preprocessor defines. RISC-V version.
  747. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  748. // This file is part of the GNU C Library.
  749. //
  750. // The GNU C Library is free software; you can redistribute it and/or
  751. // modify it under the terms of the GNU Lesser General Public
  752. // License as published by the Free Software Foundation; either
  753. // version 2.1 of the License, or (at your option) any later version.
  754. //
  755. // The GNU C Library is distributed in the hope that it will be useful,
  756. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  757. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  758. // Lesser General Public License for more details.
  759. //
  760. // You should have received a copy of the GNU Lesser General Public
  761. // License along with the GNU C Library. If not, see
  762. // <https://www.gnu.org/licenses/>.
  763. // Bit size of the time_t type at glibc build time, RISC-V case.
  764. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  765. // This file is part of the GNU C Library.
  766. //
  767. // The GNU C Library is free software; you can redistribute it and/or
  768. // modify it under the terms of the GNU Lesser General Public
  769. // License as published by the Free Software Foundation; either
  770. // version 2.1 of the License, or (at your option) any later version.
  771. //
  772. // The GNU C Library is distributed in the hope that it will be useful,
  773. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  774. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  775. // Lesser General Public License for more details.
  776. //
  777. // You should have received a copy of the GNU Lesser General Public
  778. // License along with the GNU C Library; if not, see
  779. // <https://www.gnu.org/licenses/>.
  780. // Determine the wordsize from the preprocessor defines. RISC-V version.
  781. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  782. // This file is part of the GNU C Library.
  783. //
  784. // The GNU C Library is free software; you can redistribute it and/or
  785. // modify it under the terms of the GNU Lesser General Public
  786. // License as published by the Free Software Foundation; either
  787. // version 2.1 of the License, or (at your option) any later version.
  788. //
  789. // The GNU C Library is distributed in the hope that it will be useful,
  790. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  791. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  792. // Lesser General Public License for more details.
  793. //
  794. // You should have received a copy of the GNU Lesser General Public
  795. // License along with the GNU C Library. If not, see
  796. // <https://www.gnu.org/licenses/>.
  797. // RV32 and RV64 both use 64-bit time_t
  798. // Convenience types.
  799. type X__u_char = uint8 /* types.h:31:23 */
  800. type X__u_short = uint16 /* types.h:32:28 */
  801. type X__u_int = uint32 /* types.h:33:22 */
  802. type X__u_long = uint64 /* types.h:34:27 */
  803. // Fixed-size types, underlying types depend on word size and compiler.
  804. type X__int8_t = int8 /* types.h:37:21 */
  805. type X__uint8_t = uint8 /* types.h:38:23 */
  806. type X__int16_t = int16 /* types.h:39:26 */
  807. type X__uint16_t = uint16 /* types.h:40:28 */
  808. type X__int32_t = int32 /* types.h:41:20 */
  809. type X__uint32_t = uint32 /* types.h:42:22 */
  810. type X__int64_t = int64 /* types.h:44:25 */
  811. type X__uint64_t = uint64 /* types.h:45:27 */
  812. // Smallest types with at least a given width.
  813. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  814. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  815. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  816. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  817. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  818. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  819. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  820. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  821. // quad_t is also 64 bits.
  822. type X__quad_t = int64 /* types.h:63:18 */
  823. type X__u_quad_t = uint64 /* types.h:64:27 */
  824. // Largest integral types.
  825. type X__intmax_t = int64 /* types.h:72:18 */
  826. type X__uintmax_t = uint64 /* types.h:73:27 */
  827. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  828. // macros for each of the OS types we define below. The definitions
  829. // of those macros must use the following macros for underlying types.
  830. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  831. // variants of each of the following integer types on this machine.
  832. //
  833. // 16 -- "natural" 16-bit type (always short)
  834. // 32 -- "natural" 32-bit type (always int)
  835. // 64 -- "natural" 64-bit type (long or long long)
  836. // LONG32 -- 32-bit type, traditionally long
  837. // QUAD -- 64-bit type, traditionally long long
  838. // WORD -- natural type of __WORDSIZE bits (int or long)
  839. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  840. //
  841. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  842. // conventional uses of `long' or `long long' type modifiers match the
  843. // types we define, even when a less-adorned type would be the same size.
  844. // This matters for (somewhat) portably writing printf/scanf formats for
  845. // these types, where using the appropriate l or ll format modifiers can
  846. // make the typedefs and the formats match up across all GNU platforms. If
  847. // we used `long' when it's 64 bits where `long long' is expected, then the
  848. // compiler would warn about the formats not matching the argument types,
  849. // and the programmer changing them to shut up the compiler would break the
  850. // program's portability.
  851. //
  852. // Here we assume what is presently the case in all the GCC configurations
  853. // we support: long long is always 64 bits, long is always word/address size,
  854. // and int is always 32 bits.
  855. // No need to mark the typedef with __extension__.
  856. // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
  857. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  858. // This file is part of the GNU C Library.
  859. // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  860. //
  861. // The GNU C Library is free software; you can redistribute it and/or
  862. // modify it under the terms of the GNU Lesser General Public
  863. // License as published by the Free Software Foundation; either
  864. // version 2.1 of the License, or (at your option) any later version.
  865. //
  866. // The GNU C Library is distributed in the hope that it will be useful,
  867. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  868. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  869. // Lesser General Public License for more details.
  870. //
  871. // You should have received a copy of the GNU Lesser General Public
  872. // License along with the GNU C Library. If not, see
  873. // <https://www.gnu.org/licenses/>.
  874. // See <bits/types.h> for the meaning of these macros. This file exists so
  875. // that <bits/types.h> need not vary across different GNU platforms.
  876. // Tell the libc code that off_t and off64_t are actually the same type
  877. // for all ABI purposes, even if possibly expressed as different base types
  878. // for C type-checking purposes.
  879. // Same for ino_t and ino64_t.
  880. // And for __rlim_t and __rlim64_t.
  881. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  882. // And for getitimer, setitimer and rusage
  883. // Number of descriptors that can fit in an `fd_set'.
  884. // bits/time64.h -- underlying types for __time64_t. RISC-V version.
  885. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  886. // This file is part of the GNU C Library.
  887. //
  888. // The GNU C Library is free software; you can redistribute it and/or
  889. // modify it under the terms of the GNU Lesser General Public
  890. // License as published by the Free Software Foundation; either
  891. // version 2.1 of the License, or (at your option) any later version.
  892. //
  893. // The GNU C Library is distributed in the hope that it will be useful,
  894. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  895. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  896. // Lesser General Public License for more details.
  897. //
  898. // You should have received a copy of the GNU Lesser General Public
  899. // License along with the GNU C Library; if not, see
  900. // <https://www.gnu.org/licenses/>.
  901. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  902. // If we already have 64-bit time type then use it.
  903. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  904. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  905. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  906. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  907. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  908. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  909. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  910. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  911. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  912. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  913. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  914. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  915. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  916. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  917. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  918. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  919. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  920. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  921. type X__suseconds64_t = int64 /* types.h:163:33 */
  922. type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
  923. type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
  924. // Clock ID used in clock and timer functions.
  925. type X__clockid_t = int32 /* types.h:169:29 */
  926. // Timer ID returned by `timer_create'.
  927. type X__timer_t = uintptr /* types.h:172:12 */
  928. // Type to represent block size.
  929. type X__blksize_t = int32 /* types.h:175:29 */
  930. // Types from the Large File Support interface.
  931. // Type to count number of disk blocks.
  932. type X__blkcnt_t = int64 /* types.h:180:28 */
  933. type X__blkcnt64_t = int64 /* types.h:181:30 */
  934. // Type to count file system blocks.
  935. type X__fsblkcnt_t = uint64 /* types.h:184:30 */
  936. type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
  937. // Type to count file system nodes.
  938. type X__fsfilcnt_t = uint64 /* types.h:188:30 */
  939. type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
  940. // Type of miscellaneous file system fields.
  941. type X__fsword_t = int64 /* types.h:192:28 */
  942. type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
  943. // Signed long type used in system calls.
  944. type X__syscall_slong_t = int64 /* types.h:197:33 */
  945. // Unsigned long type used in system calls.
  946. type X__syscall_ulong_t = uint64 /* types.h:199:33 */
  947. // These few don't really vary by system, they always correspond
  948. //
  949. // to one of the other defined types.
  950. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
  951. type X__caddr_t = uintptr /* types.h:204:14 */
  952. // Duplicates info from stdint.h but this is used in unistd.h.
  953. type X__intptr_t = int64 /* types.h:207:25 */
  954. // Duplicate info from sys/socket.h.
  955. type X__socklen_t = uint32 /* types.h:210:23 */
  956. // C99: An integer type that can be accessed as an atomic entity,
  957. //
  958. // even in the presence of asynchronous interrupts.
  959. // It is not currently necessary for this to be machine-specific.
  960. type X__sig_atomic_t = int32 /* types.h:215:13 */
  961. // Seconds since the Epoch, visible to user code when time_t is too
  962. // narrow only for consistency with the old way of widening too-narrow
  963. // types. User code should never use __time64_t.
  964. type Pid_t = X__pid_t /* termios.h:30:17 */
  965. // Get the system-dependent definitions of `struct termios', `tcflag_t',
  966. // `cc_t', `speed_t', and all the macros specifying the flag bits.
  967. // termios type and macro definitions. Linux version.
  968. // Copyright (C) 1993-2021 Free Software Foundation, Inc.
  969. // This file is part of the GNU C Library.
  970. //
  971. // The GNU C Library is free software; you can redistribute it and/or
  972. // modify it under the terms of the GNU Lesser General Public
  973. // License as published by the Free Software Foundation; either
  974. // version 2.1 of the License, or (at your option) any later version.
  975. //
  976. // The GNU C Library is distributed in the hope that it will be useful,
  977. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  978. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  979. // Lesser General Public License for more details.
  980. //
  981. // You should have received a copy of the GNU Lesser General Public
  982. // License along with the GNU C Library; if not, see
  983. // <https://www.gnu.org/licenses/>.
  984. type Cc_t = uint8 /* termios.h:23:23 */
  985. type Speed_t = uint32 /* termios.h:24:22 */
  986. type Tcflag_t = uint32 /* termios.h:25:22 */
  987. // struct termios definition. Linux/generic version.
  988. // Copyright (C) 2019-2021 Free Software Foundation, Inc.
  989. // This file is part of the GNU C Library.
  990. //
  991. // The GNU C Library is free software; you can redistribute it and/or
  992. // modify it under the terms of the GNU Lesser General Public
  993. // License as published by the Free Software Foundation; either
  994. // version 2.1 of the License, or (at your option) any later version.
  995. //
  996. // The GNU C Library is distributed in the hope that it will be useful,
  997. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  998. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  999. // Lesser General Public License for more details.
  1000. //
  1001. // You should have received a copy of the GNU Lesser General Public
  1002. // License along with the GNU C Library. If not, see
  1003. // <https://www.gnu.org/licenses/>.
  1004. type Termios = struct {
  1005. Fc_iflag Tcflag_t
  1006. Fc_oflag Tcflag_t
  1007. Fc_cflag Tcflag_t
  1008. Fc_lflag Tcflag_t
  1009. Fc_line Cc_t
  1010. Fc_cc [32]Cc_t
  1011. F__ccgo_pad1 [3]byte
  1012. Fc_ispeed Speed_t
  1013. Fc_ospeed Speed_t
  1014. } /* termios-struct.h:24:1 */
  1015. // -
  1016. // Copyright (c) 1982, 1986, 1993
  1017. // The Regents of the University of California. All rights reserved.
  1018. // (c) UNIX System Laboratories, Inc.
  1019. // All or some portions of this file are derived from material licensed
  1020. // to the University of California by American Telephone and Telegraph
  1021. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  1022. // the permission of UNIX System Laboratories, Inc.
  1023. //
  1024. // Redistribution and use in source and binary forms, with or without
  1025. // modification, are permitted provided that the following conditions
  1026. // are met:
  1027. // 1. Redistributions of source code must retain the above copyright
  1028. // notice, this list of conditions and the following disclaimer.
  1029. // 2. Redistributions in binary form must reproduce the above copyright
  1030. // notice, this list of conditions and the following disclaimer in the
  1031. // documentation and/or other materials provided with the distribution.
  1032. // 4. Neither the name of the University nor the names of its contributors
  1033. // may be used to endorse or promote products derived from this software
  1034. // without specific prior written permission.
  1035. //
  1036. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1037. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1038. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1039. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1040. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1041. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1042. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1043. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1044. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1045. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1046. // SUCH DAMAGE.
  1047. //
  1048. // @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
  1049. // System wide defaults for terminal state. Linux version.
  1050. // Defaults on "first" open.
  1051. // Control Character Defaults
  1052. // compat
  1053. // PROTECTED INCLUSION ENDS HERE
  1054. // #define TTYDEFCHARS to include an array of default control characters.
  1055. var _ uint8 /* gen.c:2:13: */