poll_linux_loong64.go 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. // Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_linux_loong64.go -pkgname poll', DO NOT EDIT.
  2. package poll
  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. POLLERR = 0x008 // poll.h:47:1:
  15. POLLHUP = 0x010 // poll.h:48:1:
  16. POLLIN = 0x001 // poll.h:25:1:
  17. POLLNVAL = 0x020 // poll.h:49:1:
  18. POLLOUT = 0x004 // poll.h:27:1:
  19. POLLPRI = 0x002 // poll.h:26:1:
  20. POLLRDBAND = 0x080 // poll.h:32:1:
  21. POLLRDNORM = 0x040 // poll.h:31:1:
  22. POLLWRBAND = 0x200 // poll.h:34:1:
  23. POLLWRNORM = 0x100 // poll.h:33:1:
  24. X_ABILP64 = 3 // <predefined>:377:1:
  25. X_ATFILE_SOURCE = 1 // features.h:353:1:
  26. X_DEFAULT_SOURCE = 1 // features.h:238:1:
  27. X_FEATURES_H = 1 // features.h:19:1:
  28. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  29. X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
  30. X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
  31. X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
  32. X_LOONGARCH_SIM = 3 // <predefined>:233:1:
  33. X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
  34. X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
  35. X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
  36. X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
  37. X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
  38. X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
  39. X_LP64 = 1 // <predefined>:372:1:
  40. X_POSIX_C_SOURCE = 200809 // features.h:292:1:
  41. X_POSIX_SOURCE = 1 // features.h:290:1:
  42. X_STDC_PREDEF_H = 1 // <predefined>:223:1:
  43. X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
  44. X_SYS_POLL_H = 1 // poll.h:20:1:
  45. Linux = 1 // <predefined>:308:1:
  46. Unix = 1 // <predefined>:247:1:
  47. )
  48. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  49. type Size_t = uint64 /* <builtin>:9:23 */
  50. type Wchar_t = int32 /* <builtin>:15:24 */
  51. type X__int128_t = struct {
  52. Flo int64
  53. Fhi int64
  54. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  55. type X__uint128_t = struct {
  56. Flo uint64
  57. Fhi uint64
  58. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  59. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  60. type X__float128 = float64 /* <builtin>:47:21 */
  61. // Compatibility definitions for System V `poll' interface.
  62. // Copyright (C) 1994-2023 Free Software Foundation, Inc.
  63. // This file is part of the GNU C Library.
  64. //
  65. // The GNU C Library is free software; you can redistribute it and/or
  66. // modify it under the terms of the GNU Lesser General Public
  67. // License as published by the Free Software Foundation; either
  68. // version 2.1 of the License, or (at your option) any later version.
  69. //
  70. // The GNU C Library is distributed in the hope that it will be useful,
  71. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  72. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  73. // Lesser General Public License for more details.
  74. //
  75. // You should have received a copy of the GNU Lesser General Public
  76. // License along with the GNU C Library; if not, see
  77. // <https://www.gnu.org/licenses/>.
  78. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  79. // This file is part of the GNU C Library.
  80. //
  81. // The GNU C Library is free software; you can redistribute it and/or
  82. // modify it under the terms of the GNU Lesser General Public
  83. // License as published by the Free Software Foundation; either
  84. // version 2.1 of the License, or (at your option) any later version.
  85. //
  86. // The GNU C Library is distributed in the hope that it will be useful,
  87. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  88. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  89. // Lesser General Public License for more details.
  90. //
  91. // You should have received a copy of the GNU Lesser General Public
  92. // License along with the GNU C Library; if not, see
  93. // <https://www.gnu.org/licenses/>.
  94. // These are defined by the user (or the compiler)
  95. // to specify the desired environment:
  96. //
  97. // __STRICT_ANSI__ ISO Standard C.
  98. // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
  99. // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
  100. // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
  101. // __STDC_WANT_LIB_EXT2__
  102. // Extensions to ISO C99 from TR 27431-2:2010.
  103. // __STDC_WANT_IEC_60559_BFP_EXT__
  104. // Extensions to ISO C11 from TS 18661-1:2014.
  105. // __STDC_WANT_IEC_60559_FUNCS_EXT__
  106. // Extensions to ISO C11 from TS 18661-4:2015.
  107. // __STDC_WANT_IEC_60559_TYPES_EXT__
  108. // Extensions to ISO C11 from TS 18661-3:2015.
  109. // __STDC_WANT_IEC_60559_EXT__
  110. // ISO C2X interfaces defined only in Annex F.
  111. //
  112. // _POSIX_SOURCE IEEE Std 1003.1.
  113. // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  114. // if >=199309L, add IEEE Std 1003.1b-1993;
  115. // if >=199506L, add IEEE Std 1003.1c-1995;
  116. // if >=200112L, all of IEEE 1003.1-2004
  117. // if >=200809L, all of IEEE 1003.1-2008
  118. // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
  119. // Single Unix conformance is wanted, to 600 for the
  120. // sixth revision, to 700 for the seventh revision.
  121. // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  122. // _LARGEFILE_SOURCE Some more functions for correct standard I/O.
  123. // _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
  124. // _FILE_OFFSET_BITS=N Select default filesystem interface.
  125. // _ATFILE_SOURCE Additional *at interfaces.
  126. // _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
  127. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  128. // _GNU_SOURCE All of the above, plus GNU extensions.
  129. // _DEFAULT_SOURCE The default set of features (taking precedence over
  130. // __STRICT_ANSI__).
  131. //
  132. // _FORTIFY_SOURCE Add security hardening to many library functions.
  133. // Set to 1, 2 or 3; 3 performs stricter checks than 2, which
  134. // performs stricter checks than 1.
  135. //
  136. // _REENTRANT, _THREAD_SAFE
  137. // Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  138. //
  139. // The `-ansi' switch to the GNU C compiler, and standards conformance
  140. // options such as `-std=c99', define __STRICT_ANSI__. If none of
  141. // these are defined, or if _DEFAULT_SOURCE is defined, the default is
  142. // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  143. // 200809L, as well as enabling miscellaneous functions from BSD and
  144. // SVID. If more than one of these are defined, they accumulate. For
  145. // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  146. // give you ISO C, 1003.1, and 1003.2, but nothing else.
  147. //
  148. // These are defined by this file and are used by the
  149. // header files to decide what to declare or define:
  150. //
  151. // __GLIBC_USE (F) Define things from feature set F. This is defined
  152. // to 1 or 0; the subsequent macros are either defined
  153. // or undefined, and those tests should be moved to
  154. // __GLIBC_USE.
  155. // __USE_ISOC11 Define ISO C11 things.
  156. // __USE_ISOC99 Define ISO C99 things.
  157. // __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
  158. // __USE_ISOCXX11 Define ISO C++11 things.
  159. // __USE_POSIX Define IEEE Std 1003.1 things.
  160. // __USE_POSIX2 Define IEEE Std 1003.2 things.
  161. // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
  162. // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
  163. // __USE_XOPEN Define XPG things.
  164. // __USE_XOPEN_EXTENDED Define X/Open Unix things.
  165. // __USE_UNIX98 Define Single Unix V2 things.
  166. // __USE_XOPEN2K Define XPG6 things.
  167. // __USE_XOPEN2KXSI Define XPG6 XSI things.
  168. // __USE_XOPEN2K8 Define XPG7 things.
  169. // __USE_XOPEN2K8XSI Define XPG7 XSI things.
  170. // __USE_LARGEFILE Define correct standard I/O things.
  171. // __USE_LARGEFILE64 Define LFS things with separate names.
  172. // __USE_FILE_OFFSET64 Define 64bit interface as default.
  173. // __USE_MISC Define things from 4.3BSD or System V Unix.
  174. // __USE_ATFILE Define *at interfaces and AT_* constants for them.
  175. // __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
  176. // MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
  177. // __USE_GNU Define GNU extensions.
  178. // __USE_FORTIFY_LEVEL Additional security measures used, according to level.
  179. //
  180. // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  181. // defined by this file unconditionally. `__GNU_LIBRARY__' is provided
  182. // only for compatibility. All new code should use the other symbols
  183. // to test for features.
  184. //
  185. // All macros listed above as possibly being defined by this file are
  186. // explicitly undefined if they are not explicitly defined.
  187. // Feature-test macros that are not defined by the user or compiler
  188. // but are implied by the other feature-test macros defined (or by the
  189. // lack of any definitions) are defined by the file.
  190. //
  191. // ISO C feature test macros depend on the definition of the macro
  192. // when an affected header is included, not when the first system
  193. // header is included, and so they are handled in
  194. // <bits/libc-header-start.h>, which does not have a multiple include
  195. // guard. Feature test macros that can be handled from the first
  196. // system header included are handled here.
  197. // Undefine everything, so we get a clean slate.
  198. // Suppress kernel-name space pollution unless user expressedly asks
  199. // for it.
  200. // Convenience macro to test the version of gcc.
  201. // Use like this:
  202. // #if __GNUC_PREREQ (2,8)
  203. // ... code requiring gcc 2.8 or later ...
  204. // #endif
  205. // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  206. // added in 2.0.
  207. // Similarly for clang. Features added to GCC after version 4.2 may
  208. // or may not also be available in clang, and clang's definitions of
  209. // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
  210. // features can be queried via __has_extension/__has_feature.
  211. // Whether to use feature set F.
  212. // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  213. // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
  214. // issue a warning; the expectation is that the source is being
  215. // transitioned to use the new macro.
  216. // If _GNU_SOURCE was defined by the user, turn on all the other features.
  217. // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  218. // define _DEFAULT_SOURCE.
  219. // This is to enable the ISO C2X extension.
  220. // This is to enable the ISO C11 extension.
  221. // This is to enable the ISO C99 extension.
  222. // This is to enable the ISO C90 Amendment 1:1995 extension.
  223. // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  224. // is defined, use POSIX.1-2008 (or another version depending on
  225. // _XOPEN_SOURCE).
  226. // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  227. // defined in all multithreaded code. GNU libc has not required this
  228. // for many years. We now treat them as compatibility synonyms for
  229. // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  230. // comprehensive support for multithreaded code. Using them never
  231. // lowers the selected level of POSIX conformance, only raises it.
  232. // Features part to handle 64-bit time_t support.
  233. // Copyright (C) 2021-2023 Free Software Foundation, Inc.
  234. // This file is part of the GNU C Library.
  235. //
  236. // The GNU C Library is free software; you can redistribute it and/or
  237. // modify it under the terms of the GNU Lesser General Public
  238. // License as published by the Free Software Foundation; either
  239. // version 2.1 of the License, or (at your option) any later version.
  240. //
  241. // The GNU C Library is distributed in the hope that it will be useful,
  242. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  243. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  244. // Lesser General Public License for more details.
  245. //
  246. // You should have received a copy of the GNU Lesser General Public
  247. // License along with the GNU C Library; if not, see
  248. // <https://www.gnu.org/licenses/>.
  249. // We need to know the word size in order to check the time size.
  250. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  251. // This file is part of the GNU C Library.
  252. //
  253. // The GNU C Library is free software; you can redistribute it and/or
  254. // modify it under the terms of the GNU Lesser General Public
  255. // License as published by the Free Software Foundation; either
  256. // version 2.1 of the License, or (at your option) any later version.
  257. //
  258. // The GNU C Library is distributed in the hope that it will be useful,
  259. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  260. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  261. // Lesser General Public License for more details.
  262. //
  263. // You should have received a copy of the GNU Lesser General Public
  264. // License along with the GNU C Library; if not, see
  265. // <https://www.gnu.org/licenses/>.
  266. // Bit size of the time_t type at glibc build time, general case.
  267. // Copyright (C) 2018-2023 Free Software Foundation, Inc.
  268. // This file is part of the GNU C Library.
  269. //
  270. // The GNU C Library is free software; you can redistribute it and/or
  271. // modify it under the terms of the GNU Lesser General Public
  272. // License as published by the Free Software Foundation; either
  273. // version 2.1 of the License, or (at your option) any later version.
  274. //
  275. // The GNU C Library is distributed in the hope that it will be useful,
  276. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  277. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  278. // Lesser General Public License for more details.
  279. //
  280. // You should have received a copy of the GNU Lesser General Public
  281. // License along with the GNU C Library; if not, see
  282. // <https://www.gnu.org/licenses/>.
  283. // Size in bits of the 'time_t' type of the default ABI.
  284. // The function 'gets' existed in C89, but is impossible to use
  285. // safely. It has been removed from ISO C11 and ISO C++14. Note: for
  286. // compatibility with various implementations of <cstdio>, this test
  287. // must consider only the value of __cplusplus when compiling C++.
  288. // GNU formerly extended the scanf functions with modified format
  289. // specifiers %as, %aS, and %a[...] that allocate a buffer for the
  290. // input using malloc. This extension conflicts with ISO C99, which
  291. // defines %a as a standalone format specifier that reads a floating-
  292. // point number; moreover, POSIX.1-2008 provides the same feature
  293. // using the modifier letter 'm' instead (%ms, %mS, %m[...]).
  294. //
  295. // We now follow C99 unless GNU extensions are active and the compiler
  296. // is specifically in C89 or C++98 mode (strict or not). For
  297. // instance, with GCC, -std=gnu11 will have C99-compliant scanf with
  298. // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
  299. // old extension.
  300. // ISO C2X added support for a 0b or 0B prefix on binary constants as
  301. // inputs to strtol-family functions (base 0 or 2). This macro is
  302. // used to condition redirection in headers to allow that redirection
  303. // to be disabled when building those functions, despite _GNU_SOURCE
  304. // being defined.
  305. // Get definitions of __STDC_* predefined macros, if the compiler has
  306. // not preincluded this header automatically.
  307. // Copyright (C) 1991-2023 Free Software Foundation, Inc.
  308. // This file is part of the GNU C Library.
  309. //
  310. // The GNU C Library is free software; you can redistribute it and/or
  311. // modify it under the terms of the GNU Lesser General Public
  312. // License as published by the Free Software Foundation; either
  313. // version 2.1 of the License, or (at your option) any later version.
  314. //
  315. // The GNU C Library is distributed in the hope that it will be useful,
  316. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  317. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  318. // Lesser General Public License for more details.
  319. //
  320. // You should have received a copy of the GNU Lesser General Public
  321. // License along with the GNU C Library; if not, see
  322. // <https://www.gnu.org/licenses/>.
  323. // This macro indicates that the installed library is the GNU C Library.
  324. // For historic reasons the value now is 6 and this will stay from now
  325. // on. The use of this variable is deprecated. Use __GLIBC__ and
  326. // __GLIBC_MINOR__ now (see below) when you want to test for a specific
  327. // GNU C library version and use the values in <gnu/lib-names.h> to get
  328. // the sonames of the shared libraries.
  329. // Major and minor version number of the GNU C library package. Use
  330. // these macros to test for features in specific releases.
  331. // This is here only because every header file already includes this one.
  332. // Copyright (C) 1992-2023 Free Software Foundation, Inc.
  333. // Copyright The GNU Toolchain Authors.
  334. // This file is part of the GNU C Library.
  335. //
  336. // The GNU C Library is free software; you can redistribute it and/or
  337. // modify it under the terms of the GNU Lesser General Public
  338. // License as published by the Free Software Foundation; either
  339. // version 2.1 of the License, or (at your option) any later version.
  340. //
  341. // The GNU C Library is distributed in the hope that it will be useful,
  342. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  343. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  344. // Lesser General Public License for more details.
  345. //
  346. // You should have received a copy of the GNU Lesser General Public
  347. // License along with the GNU C Library; if not, see
  348. // <https://www.gnu.org/licenses/>.
  349. // We are almost always included from features.h.
  350. // The GNU libc does not support any K&R compilers or the traditional mode
  351. // of ISO C compilers anymore. Check for some of the combinations not
  352. // supported anymore.
  353. // Some user header file might have defined this before.
  354. // Compilers that lack __has_attribute may object to
  355. // #if defined __has_attribute && __has_attribute (...)
  356. // even though they do not need to evaluate the right-hand side of the &&.
  357. // Similarly for __has_builtin, etc.
  358. // All functions, except those with callbacks or those that
  359. // synchronize memory, are leaf functions.
  360. // GCC can always grok prototypes. For C++ programs we add throw()
  361. // to help it optimize the function calls. But this only works with
  362. // gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
  363. // as non-throwing using a function attribute since programs can use
  364. // the -fexceptions options for C code as well.
  365. // These two macros are not used in glibc anymore. They are kept here
  366. // only because some other projects expect the macros to be defined.
  367. // For these things, GCC behaves the ANSI way normally,
  368. // and the non-ANSI way under -traditional.
  369. // This is not a typedef so `const __ptr_t' does the right thing.
  370. // C++ needs to know that types and declarations are C, not C++.
  371. // Fortify support.
  372. // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
  373. // Support for flexible arrays.
  374. // Headers that should use flexible arrays only if they're "real"
  375. // (e.g. only if they won't affect sizeof()) should test
  376. // #if __glibc_c99_flexarr_available.
  377. // __asm__ ("xyz") is used throughout the headers to rename functions
  378. // at the assembly language level. This is wrapped by the __REDIRECT
  379. // macro, in order to support compilers that can do this some other
  380. // way. When compilers don't support asm-names at all, we have to do
  381. // preprocessor tricks instead (which don't have exactly the right
  382. // semantics, but it's the best we can do).
  383. //
  384. // Example:
  385. // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  386. //
  387. // #elif __SOME_OTHER_COMPILER__
  388. //
  389. // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
  390. // GCC and clang have various useful declarations that can be made with
  391. // the '__attribute__' syntax. All of the ways we use this do fine if
  392. // they are omitted for compilers that don't understand it.
  393. // At some point during the gcc 2.96 development the `malloc' attribute
  394. // for functions was introduced. We don't want to use it unconditionally
  395. // (although this would be possible) since it generates warnings.
  396. // Tell the compiler which arguments to an allocation function
  397. // indicate the size of the allocation.
  398. // Tell the compiler which argument to an allocation function
  399. // indicates the alignment of the allocation.
  400. // At some point during the gcc 2.96 development the `pure' attribute
  401. // for functions was introduced. We don't want to use it unconditionally
  402. // (although this would be possible) since it generates warnings.
  403. // This declaration tells the compiler that the value is constant.
  404. // At some point during the gcc 3.1 development the `used' attribute
  405. // for functions was introduced. We don't want to use it unconditionally
  406. // (although this would be possible) since it generates warnings.
  407. // Since version 3.2, gcc allows marking deprecated functions.
  408. // Since version 4.5, gcc also allows one to specify the message printed
  409. // when a deprecated function is used. clang claims to be gcc 4.2, but
  410. // may also support this feature.
  411. // At some point during the gcc 2.8 development the `format_arg' attribute
  412. // for functions was introduced. We don't want to use it unconditionally
  413. // (although this would be possible) since it generates warnings.
  414. // If several `format_arg' attributes are given for the same function, in
  415. // gcc-3.0 and older, all but the last one are ignored. In newer gccs,
  416. // all designated arguments are considered.
  417. // At some point during the gcc 2.97 development the `strfmon' format
  418. // attribute for functions was introduced. We don't want to use it
  419. // unconditionally (although this would be possible) since it
  420. // generates warnings.
  421. // The nonnull function attribute marks pointer parameters that
  422. // must not be NULL. This has the name __nonnull in glibc,
  423. // and __attribute_nonnull__ in files shared with Gnulib to avoid
  424. // collision with a different __nonnull in DragonFlyBSD 5.9.
  425. // The returns_nonnull function attribute marks the return type of the function
  426. // as always being non-null.
  427. // If fortification mode, we warn about unused results of certain
  428. // function calls which can lead to problems.
  429. // Forces a function to be always inlined.
  430. // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  431. // it conflicts with this definition. Therefore undefine it first to
  432. // allow either header to be included first.
  433. // Associate error messages with the source location of the call site rather
  434. // than with the source location inside the function.
  435. // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  436. // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
  437. // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  438. // older than 4.3 may define these macros and still not guarantee GNU inlining
  439. // semantics.
  440. //
  441. // clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  442. // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  443. // __GNUC_GNU_INLINE__ macro definitions.
  444. // GCC 4.3 and above allow passing all anonymous arguments of an
  445. // __extern_always_inline function to some other vararg function.
  446. // It is possible to compile containing GCC extensions even if GCC is
  447. // run in pedantic mode if the uses are carefully marked using the
  448. // `__extension__' keyword. But this is not generally available before
  449. // version 2.8.
  450. // __restrict is known in EGCS 1.2 and above, and in clang.
  451. // It works also in C++ mode (outside of arrays), but only when spelled
  452. // as '__restrict', not 'restrict'.
  453. // ISO C99 also allows to declare arrays as non-overlapping. The syntax is
  454. // array_name[restrict]
  455. // GCC 3.1 and clang support this.
  456. // This syntax is not usable in C++ mode.
  457. // Describes a char array whose address can safely be passed as the first
  458. // argument to strncpy and strncat, as the char array is not necessarily
  459. // a NUL-terminated string.
  460. // Undefine (also defined in libc-symbols.h).
  461. // Copies attributes from the declaration or type referenced by
  462. // the argument.
  463. // Gnulib avoids including these, as they don't work on non-glibc or
  464. // older glibc platforms.
  465. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  466. // This file is part of the GNU C Library.
  467. //
  468. // The GNU C Library is free software; you can redistribute it and/or
  469. // modify it under the terms of the GNU Lesser General Public
  470. // License as published by the Free Software Foundation; either
  471. // version 2.1 of the License, or (at your option) any later version.
  472. //
  473. // The GNU C Library is distributed in the hope that it will be useful,
  474. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  475. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  476. // Lesser General Public License for more details.
  477. //
  478. // You should have received a copy of the GNU Lesser General Public
  479. // License along with the GNU C Library; if not, see
  480. // <https://www.gnu.org/licenses/>.
  481. // Properties of long double type. ldbl-128 version.
  482. // Copyright (C) 2016-2023 Free Software Foundation, Inc.
  483. // This file is part of the GNU C Library.
  484. //
  485. // The GNU C Library is free software; you can redistribute it and/or
  486. // modify it under the terms of the GNU Lesser General Public
  487. // License published by the Free Software Foundation; either
  488. // version 2.1 of the License, or (at your option) any later version.
  489. //
  490. // The GNU C Library is distributed in the hope that it will be useful,
  491. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  492. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  493. // Lesser General Public License for more details.
  494. //
  495. // You should have received a copy of the GNU Lesser General Public
  496. // License along with the GNU C Library; if not, see
  497. // <https://www.gnu.org/licenses/>.
  498. // long double is distinct from double, so there is nothing to
  499. // define here.
  500. // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
  501. // intended for use in preprocessor macros.
  502. //
  503. // Note: MESSAGE must be a _single_ string; concatenation of string
  504. // literals is not supported.
  505. // Generic selection (ISO C11) is a C-only feature, available in GCC
  506. // since version 4.9. Previous versions do not provide generic
  507. // selection, even though they might set __STDC_VERSION__ to 201112L,
  508. // when in -std=c11 mode. Thus, we must check for !defined __GNUC__
  509. // when testing __STDC_VERSION__ for generic selection support.
  510. // On the other hand, Clang also defines __GNUC__, so a clang-specific
  511. // check is required to enable the use of generic selection.
  512. // Designates a 1-based positional argument ref-index of pointer type
  513. // that can be used to access size-index elements of the pointed-to
  514. // array according to access mode, or at least one element when
  515. // size-index is not provided:
  516. // access (access-mode, <ref-index> [, <size-index>])
  517. // For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
  518. // use the access attribute to get object sizes from function definition
  519. // arguments, so we can't use them on functions we fortify. Drop the object
  520. // size hints for such functions.
  521. // Designates dealloc as a function to call to deallocate objects
  522. // allocated by the declared function.
  523. // Specify that a function such as setjmp or vfork may return
  524. // twice.
  525. // If we don't have __REDIRECT, prototypes will be missing if
  526. // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  527. // Decide whether we can define 'extern inline' functions in headers.
  528. // This is here only because every header file already includes this one.
  529. // Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  530. // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  531. // that will always return failure (and set errno to ENOSYS).
  532. // This file is automatically generated.
  533. // This file selects the right generated file of `__stub_FUNCTION' macros
  534. // based on the architecture being compiled for.
  535. // Copyright (C) 1999-2023 Free Software Foundation, Inc.
  536. // This file is part of the GNU C Library.
  537. //
  538. // The GNU C Library is free software; you can redistribute it and/or
  539. // modify it under the terms of the GNU Lesser General Public
  540. // License as published by the Free Software Foundation; either
  541. // version 2.1 of the License, or (at your option) any later version.
  542. //
  543. // The GNU C Library is distributed in the hope that it will be useful,
  544. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  545. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  546. // Lesser General Public License for more details.
  547. //
  548. // You should have received a copy of the GNU Lesser General Public
  549. // License along with the GNU C Library; if not, see
  550. // <https://www.gnu.org/licenses/>.
  551. // This file is automatically generated.
  552. // It defines a symbol `__stub_FUNCTION' for each function
  553. // in the C library which is a stub, meaning it will fail
  554. // every time called, usually setting errno to ENOSYS.
  555. // Get the platform dependent bits of `poll'.
  556. // Copyright (C) 1997-2023 Free Software Foundation, Inc.
  557. // This file is part of the GNU C Library.
  558. //
  559. // The GNU C Library is free software; you can redistribute it and/or
  560. // modify it under the terms of the GNU Lesser General Public
  561. // License as published by the Free Software Foundation; either
  562. // version 2.1 of the License, or (at your option) any later version.
  563. //
  564. // The GNU C Library is distributed in the hope that it will be useful,
  565. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  566. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  567. // Lesser General Public License for more details.
  568. //
  569. // You should have received a copy of the GNU Lesser General Public
  570. // License along with the GNU C Library; if not, see
  571. // <https://www.gnu.org/licenses/>.
  572. // Event types that can be polled for. These bits may be set in `events'
  573. // to indicate the interesting event types; they will appear in `revents'
  574. // to indicate the status of the file descriptor.
  575. // These values are defined in XPG4.2.
  576. // Event types always implicitly polled for. These bits need not be set in
  577. // `events', but they will appear in `revents' to indicate the status of
  578. // the file descriptor.
  579. // Type used for the number of file descriptors.
  580. type Nfds_t = uint64 /* poll.h:33:27 */
  581. // Data structure describing a polling request.
  582. type Pollfd = struct {
  583. Ffd int32
  584. Fevents int16
  585. Frevents int16
  586. } /* poll.h:36:1 */
  587. // Define some inlines helping to catch common problems.
  588. var _ int8 /* gen.c:2:13: */