termios_linux_loong64.go 59 KB

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