fcntl_linux_riscv64.go 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. // Code generated by 'ccgo fcntl/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 fcntl/fcntl_linux_riscv64.go -pkgname fcntl', DO NOT EDIT.
  2. package fcntl
  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. AT_EACCESS = 0x200
  15. AT_FDCWD = -100
  16. AT_REMOVEDIR = 0x200
  17. AT_SYMLINK_FOLLOW = 0x400
  18. AT_SYMLINK_NOFOLLOW = 0x100
  19. FAPPEND = 1024
  20. FASYNC = 8192
  21. FD_CLOEXEC = 1
  22. FFSYNC = 1052672
  23. FNDELAY = 2048
  24. FNONBLOCK = 2048
  25. F_DUPFD = 0
  26. F_DUPFD_CLOEXEC = 1030
  27. F_EXLCK = 4
  28. F_GETFD = 1
  29. F_GETFL = 3
  30. F_GETLK = 5
  31. F_GETLK64 = 5
  32. F_GETOWN = 9
  33. F_LOCK = 1
  34. F_OK = 0
  35. F_RDLCK = 0
  36. F_SETFD = 2
  37. F_SETFL = 4
  38. F_SETLK = 6
  39. F_SETLK64 = 6
  40. F_SETLKW = 7
  41. F_SETLKW64 = 7
  42. F_SETOWN = 8
  43. F_SHLCK = 8
  44. F_TEST = 3
  45. F_TLOCK = 2
  46. F_ULOCK = 0
  47. F_UNLCK = 2
  48. F_WRLCK = 1
  49. LOCK_EX = 2
  50. LOCK_NB = 4
  51. LOCK_SH = 1
  52. LOCK_UN = 8
  53. O_ACCMODE = 0003
  54. O_APPEND = 02000
  55. O_ASYNC = 020000
  56. O_CLOEXEC = 524288
  57. O_CREAT = 0100
  58. O_DIRECTORY = 65536
  59. O_DSYNC = 4096
  60. O_EXCL = 0200
  61. O_FSYNC = 1052672
  62. O_NDELAY = 2048
  63. O_NOCTTY = 0400
  64. O_NOFOLLOW = 131072
  65. O_NONBLOCK = 04000
  66. O_RDONLY = 00
  67. O_RDWR = 02
  68. O_RSYNC = 1052672
  69. O_SYNC = 04010000
  70. O_TRUNC = 01000
  71. O_WRONLY = 01
  72. POSIX_FADV_DONTNEED = 4
  73. POSIX_FADV_NOREUSE = 5
  74. POSIX_FADV_NORMAL = 0
  75. POSIX_FADV_RANDOM = 1
  76. POSIX_FADV_SEQUENTIAL = 2
  77. POSIX_FADV_WILLNEED = 3
  78. R_OK = 4
  79. SEEK_CUR = 1
  80. SEEK_END = 2
  81. SEEK_SET = 0
  82. S_IFBLK = 24576
  83. S_IFCHR = 8192
  84. S_IFDIR = 16384
  85. S_IFIFO = 4096
  86. S_IFLNK = 40960
  87. S_IFMT = 61440
  88. S_IFREG = 32768
  89. S_IFSOCK = 49152
  90. S_IRGRP = 32
  91. S_IROTH = 4
  92. S_IRUSR = 256
  93. S_IRWXG = 56
  94. S_IRWXO = 7
  95. S_IRWXU = 448
  96. S_ISGID = 1024
  97. S_ISUID = 2048
  98. S_ISVTX = 512
  99. S_IWGRP = 16
  100. S_IWOTH = 2
  101. S_IWUSR = 128
  102. S_IXGRP = 8
  103. S_IXOTH = 1
  104. S_IXUSR = 64
  105. UTIME_NOW = 1073741823
  106. UTIME_OMIT = 1073741822
  107. W_OK = 2
  108. X_OK = 1
  109. X_ATFILE_SOURCE = 1
  110. X_BITS_ENDIANNESS_H = 1
  111. X_BITS_ENDIAN_H = 1
  112. X_BITS_STAT_H = 1
  113. X_BITS_STRUCT_STAT_H = 1
  114. X_BITS_TIME64_H = 1
  115. X_BITS_TYPESIZES_H = 1
  116. X_BITS_TYPES_H = 1
  117. X_DEFAULT_SOURCE = 1
  118. X_FCNTL_H = 1
  119. X_FEATURES_H = 1
  120. X_FILE_OFFSET_BITS = 64
  121. X_LP64 = 1
  122. X_POSIX_C_SOURCE = 200809
  123. X_POSIX_SOURCE = 1
  124. X_STATBUF_ST_BLKSIZE = 0
  125. X_STATBUF_ST_NSEC = 0
  126. X_STATBUF_ST_RDEV = 0
  127. X_STDC_PREDEF_H = 1
  128. X_STRUCT_TIMESPEC = 1
  129. X_SYS_CDEFS_H = 1
  130. Linux = 1
  131. Unix = 1
  132. )
  133. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  134. type Size_t = uint64 /* <builtin>:9:23 */
  135. type Wchar_t = int32 /* <builtin>:15:24 */
  136. type X__int128_t = struct {
  137. Flo int64
  138. Fhi int64
  139. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  140. type X__uint128_t = struct {
  141. Flo uint64
  142. Fhi uint64
  143. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  144. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  145. type X__float128 = float64 /* <builtin>:47:21 */
  146. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  147. // This file is part of the GNU C Library.
  148. //
  149. // The GNU C Library is free software; you can redistribute it and/or
  150. // modify it under the terms of the GNU Lesser General Public
  151. // License as published by the Free Software Foundation; either
  152. // version 2.1 of the License, or (at your option) any later version.
  153. //
  154. // The GNU C Library is distributed in the hope that it will be useful,
  155. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  156. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  157. // Lesser General Public License for more details.
  158. //
  159. // You should have received a copy of the GNU Lesser General Public
  160. // License along with the GNU C Library; if not, see
  161. // <https://www.gnu.org/licenses/>.
  162. // POSIX Standard: 6.5 File Control Operations <fcntl.h>
  163. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  164. // This file is part of the GNU C Library.
  165. //
  166. // The GNU C Library is free software; you can redistribute it and/or
  167. // modify it under the terms of the GNU Lesser General Public
  168. // License as published by the Free Software Foundation; either
  169. // version 2.1 of the License, or (at your option) any later version.
  170. //
  171. // The GNU C Library is distributed in the hope that it will be useful,
  172. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  173. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  174. // Lesser General Public License for more details.
  175. //
  176. // You should have received a copy of the GNU Lesser General Public
  177. // License along with the GNU C Library; if not, see
  178. // <https://www.gnu.org/licenses/>.
  179. // These are defined by the user (or the compiler)
  180. // to specify the desired environment:
  181. //
  182. // __STRICT_ANSI__ ISO Standard C.
  183. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  184. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  185. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  186. // __STDC_WANT_LIB_EXT2__
  187. // Extensions to ISO C99 from TR 27431-2:2010.
  188. // __STDC_WANT_IEC_60559_BFP_EXT__
  189. // Extensions to ISO C11 from TS 18661-1:2014.
  190. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  191. // Extensions to ISO C11 from TS 18661-4:2015.
  192. // __STDC_WANT_IEC_60559_TYPES_EXT__
  193. // Extensions to ISO C11 from TS 18661-3:2015.
  194. // __STDC_WANT_IEC_60559_EXT__
  195. // ISO C2X interfaces defined only in Annex F.
  196. //
  197. // _POSIX_SOURCE IEEE Std 1003.1.
  198. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  199. // if >=199309L, add IEEE Std 1003.1b-1993;
  200. // if >=199506L, add IEEE Std 1003.1c-1995;
  201. // if >=200112L, all of IEEE 1003.1-2004
  202. // if >=200809L, all of IEEE 1003.1-2008
  203. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  204. // Single Unix conformance is wanted, to 600 for the
  205. // sixth revision, to 700 for the seventh revision.
  206. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  207. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  208. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  209. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  210. // _ATFILE_SOURCE Additional *at interfaces.
  211. // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
  212. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  213. // _GNU_SOURCE All of the above, plus GNU extensions.
  214. // _DEFAULT_SOURCE The default set of features (taking precedence over
  215. // __STRICT_ANSI__).
  216. //
  217. // _FORTIFY_SOURCE Add security hardening to many library functions.
  218. // Set to 1 or 2; 2 performs stricter checks than 1.
  219. //
  220. // _REENTRANT, _THREAD_SAFE
  221. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  222. //
  223. // The `-ansi' switch to the GNU C compiler, and standards conformance
  224. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  225. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  226. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  227. // 200809L, as well as enabling miscellaneous functions from BSD and
  228. // SVID. If more than one of these are defined, they accumulate. For
  229. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  230. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  231. //
  232. // These are defined by this file and are used by the
  233. // header files to decide what to declare or define:
  234. //
  235. // __GLIBC_USE (F) Define things from feature set F. This is defined
  236. // to 1 or 0; the subsequent macros are either defined
  237. // or undefined, and those tests should be moved to
  238. // __GLIBC_USE.
  239. // __USE_ISOC11 Define ISO C11 things.
  240. // __USE_ISOC99 Define ISO C99 things.
  241. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  242. // __USE_ISOCXX11 Define ISO C++11 things.
  243. // __USE_POSIX Define IEEE Std 1003.1 things.
  244. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  245. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  246. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  247. // __USE_XOPEN Define XPG things.
  248. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  249. // __USE_UNIX98 Define Single Unix V2 things.
  250. // __USE_XOPEN2K Define XPG6 things.
  251. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  252. // __USE_XOPEN2K8 Define XPG7 things.
  253. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  254. // __USE_LARGEFILE Define correct standard I/O things.
  255. // __USE_LARGEFILE64 Define LFS things with separate names.
  256. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  257. // __USE_MISC Define things from 4.3BSD or System V Unix.
  258. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  259. // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
  260. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  261. // __USE_GNU Define GNU extensions.
  262. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  263. //
  264. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  265. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  266. // only for compatibility. All new code should use the other symbols
  267. // to test for features.
  268. //
  269. // All macros listed above as possibly being defined by this file are
  270. // explicitly undefined if they are not explicitly defined.
  271. // Feature-test macros that are not defined by the user or compiler
  272. // but are implied by the other feature-test macros defined (or by the
  273. // lack of any definitions) are defined by the file.
  274. //
  275. // ISO C feature test macros depend on the definition of the macro
  276. // when an affected header is included, not when the first system
  277. // header is included, and so they are handled in
  278. // <bits/libc-header-start.h>, which does not have a multiple include
  279. // guard. Feature test macros that can be handled from the first
  280. // system header included are handled here.
  281. // Undefine everything, so we get a clean slate.
  282. // Suppress kernel-name space pollution unless user expressedly asks
  283. // for it.
  284. // Convenience macro to test the version of gcc.
  285. // Use like this:
  286. // #if __GNUC_PREREQ (2,8)
  287. // ... code requiring gcc 2.8 or later ...
  288. // #endif
  289. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  290. // added in 2.0.
  291. // Similarly for clang. Features added to GCC after version 4.2 may
  292. // or may not also be available in clang, and clang's definitions of
  293. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  294. // features can be queried via __has_extension/__has_feature.
  295. // Whether to use feature set F.
  296. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  297. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  298. // issue a warning; the expectation is that the source is being
  299. // transitioned to use the new macro.
  300. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  301. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  302. // define _DEFAULT_SOURCE.
  303. // This is to enable the ISO C2X extension.
  304. // This is to enable the ISO C11 extension.
  305. // This is to enable the ISO C99 extension.
  306. // This is to enable the ISO C90 Amendment 1:1995 extension.
  307. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  308. // is defined, use POSIX.1-2008 (or another version depending on
  309. // _XOPEN_SOURCE).
  310. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  311. // defined in all multithreaded code. GNU libc has not required this
  312. // for many years. We now treat them as compatibility synonyms for
  313. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  314. // comprehensive support for multithreaded code. Using them never
  315. // lowers the selected level of POSIX conformance, only raises it.
  316. // Features part to handle 64-bit time_t support.
  317. // Copyright (C) 2021 Free Software Foundation, Inc.
  318. // This file is part of the GNU C Library.
  319. //
  320. // The GNU C Library is free software; you can redistribute it and/or
  321. // modify it under the terms of the GNU Lesser General Public
  322. // License as published by the Free Software Foundation; either
  323. // version 2.1 of the License, or (at your option) any later version.
  324. //
  325. // The GNU C Library is distributed in the hope that it will be useful,
  326. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  327. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  328. // Lesser General Public License for more details.
  329. //
  330. // You should have received a copy of the GNU Lesser General Public
  331. // License along with the GNU C Library; if not, see
  332. // <https://www.gnu.org/licenses/>.
  333. // We need to know the word size in order to check the time size.
  334. // Determine the wordsize from the preprocessor defines. RISC-V version.
  335. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  336. // This file is part of the GNU C Library.
  337. //
  338. // The GNU C Library is free software; you can redistribute it and/or
  339. // modify it under the terms of the GNU Lesser General Public
  340. // License as published by the Free Software Foundation; either
  341. // version 2.1 of the License, or (at your option) any later version.
  342. //
  343. // The GNU C Library is distributed in the hope that it will be useful,
  344. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  345. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  346. // Lesser General Public License for more details.
  347. //
  348. // You should have received a copy of the GNU Lesser General Public
  349. // License along with the GNU C Library. If not, see
  350. // <https://www.gnu.org/licenses/>.
  351. // Bit size of the time_t type at glibc build time, RISC-V case.
  352. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  353. // This file is part of the GNU C Library.
  354. //
  355. // The GNU C Library is free software; you can redistribute it and/or
  356. // modify it under the terms of the GNU Lesser General Public
  357. // License as published by the Free Software Foundation; either
  358. // version 2.1 of the License, or (at your option) any later version.
  359. //
  360. // The GNU C Library is distributed in the hope that it will be useful,
  361. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  362. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  363. // Lesser General Public License for more details.
  364. //
  365. // You should have received a copy of the GNU Lesser General Public
  366. // License along with the GNU C Library; if not, see
  367. // <https://www.gnu.org/licenses/>.
  368. // Determine the wordsize from the preprocessor defines. RISC-V version.
  369. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  370. // This file is part of the GNU C Library.
  371. //
  372. // The GNU C Library is free software; you can redistribute it and/or
  373. // modify it under the terms of the GNU Lesser General Public
  374. // License as published by the Free Software Foundation; either
  375. // version 2.1 of the License, or (at your option) any later version.
  376. //
  377. // The GNU C Library is distributed in the hope that it will be useful,
  378. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  379. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  380. // Lesser General Public License for more details.
  381. //
  382. // You should have received a copy of the GNU Lesser General Public
  383. // License along with the GNU C Library. If not, see
  384. // <https://www.gnu.org/licenses/>.
  385. // RV32 and RV64 both use 64-bit time_t
  386. // The function 'gets' existed in C89, but is impossible to use
  387. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  388. // compatibility with various implementations of <cstdio>, this test
  389. // must consider only the value of __cplusplus when compiling C++.
  390. // GNU formerly extended the scanf functions with modified format
  391. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  392. // input using malloc. This extension conflicts with ISO C99, which
  393. // defines %a as a standalone format specifier that reads a floating-
  394. // point number; moreover, POSIX.1-2008 provides the same feature
  395. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  396. //
  397. // We now follow C99 unless GNU extensions are active and the compiler
  398. // is specifically in C89 or C++98 mode (strict or not). For
  399. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  400. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  401. // old extension.
  402. // Get definitions of __STDC_* predefined macros, if the compiler has
  403. // not preincluded this header automatically.
  404. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  405. // This file is part of the GNU C Library.
  406. //
  407. // The GNU C Library is free software; you can redistribute it and/or
  408. // modify it under the terms of the GNU Lesser General Public
  409. // License as published by the Free Software Foundation; either
  410. // version 2.1 of the License, or (at your option) any later version.
  411. //
  412. // The GNU C Library is distributed in the hope that it will be useful,
  413. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  414. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  415. // Lesser General Public License for more details.
  416. //
  417. // You should have received a copy of the GNU Lesser General Public
  418. // License along with the GNU C Library; if not, see
  419. // <https://www.gnu.org/licenses/>.
  420. // This macro indicates that the installed library is the GNU C Library.
  421. // For historic reasons the value now is 6 and this will stay from now
  422. // on. The use of this variable is deprecated. Use __GLIBC__ and
  423. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  424. // GNU C library version and use the values in <gnu/lib-names.h> to get
  425. // the sonames of the shared libraries.
  426. // Major and minor version number of the GNU C library package. Use
  427. // these macros to test for features in specific releases.
  428. // This is here only because every header file already includes this one.
  429. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  430. // This file is part of the GNU C Library.
  431. //
  432. // The GNU C Library is free software; you can redistribute it and/or
  433. // modify it under the terms of the GNU Lesser General Public
  434. // License as published by the Free Software Foundation; either
  435. // version 2.1 of the License, or (at your option) any later version.
  436. //
  437. // The GNU C Library is distributed in the hope that it will be useful,
  438. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  439. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  440. // Lesser General Public License for more details.
  441. //
  442. // You should have received a copy of the GNU Lesser General Public
  443. // License along with the GNU C Library; if not, see
  444. // <https://www.gnu.org/licenses/>.
  445. // We are almost always included from features.h.
  446. // The GNU libc does not support any K&R compilers or the traditional mode
  447. // of ISO C compilers anymore. Check for some of the combinations not
  448. // supported anymore.
  449. // Some user header file might have defined this before.
  450. // Compilers that lack __has_attribute may object to
  451. // #if defined __has_attribute && __has_attribute (...)
  452. // even though they do not need to evaluate the right-hand side of the &&.
  453. // Similarly for __has_builtin, etc.
  454. // All functions, except those with callbacks or those that
  455. // synchronize memory, are leaf functions.
  456. // GCC can always grok prototypes. For C++ programs we add throw()
  457. // to help it optimize the function calls. But this only works with
  458. // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
  459. // as non-throwing using a function attribute since programs can use
  460. // the -fexceptions options for C code as well.
  461. // These two macros are not used in glibc anymore. They are kept here
  462. // only because some other projects expect the macros to be defined.
  463. // For these things, GCC behaves the ANSI way normally,
  464. // and the non-ANSI way under -traditional.
  465. // This is not a typedef so `const __ptr_t' does the right thing.
  466. // C++ needs to know that types and declarations are C, not C++.
  467. // Fortify support.
  468. // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
  469. // Support for flexible arrays.
  470. // Headers that should use flexible arrays only if they're "real"
  471. // (e.g. only if they won't affect sizeof()) should test
  472. // #if __glibc_c99_flexarr_available.
  473. // __asm__ ("xyz") is used throughout the headers to rename functions
  474. // at the assembly language level. This is wrapped by the __REDIRECT
  475. // macro, in order to support compilers that can do this some other
  476. // way. When compilers don't support asm-names at all, we have to do
  477. // preprocessor tricks instead (which don't have exactly the right
  478. // semantics, but it's the best we can do).
  479. //
  480. // Example:
  481. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  482. //
  483. // #elif __SOME_OTHER_COMPILER__
  484. //
  485. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  486. // GCC and clang have various useful declarations that can be made with
  487. // the '__attribute__' syntax. All of the ways we use this do fine if
  488. // they are omitted for compilers that don't understand it.
  489. // At some point during the gcc 2.96 development the `malloc' attribute
  490. // for functions was introduced. We don't want to use it unconditionally
  491. // (although this would be possible) since it generates warnings.
  492. // Tell the compiler which arguments to an allocation function
  493. // indicate the size of the allocation.
  494. // At some point during the gcc 2.96 development the `pure' attribute
  495. // for functions was introduced. We don't want to use it unconditionally
  496. // (although this would be possible) since it generates warnings.
  497. // This declaration tells the compiler that the value is constant.
  498. // At some point during the gcc 3.1 development the `used' attribute
  499. // for functions was introduced. We don't want to use it unconditionally
  500. // (although this would be possible) since it generates warnings.
  501. // Since version 3.2, gcc allows marking deprecated functions.
  502. // Since version 4.5, gcc also allows one to specify the message printed
  503. // when a deprecated function is used. clang claims to be gcc 4.2, but
  504. // may also support this feature.
  505. // At some point during the gcc 2.8 development the `format_arg' attribute
  506. // for functions was introduced. We don't want to use it unconditionally
  507. // (although this would be possible) since it generates warnings.
  508. // If several `format_arg' attributes are given for the same function, in
  509. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  510. // all designated arguments are considered.
  511. // At some point during the gcc 2.97 development the `strfmon' format
  512. // attribute for functions was introduced. We don't want to use it
  513. // unconditionally (although this would be possible) since it
  514. // generates warnings.
  515. // The nonnull function attribute marks pointer parameters that
  516. // must not be NULL.
  517. // The returns_nonnull function attribute marks the return type of the function
  518. // as always being non-null.
  519. // If fortification mode, we warn about unused results of certain
  520. // function calls which can lead to problems.
  521. // Forces a function to be always inlined.
  522. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  523. // it conflicts with this definition. Therefore undefine it first to
  524. // allow either header to be included first.
  525. // Associate error messages with the source location of the call site rather
  526. // than with the source location inside the function.
  527. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  528. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  529. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  530. // older than 4.3 may define these macros and still not guarantee GNU inlining
  531. // semantics.
  532. //
  533. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  534. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  535. // __GNUC_GNU_INLINE__ macro definitions.
  536. // GCC 4.3 and above allow passing all anonymous arguments of an
  537. // __extern_always_inline function to some other vararg function.
  538. // It is possible to compile containing GCC extensions even if GCC is
  539. // run in pedantic mode if the uses are carefully marked using the
  540. // `__extension__' keyword. But this is not generally available before
  541. // version 2.8.
  542. // __restrict is known in EGCS 1.2 and above, and in clang.
  543. // It works also in C++ mode (outside of arrays), but only when spelled
  544. // as '__restrict', not 'restrict'.
  545. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  546. // array_name[restrict]
  547. // GCC 3.1 and clang support this.
  548. // This syntax is not usable in C++ mode.
  549. // Describes a char array whose address can safely be passed as the first
  550. // argument to strncpy and strncat, as the char array is not necessarily
  551. // a NUL-terminated string.
  552. // Undefine (also defined in libc-symbols.h).
  553. // Copies attributes from the declaration or type referenced by
  554. // the argument.
  555. // The #ifndef lets Gnulib avoid including these on non-glibc
  556. // platforms, where the includes typically do not exist.
  557. // Determine the wordsize from the preprocessor defines. RISC-V version.
  558. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  559. // This file is part of the GNU C Library.
  560. //
  561. // The GNU C Library is free software; you can redistribute it and/or
  562. // modify it under the terms of the GNU Lesser General Public
  563. // License as published by the Free Software Foundation; either
  564. // version 2.1 of the License, or (at your option) any later version.
  565. //
  566. // The GNU C Library is distributed in the hope that it will be useful,
  567. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  568. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  569. // Lesser General Public License for more details.
  570. //
  571. // You should have received a copy of the GNU Lesser General Public
  572. // License along with the GNU C Library. If not, see
  573. // <https://www.gnu.org/licenses/>.
  574. // Properties of long double type. ldbl-128 version.
  575. // Copyright (C) 2016-2021 Free Software Foundation, Inc.
  576. // This file is part of the GNU C Library.
  577. //
  578. // The GNU C Library is free software; you can redistribute it and/or
  579. // modify it under the terms of the GNU Lesser General Public
  580. // License published by the Free Software Foundation; either
  581. // version 2.1 of the License, or (at your option) any later version.
  582. //
  583. // The GNU C Library is distributed in the hope that it will be useful,
  584. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  585. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  586. // Lesser General Public License for more details.
  587. //
  588. // You should have received a copy of the GNU Lesser General Public
  589. // License along with the GNU C Library; if not, see
  590. // <https://www.gnu.org/licenses/>.
  591. // long double is distinct from double, so there is nothing to
  592. // define here.
  593. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  594. // intended for use in preprocessor macros.
  595. //
  596. // Note: MESSAGE must be a _single_ string; concatenation of string
  597. // literals is not supported.
  598. // Generic selection (ISO C11) is a C-only feature, available in GCC
  599. // since version 4.9. Previous versions do not provide generic
  600. // selection, even though they might set __STDC_VERSION__ to 201112L,
  601. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  602. // when testing __STDC_VERSION__ for generic selection support.
  603. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  604. // check is required to enable the use of generic selection.
  605. // Designates a 1-based positional argument ref-index of pointer type
  606. // that can be used to access size-index elements of the pointed-to
  607. // array according to access mode, or at least one element when
  608. // size-index is not provided:
  609. // access (access-mode, <ref-index> [, <size-index>])
  610. // Designates dealloc as a function to call to deallocate objects
  611. // allocated by the declared function.
  612. // Specify that a function such as setjmp or vfork may return
  613. // twice.
  614. // If we don't have __REDIRECT, prototypes will be missing if
  615. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  616. // Decide whether we can define 'extern inline' functions in headers.
  617. // This is here only because every header file already includes this one.
  618. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  619. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  620. // that will always return failure (and set errno to ENOSYS).
  621. // This file is automatically generated.
  622. // This file selects the right generated file of `__stub_FUNCTION' macros
  623. // based on the architecture being compiled for.
  624. // Determine the wordsize from the preprocessor defines. RISC-V version.
  625. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  626. // This file is part of the GNU C Library.
  627. //
  628. // The GNU C Library is free software; you can redistribute it and/or
  629. // modify it under the terms of the GNU Lesser General Public
  630. // License as published by the Free Software Foundation; either
  631. // version 2.1 of the License, or (at your option) any later version.
  632. //
  633. // The GNU C Library is distributed in the hope that it will be useful,
  634. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  635. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  636. // Lesser General Public License for more details.
  637. //
  638. // You should have received a copy of the GNU Lesser General Public
  639. // License along with the GNU C Library. If not, see
  640. // <https://www.gnu.org/licenses/>.
  641. // This file is automatically generated.
  642. // It defines a symbol `__stub_FUNCTION' for each function
  643. // in the C library which is a stub, meaning it will fail
  644. // every time called, usually setting errno to ENOSYS.
  645. // This must be early so <bits/fcntl.h> can define types winningly.
  646. // Get __mode_t, __dev_t and __off_t .
  647. // bits/types.h -- definitions of __*_t types underlying *_t types.
  648. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  649. // This file is part of the GNU C Library.
  650. //
  651. // The GNU C Library is free software; you can redistribute it and/or
  652. // modify it under the terms of the GNU Lesser General Public
  653. // License as published by the Free Software Foundation; either
  654. // version 2.1 of the License, or (at your option) any later version.
  655. //
  656. // The GNU C Library is distributed in the hope that it will be useful,
  657. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  658. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  659. // Lesser General Public License for more details.
  660. //
  661. // You should have received a copy of the GNU Lesser General Public
  662. // License along with the GNU C Library; if not, see
  663. // <https://www.gnu.org/licenses/>.
  664. // Never include this file directly; use <sys/types.h> instead.
  665. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  666. // This file is part of the GNU C Library.
  667. //
  668. // The GNU C Library is free software; you can redistribute it and/or
  669. // modify it under the terms of the GNU Lesser General Public
  670. // License as published by the Free Software Foundation; either
  671. // version 2.1 of the License, or (at your option) any later version.
  672. //
  673. // The GNU C Library is distributed in the hope that it will be useful,
  674. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  675. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  676. // Lesser General Public License for more details.
  677. //
  678. // You should have received a copy of the GNU Lesser General Public
  679. // License along with the GNU C Library; if not, see
  680. // <https://www.gnu.org/licenses/>.
  681. // Determine the wordsize from the preprocessor defines. RISC-V version.
  682. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  683. // This file is part of the GNU C Library.
  684. //
  685. // The GNU C Library is free software; you can redistribute it and/or
  686. // modify it under the terms of the GNU Lesser General Public
  687. // License as published by the Free Software Foundation; either
  688. // version 2.1 of the License, or (at your option) any later version.
  689. //
  690. // The GNU C Library is distributed in the hope that it will be useful,
  691. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  692. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  693. // Lesser General Public License for more details.
  694. //
  695. // You should have received a copy of the GNU Lesser General Public
  696. // License along with the GNU C Library. If not, see
  697. // <https://www.gnu.org/licenses/>.
  698. // Bit size of the time_t type at glibc build time, RISC-V case.
  699. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  700. // This file is part of the GNU C Library.
  701. //
  702. // The GNU C Library is free software; you can redistribute it and/or
  703. // modify it under the terms of the GNU Lesser General Public
  704. // License as published by the Free Software Foundation; either
  705. // version 2.1 of the License, or (at your option) any later version.
  706. //
  707. // The GNU C Library is distributed in the hope that it will be useful,
  708. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  709. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  710. // Lesser General Public License for more details.
  711. //
  712. // You should have received a copy of the GNU Lesser General Public
  713. // License along with the GNU C Library; if not, see
  714. // <https://www.gnu.org/licenses/>.
  715. // Determine the wordsize from the preprocessor defines. RISC-V version.
  716. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  717. // This file is part of the GNU C Library.
  718. //
  719. // The GNU C Library is free software; you can redistribute it and/or
  720. // modify it under the terms of the GNU Lesser General Public
  721. // License as published by the Free Software Foundation; either
  722. // version 2.1 of the License, or (at your option) any later version.
  723. //
  724. // The GNU C Library is distributed in the hope that it will be useful,
  725. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  726. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  727. // Lesser General Public License for more details.
  728. //
  729. // You should have received a copy of the GNU Lesser General Public
  730. // License along with the GNU C Library. If not, see
  731. // <https://www.gnu.org/licenses/>.
  732. // RV32 and RV64 both use 64-bit time_t
  733. // Convenience types.
  734. type X__u_char = uint8 /* types.h:31:23 */
  735. type X__u_short = uint16 /* types.h:32:28 */
  736. type X__u_int = uint32 /* types.h:33:22 */
  737. type X__u_long = uint64 /* types.h:34:27 */
  738. // Fixed-size types, underlying types depend on word size and compiler.
  739. type X__int8_t = int8 /* types.h:37:21 */
  740. type X__uint8_t = uint8 /* types.h:38:23 */
  741. type X__int16_t = int16 /* types.h:39:26 */
  742. type X__uint16_t = uint16 /* types.h:40:28 */
  743. type X__int32_t = int32 /* types.h:41:20 */
  744. type X__uint32_t = uint32 /* types.h:42:22 */
  745. type X__int64_t = int64 /* types.h:44:25 */
  746. type X__uint64_t = uint64 /* types.h:45:27 */
  747. // Smallest types with at least a given width.
  748. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  749. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  750. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  751. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  752. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  753. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  754. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  755. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  756. // quad_t is also 64 bits.
  757. type X__quad_t = int64 /* types.h:63:18 */
  758. type X__u_quad_t = uint64 /* types.h:64:27 */
  759. // Largest integral types.
  760. type X__intmax_t = int64 /* types.h:72:18 */
  761. type X__uintmax_t = uint64 /* types.h:73:27 */
  762. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  763. // macros for each of the OS types we define below. The definitions
  764. // of those macros must use the following macros for underlying types.
  765. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  766. // variants of each of the following integer types on this machine.
  767. //
  768. // 16 -- "natural" 16-bit type (always short)
  769. // 32 -- "natural" 32-bit type (always int)
  770. // 64 -- "natural" 64-bit type (long or long long)
  771. // LONG32 -- 32-bit type, traditionally long
  772. // QUAD -- 64-bit type, traditionally long long
  773. // WORD -- natural type of __WORDSIZE bits (int or long)
  774. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  775. //
  776. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  777. // conventional uses of `long' or `long long' type modifiers match the
  778. // types we define, even when a less-adorned type would be the same size.
  779. // This matters for (somewhat) portably writing printf/scanf formats for
  780. // these types, where using the appropriate l or ll format modifiers can
  781. // make the typedefs and the formats match up across all GNU platforms. If
  782. // we used `long' when it's 64 bits where `long long' is expected, then the
  783. // compiler would warn about the formats not matching the argument types,
  784. // and the programmer changing them to shut up the compiler would break the
  785. // program's portability.
  786. //
  787. // Here we assume what is presently the case in all the GCC configurations
  788. // we support: long long is always 64 bits, long is always word/address size,
  789. // and int is always 32 bits.
  790. // No need to mark the typedef with __extension__.
  791. // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
  792. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  793. // This file is part of the GNU C Library.
  794. // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  795. //
  796. // The GNU C Library is free software; you can redistribute it and/or
  797. // modify it under the terms of the GNU Lesser General Public
  798. // License as published by the Free Software Foundation; either
  799. // version 2.1 of the License, or (at your option) any later version.
  800. //
  801. // The GNU C Library is distributed in the hope that it will be useful,
  802. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  803. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  804. // Lesser General Public License for more details.
  805. //
  806. // You should have received a copy of the GNU Lesser General Public
  807. // License along with the GNU C Library. If not, see
  808. // <https://www.gnu.org/licenses/>.
  809. // See <bits/types.h> for the meaning of these macros. This file exists so
  810. // that <bits/types.h> need not vary across different GNU platforms.
  811. // Tell the libc code that off_t and off64_t are actually the same type
  812. // for all ABI purposes, even if possibly expressed as different base types
  813. // for C type-checking purposes.
  814. // Same for ino_t and ino64_t.
  815. // And for __rlim_t and __rlim64_t.
  816. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  817. // And for getitimer, setitimer and rusage
  818. // Number of descriptors that can fit in an `fd_set'.
  819. // bits/time64.h -- underlying types for __time64_t. RISC-V version.
  820. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  821. // This file is part of the GNU C Library.
  822. //
  823. // The GNU C Library is free software; you can redistribute it and/or
  824. // modify it under the terms of the GNU Lesser General Public
  825. // License as published by the Free Software Foundation; either
  826. // version 2.1 of the License, or (at your option) any later version.
  827. //
  828. // The GNU C Library is distributed in the hope that it will be useful,
  829. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  830. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  831. // Lesser General Public License for more details.
  832. //
  833. // You should have received a copy of the GNU Lesser General Public
  834. // License along with the GNU C Library; if not, see
  835. // <https://www.gnu.org/licenses/>.
  836. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  837. // If we already have 64-bit time type then use it.
  838. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  839. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  840. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  841. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  842. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  843. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  844. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  845. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  846. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  847. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  848. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  849. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  850. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  851. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  852. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  853. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  854. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  855. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  856. type X__suseconds64_t = int64 /* types.h:163:33 */
  857. type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
  858. type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
  859. // Clock ID used in clock and timer functions.
  860. type X__clockid_t = int32 /* types.h:169:29 */
  861. // Timer ID returned by `timer_create'.
  862. type X__timer_t = uintptr /* types.h:172:12 */
  863. // Type to represent block size.
  864. type X__blksize_t = int32 /* types.h:175:29 */
  865. // Types from the Large File Support interface.
  866. // Type to count number of disk blocks.
  867. type X__blkcnt_t = int64 /* types.h:180:28 */
  868. type X__blkcnt64_t = int64 /* types.h:181:30 */
  869. // Type to count file system blocks.
  870. type X__fsblkcnt_t = uint64 /* types.h:184:30 */
  871. type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
  872. // Type to count file system nodes.
  873. type X__fsfilcnt_t = uint64 /* types.h:188:30 */
  874. type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
  875. // Type of miscellaneous file system fields.
  876. type X__fsword_t = int64 /* types.h:192:28 */
  877. type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
  878. // Signed long type used in system calls.
  879. type X__syscall_slong_t = int64 /* types.h:197:33 */
  880. // Unsigned long type used in system calls.
  881. type X__syscall_ulong_t = uint64 /* types.h:199:33 */
  882. // These few don't really vary by system, they always correspond
  883. //
  884. // to one of the other defined types.
  885. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
  886. type X__caddr_t = uintptr /* types.h:204:14 */
  887. // Duplicates info from stdint.h but this is used in unistd.h.
  888. type X__intptr_t = int64 /* types.h:207:25 */
  889. // Duplicate info from sys/socket.h.
  890. type X__socklen_t = uint32 /* types.h:210:23 */
  891. // C99: An integer type that can be accessed as an atomic entity,
  892. //
  893. // even in the presence of asynchronous interrupts.
  894. // It is not currently necessary for this to be machine-specific.
  895. type X__sig_atomic_t = int32 /* types.h:215:13 */
  896. // Seconds since the Epoch, visible to user code when time_t is too
  897. // narrow only for consistency with the old way of widening too-narrow
  898. // types. User code should never use __time64_t.
  899. // Get the definitions of O_*, F_*, FD_*: all the
  900. // numbers and flag bits for `open', `fcntl', et al.
  901. // O_*, F_*, FD_* bit values for Linux / RISC-V.
  902. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  903. //
  904. // This file is part of the GNU C Library.
  905. //
  906. // The GNU C Library is free software; you can redistribute it and/or
  907. // modify it under the terms of the GNU Lesser General Public
  908. // License as published by the Free Software Foundation; either
  909. // version 2.1 of the License, or (at your option) any later version.
  910. //
  911. // The GNU C Library is distributed in the hope that it will be useful,
  912. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  913. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  914. // Lesser General Public License for more details.
  915. //
  916. // You should have received a copy of the GNU Lesser General Public
  917. // License along with the GNU C Library; if not, see
  918. // <https://www.gnu.org/licenses/>.
  919. // Determine the wordsize from the preprocessor defines. RISC-V version.
  920. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  921. // This file is part of the GNU C Library.
  922. //
  923. // The GNU C Library is free software; you can redistribute it and/or
  924. // modify it under the terms of the GNU Lesser General Public
  925. // License as published by the Free Software Foundation; either
  926. // version 2.1 of the License, or (at your option) any later version.
  927. //
  928. // The GNU C Library is distributed in the hope that it will be useful,
  929. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  930. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  931. // Lesser General Public License for more details.
  932. //
  933. // You should have received a copy of the GNU Lesser General Public
  934. // License along with the GNU C Library. If not, see
  935. // <https://www.gnu.org/licenses/>.
  936. // In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as
  937. // non-64-bit versions. It will need to be revised for 128-bit.
  938. type Flock = struct {
  939. Fl_type int16
  940. Fl_whence int16
  941. F__ccgo_pad1 [4]byte
  942. Fl_start X__off_t
  943. Fl_len X__off_t
  944. Fl_pid X__pid_t
  945. F__ccgo_pad2 [4]byte
  946. } /* fcntl.h:36:1 */
  947. // Include generic Linux declarations.
  948. // O_*, F_*, FD_* bit values for Linux.
  949. // Copyright (C) 2001-2021 Free Software Foundation, Inc.
  950. // This file is part of the GNU C Library.
  951. //
  952. // The GNU C Library is free software; you can redistribute it and/or
  953. // modify it under the terms of the GNU Lesser General Public
  954. // License as published by the Free Software Foundation; either
  955. // version 2.1 of the License, or (at your option) any later version.
  956. //
  957. // The GNU C Library is distributed in the hope that it will be useful,
  958. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  959. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  960. // Lesser General Public License for more details.
  961. //
  962. // You should have received a copy of the GNU Lesser General Public
  963. // License along with the GNU C Library; if not, see
  964. // <https://www.gnu.org/licenses/>.
  965. // This file contains shared definitions between Linux architectures
  966. // and is included by <bits/fcntl.h> to declare them. The various
  967. // #ifndef cases allow the architecture specific file to define those
  968. // values with different values.
  969. //
  970. // A minimal <bits/fcntl.h> contains just:
  971. //
  972. // struct flock {...}
  973. // #ifdef __USE_LARGEFILE64
  974. // struct flock64 {...}
  975. // #endif
  976. // #include <bits/fcntl-linux.h>
  977. // open/fcntl.
  978. // open file description locks.
  979. //
  980. // Usually record locks held by a process are released on *any* close and are
  981. // not inherited across a fork.
  982. //
  983. // These cmd values will set locks that conflict with process-associated record
  984. // locks, but are "owned" by the opened file description, not the process.
  985. // This means that they are inherited across fork or clone with CLONE_FILES
  986. // like BSD (flock) locks, and they are only released automatically when the
  987. // last reference to the the file description against which they were acquired
  988. // is put.
  989. // For now, Linux has no separate synchronicity options for read
  990. // operations. We define O_RSYNC therefore as the same as O_SYNC
  991. // since this is a superset.
  992. // Values for the second argument to `fcntl'.
  993. // For F_[GET|SET]FD.
  994. // For posix fcntl() and `l_type' field of a `struct flock' for lockf().
  995. // For old implementation of BSD flock.
  996. // Operations for BSD flock, also used by the kernel implementation.
  997. // Define some more compatibility macros to be backward compatible with
  998. // BSD systems which did not managed to hide these kernel macros.
  999. // Advise to `posix_fadvise'.
  1000. // Values for `*at' functions.
  1001. // Detect if open needs mode as a third argument (or for openat as a fourth
  1002. // argument).
  1003. // POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
  1004. //
  1005. // Earlier POSIX standards permitted any type ending in `_t' to be defined
  1006. // by any POSIX header, so we don't conditionalize the definitions here.
  1007. type Mode_t = X__mode_t /* fcntl.h:50:18 */
  1008. type Off_t = X__off64_t /* fcntl.h:58:19 */
  1009. type Pid_t = X__pid_t /* fcntl.h:69:17 */
  1010. // For XPG all symbols from <sys/stat.h> should also be available.
  1011. // NB: Include guard matches what <linux/time.h> uses.
  1012. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1013. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1014. // This file is part of the GNU C Library.
  1015. //
  1016. // The GNU C Library is free software; you can redistribute it and/or
  1017. // modify it under the terms of the GNU Lesser General Public
  1018. // License as published by the Free Software Foundation; either
  1019. // version 2.1 of the License, or (at your option) any later version.
  1020. //
  1021. // The GNU C Library is distributed in the hope that it will be useful,
  1022. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1023. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1024. // Lesser General Public License for more details.
  1025. //
  1026. // You should have received a copy of the GNU Lesser General Public
  1027. // License along with the GNU C Library; if not, see
  1028. // <https://www.gnu.org/licenses/>.
  1029. // Never include this file directly; use <sys/types.h> instead.
  1030. // Endian macros for string.h functions
  1031. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1032. // This file is part of the GNU C Library.
  1033. //
  1034. // The GNU C Library is free software; you can redistribute it and/or
  1035. // modify it under the terms of the GNU Lesser General Public
  1036. // License as published by the Free Software Foundation; either
  1037. // version 2.1 of the License, or (at your option) any later version.
  1038. //
  1039. // The GNU C Library is distributed in the hope that it will be useful,
  1040. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1041. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1042. // Lesser General Public License for more details.
  1043. //
  1044. // You should have received a copy of the GNU Lesser General Public
  1045. // License along with the GNU C Library; if not, see
  1046. // <http://www.gnu.org/licenses/>.
  1047. // Definitions for byte order, according to significance of bytes,
  1048. // from low addresses to high addresses. The value is what you get by
  1049. // putting '4' in the most significant byte, '3' in the second most
  1050. // significant byte, '2' in the second least significant byte, and '1'
  1051. // in the least significant byte, and then writing down one digit for
  1052. // each byte, starting with the byte at the lowest address at the left,
  1053. // and proceeding to the byte with the highest address at the right.
  1054. // This file defines `__BYTE_ORDER' for the particular machine.
  1055. // RISC-V is little-endian.
  1056. // Some machines may need to use a different endianness for floating point
  1057. // values.
  1058. // bits/types.h -- definitions of __*_t types underlying *_t types.
  1059. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1060. // This file is part of the GNU C Library.
  1061. //
  1062. // The GNU C Library is free software; you can redistribute it and/or
  1063. // modify it under the terms of the GNU Lesser General Public
  1064. // License as published by the Free Software Foundation; either
  1065. // version 2.1 of the License, or (at your option) any later version.
  1066. //
  1067. // The GNU C Library is distributed in the hope that it will be useful,
  1068. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1069. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1070. // Lesser General Public License for more details.
  1071. //
  1072. // You should have received a copy of the GNU Lesser General Public
  1073. // License along with the GNU C Library; if not, see
  1074. // <https://www.gnu.org/licenses/>.
  1075. // Never include this file directly; use <sys/types.h> instead.
  1076. // Returned by `time'.
  1077. type Time_t = X__time_t /* time_t.h:10:18 */
  1078. // POSIX.1b structure for a time value. This is like a `struct timeval' but
  1079. //
  1080. // has nanoseconds instead of microseconds.
  1081. type Timespec = struct {
  1082. Ftv_sec X__time_t
  1083. Ftv_nsec X__syscall_slong_t
  1084. } /* struct_timespec.h:11:1 */
  1085. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1086. // This file is part of the GNU C Library.
  1087. //
  1088. // The GNU C Library is free software; you can redistribute it and/or
  1089. // modify it under the terms of the GNU Lesser General Public
  1090. // License as published by the Free Software Foundation; either
  1091. // version 2.1 of the License, or (at your option) any later version.
  1092. //
  1093. // The GNU C Library is distributed in the hope that it will be useful,
  1094. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1095. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1096. // Lesser General Public License for more details.
  1097. //
  1098. // You should have received a copy of the GNU Lesser General Public
  1099. // License along with the GNU C Library; if not, see
  1100. // <https://www.gnu.org/licenses/>.
  1101. // Definition for struct stat.
  1102. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  1103. // This file is part of the GNU C Library.
  1104. //
  1105. // The GNU C Library is free software; you can redistribute it and/or
  1106. // modify it under the terms of the GNU Lesser General Public
  1107. // License as published by the Free Software Foundation; either
  1108. // version 2.1 of the License, or (at your option) any later version.
  1109. //
  1110. // The GNU C Library is distributed in the hope that it will be useful,
  1111. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1112. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1113. // Lesser General Public License for more details.
  1114. //
  1115. // You should have received a copy of the GNU Lesser General Public
  1116. // License along with the GNU C Library. If not, see
  1117. // <https://www.gnu.org/licenses/>.
  1118. // Endian macros for string.h functions
  1119. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  1120. // This file is part of the GNU C Library.
  1121. //
  1122. // The GNU C Library is free software; you can redistribute it and/or
  1123. // modify it under the terms of the GNU Lesser General Public
  1124. // License as published by the Free Software Foundation; either
  1125. // version 2.1 of the License, or (at your option) any later version.
  1126. //
  1127. // The GNU C Library is distributed in the hope that it will be useful,
  1128. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1129. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1130. // Lesser General Public License for more details.
  1131. //
  1132. // You should have received a copy of the GNU Lesser General Public
  1133. // License along with the GNU C Library; if not, see
  1134. // <http://www.gnu.org/licenses/>.
  1135. // Determine the wordsize from the preprocessor defines. RISC-V version.
  1136. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  1137. // This file is part of the GNU C Library.
  1138. //
  1139. // The GNU C Library is free software; you can redistribute it and/or
  1140. // modify it under the terms of the GNU Lesser General Public
  1141. // License as published by the Free Software Foundation; either
  1142. // version 2.1 of the License, or (at your option) any later version.
  1143. //
  1144. // The GNU C Library is distributed in the hope that it will be useful,
  1145. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1146. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1147. // Lesser General Public License for more details.
  1148. //
  1149. // You should have received a copy of the GNU Lesser General Public
  1150. // License along with the GNU C Library. If not, see
  1151. // <https://www.gnu.org/licenses/>.
  1152. type Stat = struct {
  1153. Fst_dev X__dev_t
  1154. Fst_ino X__ino64_t
  1155. Fst_mode X__mode_t
  1156. Fst_nlink X__nlink_t
  1157. Fst_uid X__uid_t
  1158. Fst_gid X__gid_t
  1159. Fst_rdev X__dev_t
  1160. F__pad1 X__dev_t
  1161. Fst_size X__off64_t
  1162. Fst_blksize X__blksize_t
  1163. F__pad2 int32
  1164. Fst_blocks X__blkcnt64_t
  1165. Fst_atim struct {
  1166. Ftv_sec X__time_t
  1167. Ftv_nsec X__syscall_slong_t
  1168. }
  1169. Fst_mtim struct {
  1170. Ftv_sec X__time_t
  1171. Ftv_nsec X__syscall_slong_t
  1172. }
  1173. Fst_ctim struct {
  1174. Ftv_sec X__time_t
  1175. Ftv_nsec X__syscall_slong_t
  1176. }
  1177. F__glibc_reserved [2]int32
  1178. } /* struct_stat.h:44:1 */
  1179. // Define some inlines helping to catch common problems.
  1180. var _ uint8 /* gen.c:2:13: */