stdlib_linux_riscv64.go (68829B)
1 // Code generated by 'ccgo stdlib/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 stdlib/stdlib_linux_riscv64.go -pkgname stdlib', DO NOT EDIT. 2 3 package stdlib 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 BIG_ENDIAN = 4321 19 BYTE_ORDER = 1234 20 EXIT_FAILURE = 1 21 EXIT_SUCCESS = 0 22 FD_SETSIZE = 1024 23 LITTLE_ENDIAN = 1234 24 PDP_ENDIAN = 3412 25 RAND_MAX = 2147483647 26 WCONTINUED = 8 27 WEXITED = 4 28 WNOHANG = 1 29 WNOWAIT = 0x01000000 30 WSTOPPED = 2 31 WUNTRACED = 2 32 X_ALLOCA_H = 1 33 X_ATFILE_SOURCE = 1 34 X_BITS_BYTESWAP_H = 1 35 X_BITS_ENDIANNESS_H = 1 36 X_BITS_ENDIAN_H = 1 37 X_BITS_FLOATN_COMMON_H = 0 38 X_BITS_FLOATN_H = 0 39 X_BITS_PTHREADTYPES_ARCH_H = 1 40 X_BITS_PTHREADTYPES_COMMON_H = 1 41 X_BITS_STDINT_INTN_H = 1 42 X_BITS_TIME64_H = 1 43 X_BITS_TYPESIZES_H = 1 44 X_BITS_TYPES_H = 1 45 X_BITS_UINTN_IDENTITY_H = 1 46 X_BSD_SIZE_T_ = 0 47 X_BSD_SIZE_T_DEFINED_ = 0 48 X_DEFAULT_SOURCE = 1 49 X_ENDIAN_H = 1 50 X_FEATURES_H = 1 51 X_FILE_OFFSET_BITS = 64 52 X_GCC_SIZE_T = 0 53 X_GCC_WCHAR_T = 0 54 X_LP64 = 1 55 X_POSIX_C_SOURCE = 200809 56 X_POSIX_SOURCE = 1 57 X_RWLOCK_INTERNAL_H = 0 58 X_SIZET_ = 0 59 X_SIZE_T = 0 60 X_SIZE_T_ = 0 61 X_SIZE_T_DECLARED = 0 62 X_SIZE_T_DEFINED = 0 63 X_SIZE_T_DEFINED_ = 0 64 X_STDC_PREDEF_H = 1 65 X_STDLIB_H = 1 66 X_STRUCT_TIMESPEC = 1 67 X_SYS_CDEFS_H = 1 68 X_SYS_SELECT_H = 1 69 X_SYS_SIZE_T_H = 0 70 X_SYS_TYPES_H = 1 71 X_THREAD_MUTEX_INTERNAL_H = 1 72 X_THREAD_SHARED_TYPES_H = 1 73 X_T_SIZE = 0 74 X_T_SIZE_ = 0 75 X_T_WCHAR = 0 76 X_T_WCHAR_ = 0 77 X_WCHAR_T = 0 78 X_WCHAR_T_ = 0 79 X_WCHAR_T_DECLARED = 0 80 X_WCHAR_T_DEFINED = 0 81 X_WCHAR_T_DEFINED_ = 0 82 X_WCHAR_T_H = 0 83 Linux = 1 84 Unix = 1 85 ) 86 87 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 88 89 type Size_t = uint64 /* <builtin>:9:23 */ 90 91 type Wchar_t = int32 /* <builtin>:15:24 */ 92 93 type X__int128_t = struct { 94 Flo int64 95 Fhi int64 96 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 97 type X__uint128_t = struct { 98 Flo uint64 99 Fhi uint64 100 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 101 102 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 103 type X__float128 = float64 /* <builtin>:47:21 */ 104 105 // A null pointer constant. 106 107 // XPG requires a few symbols from <sys/wait.h> being defined. 108 // Definitions of flag bits for `waitpid' et al. 109 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 110 // This file is part of the GNU C Library. 111 // 112 // The GNU C Library is free software; you can redistribute it and/or 113 // modify it under the terms of the GNU Lesser General Public 114 // License as published by the Free Software Foundation; either 115 // version 2.1 of the License, or (at your option) any later version. 116 // 117 // The GNU C Library is distributed in the hope that it will be useful, 118 // but WITHOUT ANY WARRANTY; without even the implied warranty of 119 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 120 // Lesser General Public License for more details. 121 // 122 // You should have received a copy of the GNU Lesser General Public 123 // License along with the GNU C Library; if not, see 124 // <https://www.gnu.org/licenses/>. 125 126 // Bits in the third argument to `waitpid'. 127 128 // Bits in the fourth argument to `waitid'. 129 130 // Definitions of status bits for `wait' et al. 131 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 132 // This file is part of the GNU C Library. 133 // 134 // The GNU C Library is free software; you can redistribute it and/or 135 // modify it under the terms of the GNU Lesser General Public 136 // License as published by the Free Software Foundation; either 137 // version 2.1 of the License, or (at your option) any later version. 138 // 139 // The GNU C Library is distributed in the hope that it will be useful, 140 // but WITHOUT ANY WARRANTY; without even the implied warranty of 141 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 142 // Lesser General Public License for more details. 143 // 144 // You should have received a copy of the GNU Lesser General Public 145 // License along with the GNU C Library; if not, see 146 // <https://www.gnu.org/licenses/>. 147 148 // Everything extant so far uses these same bits. 149 150 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 151 152 // If WIFSIGNALED(STATUS), the terminating signal. 153 154 // If WIFSTOPPED(STATUS), the signal that stopped the child. 155 156 // Nonzero if STATUS indicates normal termination. 157 158 // Nonzero if STATUS indicates termination by a signal. 159 160 // Nonzero if STATUS indicates the child is stopped. 161 162 // Nonzero if STATUS indicates the child continued after a stop. We only 163 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 164 165 // Nonzero if STATUS indicates the child dumped core. 166 167 // Macros for constructing status values. 168 169 // Define the macros <sys/wait.h> also would define this way. 170 171 // _FloatN API tests for enablement. 172 // Macros to control TS 18661-3 glibc features on ldbl-128 platforms. 173 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 174 // This file is part of the GNU C Library. 175 // 176 // The GNU C Library is free software; you can redistribute it and/or 177 // modify it under the terms of the GNU Lesser General Public 178 // License as published by the Free Software Foundation; either 179 // version 2.1 of the License, or (at your option) any later version. 180 // 181 // The GNU C Library is distributed in the hope that it will be useful, 182 // but WITHOUT ANY WARRANTY; without even the implied warranty of 183 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 184 // Lesser General Public License for more details. 185 // 186 // You should have received a copy of the GNU Lesser General Public 187 // License along with the GNU C Library; if not, see 188 // <https://www.gnu.org/licenses/>. 189 190 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 191 // This file is part of the GNU C Library. 192 // 193 // The GNU C Library is free software; you can redistribute it and/or 194 // modify it under the terms of the GNU Lesser General Public 195 // License as published by the Free Software Foundation; either 196 // version 2.1 of the License, or (at your option) any later version. 197 // 198 // The GNU C Library is distributed in the hope that it will be useful, 199 // but WITHOUT ANY WARRANTY; without even the implied warranty of 200 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 201 // Lesser General Public License for more details. 202 // 203 // You should have received a copy of the GNU Lesser General Public 204 // License along with the GNU C Library; if not, see 205 // <https://www.gnu.org/licenses/>. 206 207 // Properties of long double type. ldbl-128 version. 208 // Copyright (C) 2016-2021 Free Software Foundation, Inc. 209 // This file is part of the GNU C Library. 210 // 211 // The GNU C Library is free software; you can redistribute it and/or 212 // modify it under the terms of the GNU Lesser General Public 213 // License published by the Free Software Foundation; either 214 // version 2.1 of the License, or (at your option) any later version. 215 // 216 // The GNU C Library is distributed in the hope that it will be useful, 217 // but WITHOUT ANY WARRANTY; without even the implied warranty of 218 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 219 // Lesser General Public License for more details. 220 // 221 // You should have received a copy of the GNU Lesser General Public 222 // License along with the GNU C Library; if not, see 223 // <https://www.gnu.org/licenses/>. 224 225 // long double is distinct from double, so there is nothing to 226 // define here. 227 228 // Defined to 1 if the current compiler invocation provides a 229 // floating-point type with the IEEE 754 binary128 format, and this 230 // glibc includes corresponding *f128 interfaces for it. 231 232 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 233 // from the default float, double and long double types in this glibc. 234 235 // Defined to 1 if the current compiler invocation provides a 236 // floating-point type with the right format for _Float64x, and this 237 // glibc includes corresponding *f64x interfaces for it. 238 239 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 240 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 241 // the format of _Float128, which must be different from that of long 242 // double. 243 244 // Defined to concatenate the literal suffix to be used with _Float128 245 // types, if __HAVE_FLOAT128 is 1. 246 247 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 248 249 // The remaining of this file provides support for older compilers. 250 251 // The type _Float128 exists only since GCC 7.0. 252 253 // Various built-in functions do not exist before GCC 7.0. 254 255 // Macros to control TS 18661-3 glibc features where the same 256 // definitions are appropriate for all platforms. 257 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 258 // This file is part of the GNU C Library. 259 // 260 // The GNU C Library is free software; you can redistribute it and/or 261 // modify it under the terms of the GNU Lesser General Public 262 // License as published by the Free Software Foundation; either 263 // version 2.1 of the License, or (at your option) any later version. 264 // 265 // The GNU C Library is distributed in the hope that it will be useful, 266 // but WITHOUT ANY WARRANTY; without even the implied warranty of 267 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 268 // Lesser General Public License for more details. 269 // 270 // You should have received a copy of the GNU Lesser General Public 271 // License along with the GNU C Library; if not, see 272 // <https://www.gnu.org/licenses/>. 273 274 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 275 // This file is part of the GNU C Library. 276 // 277 // The GNU C Library is free software; you can redistribute it and/or 278 // modify it under the terms of the GNU Lesser General Public 279 // License as published by the Free Software Foundation; either 280 // version 2.1 of the License, or (at your option) any later version. 281 // 282 // The GNU C Library is distributed in the hope that it will be useful, 283 // but WITHOUT ANY WARRANTY; without even the implied warranty of 284 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 285 // Lesser General Public License for more details. 286 // 287 // You should have received a copy of the GNU Lesser General Public 288 // License along with the GNU C Library; if not, see 289 // <https://www.gnu.org/licenses/>. 290 291 // Properties of long double type. ldbl-128 version. 292 // Copyright (C) 2016-2021 Free Software Foundation, Inc. 293 // This file is part of the GNU C Library. 294 // 295 // The GNU C Library is free software; you can redistribute it and/or 296 // modify it under the terms of the GNU Lesser General Public 297 // License published by the Free Software Foundation; either 298 // version 2.1 of the License, or (at your option) any later version. 299 // 300 // The GNU C Library is distributed in the hope that it will be useful, 301 // but WITHOUT ANY WARRANTY; without even the implied warranty of 302 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 303 // Lesser General Public License for more details. 304 // 305 // You should have received a copy of the GNU Lesser General Public 306 // License along with the GNU C Library; if not, see 307 // <https://www.gnu.org/licenses/>. 308 309 // long double is distinct from double, so there is nothing to 310 // define here. 311 312 // This header should be included at the bottom of each bits/floatn.h. 313 // It defines the following macros for each _FloatN and _FloatNx type, 314 // where the same definitions, or definitions based only on the macros 315 // in bits/floatn.h, are appropriate for all glibc configurations. 316 317 // Defined to 1 if the current compiler invocation provides a 318 // floating-point type with the right format for this type, and this 319 // glibc includes corresponding *fN or *fNx interfaces for it. 320 321 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 322 // type is the first with its format in the sequence of (the default 323 // choices for) float, double, long double, _Float16, _Float32, 324 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 325 // glibc; that is, if functions present once per floating-point format 326 // rather than once per type are present for this type. 327 // 328 // All configurations supported by glibc have _Float32 the same format 329 // as float, _Float64 and _Float32x the same format as double, the 330 // _Float64x the same format as either long double or _Float128. No 331 // configurations support _Float128x or, as of GCC 7, have compiler 332 // support for a type meeting the requirements for _Float128x. 333 334 // Defined to 1 if the corresponding _FloatN type is not binary compatible 335 // with the corresponding ISO C type in the current compilation unit as 336 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 337 // in glibc. 338 339 // Defined to 1 if any _FloatN or _FloatNx types that are not 340 // ABI-distinct are however distinct types at the C language level (so 341 // for the purposes of __builtin_types_compatible_p and _Generic). 342 343 // Defined to concatenate the literal suffix to be used with _FloatN 344 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 345 // literal suffixes exist since GCC 7, for C only. 346 347 // Defined to a complex type if __HAVE_<type> is 1. 348 349 // The remaining of this file provides support for older compilers. 350 351 // If double, long double and _Float64 all have the same set of 352 // values, TS 18661-3 requires the usual arithmetic conversions on 353 // long double and _Float64 to produce _Float64. For this to be the 354 // case when building with a compiler without a distinct _Float64 355 // type, _Float64 must be a typedef for long double, not for 356 // double. 357 358 // Returned by `div'. 359 type Div_t = struct { 360 Fquot int32 361 Frem int32 362 } /* stdlib.h:62:5 */ 363 364 // Returned by `ldiv'. 365 type Ldiv_t = struct { 366 Fquot int64 367 Frem int64 368 } /* stdlib.h:70:5 */ 369 370 // Returned by `lldiv'. 371 type Lldiv_t = struct { 372 Fquot int64 373 Frem int64 374 } /* stdlib.h:80:5 */ 375 376 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 377 // This file is part of the GNU C Library. 378 // 379 // The GNU C Library is free software; you can redistribute it and/or 380 // modify it under the terms of the GNU Lesser General Public 381 // License as published by the Free Software Foundation; either 382 // version 2.1 of the License, or (at your option) any later version. 383 // 384 // The GNU C Library is distributed in the hope that it will be useful, 385 // but WITHOUT ANY WARRANTY; without even the implied warranty of 386 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 387 // Lesser General Public License for more details. 388 // 389 // You should have received a copy of the GNU Lesser General Public 390 // License along with the GNU C Library; if not, see 391 // <https://www.gnu.org/licenses/>. 392 393 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 394 395 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 396 // This file is part of the GNU C Library. 397 // 398 // The GNU C Library is free software; you can redistribute it and/or 399 // modify it under the terms of the GNU Lesser General Public 400 // License as published by the Free Software Foundation; either 401 // version 2.1 of the License, or (at your option) any later version. 402 // 403 // The GNU C Library is distributed in the hope that it will be useful, 404 // but WITHOUT ANY WARRANTY; without even the implied warranty of 405 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 406 // Lesser General Public License for more details. 407 // 408 // You should have received a copy of the GNU Lesser General Public 409 // License along with the GNU C Library; if not, see 410 // <https://www.gnu.org/licenses/>. 411 412 // bits/types.h -- definitions of __*_t types underlying *_t types. 413 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 414 // This file is part of the GNU C Library. 415 // 416 // The GNU C Library is free software; you can redistribute it and/or 417 // modify it under the terms of the GNU Lesser General Public 418 // License as published by the Free Software Foundation; either 419 // version 2.1 of the License, or (at your option) any later version. 420 // 421 // The GNU C Library is distributed in the hope that it will be useful, 422 // but WITHOUT ANY WARRANTY; without even the implied warranty of 423 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 424 // Lesser General Public License for more details. 425 // 426 // You should have received a copy of the GNU Lesser General Public 427 // License along with the GNU C Library; if not, see 428 // <https://www.gnu.org/licenses/>. 429 430 // Never include this file directly; use <sys/types.h> instead. 431 432 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 433 // This file is part of the GNU C Library. 434 // 435 // The GNU C Library is free software; you can redistribute it and/or 436 // modify it under the terms of the GNU Lesser General Public 437 // License as published by the Free Software Foundation; either 438 // version 2.1 of the License, or (at your option) any later version. 439 // 440 // The GNU C Library is distributed in the hope that it will be useful, 441 // but WITHOUT ANY WARRANTY; without even the implied warranty of 442 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 443 // Lesser General Public License for more details. 444 // 445 // You should have received a copy of the GNU Lesser General Public 446 // License along with the GNU C Library; if not, see 447 // <https://www.gnu.org/licenses/>. 448 449 // Determine the wordsize from the preprocessor defines. RISC-V version. 450 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 451 // This file is part of the GNU C Library. 452 // 453 // The GNU C Library is free software; you can redistribute it and/or 454 // modify it under the terms of the GNU Lesser General Public 455 // License as published by the Free Software Foundation; either 456 // version 2.1 of the License, or (at your option) any later version. 457 // 458 // The GNU C Library is distributed in the hope that it will be useful, 459 // but WITHOUT ANY WARRANTY; without even the implied warranty of 460 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 461 // Lesser General Public License for more details. 462 // 463 // You should have received a copy of the GNU Lesser General Public 464 // License along with the GNU C Library. If not, see 465 // <https://www.gnu.org/licenses/>. 466 467 // Bit size of the time_t type at glibc build time, RISC-V case. 468 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 469 // This file is part of the GNU C Library. 470 // 471 // The GNU C Library is free software; you can redistribute it and/or 472 // modify it under the terms of the GNU Lesser General Public 473 // License as published by the Free Software Foundation; either 474 // version 2.1 of the License, or (at your option) any later version. 475 // 476 // The GNU C Library is distributed in the hope that it will be useful, 477 // but WITHOUT ANY WARRANTY; without even the implied warranty of 478 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 479 // Lesser General Public License for more details. 480 // 481 // You should have received a copy of the GNU Lesser General Public 482 // License along with the GNU C Library; if not, see 483 // <https://www.gnu.org/licenses/>. 484 485 // Determine the wordsize from the preprocessor defines. RISC-V version. 486 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 487 // This file is part of the GNU C Library. 488 // 489 // The GNU C Library is free software; you can redistribute it and/or 490 // modify it under the terms of the GNU Lesser General Public 491 // License as published by the Free Software Foundation; either 492 // version 2.1 of the License, or (at your option) any later version. 493 // 494 // The GNU C Library is distributed in the hope that it will be useful, 495 // but WITHOUT ANY WARRANTY; without even the implied warranty of 496 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 497 // Lesser General Public License for more details. 498 // 499 // You should have received a copy of the GNU Lesser General Public 500 // License along with the GNU C Library. If not, see 501 // <https://www.gnu.org/licenses/>. 502 503 // RV32 and RV64 both use 64-bit time_t 504 505 // Convenience types. 506 type X__u_char = uint8 /* types.h:31:23 */ 507 type X__u_short = uint16 /* types.h:32:28 */ 508 type X__u_int = uint32 /* types.h:33:22 */ 509 type X__u_long = uint64 /* types.h:34:27 */ 510 511 // Fixed-size types, underlying types depend on word size and compiler. 512 type X__int8_t = int8 /* types.h:37:21 */ 513 type X__uint8_t = uint8 /* types.h:38:23 */ 514 type X__int16_t = int16 /* types.h:39:26 */ 515 type X__uint16_t = uint16 /* types.h:40:28 */ 516 type X__int32_t = int32 /* types.h:41:20 */ 517 type X__uint32_t = uint32 /* types.h:42:22 */ 518 type X__int64_t = int64 /* types.h:44:25 */ 519 type X__uint64_t = uint64 /* types.h:45:27 */ 520 521 // Smallest types with at least a given width. 522 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 523 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 524 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 525 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 526 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 527 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 528 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 529 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 530 531 // quad_t is also 64 bits. 532 type X__quad_t = int64 /* types.h:63:18 */ 533 type X__u_quad_t = uint64 /* types.h:64:27 */ 534 535 // Largest integral types. 536 type X__intmax_t = int64 /* types.h:72:18 */ 537 type X__uintmax_t = uint64 /* types.h:73:27 */ 538 539 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 540 // macros for each of the OS types we define below. The definitions 541 // of those macros must use the following macros for underlying types. 542 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 543 // variants of each of the following integer types on this machine. 544 // 545 // 16 -- "natural" 16-bit type (always short) 546 // 32 -- "natural" 32-bit type (always int) 547 // 64 -- "natural" 64-bit type (long or long long) 548 // LONG32 -- 32-bit type, traditionally long 549 // QUAD -- 64-bit type, traditionally long long 550 // WORD -- natural type of __WORDSIZE bits (int or long) 551 // LONGWORD -- type of __WORDSIZE bits, traditionally long 552 // 553 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 554 // conventional uses of `long' or `long long' type modifiers match the 555 // types we define, even when a less-adorned type would be the same size. 556 // This matters for (somewhat) portably writing printf/scanf formats for 557 // these types, where using the appropriate l or ll format modifiers can 558 // make the typedefs and the formats match up across all GNU platforms. If 559 // we used `long' when it's 64 bits where `long long' is expected, then the 560 // compiler would warn about the formats not matching the argument types, 561 // and the programmer changing them to shut up the compiler would break the 562 // program's portability. 563 // 564 // Here we assume what is presently the case in all the GCC configurations 565 // we support: long long is always 64 bits, long is always word/address size, 566 // and int is always 32 bits. 567 568 // No need to mark the typedef with __extension__. 569 // bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. 570 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 571 // This file is part of the GNU C Library. 572 // Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011. 573 // 574 // The GNU C Library is free software; you can redistribute it and/or 575 // modify it under the terms of the GNU Lesser General Public 576 // License as published by the Free Software Foundation; either 577 // version 2.1 of the License, or (at your option) any later version. 578 // 579 // The GNU C Library is distributed in the hope that it will be useful, 580 // but WITHOUT ANY WARRANTY; without even the implied warranty of 581 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 582 // Lesser General Public License for more details. 583 // 584 // You should have received a copy of the GNU Lesser General Public 585 // License along with the GNU C Library. If not, see 586 // <https://www.gnu.org/licenses/>. 587 588 // See <bits/types.h> for the meaning of these macros. This file exists so 589 // that <bits/types.h> need not vary across different GNU platforms. 590 591 // Tell the libc code that off_t and off64_t are actually the same type 592 // for all ABI purposes, even if possibly expressed as different base types 593 // for C type-checking purposes. 594 595 // Same for ino_t and ino64_t. 596 597 // And for __rlim_t and __rlim64_t. 598 599 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 600 601 // And for getitimer, setitimer and rusage 602 603 // Number of descriptors that can fit in an `fd_set'. 604 605 // bits/time64.h -- underlying types for __time64_t. RISC-V version. 606 // Copyright (C) 2020-2021 Free Software Foundation, Inc. 607 // This file is part of the GNU C Library. 608 // 609 // The GNU C Library is free software; you can redistribute it and/or 610 // modify it under the terms of the GNU Lesser General Public 611 // License as published by the Free Software Foundation; either 612 // version 2.1 of the License, or (at your option) any later version. 613 // 614 // The GNU C Library is distributed in the hope that it will be useful, 615 // but WITHOUT ANY WARRANTY; without even the implied warranty of 616 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 617 // Lesser General Public License for more details. 618 // 619 // You should have received a copy of the GNU Lesser General Public 620 // License along with the GNU C Library; if not, see 621 // <https://www.gnu.org/licenses/>. 622 623 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 624 625 // If we already have 64-bit time type then use it. 626 627 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 628 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 629 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 630 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 631 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 632 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 633 type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. 634 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 635 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 636 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 637 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 638 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 639 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 640 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 641 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 642 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 643 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 644 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 645 type X__suseconds64_t = int64 /* types.h:163:33 */ 646 647 type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address. 648 type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key. 649 650 // Clock ID used in clock and timer functions. 651 type X__clockid_t = int32 /* types.h:169:29 */ 652 653 // Timer ID returned by `timer_create'. 654 type X__timer_t = uintptr /* types.h:172:12 */ 655 656 // Type to represent block size. 657 type X__blksize_t = int32 /* types.h:175:29 */ 658 659 // Types from the Large File Support interface. 660 661 // Type to count number of disk blocks. 662 type X__blkcnt_t = int64 /* types.h:180:28 */ 663 type X__blkcnt64_t = int64 /* types.h:181:30 */ 664 665 // Type to count file system blocks. 666 type X__fsblkcnt_t = uint64 /* types.h:184:30 */ 667 type X__fsblkcnt64_t = uint64 /* types.h:185:32 */ 668 669 // Type to count file system nodes. 670 type X__fsfilcnt_t = uint64 /* types.h:188:30 */ 671 type X__fsfilcnt64_t = uint64 /* types.h:189:32 */ 672 673 // Type of miscellaneous file system fields. 674 type X__fsword_t = int64 /* types.h:192:28 */ 675 676 type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error. 677 678 // Signed long type used in system calls. 679 type X__syscall_slong_t = int64 /* types.h:197:33 */ 680 // Unsigned long type used in system calls. 681 type X__syscall_ulong_t = uint64 /* types.h:199:33 */ 682 683 // These few don't really vary by system, they always correspond 684 // 685 // to one of the other defined types. 686 type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). 687 type X__caddr_t = uintptr /* types.h:204:14 */ 688 689 // Duplicates info from stdint.h but this is used in unistd.h. 690 type X__intptr_t = int64 /* types.h:207:25 */ 691 692 // Duplicate info from sys/socket.h. 693 type X__socklen_t = uint32 /* types.h:210:23 */ 694 695 // C99: An integer type that can be accessed as an atomic entity, 696 // 697 // even in the presence of asynchronous interrupts. 698 // It is not currently necessary for this to be machine-specific. 699 type X__sig_atomic_t = int32 /* types.h:215:13 */ 700 701 // Seconds since the Epoch, visible to user code when time_t is too 702 // narrow only for consistency with the old way of widening too-narrow 703 // types. User code should never use __time64_t. 704 705 type U_char = X__u_char /* types.h:33:18 */ 706 type U_short = X__u_short /* types.h:34:19 */ 707 type U_int = X__u_int /* types.h:35:17 */ 708 type U_long = X__u_long /* types.h:36:18 */ 709 type Quad_t = X__quad_t /* types.h:37:18 */ 710 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 711 type Fsid_t = X__fsid_t /* types.h:39:18 */ 712 type Loff_t = X__loff_t /* types.h:42:18 */ 713 714 type Ino_t = X__ino64_t /* types.h:49:19 */ 715 716 type Dev_t = X__dev_t /* types.h:59:17 */ 717 718 type Gid_t = X__gid_t /* types.h:64:17 */ 719 720 type Mode_t = X__mode_t /* types.h:69:18 */ 721 722 type Nlink_t = X__nlink_t /* types.h:74:19 */ 723 724 type Uid_t = X__uid_t /* types.h:79:17 */ 725 726 type Off_t = X__off64_t /* types.h:87:19 */ 727 728 type Pid_t = X__pid_t /* types.h:97:17 */ 729 730 type Id_t = X__id_t /* types.h:103:16 */ 731 732 type Ssize_t = X__ssize_t /* types.h:108:19 */ 733 734 type Daddr_t = X__daddr_t /* types.h:114:19 */ 735 type Caddr_t = X__caddr_t /* types.h:115:19 */ 736 737 type Key_t = X__key_t /* types.h:121:17 */ 738 739 // bits/types.h -- definitions of __*_t types underlying *_t types. 740 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 741 // This file is part of the GNU C Library. 742 // 743 // The GNU C Library is free software; you can redistribute it and/or 744 // modify it under the terms of the GNU Lesser General Public 745 // License as published by the Free Software Foundation; either 746 // version 2.1 of the License, or (at your option) any later version. 747 // 748 // The GNU C Library is distributed in the hope that it will be useful, 749 // but WITHOUT ANY WARRANTY; without even the implied warranty of 750 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 751 // Lesser General Public License for more details. 752 // 753 // You should have received a copy of the GNU Lesser General Public 754 // License along with the GNU C Library; if not, see 755 // <https://www.gnu.org/licenses/>. 756 757 // Never include this file directly; use <sys/types.h> instead. 758 759 // Returned by `clock'. 760 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 761 762 // bits/types.h -- definitions of __*_t types underlying *_t types. 763 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 764 // This file is part of the GNU C Library. 765 // 766 // The GNU C Library is free software; you can redistribute it and/or 767 // modify it under the terms of the GNU Lesser General Public 768 // License as published by the Free Software Foundation; either 769 // version 2.1 of the License, or (at your option) any later version. 770 // 771 // The GNU C Library is distributed in the hope that it will be useful, 772 // but WITHOUT ANY WARRANTY; without even the implied warranty of 773 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 774 // Lesser General Public License for more details. 775 // 776 // You should have received a copy of the GNU Lesser General Public 777 // License along with the GNU C Library; if not, see 778 // <https://www.gnu.org/licenses/>. 779 780 // Never include this file directly; use <sys/types.h> instead. 781 782 // Clock ID used in clock and timer functions. 783 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 784 785 // bits/types.h -- definitions of __*_t types underlying *_t types. 786 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 787 // This file is part of the GNU C Library. 788 // 789 // The GNU C Library is free software; you can redistribute it and/or 790 // modify it under the terms of the GNU Lesser General Public 791 // License as published by the Free Software Foundation; either 792 // version 2.1 of the License, or (at your option) any later version. 793 // 794 // The GNU C Library is distributed in the hope that it will be useful, 795 // but WITHOUT ANY WARRANTY; without even the implied warranty of 796 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 797 // Lesser General Public License for more details. 798 // 799 // You should have received a copy of the GNU Lesser General Public 800 // License along with the GNU C Library; if not, see 801 // <https://www.gnu.org/licenses/>. 802 803 // Never include this file directly; use <sys/types.h> instead. 804 805 // Returned by `time'. 806 type Time_t = X__time_t /* time_t.h:10:18 */ 807 808 // bits/types.h -- definitions of __*_t types underlying *_t types. 809 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 810 // This file is part of the GNU C Library. 811 // 812 // The GNU C Library is free software; you can redistribute it and/or 813 // modify it under the terms of the GNU Lesser General Public 814 // License as published by the Free Software Foundation; either 815 // version 2.1 of the License, or (at your option) any later version. 816 // 817 // The GNU C Library is distributed in the hope that it will be useful, 818 // but WITHOUT ANY WARRANTY; without even the implied warranty of 819 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 820 // Lesser General Public License for more details. 821 // 822 // You should have received a copy of the GNU Lesser General Public 823 // License along with the GNU C Library; if not, see 824 // <https://www.gnu.org/licenses/>. 825 826 // Never include this file directly; use <sys/types.h> instead. 827 828 // Timer ID returned by `timer_create'. 829 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 830 831 // Copyright (C) 1989-2021 Free Software Foundation, Inc. 832 // 833 // This file is part of GCC. 834 // 835 // GCC is free software; you can redistribute it and/or modify 836 // it under the terms of the GNU General Public License as published by 837 // the Free Software Foundation; either version 3, or (at your option) 838 // any later version. 839 // 840 // GCC is distributed in the hope that it will be useful, 841 // but WITHOUT ANY WARRANTY; without even the implied warranty of 842 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 843 // GNU General Public License for more details. 844 // 845 // Under Section 7 of GPL version 3, you are granted additional 846 // permissions described in the GCC Runtime Library Exception, version 847 // 3.1, as published by the Free Software Foundation. 848 // 849 // You should have received a copy of the GNU General Public License and 850 // a copy of the GCC Runtime Library Exception along with this program; 851 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 852 // <http://www.gnu.org/licenses/>. 853 854 // ISO C Standard: 7.17 Common definitions <stddef.h> 855 856 // Any one of these symbols __need_* means that GNU libc 857 // wants us just to define one data type. So don't define 858 // the symbols that indicate this file's entire job has been done. 859 860 // This avoids lossage on SunOS but only if stdtypes.h comes first. 861 // There's no way to win with the other order! Sun lossage. 862 863 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 864 // Just ignore it. 865 866 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 867 // _TYPE_size_t which will typedef size_t. fixincludes patched the 868 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 869 // not defined, and so that defining this macro defines _GCC_SIZE_T. 870 // If we find that the macros are still defined at this point, we must 871 // invoke them so that the type is defined as expected. 872 873 // In case nobody has defined these types, but we aren't running under 874 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 875 // __WCHAR_TYPE__ have reasonable values. This can happen if the 876 // parts of GCC is compiled by an older compiler, that actually 877 // include gstddef.h, such as collect2. 878 879 // Signed type of difference of two pointers. 880 881 // Define this type if we are doing the whole job, 882 // or if we want this type in particular. 883 884 // Unsigned type of `sizeof' something. 885 886 // Define this type if we are doing the whole job, 887 // or if we want this type in particular. 888 889 // Wide character type. 890 // Locale-writers should change this as necessary to 891 // be big enough to hold unique values not between 0 and 127, 892 // and not (wchar_t) -1, for each defined multibyte character. 893 894 // Define this type if we are doing the whole job, 895 // or if we want this type in particular. 896 897 // A null pointer constant. 898 899 // Old compatibility names for C types. 900 type Ulong = uint64 /* types.h:148:27 */ 901 type Ushort = uint16 /* types.h:149:28 */ 902 type Uint = uint32 /* types.h:150:22 */ 903 904 // These size-specific names are used by some of the inet code. 905 906 // Define intN_t types. 907 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 908 // This file is part of the GNU C Library. 909 // 910 // The GNU C Library is free software; you can redistribute it and/or 911 // modify it under the terms of the GNU Lesser General Public 912 // License as published by the Free Software Foundation; either 913 // version 2.1 of the License, or (at your option) any later version. 914 // 915 // The GNU C Library is distributed in the hope that it will be useful, 916 // but WITHOUT ANY WARRANTY; without even the implied warranty of 917 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 918 // Lesser General Public License for more details. 919 // 920 // You should have received a copy of the GNU Lesser General Public 921 // License along with the GNU C Library; if not, see 922 // <https://www.gnu.org/licenses/>. 923 924 // bits/types.h -- definitions of __*_t types underlying *_t types. 925 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 926 // This file is part of the GNU C Library. 927 // 928 // The GNU C Library is free software; you can redistribute it and/or 929 // modify it under the terms of the GNU Lesser General Public 930 // License as published by the Free Software Foundation; either 931 // version 2.1 of the License, or (at your option) any later version. 932 // 933 // The GNU C Library is distributed in the hope that it will be useful, 934 // but WITHOUT ANY WARRANTY; without even the implied warranty of 935 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 936 // Lesser General Public License for more details. 937 // 938 // You should have received a copy of the GNU Lesser General Public 939 // License along with the GNU C Library; if not, see 940 // <https://www.gnu.org/licenses/>. 941 942 // Never include this file directly; use <sys/types.h> instead. 943 944 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 945 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 946 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 947 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 948 949 // These were defined by ISO C without the first `_'. 950 type U_int8_t = X__uint8_t /* types.h:158:19 */ 951 type U_int16_t = X__uint16_t /* types.h:159:20 */ 952 type U_int32_t = X__uint32_t /* types.h:160:20 */ 953 type U_int64_t = X__uint64_t /* types.h:161:20 */ 954 955 type Register_t = int32 /* types.h:164:13 */ 956 957 // It also defines `fd_set' and the FD_* macros for `select'. 958 // `fd_set' type and related macros, and `select'/`pselect' declarations. 959 // Copyright (C) 1996-2021 Free Software Foundation, Inc. 960 // This file is part of the GNU C Library. 961 // 962 // The GNU C Library is free software; you can redistribute it and/or 963 // modify it under the terms of the GNU Lesser General Public 964 // License as published by the Free Software Foundation; either 965 // version 2.1 of the License, or (at your option) any later version. 966 // 967 // The GNU C Library is distributed in the hope that it will be useful, 968 // but WITHOUT ANY WARRANTY; without even the implied warranty of 969 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 970 // Lesser General Public License for more details. 971 // 972 // You should have received a copy of the GNU Lesser General Public 973 // License along with the GNU C Library; if not, see 974 // <https://www.gnu.org/licenses/>. 975 976 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 977 978 // Copyright (C) 1991-2021 Free Software Foundation, Inc. 979 // This file is part of the GNU C Library. 980 // 981 // The GNU C Library is free software; you can redistribute it and/or 982 // modify it under the terms of the GNU Lesser General Public 983 // License as published by the Free Software Foundation; either 984 // version 2.1 of the License, or (at your option) any later version. 985 // 986 // The GNU C Library is distributed in the hope that it will be useful, 987 // but WITHOUT ANY WARRANTY; without even the implied warranty of 988 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 989 // Lesser General Public License for more details. 990 // 991 // You should have received a copy of the GNU Lesser General Public 992 // License along with the GNU C Library; if not, see 993 // <https://www.gnu.org/licenses/>. 994 995 // Get definition of needed basic types. 996 // bits/types.h -- definitions of __*_t types underlying *_t types. 997 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 998 // This file is part of the GNU C Library. 999 // 1000 // The GNU C Library is free software; you can redistribute it and/or 1001 // modify it under the terms of the GNU Lesser General Public 1002 // License as published by the Free Software Foundation; either 1003 // version 2.1 of the License, or (at your option) any later version. 1004 // 1005 // The GNU C Library is distributed in the hope that it will be useful, 1006 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1007 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1008 // Lesser General Public License for more details. 1009 // 1010 // You should have received a copy of the GNU Lesser General Public 1011 // License along with the GNU C Library; if not, see 1012 // <https://www.gnu.org/licenses/>. 1013 1014 // Never include this file directly; use <sys/types.h> instead. 1015 1016 // Get __FD_* definitions. 1017 // Copyright (C) 1997-2021 Free Software Foundation, Inc. 1018 // This file is part of the GNU C Library. 1019 // 1020 // The GNU C Library is free software; you can redistribute it and/or 1021 // modify it under the terms of the GNU Lesser General Public 1022 // License as published by the Free Software Foundation; either 1023 // version 2.1 of the License, or (at your option) any later version. 1024 // 1025 // The GNU C Library is distributed in the hope that it will be useful, 1026 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1027 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1028 // Lesser General Public License for more details. 1029 // 1030 // You should have received a copy of the GNU Lesser General Public 1031 // License along with the GNU C Library; if not, see 1032 // <https://www.gnu.org/licenses/>. 1033 1034 // We don't use `memset' because this would require a prototype and 1035 // the array isn't too big. 1036 1037 // Get sigset_t. 1038 1039 type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ 1040 1041 // A set of signals to be blocked, unblocked, or waited for. 1042 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 1043 1044 // Get definition of timer specification structures. 1045 1046 // bits/types.h -- definitions of __*_t types underlying *_t types. 1047 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1048 // This file is part of the GNU C Library. 1049 // 1050 // The GNU C Library is free software; you can redistribute it and/or 1051 // modify it under the terms of the GNU Lesser General Public 1052 // License as published by the Free Software Foundation; either 1053 // version 2.1 of the License, or (at your option) any later version. 1054 // 1055 // The GNU C Library is distributed in the hope that it will be useful, 1056 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1057 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1058 // Lesser General Public License for more details. 1059 // 1060 // You should have received a copy of the GNU Lesser General Public 1061 // License along with the GNU C Library; if not, see 1062 // <https://www.gnu.org/licenses/>. 1063 1064 // Never include this file directly; use <sys/types.h> instead. 1065 1066 // A time value that is accurate to the nearest 1067 // 1068 // microsecond but also has a range of years. 1069 type Timeval = struct { 1070 Ftv_sec X__time_t 1071 Ftv_usec X__suseconds_t 1072 } /* struct_timeval.h:8:1 */ 1073 1074 // NB: Include guard matches what <linux/time.h> uses. 1075 1076 // bits/types.h -- definitions of __*_t types underlying *_t types. 1077 // Copyright (C) 2002-2021 Free Software Foundation, Inc. 1078 // This file is part of the GNU C Library. 1079 // 1080 // The GNU C Library is free software; you can redistribute it and/or 1081 // modify it under the terms of the GNU Lesser General Public 1082 // License as published by the Free Software Foundation; either 1083 // version 2.1 of the License, or (at your option) any later version. 1084 // 1085 // The GNU C Library is distributed in the hope that it will be useful, 1086 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1087 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1088 // Lesser General Public License for more details. 1089 // 1090 // You should have received a copy of the GNU Lesser General Public 1091 // License along with the GNU C Library; if not, see 1092 // <https://www.gnu.org/licenses/>. 1093 1094 // Never include this file directly; use <sys/types.h> instead. 1095 1096 // Endian macros for string.h functions 1097 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1098 // This file is part of the GNU C Library. 1099 // 1100 // The GNU C Library is free software; you can redistribute it and/or 1101 // modify it under the terms of the GNU Lesser General Public 1102 // License as published by the Free Software Foundation; either 1103 // version 2.1 of the License, or (at your option) any later version. 1104 // 1105 // The GNU C Library is distributed in the hope that it will be useful, 1106 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1107 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1108 // Lesser General Public License for more details. 1109 // 1110 // You should have received a copy of the GNU Lesser General Public 1111 // License along with the GNU C Library; if not, see 1112 // <http://www.gnu.org/licenses/>. 1113 1114 // POSIX.1b structure for a time value. This is like a `struct timeval' but 1115 // 1116 // has nanoseconds instead of microseconds. 1117 type Timespec = struct { 1118 Ftv_sec X__time_t 1119 Ftv_nsec X__syscall_slong_t 1120 } /* struct_timespec.h:11:1 */ 1121 1122 type Suseconds_t = X__suseconds_t /* select.h:43:23 */ 1123 1124 // The fd_set member is required to be an array of longs. 1125 type X__fd_mask = int64 /* select.h:49:18 */ 1126 1127 // Some versions of <linux/posix_types.h> define this macros. 1128 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 1129 1130 // fd_set for select and pselect. 1131 type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ 1132 1133 // Maximum number of file descriptors in `fd_set'. 1134 1135 // Sometimes the fd_set member is assumed to have this type. 1136 type Fd_mask = X__fd_mask /* select.h:77:19 */ 1137 1138 // Define some inlines helping to catch common problems. 1139 1140 type Blksize_t = X__blksize_t /* types.h:185:21 */ 1141 1142 // Types from the Large File Support interface. 1143 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 1144 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 1145 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 1146 1147 // Now add the thread types. 1148 // Declaration of common pthread types for all architectures. 1149 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1150 // This file is part of the GNU C Library. 1151 // 1152 // The GNU C Library is free software; you can redistribute it and/or 1153 // modify it under the terms of the GNU Lesser General Public 1154 // License as published by the Free Software Foundation; either 1155 // version 2.1 of the License, or (at your option) any later version. 1156 // 1157 // The GNU C Library is distributed in the hope that it will be useful, 1158 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1159 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1160 // Lesser General Public License for more details. 1161 // 1162 // You should have received a copy of the GNU Lesser General Public 1163 // License along with the GNU C Library; if not, see 1164 // <https://www.gnu.org/licenses/>. 1165 1166 // For internal mutex and condition variable definitions. 1167 // Common threading primitives definitions for both POSIX and C11. 1168 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1169 // This file is part of the GNU C Library. 1170 // 1171 // The GNU C Library is free software; you can redistribute it and/or 1172 // modify it under the terms of the GNU Lesser General Public 1173 // License as published by the Free Software Foundation; either 1174 // version 2.1 of the License, or (at your option) any later version. 1175 // 1176 // The GNU C Library is distributed in the hope that it will be useful, 1177 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1178 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1179 // Lesser General Public License for more details. 1180 // 1181 // You should have received a copy of the GNU Lesser General Public 1182 // License along with the GNU C Library; if not, see 1183 // <https://www.gnu.org/licenses/>. 1184 1185 // Arch-specific definitions. Each architecture must define the following 1186 // macros to define the expected sizes of pthread data types: 1187 // 1188 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1189 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1190 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1191 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1192 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1193 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1194 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1195 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1196 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1197 // 1198 // The additional macro defines any constraint for the lock alignment 1199 // inside the thread structures: 1200 // 1201 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1202 // 1203 // Same idea but for the once locking primitive: 1204 // 1205 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1206 1207 // Machine-specific pthread type layouts. RISC-V version. 1208 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 1209 // This file is part of the GNU C Library. 1210 // 1211 // The GNU C Library is free software; you can redistribute it and/or 1212 // modify it under the terms of the GNU Lesser General Public 1213 // License as published by the Free Software Foundation; either 1214 // version 2.1 of the License, or (at your option) any later version. 1215 // 1216 // The GNU C Library is distributed in the hope that it will be useful, 1217 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1218 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1219 // Lesser General Public License for more details. 1220 // 1221 // You should have received a copy of the GNU Lesser General Public 1222 // License along with the GNU C Library. If not, see 1223 // <https://www.gnu.org/licenses/>. 1224 1225 // Endian macros for string.h functions 1226 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1227 // This file is part of the GNU C Library. 1228 // 1229 // The GNU C Library is free software; you can redistribute it and/or 1230 // modify it under the terms of the GNU Lesser General Public 1231 // License as published by the Free Software Foundation; either 1232 // version 2.1 of the License, or (at your option) any later version. 1233 // 1234 // The GNU C Library is distributed in the hope that it will be useful, 1235 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1236 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1237 // Lesser General Public License for more details. 1238 // 1239 // You should have received a copy of the GNU Lesser General Public 1240 // License along with the GNU C Library; if not, see 1241 // <http://www.gnu.org/licenses/>. 1242 1243 // Common definition of pthread_mutex_t. 1244 1245 type X__pthread_internal_list = struct { 1246 F__prev uintptr 1247 F__next uintptr 1248 } /* thread-shared-types.h:49:9 */ 1249 1250 // Type to count file system inodes. 1251 1252 // Now add the thread types. 1253 // Declaration of common pthread types for all architectures. 1254 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1255 // This file is part of the GNU C Library. 1256 // 1257 // The GNU C Library is free software; you can redistribute it and/or 1258 // modify it under the terms of the GNU Lesser General Public 1259 // License as published by the Free Software Foundation; either 1260 // version 2.1 of the License, or (at your option) any later version. 1261 // 1262 // The GNU C Library is distributed in the hope that it will be useful, 1263 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1264 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1265 // Lesser General Public License for more details. 1266 // 1267 // You should have received a copy of the GNU Lesser General Public 1268 // License along with the GNU C Library; if not, see 1269 // <https://www.gnu.org/licenses/>. 1270 1271 // For internal mutex and condition variable definitions. 1272 // Common threading primitives definitions for both POSIX and C11. 1273 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1274 // This file is part of the GNU C Library. 1275 // 1276 // The GNU C Library is free software; you can redistribute it and/or 1277 // modify it under the terms of the GNU Lesser General Public 1278 // License as published by the Free Software Foundation; either 1279 // version 2.1 of the License, or (at your option) any later version. 1280 // 1281 // The GNU C Library is distributed in the hope that it will be useful, 1282 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1283 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1284 // Lesser General Public License for more details. 1285 // 1286 // You should have received a copy of the GNU Lesser General Public 1287 // License along with the GNU C Library; if not, see 1288 // <https://www.gnu.org/licenses/>. 1289 1290 // Arch-specific definitions. Each architecture must define the following 1291 // macros to define the expected sizes of pthread data types: 1292 // 1293 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1294 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1295 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1296 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1297 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1298 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1299 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1300 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1301 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1302 // 1303 // The additional macro defines any constraint for the lock alignment 1304 // inside the thread structures: 1305 // 1306 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1307 // 1308 // Same idea but for the once locking primitive: 1309 // 1310 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1311 1312 // Machine-specific pthread type layouts. RISC-V version. 1313 // Copyright (C) 2011-2021 Free Software Foundation, Inc. 1314 // This file is part of the GNU C Library. 1315 // 1316 // The GNU C Library is free software; you can redistribute it and/or 1317 // modify it under the terms of the GNU Lesser General Public 1318 // License as published by the Free Software Foundation; either 1319 // version 2.1 of the License, or (at your option) any later version. 1320 // 1321 // The GNU C Library is distributed in the hope that it will be useful, 1322 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1323 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1324 // Lesser General Public License for more details. 1325 // 1326 // You should have received a copy of the GNU Lesser General Public 1327 // License along with the GNU C Library. If not, see 1328 // <https://www.gnu.org/licenses/>. 1329 1330 // Endian macros for string.h functions 1331 // Copyright (C) 1992-2021 Free Software Foundation, Inc. 1332 // This file is part of the GNU C Library. 1333 // 1334 // The GNU C Library is free software; you can redistribute it and/or 1335 // modify it under the terms of the GNU Lesser General Public 1336 // License as published by the Free Software Foundation; either 1337 // version 2.1 of the License, or (at your option) any later version. 1338 // 1339 // The GNU C Library is distributed in the hope that it will be useful, 1340 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1341 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1342 // Lesser General Public License for more details. 1343 // 1344 // You should have received a copy of the GNU Lesser General Public 1345 // License along with the GNU C Library; if not, see 1346 // <http://www.gnu.org/licenses/>. 1347 1348 // Common definition of pthread_mutex_t. 1349 1350 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 1351 1352 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 1353 1354 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 1355 1356 // Arch-specific mutex definitions. A generic implementation is provided 1357 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 1358 // can override it by defining: 1359 // 1360 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 1361 // definition). It should contains at least the internal members 1362 // defined in the generic version. 1363 // 1364 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 1365 // atomic operations. 1366 // 1367 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 1368 // It should initialize the mutex internal flag. 1369 1370 // Default mutex implementation struct definitions. 1371 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 1372 // This file is part of the GNU C Library. 1373 // 1374 // The GNU C Library is free software; you can redistribute it and/or 1375 // modify it under the terms of the GNU Lesser General Public 1376 // License as published by the Free Software Foundation; either 1377 // version 2.1 of the License, or (at your option) any later version. 1378 // 1379 // The GNU C Library is distributed in the hope that it will be useful, 1380 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1381 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1382 // Lesser General Public License for more details. 1383 // 1384 // You should have received a copy of the GNU Lesser General Public 1385 // License along with the GNU C Library; if not, see 1386 // <http://www.gnu.org/licenses/>. 1387 1388 // Generic struct for both POSIX and C11 mutexes. New ports are expected 1389 // to use the default layout, however architecture can redefine it to 1390 // add arch-specific extension (such as lock-elision). The struct have 1391 // a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. 1392 1393 type X__pthread_mutex_s = struct { 1394 F__lock int32 1395 F__count uint32 1396 F__owner int32 1397 F__nusers uint32 1398 F__kind int32 1399 F__spins int32 1400 F__list X__pthread_list_t 1401 } /* struct_mutex.h:27:1 */ 1402 1403 // Arch-sepecific read-write lock definitions. A generic implementation is 1404 // provided by struct_rwlock.h. If required, an architecture can override it 1405 // by defining: 1406 // 1407 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 1408 // It should contain at least the internal members defined in the 1409 // generic version. 1410 // 1411 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 1412 // It should initialize the rwlock internal type. 1413 1414 // RISC-V internal rwlock struct definitions. 1415 // Copyright (C) 2019-2021 Free Software Foundation, Inc. 1416 // 1417 // This file is part of the GNU C Library. 1418 // 1419 // The GNU C Library is free software; you can redistribute it and/or 1420 // modify it under the terms of the GNU Lesser General Public 1421 // License as published by the Free Software Foundation; either 1422 // version 2.1 of the License, or (at your option) any later version. 1423 // 1424 // The GNU C Library is distributed in the hope that it will be useful, 1425 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1426 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1427 // Lesser General Public License for more details. 1428 // 1429 // You should have received a copy of the GNU Lesser General Public 1430 // License along with the GNU C Library; if not, see 1431 // <https://www.gnu.org/licenses/>. 1432 1433 // There is a lot of padding in this structure. While it's not strictly 1434 // 1435 // necessary on RISC-V, we're going to leave it in to be on the safe side in 1436 // case it's needed in the future. Most other architectures have the padding, 1437 // so this gives us the same extensibility as everyone else has. 1438 type X__pthread_rwlock_arch_t = struct { 1439 F__readers uint32 1440 F__writers uint32 1441 F__wrphase_futex uint32 1442 F__writers_futex uint32 1443 F__pad3 uint32 1444 F__pad4 uint32 1445 F__cur_writer int32 1446 F__shared int32 1447 F__pad1 uint64 1448 F__pad2 uint64 1449 F__flags uint32 1450 F__ccgo_pad1 [4]byte 1451 } /* struct_rwlock.h:27:1 */ 1452 1453 // Common definition of pthread_cond_t. 1454 1455 type X__pthread_cond_s = struct { 1456 F__0 struct{ F__wseq uint64 } 1457 F__8 struct{ F__g1_start uint64 } 1458 F__g_refs [2]uint32 1459 F__g_size [2]uint32 1460 F__g1_orig_size uint32 1461 F__wrefs uint32 1462 F__g_signals [2]uint32 1463 } /* thread-shared-types.h:92:1 */ 1464 1465 type X__tss_t = uint32 /* thread-shared-types.h:119:22 */ 1466 type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ 1467 1468 type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ 1469 1470 // Thread identifiers. The structure of the attribute type is not 1471 // 1472 // exposed on purpose. 1473 type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ 1474 1475 // Data structures for mutex handling. The structure of the attribute 1476 // 1477 // type is not exposed on purpose. 1478 type Pthread_mutexattr_t = struct { 1479 F__ccgo_pad1 [0]uint32 1480 F__size [4]uint8 1481 } /* pthreadtypes.h:36:3 */ 1482 1483 // Data structure for condition variable handling. The structure of 1484 // 1485 // the attribute type is not exposed on purpose. 1486 type Pthread_condattr_t = struct { 1487 F__ccgo_pad1 [0]uint32 1488 F__size [4]uint8 1489 } /* pthreadtypes.h:45:3 */ 1490 1491 // Keys for thread-specific data 1492 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 1493 1494 // Once-only execution 1495 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 1496 1497 type Pthread_attr_t1 = struct { 1498 F__ccgo_pad1 [0]uint64 1499 F__size [56]uint8 1500 } /* pthreadtypes.h:56:1 */ 1501 1502 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 1503 1504 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 1505 1506 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 1507 1508 // Data structure for reader-writer lock variable handling. The 1509 // 1510 // structure of the attribute type is deliberately not exposed. 1511 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 1512 1513 type Pthread_rwlockattr_t = struct { 1514 F__ccgo_pad1 [0]uint64 1515 F__size [8]uint8 1516 } /* pthreadtypes.h:97:3 */ 1517 1518 // POSIX spinlock data type. 1519 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 1520 1521 // POSIX barriers data type. The structure of the type is 1522 // 1523 // deliberately not exposed. 1524 type Pthread_barrier_t = struct { 1525 F__ccgo_pad1 [0]uint64 1526 F__size [32]uint8 1527 } /* pthreadtypes.h:112:3 */ 1528 1529 type Pthread_barrierattr_t = struct { 1530 F__ccgo_pad1 [0]uint32 1531 F__size [4]uint8 1532 } /* pthreadtypes.h:118:3 */ 1533 1534 // Reentrant versions of the `random' family of functions. 1535 // These functions all use the following data structure to contain 1536 // state, rather than global state variables. 1537 1538 type Random_data = struct { 1539 Ffptr uintptr 1540 Frptr uintptr 1541 Fstate uintptr 1542 Frand_type int32 1543 Frand_deg int32 1544 Frand_sep int32 1545 F__ccgo_pad1 [4]byte 1546 Fend_ptr uintptr 1547 } /* stdlib.h:423:1 */ 1548 1549 // Data structure for communication with thread safe versions. This 1550 // 1551 // type is to be regarded as opaque. It's only exported because users 1552 // have to allocate objects of this type. 1553 type Drand48_data = struct { 1554 F__x [3]uint16 1555 F__old_x [3]uint16 1556 F__c uint16 1557 F__init uint16 1558 F__a uint64 1559 } /* stdlib.h:490:1 */ 1560 1561 // Shorthand for type of comparison functions. 1562 type X__compar_fn_t = uintptr /* stdlib.h:814:13 */ 1563 1564 // Floating-point inline functions for stdlib.h. 1565 // Copyright (C) 2012-2021 Free Software Foundation, Inc. 1566 // This file is part of the GNU C Library. 1567 // 1568 // The GNU C Library is free software; you can redistribute it and/or 1569 // modify it under the terms of the GNU Lesser General Public 1570 // License as published by the Free Software Foundation; either 1571 // version 2.1 of the License, or (at your option) any later version. 1572 // 1573 // The GNU C Library is distributed in the hope that it will be useful, 1574 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1575 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1576 // Lesser General Public License for more details. 1577 // 1578 // You should have received a copy of the GNU Lesser General Public 1579 // License along with the GNU C Library; if not, see 1580 // <https://www.gnu.org/licenses/>. 1581 1582 // Define some macros helping to catch buffer overflows. 1583 1584 // Macros to control TS 18661-3 glibc features on ldbl-128 platforms. 1585 // Copyright (C) 2017-2021 Free Software Foundation, Inc. 1586 // This file is part of the GNU C Library. 1587 // 1588 // The GNU C Library is free software; you can redistribute it and/or 1589 // modify it under the terms of the GNU Lesser General Public 1590 // License as published by the Free Software Foundation; either 1591 // version 2.1 of the License, or (at your option) any later version. 1592 // 1593 // The GNU C Library is distributed in the hope that it will be useful, 1594 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1595 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1596 // Lesser General Public License for more details. 1597 // 1598 // You should have received a copy of the GNU Lesser General Public 1599 // License along with the GNU C Library; if not, see 1600 // <https://www.gnu.org/licenses/>. 1601 1602 var _ uint8 /* gen.c:2:13: */