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