utime_linux_riscv64.go 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  1. // Code generated by 'ccgo utime/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 utime/utime_linux_riscv64.go -pkgname utime', DO NOT EDIT.
  2. package utime
  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. X_ATFILE_SOURCE = 1
  15. X_BITS_TIME64_H = 1
  16. X_BITS_TYPESIZES_H = 1
  17. X_BITS_TYPES_H = 1
  18. X_DEFAULT_SOURCE = 1
  19. X_FEATURES_H = 1
  20. X_FILE_OFFSET_BITS = 64
  21. X_LP64 = 1
  22. X_POSIX_C_SOURCE = 200809
  23. X_POSIX_SOURCE = 1
  24. X_STDC_PREDEF_H = 1
  25. X_SYS_CDEFS_H = 1
  26. X_UTIME_H = 1
  27. Linux = 1
  28. Unix = 1
  29. )
  30. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  31. type Size_t = uint64 /* <builtin>:9:23 */
  32. type Wchar_t = int32 /* <builtin>:15:24 */
  33. type X__int128_t = struct {
  34. Flo int64
  35. Fhi int64
  36. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  37. type X__uint128_t = struct {
  38. Flo uint64
  39. Fhi uint64
  40. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  41. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  42. type X__float128 = float64 /* <builtin>:47:21 */
  43. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  44. // This file is part of the GNU C Library.
  45. //
  46. // The GNU C Library is free software; you can redistribute it and/or
  47. // modify it under the terms of the GNU Lesser General Public
  48. // License as published by the Free Software Foundation; either
  49. // version 2.1 of the License, or (at your option) any later version.
  50. //
  51. // The GNU C Library is distributed in the hope that it will be useful,
  52. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  53. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  54. // Lesser General Public License for more details.
  55. //
  56. // You should have received a copy of the GNU Lesser General Public
  57. // License along with the GNU C Library; if not, see
  58. // <https://www.gnu.org/licenses/>.
  59. // POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
  60. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  61. // This file is part of the GNU C Library.
  62. //
  63. // The GNU C Library is free software; you can redistribute it and/or
  64. // modify it under the terms of the GNU Lesser General Public
  65. // License as published by the Free Software Foundation; either
  66. // version 2.1 of the License, or (at your option) any later version.
  67. //
  68. // The GNU C Library is distributed in the hope that it will be useful,
  69. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  70. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  71. // Lesser General Public License for more details.
  72. //
  73. // You should have received a copy of the GNU Lesser General Public
  74. // License along with the GNU C Library; if not, see
  75. // <https://www.gnu.org/licenses/>.
  76. // These are defined by the user (or the compiler)
  77. // to specify the desired environment:
  78. //
  79. // __STRICT_ANSI__ ISO Standard C.
  80. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  81. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  82. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  83. // __STDC_WANT_LIB_EXT2__
  84. // Extensions to ISO C99 from TR 27431-2:2010.
  85. // __STDC_WANT_IEC_60559_BFP_EXT__
  86. // Extensions to ISO C11 from TS 18661-1:2014.
  87. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  88. // Extensions to ISO C11 from TS 18661-4:2015.
  89. // __STDC_WANT_IEC_60559_TYPES_EXT__
  90. // Extensions to ISO C11 from TS 18661-3:2015.
  91. // __STDC_WANT_IEC_60559_EXT__
  92. // ISO C2X interfaces defined only in Annex F.
  93. //
  94. // _POSIX_SOURCE IEEE Std 1003.1.
  95. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  96. // if >=199309L, add IEEE Std 1003.1b-1993;
  97. // if >=199506L, add IEEE Std 1003.1c-1995;
  98. // if >=200112L, all of IEEE 1003.1-2004
  99. // if >=200809L, all of IEEE 1003.1-2008
  100. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  101. // Single Unix conformance is wanted, to 600 for the
  102. // sixth revision, to 700 for the seventh revision.
  103. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  104. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  105. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  106. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  107. // _ATFILE_SOURCE Additional *at interfaces.
  108. // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
  109. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  110. // _GNU_SOURCE All of the above, plus GNU extensions.
  111. // _DEFAULT_SOURCE The default set of features (taking precedence over
  112. // __STRICT_ANSI__).
  113. //
  114. // _FORTIFY_SOURCE Add security hardening to many library functions.
  115. // Set to 1 or 2; 2 performs stricter checks than 1.
  116. //
  117. // _REENTRANT, _THREAD_SAFE
  118. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  119. //
  120. // The `-ansi' switch to the GNU C compiler, and standards conformance
  121. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  122. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  123. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  124. // 200809L, as well as enabling miscellaneous functions from BSD and
  125. // SVID. If more than one of these are defined, they accumulate. For
  126. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  127. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  128. //
  129. // These are defined by this file and are used by the
  130. // header files to decide what to declare or define:
  131. //
  132. // __GLIBC_USE (F) Define things from feature set F. This is defined
  133. // to 1 or 0; the subsequent macros are either defined
  134. // or undefined, and those tests should be moved to
  135. // __GLIBC_USE.
  136. // __USE_ISOC11 Define ISO C11 things.
  137. // __USE_ISOC99 Define ISO C99 things.
  138. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  139. // __USE_ISOCXX11 Define ISO C++11 things.
  140. // __USE_POSIX Define IEEE Std 1003.1 things.
  141. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  142. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  143. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  144. // __USE_XOPEN Define XPG things.
  145. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  146. // __USE_UNIX98 Define Single Unix V2 things.
  147. // __USE_XOPEN2K Define XPG6 things.
  148. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  149. // __USE_XOPEN2K8 Define XPG7 things.
  150. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  151. // __USE_LARGEFILE Define correct standard I/O things.
  152. // __USE_LARGEFILE64 Define LFS things with separate names.
  153. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  154. // __USE_MISC Define things from 4.3BSD or System V Unix.
  155. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  156. // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
  157. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  158. // __USE_GNU Define GNU extensions.
  159. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  160. //
  161. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  162. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  163. // only for compatibility. All new code should use the other symbols
  164. // to test for features.
  165. //
  166. // All macros listed above as possibly being defined by this file are
  167. // explicitly undefined if they are not explicitly defined.
  168. // Feature-test macros that are not defined by the user or compiler
  169. // but are implied by the other feature-test macros defined (or by the
  170. // lack of any definitions) are defined by the file.
  171. //
  172. // ISO C feature test macros depend on the definition of the macro
  173. // when an affected header is included, not when the first system
  174. // header is included, and so they are handled in
  175. // <bits/libc-header-start.h>, which does not have a multiple include
  176. // guard. Feature test macros that can be handled from the first
  177. // system header included are handled here.
  178. // Undefine everything, so we get a clean slate.
  179. // Suppress kernel-name space pollution unless user expressedly asks
  180. // for it.
  181. // Convenience macro to test the version of gcc.
  182. // Use like this:
  183. // #if __GNUC_PREREQ (2,8)
  184. // ... code requiring gcc 2.8 or later ...
  185. // #endif
  186. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  187. // added in 2.0.
  188. // Similarly for clang. Features added to GCC after version 4.2 may
  189. // or may not also be available in clang, and clang's definitions of
  190. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  191. // features can be queried via __has_extension/__has_feature.
  192. // Whether to use feature set F.
  193. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  194. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  195. // issue a warning; the expectation is that the source is being
  196. // transitioned to use the new macro.
  197. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  198. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  199. // define _DEFAULT_SOURCE.
  200. // This is to enable the ISO C2X extension.
  201. // This is to enable the ISO C11 extension.
  202. // This is to enable the ISO C99 extension.
  203. // This is to enable the ISO C90 Amendment 1:1995 extension.
  204. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  205. // is defined, use POSIX.1-2008 (or another version depending on
  206. // _XOPEN_SOURCE).
  207. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  208. // defined in all multithreaded code. GNU libc has not required this
  209. // for many years. We now treat them as compatibility synonyms for
  210. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  211. // comprehensive support for multithreaded code. Using them never
  212. // lowers the selected level of POSIX conformance, only raises it.
  213. // Features part to handle 64-bit time_t support.
  214. // Copyright (C) 2021 Free Software Foundation, Inc.
  215. // This file is part of the GNU C Library.
  216. //
  217. // The GNU C Library is free software; you can redistribute it and/or
  218. // modify it under the terms of the GNU Lesser General Public
  219. // License as published by the Free Software Foundation; either
  220. // version 2.1 of the License, or (at your option) any later version.
  221. //
  222. // The GNU C Library is distributed in the hope that it will be useful,
  223. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  224. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  225. // Lesser General Public License for more details.
  226. //
  227. // You should have received a copy of the GNU Lesser General Public
  228. // License along with the GNU C Library; if not, see
  229. // <https://www.gnu.org/licenses/>.
  230. // We need to know the word size in order to check the time size.
  231. // Determine the wordsize from the preprocessor defines. RISC-V version.
  232. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  233. // This file is part of the GNU C Library.
  234. //
  235. // The GNU C Library is free software; you can redistribute it and/or
  236. // modify it under the terms of the GNU Lesser General Public
  237. // License as published by the Free Software Foundation; either
  238. // version 2.1 of the License, or (at your option) any later version.
  239. //
  240. // The GNU C Library is distributed in the hope that it will be useful,
  241. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  242. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  243. // Lesser General Public License for more details.
  244. //
  245. // You should have received a copy of the GNU Lesser General Public
  246. // License along with the GNU C Library. If not, see
  247. // <https://www.gnu.org/licenses/>.
  248. // Bit size of the time_t type at glibc build time, RISC-V case.
  249. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  250. // This file is part of the GNU C Library.
  251. //
  252. // The GNU C Library is free software; you can redistribute it and/or
  253. // modify it under the terms of the GNU Lesser General Public
  254. // License as published by the Free Software Foundation; either
  255. // version 2.1 of the License, or (at your option) any later version.
  256. //
  257. // The GNU C Library is distributed in the hope that it will be useful,
  258. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  259. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  260. // Lesser General Public License for more details.
  261. //
  262. // You should have received a copy of the GNU Lesser General Public
  263. // License along with the GNU C Library; if not, see
  264. // <https://www.gnu.org/licenses/>.
  265. // Determine the wordsize from the preprocessor defines. RISC-V version.
  266. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  267. // This file is part of the GNU C Library.
  268. //
  269. // The GNU C Library is free software; you can redistribute it and/or
  270. // modify it under the terms of the GNU Lesser General Public
  271. // License as published by the Free Software Foundation; either
  272. // version 2.1 of the License, or (at your option) any later version.
  273. //
  274. // The GNU C Library is distributed in the hope that it will be useful,
  275. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  276. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  277. // Lesser General Public License for more details.
  278. //
  279. // You should have received a copy of the GNU Lesser General Public
  280. // License along with the GNU C Library. If not, see
  281. // <https://www.gnu.org/licenses/>.
  282. // RV32 and RV64 both use 64-bit time_t
  283. // The function 'gets' existed in C89, but is impossible to use
  284. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  285. // compatibility with various implementations of <cstdio>, this test
  286. // must consider only the value of __cplusplus when compiling C++.
  287. // GNU formerly extended the scanf functions with modified format
  288. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  289. // input using malloc. This extension conflicts with ISO C99, which
  290. // defines %a as a standalone format specifier that reads a floating-
  291. // point number; moreover, POSIX.1-2008 provides the same feature
  292. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  293. //
  294. // We now follow C99 unless GNU extensions are active and the compiler
  295. // is specifically in C89 or C++98 mode (strict or not). For
  296. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  297. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  298. // old extension.
  299. // Get definitions of __STDC_* predefined macros, if the compiler has
  300. // not preincluded this header automatically.
  301. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  302. // This file is part of the GNU C Library.
  303. //
  304. // The GNU C Library is free software; you can redistribute it and/or
  305. // modify it under the terms of the GNU Lesser General Public
  306. // License as published by the Free Software Foundation; either
  307. // version 2.1 of the License, or (at your option) any later version.
  308. //
  309. // The GNU C Library is distributed in the hope that it will be useful,
  310. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  311. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  312. // Lesser General Public License for more details.
  313. //
  314. // You should have received a copy of the GNU Lesser General Public
  315. // License along with the GNU C Library; if not, see
  316. // <https://www.gnu.org/licenses/>.
  317. // This macro indicates that the installed library is the GNU C Library.
  318. // For historic reasons the value now is 6 and this will stay from now
  319. // on. The use of this variable is deprecated. Use __GLIBC__ and
  320. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  321. // GNU C library version and use the values in <gnu/lib-names.h> to get
  322. // the sonames of the shared libraries.
  323. // Major and minor version number of the GNU C library package. Use
  324. // these macros to test for features in specific releases.
  325. // This is here only because every header file already includes this one.
  326. // Copyright (C) 1992-2021 Free Software Foundation, Inc.
  327. // This file is part of the GNU C Library.
  328. //
  329. // The GNU C Library is free software; you can redistribute it and/or
  330. // modify it under the terms of the GNU Lesser General Public
  331. // License as published by the Free Software Foundation; either
  332. // version 2.1 of the License, or (at your option) any later version.
  333. //
  334. // The GNU C Library is distributed in the hope that it will be useful,
  335. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  336. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  337. // Lesser General Public License for more details.
  338. //
  339. // You should have received a copy of the GNU Lesser General Public
  340. // License along with the GNU C Library; if not, see
  341. // <https://www.gnu.org/licenses/>.
  342. // We are almost always included from features.h.
  343. // The GNU libc does not support any K&R compilers or the traditional mode
  344. // of ISO C compilers anymore. Check for some of the combinations not
  345. // supported anymore.
  346. // Some user header file might have defined this before.
  347. // Compilers that lack __has_attribute may object to
  348. // #if defined __has_attribute && __has_attribute (...)
  349. // even though they do not need to evaluate the right-hand side of the &&.
  350. // Similarly for __has_builtin, etc.
  351. // All functions, except those with callbacks or those that
  352. // synchronize memory, are leaf functions.
  353. // GCC can always grok prototypes. For C++ programs we add throw()
  354. // to help it optimize the function calls. But this only works with
  355. // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
  356. // as non-throwing using a function attribute since programs can use
  357. // the -fexceptions options for C code as well.
  358. // These two macros are not used in glibc anymore. They are kept here
  359. // only because some other projects expect the macros to be defined.
  360. // For these things, GCC behaves the ANSI way normally,
  361. // and the non-ANSI way under -traditional.
  362. // This is not a typedef so `const __ptr_t' does the right thing.
  363. // C++ needs to know that types and declarations are C, not C++.
  364. // Fortify support.
  365. // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
  366. // Support for flexible arrays.
  367. // Headers that should use flexible arrays only if they're "real"
  368. // (e.g. only if they won't affect sizeof()) should test
  369. // #if __glibc_c99_flexarr_available.
  370. // __asm__ ("xyz") is used throughout the headers to rename functions
  371. // at the assembly language level. This is wrapped by the __REDIRECT
  372. // macro, in order to support compilers that can do this some other
  373. // way. When compilers don't support asm-names at all, we have to do
  374. // preprocessor tricks instead (which don't have exactly the right
  375. // semantics, but it's the best we can do).
  376. //
  377. // Example:
  378. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  379. //
  380. // #elif __SOME_OTHER_COMPILER__
  381. //
  382. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  383. // GCC and clang have various useful declarations that can be made with
  384. // the '__attribute__' syntax. All of the ways we use this do fine if
  385. // they are omitted for compilers that don't understand it.
  386. // At some point during the gcc 2.96 development the `malloc' attribute
  387. // for functions was introduced. We don't want to use it unconditionally
  388. // (although this would be possible) since it generates warnings.
  389. // Tell the compiler which arguments to an allocation function
  390. // indicate the size of the allocation.
  391. // At some point during the gcc 2.96 development the `pure' attribute
  392. // for functions was introduced. We don't want to use it unconditionally
  393. // (although this would be possible) since it generates warnings.
  394. // This declaration tells the compiler that the value is constant.
  395. // At some point during the gcc 3.1 development the `used' attribute
  396. // for functions was introduced. We don't want to use it unconditionally
  397. // (although this would be possible) since it generates warnings.
  398. // Since version 3.2, gcc allows marking deprecated functions.
  399. // Since version 4.5, gcc also allows one to specify the message printed
  400. // when a deprecated function is used. clang claims to be gcc 4.2, but
  401. // may also support this feature.
  402. // At some point during the gcc 2.8 development the `format_arg' attribute
  403. // for functions was introduced. We don't want to use it unconditionally
  404. // (although this would be possible) since it generates warnings.
  405. // If several `format_arg' attributes are given for the same function, in
  406. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  407. // all designated arguments are considered.
  408. // At some point during the gcc 2.97 development the `strfmon' format
  409. // attribute for functions was introduced. We don't want to use it
  410. // unconditionally (although this would be possible) since it
  411. // generates warnings.
  412. // The nonnull function attribute marks pointer parameters that
  413. // must not be NULL.
  414. // The returns_nonnull function attribute marks the return type of the function
  415. // as always being non-null.
  416. // If fortification mode, we warn about unused results of certain
  417. // function calls which can lead to problems.
  418. // Forces a function to be always inlined.
  419. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  420. // it conflicts with this definition. Therefore undefine it first to
  421. // allow either header to be included first.
  422. // Associate error messages with the source location of the call site rather
  423. // than with the source location inside the function.
  424. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  425. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  426. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  427. // older than 4.3 may define these macros and still not guarantee GNU inlining
  428. // semantics.
  429. //
  430. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  431. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  432. // __GNUC_GNU_INLINE__ macro definitions.
  433. // GCC 4.3 and above allow passing all anonymous arguments of an
  434. // __extern_always_inline function to some other vararg function.
  435. // It is possible to compile containing GCC extensions even if GCC is
  436. // run in pedantic mode if the uses are carefully marked using the
  437. // `__extension__' keyword. But this is not generally available before
  438. // version 2.8.
  439. // __restrict is known in EGCS 1.2 and above, and in clang.
  440. // It works also in C++ mode (outside of arrays), but only when spelled
  441. // as '__restrict', not 'restrict'.
  442. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  443. // array_name[restrict]
  444. // GCC 3.1 and clang support this.
  445. // This syntax is not usable in C++ mode.
  446. // Describes a char array whose address can safely be passed as the first
  447. // argument to strncpy and strncat, as the char array is not necessarily
  448. // a NUL-terminated string.
  449. // Undefine (also defined in libc-symbols.h).
  450. // Copies attributes from the declaration or type referenced by
  451. // the argument.
  452. // The #ifndef lets Gnulib avoid including these on non-glibc
  453. // platforms, where the includes typically do not exist.
  454. // Determine the wordsize from the preprocessor defines. RISC-V version.
  455. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  456. // This file is part of the GNU C Library.
  457. //
  458. // The GNU C Library is free software; you can redistribute it and/or
  459. // modify it under the terms of the GNU Lesser General Public
  460. // License as published by the Free Software Foundation; either
  461. // version 2.1 of the License, or (at your option) any later version.
  462. //
  463. // The GNU C Library is distributed in the hope that it will be useful,
  464. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  465. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  466. // Lesser General Public License for more details.
  467. //
  468. // You should have received a copy of the GNU Lesser General Public
  469. // License along with the GNU C Library. If not, see
  470. // <https://www.gnu.org/licenses/>.
  471. // Properties of long double type. ldbl-128 version.
  472. // Copyright (C) 2016-2021 Free Software Foundation, Inc.
  473. // This file is part of the GNU C Library.
  474. //
  475. // The GNU C Library is free software; you can redistribute it and/or
  476. // modify it under the terms of the GNU Lesser General Public
  477. // License published by the Free Software Foundation; either
  478. // version 2.1 of the License, or (at your option) any later version.
  479. //
  480. // The GNU C Library is distributed in the hope that it will be useful,
  481. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  482. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  483. // Lesser General Public License for more details.
  484. //
  485. // You should have received a copy of the GNU Lesser General Public
  486. // License along with the GNU C Library; if not, see
  487. // <https://www.gnu.org/licenses/>.
  488. // long double is distinct from double, so there is nothing to
  489. // define here.
  490. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  491. // intended for use in preprocessor macros.
  492. //
  493. // Note: MESSAGE must be a _single_ string; concatenation of string
  494. // literals is not supported.
  495. // Generic selection (ISO C11) is a C-only feature, available in GCC
  496. // since version 4.9. Previous versions do not provide generic
  497. // selection, even though they might set __STDC_VERSION__ to 201112L,
  498. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  499. // when testing __STDC_VERSION__ for generic selection support.
  500. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  501. // check is required to enable the use of generic selection.
  502. // Designates a 1-based positional argument ref-index of pointer type
  503. // that can be used to access size-index elements of the pointed-to
  504. // array according to access mode, or at least one element when
  505. // size-index is not provided:
  506. // access (access-mode, <ref-index> [, <size-index>])
  507. // Designates dealloc as a function to call to deallocate objects
  508. // allocated by the declared function.
  509. // Specify that a function such as setjmp or vfork may return
  510. // twice.
  511. // If we don't have __REDIRECT, prototypes will be missing if
  512. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  513. // Decide whether we can define 'extern inline' functions in headers.
  514. // This is here only because every header file already includes this one.
  515. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  516. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  517. // that will always return failure (and set errno to ENOSYS).
  518. // This file is automatically generated.
  519. // This file selects the right generated file of `__stub_FUNCTION' macros
  520. // based on the architecture being compiled for.
  521. // Determine the wordsize from the preprocessor defines. RISC-V version.
  522. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  523. // This file is part of the GNU C Library.
  524. //
  525. // The GNU C Library is free software; you can redistribute it and/or
  526. // modify it under the terms of the GNU Lesser General Public
  527. // License as published by the Free Software Foundation; either
  528. // version 2.1 of the License, or (at your option) any later version.
  529. //
  530. // The GNU C Library is distributed in the hope that it will be useful,
  531. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  532. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  533. // Lesser General Public License for more details.
  534. //
  535. // You should have received a copy of the GNU Lesser General Public
  536. // License along with the GNU C Library. If not, see
  537. // <https://www.gnu.org/licenses/>.
  538. // This file is automatically generated.
  539. // It defines a symbol `__stub_FUNCTION' for each function
  540. // in the C library which is a stub, meaning it will fail
  541. // every time called, usually setting errno to ENOSYS.
  542. // bits/types.h -- definitions of __*_t types underlying *_t types.
  543. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  544. // This file is part of the GNU C Library.
  545. //
  546. // The GNU C Library is free software; you can redistribute it and/or
  547. // modify it under the terms of the GNU Lesser General Public
  548. // License as published by the Free Software Foundation; either
  549. // version 2.1 of the License, or (at your option) any later version.
  550. //
  551. // The GNU C Library is distributed in the hope that it will be useful,
  552. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  553. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  554. // Lesser General Public License for more details.
  555. //
  556. // You should have received a copy of the GNU Lesser General Public
  557. // License along with the GNU C Library; if not, see
  558. // <https://www.gnu.org/licenses/>.
  559. // Never include this file directly; use <sys/types.h> instead.
  560. // Copyright (C) 1991-2021 Free Software Foundation, Inc.
  561. // This file is part of the GNU C Library.
  562. //
  563. // The GNU C Library is free software; you can redistribute it and/or
  564. // modify it under the terms of the GNU Lesser General Public
  565. // License as published by the Free Software Foundation; either
  566. // version 2.1 of the License, or (at your option) any later version.
  567. //
  568. // The GNU C Library is distributed in the hope that it will be useful,
  569. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  570. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  571. // Lesser General Public License for more details.
  572. //
  573. // You should have received a copy of the GNU Lesser General Public
  574. // License along with the GNU C Library; if not, see
  575. // <https://www.gnu.org/licenses/>.
  576. // Determine the wordsize from the preprocessor defines. RISC-V version.
  577. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  578. // This file is part of the GNU C Library.
  579. //
  580. // The GNU C Library is free software; you can redistribute it and/or
  581. // modify it under the terms of the GNU Lesser General Public
  582. // License as published by the Free Software Foundation; either
  583. // version 2.1 of the License, or (at your option) any later version.
  584. //
  585. // The GNU C Library is distributed in the hope that it will be useful,
  586. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  587. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  588. // Lesser General Public License for more details.
  589. //
  590. // You should have received a copy of the GNU Lesser General Public
  591. // License along with the GNU C Library. If not, see
  592. // <https://www.gnu.org/licenses/>.
  593. // Bit size of the time_t type at glibc build time, RISC-V case.
  594. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  595. // This file is part of the GNU C Library.
  596. //
  597. // The GNU C Library is free software; you can redistribute it and/or
  598. // modify it under the terms of the GNU Lesser General Public
  599. // License as published by the Free Software Foundation; either
  600. // version 2.1 of the License, or (at your option) any later version.
  601. //
  602. // The GNU C Library is distributed in the hope that it will be useful,
  603. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  604. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  605. // Lesser General Public License for more details.
  606. //
  607. // You should have received a copy of the GNU Lesser General Public
  608. // License along with the GNU C Library; if not, see
  609. // <https://www.gnu.org/licenses/>.
  610. // Determine the wordsize from the preprocessor defines. RISC-V version.
  611. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  612. // This file is part of the GNU C Library.
  613. //
  614. // The GNU C Library is free software; you can redistribute it and/or
  615. // modify it under the terms of the GNU Lesser General Public
  616. // License as published by the Free Software Foundation; either
  617. // version 2.1 of the License, or (at your option) any later version.
  618. //
  619. // The GNU C Library is distributed in the hope that it will be useful,
  620. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  621. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  622. // Lesser General Public License for more details.
  623. //
  624. // You should have received a copy of the GNU Lesser General Public
  625. // License along with the GNU C Library. If not, see
  626. // <https://www.gnu.org/licenses/>.
  627. // RV32 and RV64 both use 64-bit time_t
  628. // Convenience types.
  629. type X__u_char = uint8 /* types.h:31:23 */
  630. type X__u_short = uint16 /* types.h:32:28 */
  631. type X__u_int = uint32 /* types.h:33:22 */
  632. type X__u_long = uint64 /* types.h:34:27 */
  633. // Fixed-size types, underlying types depend on word size and compiler.
  634. type X__int8_t = int8 /* types.h:37:21 */
  635. type X__uint8_t = uint8 /* types.h:38:23 */
  636. type X__int16_t = int16 /* types.h:39:26 */
  637. type X__uint16_t = uint16 /* types.h:40:28 */
  638. type X__int32_t = int32 /* types.h:41:20 */
  639. type X__uint32_t = uint32 /* types.h:42:22 */
  640. type X__int64_t = int64 /* types.h:44:25 */
  641. type X__uint64_t = uint64 /* types.h:45:27 */
  642. // Smallest types with at least a given width.
  643. type X__int_least8_t = X__int8_t /* types.h:52:18 */
  644. type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
  645. type X__int_least16_t = X__int16_t /* types.h:54:19 */
  646. type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  647. type X__int_least32_t = X__int32_t /* types.h:56:19 */
  648. type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  649. type X__int_least64_t = X__int64_t /* types.h:58:19 */
  650. type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  651. // quad_t is also 64 bits.
  652. type X__quad_t = int64 /* types.h:63:18 */
  653. type X__u_quad_t = uint64 /* types.h:64:27 */
  654. // Largest integral types.
  655. type X__intmax_t = int64 /* types.h:72:18 */
  656. type X__uintmax_t = uint64 /* types.h:73:27 */
  657. // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  658. // macros for each of the OS types we define below. The definitions
  659. // of those macros must use the following macros for underlying types.
  660. // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  661. // variants of each of the following integer types on this machine.
  662. //
  663. // 16 -- "natural" 16-bit type (always short)
  664. // 32 -- "natural" 32-bit type (always int)
  665. // 64 -- "natural" 64-bit type (long or long long)
  666. // LONG32 -- 32-bit type, traditionally long
  667. // QUAD -- 64-bit type, traditionally long long
  668. // WORD -- natural type of __WORDSIZE bits (int or long)
  669. // LONGWORD -- type of __WORDSIZE bits, traditionally long
  670. //
  671. // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  672. // conventional uses of `long' or `long long' type modifiers match the
  673. // types we define, even when a less-adorned type would be the same size.
  674. // This matters for (somewhat) portably writing printf/scanf formats for
  675. // these types, where using the appropriate l or ll format modifiers can
  676. // make the typedefs and the formats match up across all GNU platforms. If
  677. // we used `long' when it's 64 bits where `long long' is expected, then the
  678. // compiler would warn about the formats not matching the argument types,
  679. // and the programmer changing them to shut up the compiler would break the
  680. // program's portability.
  681. //
  682. // Here we assume what is presently the case in all the GCC configurations
  683. // we support: long long is always 64 bits, long is always word/address size,
  684. // and int is always 32 bits.
  685. // No need to mark the typedef with __extension__.
  686. // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
  687. // Copyright (C) 2011-2021 Free Software Foundation, Inc.
  688. // This file is part of the GNU C Library.
  689. // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  690. //
  691. // The GNU C Library is free software; you can redistribute it and/or
  692. // modify it under the terms of the GNU Lesser General Public
  693. // License as published by the Free Software Foundation; either
  694. // version 2.1 of the License, or (at your option) any later version.
  695. //
  696. // The GNU C Library is distributed in the hope that it will be useful,
  697. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  698. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  699. // Lesser General Public License for more details.
  700. //
  701. // You should have received a copy of the GNU Lesser General Public
  702. // License along with the GNU C Library. If not, see
  703. // <https://www.gnu.org/licenses/>.
  704. // See <bits/types.h> for the meaning of these macros. This file exists so
  705. // that <bits/types.h> need not vary across different GNU platforms.
  706. // Tell the libc code that off_t and off64_t are actually the same type
  707. // for all ABI purposes, even if possibly expressed as different base types
  708. // for C type-checking purposes.
  709. // Same for ino_t and ino64_t.
  710. // And for __rlim_t and __rlim64_t.
  711. // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
  712. // And for getitimer, setitimer and rusage
  713. // Number of descriptors that can fit in an `fd_set'.
  714. // bits/time64.h -- underlying types for __time64_t. RISC-V version.
  715. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  716. // This file is part of the GNU C Library.
  717. //
  718. // The GNU C Library is free software; you can redistribute it and/or
  719. // modify it under the terms of the GNU Lesser General Public
  720. // License as published by the Free Software Foundation; either
  721. // version 2.1 of the License, or (at your option) any later version.
  722. //
  723. // The GNU C Library is distributed in the hope that it will be useful,
  724. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  725. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  726. // Lesser General Public License for more details.
  727. //
  728. // You should have received a copy of the GNU Lesser General Public
  729. // License along with the GNU C Library; if not, see
  730. // <https://www.gnu.org/licenses/>.
  731. // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  732. // If we already have 64-bit time type then use it.
  733. type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
  734. type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
  735. type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
  736. type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
  737. type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
  738. type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
  739. type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
  740. type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
  741. type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  742. type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
  743. type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  744. type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
  745. type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
  746. type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
  747. type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
  748. type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
  749. type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
  750. type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
  751. type X__suseconds64_t = int64 /* types.h:163:33 */
  752. type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
  753. type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
  754. // Clock ID used in clock and timer functions.
  755. type X__clockid_t = int32 /* types.h:169:29 */
  756. // Timer ID returned by `timer_create'.
  757. type X__timer_t = uintptr /* types.h:172:12 */
  758. // Type to represent block size.
  759. type X__blksize_t = int32 /* types.h:175:29 */
  760. // Types from the Large File Support interface.
  761. // Type to count number of disk blocks.
  762. type X__blkcnt_t = int64 /* types.h:180:28 */
  763. type X__blkcnt64_t = int64 /* types.h:181:30 */
  764. // Type to count file system blocks.
  765. type X__fsblkcnt_t = uint64 /* types.h:184:30 */
  766. type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
  767. // Type to count file system nodes.
  768. type X__fsfilcnt_t = uint64 /* types.h:188:30 */
  769. type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
  770. // Type of miscellaneous file system fields.
  771. type X__fsword_t = int64 /* types.h:192:28 */
  772. type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
  773. // Signed long type used in system calls.
  774. type X__syscall_slong_t = int64 /* types.h:197:33 */
  775. // Unsigned long type used in system calls.
  776. type X__syscall_ulong_t = uint64 /* types.h:199:33 */
  777. // These few don't really vary by system, they always correspond
  778. //
  779. // to one of the other defined types.
  780. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
  781. type X__caddr_t = uintptr /* types.h:204:14 */
  782. // Duplicates info from stdint.h but this is used in unistd.h.
  783. type X__intptr_t = int64 /* types.h:207:25 */
  784. // Duplicate info from sys/socket.h.
  785. type X__socklen_t = uint32 /* types.h:210:23 */
  786. // C99: An integer type that can be accessed as an atomic entity,
  787. //
  788. // even in the presence of asynchronous interrupts.
  789. // It is not currently necessary for this to be machine-specific.
  790. type X__sig_atomic_t = int32 /* types.h:215:13 */
  791. // Seconds since the Epoch, visible to user code when time_t is too
  792. // narrow only for consistency with the old way of widening too-narrow
  793. // types. User code should never use __time64_t.
  794. // bits/types.h -- definitions of __*_t types underlying *_t types.
  795. // Copyright (C) 2002-2021 Free Software Foundation, Inc.
  796. // This file is part of the GNU C Library.
  797. //
  798. // The GNU C Library is free software; you can redistribute it and/or
  799. // modify it under the terms of the GNU Lesser General Public
  800. // License as published by the Free Software Foundation; either
  801. // version 2.1 of the License, or (at your option) any later version.
  802. //
  803. // The GNU C Library is distributed in the hope that it will be useful,
  804. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  805. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  806. // Lesser General Public License for more details.
  807. //
  808. // You should have received a copy of the GNU Lesser General Public
  809. // License along with the GNU C Library; if not, see
  810. // <https://www.gnu.org/licenses/>.
  811. // Never include this file directly; use <sys/types.h> instead.
  812. // Returned by `time'.
  813. type Time_t = X__time_t /* time_t.h:10:18 */
  814. // Structure describing file times.
  815. type Utimbuf = struct {
  816. Factime X__time_t
  817. Fmodtime X__time_t
  818. } /* utime.h:36:1 */
  819. var _ uint8 /* gen.c:2:13: */