modernc.org/xau@v1.0.16/internal/autest/main_linux_amd64.go (about) 1 // Code generated by 'ccgo -export-fields F -lmodernc.org/xau/lib -o internal/autest/main_linux_amd64.go -trace-translation-units /tmp/go-generate-426534225/cdb.json Autest', DO NOT EDIT. 2 3 package main 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 11 "modernc.org/libc" 12 "modernc.org/libc/sys/types" 13 "modernc.org/xau/lib" 14 ) 15 16 var _ = math.Pi 17 var _ reflect.Kind 18 var _ atomic.Value 19 var _ unsafe.Pointer 20 var _ types.Size_t 21 22 func main() { libc.Start(main1) } 23 24 // A null pointer constant. 25 26 // XPG requires a few symbols from <sys/wait.h> being defined. 27 // Definitions of flag bits for `waitpid' et al. 28 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 29 // This file is part of the GNU C Library. 30 // 31 // The GNU C Library is free software; you can redistribute it and/or 32 // modify it under the terms of the GNU Lesser General Public 33 // License as published by the Free Software Foundation; either 34 // version 2.1 of the License, or (at your option) any later version. 35 // 36 // The GNU C Library is distributed in the hope that it will be useful, 37 // but WITHOUT ANY WARRANTY; without even the implied warranty of 38 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 39 // Lesser General Public License for more details. 40 // 41 // You should have received a copy of the GNU Lesser General Public 42 // License along with the GNU C Library; if not, see 43 // <https://www.gnu.org/licenses/>. 44 45 // Bits in the third argument to `waitpid'. 46 47 // Bits in the fourth argument to `waitid'. 48 49 // The following values are used by the `waitid' function. 50 51 // The Linux kernel defines these bare, rather than an enum, 52 // which causes a conflict if the include order is reversed. 53 54 const ( /* waitflags.h:52:1: */ 55 P_ALL = 0 // Wait for any child. 56 P_PID = 1 // Wait for specified process. 57 P_PGID = 2 58 ) 59 60 type ptrdiff_t = int64 /* <builtin>:3:26 */ 61 62 type size_t = uint64 /* <builtin>:9:23 */ 63 64 type wchar_t = int32 /* <builtin>:15:24 */ 65 66 // 67 // 68 // Copyright 1988, 1998 The Open Group 69 // 70 // Permission to use, copy, modify, distribute, and sell this software and its 71 // documentation for any purpose is hereby granted without fee, provided that 72 // the above copyright notice appear in all copies and that both that 73 // copyright notice and this permission notice appear in supporting 74 // documentation. 75 // 76 // The above copyright notice and this permission notice shall be included in 77 // all copies or substantial portions of the Software. 78 // 79 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 80 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 81 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 82 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 83 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 84 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 85 // 86 // Except as contained in this notice, the name of The Open Group shall not be 87 // used in advertising or otherwise to promote the sale, use or other dealings 88 // in this Software without prior written authorization from The Open Group. 89 // 90 91 // config.h. Generated from config.h.in by configure. 92 // config.h.in. Generated from configure.ac by autoheader. 93 94 // Define to 1 if you have the <dlfcn.h> header file. 95 96 // Define to 1 if you have the <inttypes.h> header file. 97 98 // Define to 1 if you have the <memory.h> header file. 99 100 // Define to 1 if you have the `pathconf' function. 101 102 // Define to 1 if you have the <stdint.h> header file. 103 104 // Define to 1 if you have the <stdlib.h> header file. 105 106 // Define to 1 if you have the <strings.h> header file. 107 108 // Define to 1 if you have the <string.h> header file. 109 110 // Define to 1 if you have the <sys/stat.h> header file. 111 112 // Define to 1 if you have the <sys/types.h> header file. 113 114 // Define to 1 if you have the <unistd.h> header file. 115 116 // Define to the sub-directory where libtool stores uninstalled libraries. 117 118 // Name of package 119 120 // Define to the address where bug reports for this package should be sent. 121 122 // Define to the full name of this package. 123 124 // Define to the full name and version of this package. 125 126 // Define to the one symbol short name of this package. 127 128 // Define to the home page for this package. 129 130 // Define to the version of this package. 131 132 // Major version of this package 133 134 // Minor version of this package 135 136 // Patch version of this package 137 138 // Define to 1 if you have the ANSI C header files. 139 140 // Enable extensions on AIX 3, Interix. 141 // Enable GNU extensions on systems that have them. 142 // Enable threading extensions on Solaris. 143 // Enable extensions on HP NonStop. 144 // Enable general extensions on Solaris. 145 146 // Version number of package 147 148 // Whether libXau is compiled with thread support 149 // #undef XTHREADS 150 151 // Whether libXau needs to use MT safe API's 152 // #undef XUSE_MTSAFE_API 153 154 // Define to 1 if on MINIX. 155 // #undef _MINIX 156 157 // Define to 2 if the system does not provide POSIX.1 features except with 158 // this defined. 159 // #undef _POSIX_1_SOURCE 160 161 // Define to 1 if you need to in order for `stat' and other things to work. 162 // #undef _POSIX_SOURCE 163 // 164 // 165 // Copyright 1988, 1998 The Open Group 166 // 167 // Permission to use, copy, modify, distribute, and sell this software and its 168 // documentation for any purpose is hereby granted without fee, provided that 169 // the above copyright notice appear in all copies and that both that 170 // copyright notice and this permission notice appear in supporting 171 // documentation. 172 // 173 // The above copyright notice and this permission notice shall be included in 174 // all copies or substantial portions of the Software. 175 // 176 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 177 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 178 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 179 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 180 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 181 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 182 // 183 // Except as contained in this notice, the name of The Open Group shall not be 184 // used in advertising or otherwise to promote the sale, use or other dealings 185 // in this Software without prior written authorization from The Open Group. 186 // 187 188 // struct xauth is full of implicit padding to properly align the pointers 189 // after the length fields. We can't clean that up without breaking ABI, 190 // so tell clang not to bother complaining about it. 191 192 type xauth = struct { 193 Ffamily uint16 194 Faddress_length uint16 195 F__ccgo_pad1 [4]byte 196 Faddress uintptr 197 Fnumber_length uint16 198 F__ccgo_pad2 [6]byte 199 Fnumber uintptr 200 Fname_length uint16 201 F__ccgo_pad3 [6]byte 202 Fname uintptr 203 Fdata_length uint16 204 F__ccgo_pad4 [6]byte 205 Fdata uintptr 206 } /* Xauth.h:38:9 */ 207 208 // 209 // 210 // Copyright 1988, 1998 The Open Group 211 // 212 // Permission to use, copy, modify, distribute, and sell this software and its 213 // documentation for any purpose is hereby granted without fee, provided that 214 // the above copyright notice appear in all copies and that both that 215 // copyright notice and this permission notice appear in supporting 216 // documentation. 217 // 218 // The above copyright notice and this permission notice shall be included in 219 // all copies or substantial portions of the Software. 220 // 221 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 222 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 223 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 224 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 225 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 226 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 227 // 228 // Except as contained in this notice, the name of The Open Group shall not be 229 // used in advertising or otherwise to promote the sale, use or other dealings 230 // in this Software without prior written authorization from The Open Group. 231 // 232 233 // config.h. Generated from config.h.in by configure. 234 // config.h.in. Generated from configure.ac by autoheader. 235 236 // Define to 1 if you have the <dlfcn.h> header file. 237 238 // Define to 1 if you have the <inttypes.h> header file. 239 240 // Define to 1 if you have the <memory.h> header file. 241 242 // Define to 1 if you have the `pathconf' function. 243 244 // Define to 1 if you have the <stdint.h> header file. 245 246 // Define to 1 if you have the <stdlib.h> header file. 247 248 // Define to 1 if you have the <strings.h> header file. 249 250 // Define to 1 if you have the <string.h> header file. 251 252 // Define to 1 if you have the <sys/stat.h> header file. 253 254 // Define to 1 if you have the <sys/types.h> header file. 255 256 // Define to 1 if you have the <unistd.h> header file. 257 258 // Define to the sub-directory where libtool stores uninstalled libraries. 259 260 // Name of package 261 262 // Define to the address where bug reports for this package should be sent. 263 264 // Define to the full name of this package. 265 266 // Define to the full name and version of this package. 267 268 // Define to the one symbol short name of this package. 269 270 // Define to the home page for this package. 271 272 // Define to the version of this package. 273 274 // Major version of this package 275 276 // Minor version of this package 277 278 // Patch version of this package 279 280 // Define to 1 if you have the ANSI C header files. 281 282 // Enable extensions on AIX 3, Interix. 283 // Enable GNU extensions on systems that have them. 284 // Enable threading extensions on Solaris. 285 // Enable extensions on HP NonStop. 286 // Enable general extensions on Solaris. 287 288 // Version number of package 289 290 // Whether libXau is compiled with thread support 291 // #undef XTHREADS 292 293 // Whether libXau needs to use MT safe API's 294 // #undef XUSE_MTSAFE_API 295 296 // Define to 1 if on MINIX. 297 // #undef _MINIX 298 299 // Define to 2 if the system does not provide POSIX.1 features except with 300 // this defined. 301 // #undef _POSIX_1_SOURCE 302 303 // Define to 1 if you need to in order for `stat' and other things to work. 304 // #undef _POSIX_SOURCE 305 // 306 // 307 // Copyright 1988, 1998 The Open Group 308 // 309 // Permission to use, copy, modify, distribute, and sell this software and its 310 // documentation for any purpose is hereby granted without fee, provided that 311 // the above copyright notice appear in all copies and that both that 312 // copyright notice and this permission notice appear in supporting 313 // documentation. 314 // 315 // The above copyright notice and this permission notice shall be included in 316 // all copies or substantial portions of the Software. 317 // 318 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 319 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 320 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 321 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 322 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 323 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 324 // 325 // Except as contained in this notice, the name of The Open Group shall not be 326 // used in advertising or otherwise to promote the sale, use or other dealings 327 // in this Software without prior written authorization from The Open Group. 328 // 329 330 // struct xauth is full of implicit padding to properly align the pointers 331 // after the length fields. We can't clean that up without breaking ABI, 332 // so tell clang not to bother complaining about it. 333 334 type Xauth = xauth /* Xauth.h:48:3 */ 335 336 // POSIX.1-2008 extended locale interface (see locale.h). 337 // Definition of locale_t. 338 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 339 // This file is part of the GNU C Library. 340 // 341 // The GNU C Library is free software; you can redistribute it and/or 342 // modify it under the terms of the GNU Lesser General Public 343 // License as published by the Free Software Foundation; either 344 // version 2.1 of the License, or (at your option) any later version. 345 // 346 // The GNU C Library is distributed in the hope that it will be useful, 347 // but WITHOUT ANY WARRANTY; without even the implied warranty of 348 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 349 // Lesser General Public License for more details. 350 // 351 // You should have received a copy of the GNU Lesser General Public 352 // License along with the GNU C Library; if not, see 353 // <https://www.gnu.org/licenses/>. 354 355 // Definition of struct __locale_struct and __locale_t. 356 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 357 // This file is part of the GNU C Library. 358 // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 359 // 360 // The GNU C Library is free software; you can redistribute it and/or 361 // modify it under the terms of the GNU Lesser General Public 362 // License as published by the Free Software Foundation; either 363 // version 2.1 of the License, or (at your option) any later version. 364 // 365 // The GNU C Library is distributed in the hope that it will be useful, 366 // but WITHOUT ANY WARRANTY; without even the implied warranty of 367 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 368 // Lesser General Public License for more details. 369 // 370 // You should have received a copy of the GNU Lesser General Public 371 // License along with the GNU C Library; if not, see 372 // <https://www.gnu.org/licenses/>. 373 374 // POSIX.1-2008: the locale_t type, representing a locale context 375 // (implementation-namespace version). This type should be treated 376 // as opaque by applications; some details are exposed for the sake of 377 // efficiency in e.g. ctype functions. 378 379 type __locale_struct = struct { 380 F__locales [13]uintptr 381 F__ctype_b uintptr 382 F__ctype_tolower uintptr 383 F__ctype_toupper uintptr 384 F__names [13]uintptr 385 } /* __locale_t.h:28:1 */ 386 387 type locale_t = uintptr /* locale_t.h:24:20 */ 388 389 // The tag name of this struct is _G_fpos_t to preserve historic 390 // C++ mangled names for functions taking fpos_t arguments. 391 // That name should not be used in new code. 392 type _G_fpos_t = struct { 393 F__pos int64 394 F__state struct { 395 F__count int32 396 F__value struct{ F__wch uint32 } 397 } 398 } /* __fpos_t.h:10:9 */ 399 400 // bits/types.h -- definitions of __*_t types underlying *_t types. 401 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 402 // This file is part of the GNU C Library. 403 // 404 // The GNU C Library is free software; you can redistribute it and/or 405 // modify it under the terms of the GNU Lesser General Public 406 // License as published by the Free Software Foundation; either 407 // version 2.1 of the License, or (at your option) any later version. 408 // 409 // The GNU C Library is distributed in the hope that it will be useful, 410 // but WITHOUT ANY WARRANTY; without even the implied warranty of 411 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 412 // Lesser General Public License for more details. 413 // 414 // You should have received a copy of the GNU Lesser General Public 415 // License along with the GNU C Library; if not, see 416 // <https://www.gnu.org/licenses/>. 417 418 // Never include this file directly; use <sys/types.h> instead. 419 420 // The tag name of this struct is _G_fpos64_t to preserve historic 421 // C++ mangled names for functions taking fpos_t and/or fpos64_t 422 // arguments. That name should not be used in new code. 423 type _G_fpos64_t = struct { 424 F__pos int64 425 F__state struct { 426 F__count int32 427 F__value struct{ F__wch uint32 } 428 } 429 } /* __fpos64_t.h:10:9 */ 430 431 type _IO_FILE = struct { 432 F_flags int32 433 F__ccgo_pad1 [4]byte 434 F_IO_read_ptr uintptr 435 F_IO_read_end uintptr 436 F_IO_read_base uintptr 437 F_IO_write_base uintptr 438 F_IO_write_ptr uintptr 439 F_IO_write_end uintptr 440 F_IO_buf_base uintptr 441 F_IO_buf_end uintptr 442 F_IO_save_base uintptr 443 F_IO_backup_base uintptr 444 F_IO_save_end uintptr 445 F_markers uintptr 446 F_chain uintptr 447 F_fileno int32 448 F_flags2 int32 449 F_old_offset int64 450 F_cur_column uint16 451 F_vtable_offset int8 452 F_shortbuf [1]int8 453 F__ccgo_pad2 [4]byte 454 F_lock uintptr 455 F_offset int64 456 F_codecvt uintptr 457 F_wide_data uintptr 458 F_freeres_list uintptr 459 F_freeres_buf uintptr 460 F__pad5 size_t 461 F_mode int32 462 F_unused2 [20]int8 463 } /* __FILE.h:4:1 */ 464 465 // The opaque type of streams. This is the definition used elsewhere. 466 type FILE = _IO_FILE /* FILE.h:7:25 */ 467 468 // The structure with the cookie function pointers. 469 // The tag name of this struct is _IO_cookie_io_functions_t to 470 // preserve historic C++ mangled names for functions taking 471 // cookie_io_functions_t arguments. That name should not be used in 472 // new code. 473 type _IO_cookie_io_functions_t = struct { 474 Fread uintptr 475 Fwrite uintptr 476 Fseek uintptr 477 Fclose uintptr 478 } /* cookie_io_functions_t.h:55:9 */ 479 480 // The structure with the cookie function pointers. 481 // The tag name of this struct is _IO_cookie_io_functions_t to 482 // preserve historic C++ mangled names for functions taking 483 // cookie_io_functions_t arguments. That name should not be used in 484 // new code. 485 type cookie_io_functions_t = _IO_cookie_io_functions_t /* cookie_io_functions_t.h:61:3 */ 486 487 type va_list = uintptr /* stdio.h:52:24 */ 488 489 type off_t = int64 /* stdio.h:65:19 */ 490 type off64_t = int64 /* stdio.h:70:19 */ 491 492 type ssize_t = int64 /* stdio.h:77:19 */ 493 494 // The type of the second argument to `fgetpos' and `fsetpos'. 495 type fpos_t = _G_fpos64_t /* stdio.h:86:20 */ 496 type fpos64_t = _G_fpos64_t /* stdio.h:89:20 */ 497 498 // A null pointer constant. 499 500 // XPG requires a few symbols from <sys/wait.h> being defined. 501 // Definitions of flag bits for `waitpid' et al. 502 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 503 // This file is part of the GNU C Library. 504 // 505 // The GNU C Library is free software; you can redistribute it and/or 506 // modify it under the terms of the GNU Lesser General Public 507 // License as published by the Free Software Foundation; either 508 // version 2.1 of the License, or (at your option) any later version. 509 // 510 // The GNU C Library is distributed in the hope that it will be useful, 511 // but WITHOUT ANY WARRANTY; without even the implied warranty of 512 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 513 // Lesser General Public License for more details. 514 // 515 // You should have received a copy of the GNU Lesser General Public 516 // License along with the GNU C Library; if not, see 517 // <https://www.gnu.org/licenses/>. 518 519 // Bits in the third argument to `waitpid'. 520 521 // Bits in the fourth argument to `waitid'. 522 523 // The following values are used by the `waitid' function. 524 525 // The Linux kernel defines these bare, rather than an enum, 526 // which causes a conflict if the include order is reversed. 527 528 type idtype_t = uint32 /* waitflags.h:57:3 */ 529 // Definitions of status bits for `wait' et al. 530 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 531 // This file is part of the GNU C Library. 532 // 533 // The GNU C Library is free software; you can redistribute it and/or 534 // modify it under the terms of the GNU Lesser General Public 535 // License as published by the Free Software Foundation; either 536 // version 2.1 of the License, or (at your option) any later version. 537 // 538 // The GNU C Library is distributed in the hope that it will be useful, 539 // but WITHOUT ANY WARRANTY; without even the implied warranty of 540 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 541 // Lesser General Public License for more details. 542 // 543 // You should have received a copy of the GNU Lesser General Public 544 // License along with the GNU C Library; if not, see 545 // <https://www.gnu.org/licenses/>. 546 547 // Everything extant so far uses these same bits. 548 549 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 550 551 // If WIFSIGNALED(STATUS), the terminating signal. 552 553 // If WIFSTOPPED(STATUS), the signal that stopped the child. 554 555 // Nonzero if STATUS indicates normal termination. 556 557 // Nonzero if STATUS indicates termination by a signal. 558 559 // Nonzero if STATUS indicates the child is stopped. 560 561 // Nonzero if STATUS indicates the child continued after a stop. We only 562 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 563 564 // Nonzero if STATUS indicates the child dumped core. 565 566 // Macros for constructing status values. 567 568 // Define the macros <sys/wait.h> also would define this way. 569 570 // _FloatN API tests for enablement. 571 // Macros to control TS 18661-3 glibc features on x86. 572 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 573 // This file is part of the GNU C Library. 574 // 575 // The GNU C Library is free software; you can redistribute it and/or 576 // modify it under the terms of the GNU Lesser General Public 577 // License as published by the Free Software Foundation; either 578 // version 2.1 of the License, or (at your option) any later version. 579 // 580 // The GNU C Library is distributed in the hope that it will be useful, 581 // but WITHOUT ANY WARRANTY; without even the implied warranty of 582 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 583 // Lesser General Public License for more details. 584 // 585 // You should have received a copy of the GNU Lesser General Public 586 // License along with the GNU C Library; if not, see 587 // <https://www.gnu.org/licenses/>. 588 589 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 590 // This file is part of the GNU C Library. 591 // 592 // The GNU C Library is free software; you can redistribute it and/or 593 // modify it under the terms of the GNU Lesser General Public 594 // License as published by the Free Software Foundation; either 595 // version 2.1 of the License, or (at your option) any later version. 596 // 597 // The GNU C Library is distributed in the hope that it will be useful, 598 // but WITHOUT ANY WARRANTY; without even the implied warranty of 599 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 600 // Lesser General Public License for more details. 601 // 602 // You should have received a copy of the GNU Lesser General Public 603 // License along with the GNU C Library; if not, see 604 // <https://www.gnu.org/licenses/>. 605 606 // Defined to 1 if the current compiler invocation provides a 607 // floating-point type with the IEEE 754 binary128 format, and this 608 // glibc includes corresponding *f128 interfaces for it. The required 609 // libgcc support was added some time after the basic compiler 610 // support, for x86_64 and x86. 611 612 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 613 // from the default float, double and long double types in this glibc. 614 615 // Defined to 1 if the current compiler invocation provides a 616 // floating-point type with the right format for _Float64x, and this 617 // glibc includes corresponding *f64x interfaces for it. 618 619 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 620 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 621 // the format of _Float128, which must be different from that of long 622 // double. 623 624 // Defined to concatenate the literal suffix to be used with _Float128 625 // types, if __HAVE_FLOAT128 is 1. 626 627 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 628 629 // The remaining of this file provides support for older compilers. 630 631 // The type _Float128 exists only since GCC 7.0. 632 633 // __builtin_huge_valf128 doesn't exist before GCC 7.0. 634 635 // Older GCC has only a subset of built-in functions for _Float128 on 636 // x86, and __builtin_infq is not usable in static initializers. 637 // Converting a narrower sNaN to _Float128 produces a quiet NaN, so 638 // attempts to use _Float128 sNaNs will not work properly with older 639 // compilers. 640 641 // In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, 642 // e.g.: __builtin_signbitf128, before GCC 6. However, there has never 643 // been a __builtin_signbitf128 in GCC and the type-generic builtin is 644 // only available since GCC 6. 645 646 // Macros to control TS 18661-3 glibc features where the same 647 // definitions are appropriate for all platforms. 648 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 649 // This file is part of the GNU C Library. 650 // 651 // The GNU C Library is free software; you can redistribute it and/or 652 // modify it under the terms of the GNU Lesser General Public 653 // License as published by the Free Software Foundation; either 654 // version 2.1 of the License, or (at your option) any later version. 655 // 656 // The GNU C Library is distributed in the hope that it will be useful, 657 // but WITHOUT ANY WARRANTY; without even the implied warranty of 658 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 659 // Lesser General Public License for more details. 660 // 661 // You should have received a copy of the GNU Lesser General Public 662 // License along with the GNU C Library; if not, see 663 // <https://www.gnu.org/licenses/>. 664 665 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 666 // This file is part of the GNU C Library. 667 // 668 // The GNU C Library is free software; you can redistribute it and/or 669 // modify it under the terms of the GNU Lesser General Public 670 // License as published by the Free Software Foundation; either 671 // version 2.1 of the License, or (at your option) any later version. 672 // 673 // The GNU C Library is distributed in the hope that it will be useful, 674 // but WITHOUT ANY WARRANTY; without even the implied warranty of 675 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 676 // Lesser General Public License for more details. 677 // 678 // You should have received a copy of the GNU Lesser General Public 679 // License along with the GNU C Library; if not, see 680 // <https://www.gnu.org/licenses/>. 681 682 // Properties of long double type. ldbl-96 version. 683 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 684 // This file is part of the GNU C Library. 685 // 686 // The GNU C Library is free software; you can redistribute it and/or 687 // modify it under the terms of the GNU Lesser General Public 688 // License published by the Free Software Foundation; either 689 // version 2.1 of the License, or (at your option) any later version. 690 // 691 // The GNU C Library is distributed in the hope that it will be useful, 692 // but WITHOUT ANY WARRANTY; without even the implied warranty of 693 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 694 // Lesser General Public License for more details. 695 // 696 // You should have received a copy of the GNU Lesser General Public 697 // License along with the GNU C Library; if not, see 698 // <https://www.gnu.org/licenses/>. 699 700 // long double is distinct from double, so there is nothing to 701 // define here. 702 703 // This header should be included at the bottom of each bits/floatn.h. 704 // It defines the following macros for each _FloatN and _FloatNx type, 705 // where the same definitions, or definitions based only on the macros 706 // in bits/floatn.h, are appropriate for all glibc configurations. 707 708 // Defined to 1 if the current compiler invocation provides a 709 // floating-point type with the right format for this type, and this 710 // glibc includes corresponding *fN or *fNx interfaces for it. 711 712 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 713 // type is the first with its format in the sequence of (the default 714 // choices for) float, double, long double, _Float16, _Float32, 715 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 716 // glibc; that is, if functions present once per floating-point format 717 // rather than once per type are present for this type. 718 // 719 // All configurations supported by glibc have _Float32 the same format 720 // as float, _Float64 and _Float32x the same format as double, the 721 // _Float64x the same format as either long double or _Float128. No 722 // configurations support _Float128x or, as of GCC 7, have compiler 723 // support for a type meeting the requirements for _Float128x. 724 725 // Defined to 1 if the corresponding _FloatN type is not binary compatible 726 // with the corresponding ISO C type in the current compilation unit as 727 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 728 // in glibc. 729 730 // Defined to 1 if any _FloatN or _FloatNx types that are not 731 // ABI-distinct are however distinct types at the C language level (so 732 // for the purposes of __builtin_types_compatible_p and _Generic). 733 734 // Defined to concatenate the literal suffix to be used with _FloatN 735 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 736 // literal suffixes exist since GCC 7, for C only. 737 738 // Defined to a complex type if __HAVE_<type> is 1. 739 740 // The remaining of this file provides support for older compilers. 741 742 // If double, long double and _Float64 all have the same set of 743 // values, TS 18661-3 requires the usual arithmetic conversions on 744 // long double and _Float64 to produce _Float64. For this to be the 745 // case when building with a compiler without a distinct _Float64 746 // type, _Float64 must be a typedef for long double, not for 747 // double. 748 749 // Returned by `div'. 750 type div_t = struct { 751 Fquot int32 752 Frem int32 753 } /* stdlib.h:62:5 */ 754 755 // Returned by `ldiv'. 756 type ldiv_t = struct { 757 Fquot int64 758 Frem int64 759 } /* stdlib.h:70:5 */ 760 761 // Returned by `lldiv'. 762 type lldiv_t = struct { 763 Fquot int64 764 Frem int64 765 } /* stdlib.h:80:5 */ 766 767 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 768 // This file is part of the GNU C Library. 769 // 770 // The GNU C Library is free software; you can redistribute it and/or 771 // modify it under the terms of the GNU Lesser General Public 772 // License as published by the Free Software Foundation; either 773 // version 2.1 of the License, or (at your option) any later version. 774 // 775 // The GNU C Library is distributed in the hope that it will be useful, 776 // but WITHOUT ANY WARRANTY; without even the implied warranty of 777 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 778 // Lesser General Public License for more details. 779 // 780 // You should have received a copy of the GNU Lesser General Public 781 // License along with the GNU C Library; if not, see 782 // <https://www.gnu.org/licenses/>. 783 784 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 785 786 // Copyright (C) 1991-2020 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 // bits/types.h -- definitions of __*_t types underlying *_t types. 804 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 805 // This file is part of the GNU C Library. 806 // 807 // The GNU C Library is free software; you can redistribute it and/or 808 // modify it under the terms of the GNU Lesser General Public 809 // License as published by the Free Software Foundation; either 810 // version 2.1 of the License, or (at your option) any later version. 811 // 812 // The GNU C Library is distributed in the hope that it will be useful, 813 // but WITHOUT ANY WARRANTY; without even the implied warranty of 814 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 815 // Lesser General Public License for more details. 816 // 817 // You should have received a copy of the GNU Lesser General Public 818 // License along with the GNU C Library; if not, see 819 // <https://www.gnu.org/licenses/>. 820 821 // Never include this file directly; use <sys/types.h> instead. 822 823 type u_char = uint8 /* types.h:33:18 */ 824 type u_short = uint16 /* types.h:34:19 */ 825 type u_int = uint32 /* types.h:35:17 */ 826 type u_long = uint64 /* types.h:36:18 */ 827 type quad_t = int64 /* types.h:37:18 */ 828 type u_quad_t = uint64 /* types.h:38:20 */ 829 type fsid_t = struct{ F__val [2]int32 } /* types.h:39:18 */ 830 type loff_t = int64 /* types.h:42:18 */ 831 832 type ino_t = uint64 /* types.h:49:19 */ 833 type ino64_t = uint64 /* types.h:54:19 */ 834 835 type dev_t = uint64 /* types.h:59:17 */ 836 837 type gid_t = uint32 /* types.h:64:17 */ 838 839 type mode_t = uint32 /* types.h:69:18 */ 840 841 type nlink_t = uint64 /* types.h:74:19 */ 842 843 type uid_t = uint32 /* types.h:79:17 */ 844 845 type pid_t = int32 /* types.h:97:17 */ 846 847 type id_t = uint32 /* types.h:103:16 */ 848 849 type daddr_t = int32 /* types.h:114:19 */ 850 type caddr_t = uintptr /* types.h:115:19 */ 851 852 type key_t = int32 /* types.h:121:17 */ 853 854 // bits/types.h -- definitions of __*_t types underlying *_t types. 855 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 856 // This file is part of the GNU C Library. 857 // 858 // The GNU C Library is free software; you can redistribute it and/or 859 // modify it under the terms of the GNU Lesser General Public 860 // License as published by the Free Software Foundation; either 861 // version 2.1 of the License, or (at your option) any later version. 862 // 863 // The GNU C Library is distributed in the hope that it will be useful, 864 // but WITHOUT ANY WARRANTY; without even the implied warranty of 865 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 866 // Lesser General Public License for more details. 867 // 868 // You should have received a copy of the GNU Lesser General Public 869 // License along with the GNU C Library; if not, see 870 // <https://www.gnu.org/licenses/>. 871 872 // Never include this file directly; use <sys/types.h> instead. 873 874 // Returned by `clock'. 875 type clock_t = int64 /* clock_t.h:7:19 */ 876 877 // bits/types.h -- definitions of __*_t types underlying *_t types. 878 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 879 // This file is part of the GNU C Library. 880 // 881 // The GNU C Library is free software; you can redistribute it and/or 882 // modify it under the terms of the GNU Lesser General Public 883 // License as published by the Free Software Foundation; either 884 // version 2.1 of the License, or (at your option) any later version. 885 // 886 // The GNU C Library is distributed in the hope that it will be useful, 887 // but WITHOUT ANY WARRANTY; without even the implied warranty of 888 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 889 // Lesser General Public License for more details. 890 // 891 // You should have received a copy of the GNU Lesser General Public 892 // License along with the GNU C Library; if not, see 893 // <https://www.gnu.org/licenses/>. 894 895 // Never include this file directly; use <sys/types.h> instead. 896 897 // Clock ID used in clock and timer functions. 898 type clockid_t = int32 /* clockid_t.h:7:21 */ 899 900 // bits/types.h -- definitions of __*_t types underlying *_t types. 901 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 902 // This file is part of the GNU C Library. 903 // 904 // The GNU C Library is free software; you can redistribute it and/or 905 // modify it under the terms of the GNU Lesser General Public 906 // License as published by the Free Software Foundation; either 907 // version 2.1 of the License, or (at your option) any later version. 908 // 909 // The GNU C Library is distributed in the hope that it will be useful, 910 // but WITHOUT ANY WARRANTY; without even the implied warranty of 911 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 912 // Lesser General Public License for more details. 913 // 914 // You should have received a copy of the GNU Lesser General Public 915 // License along with the GNU C Library; if not, see 916 // <https://www.gnu.org/licenses/>. 917 918 // Never include this file directly; use <sys/types.h> instead. 919 920 // Returned by `time'. 921 type time_t = int64 /* time_t.h:7:18 */ 922 923 // bits/types.h -- definitions of __*_t types underlying *_t types. 924 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 925 // This file is part of the GNU C Library. 926 // 927 // The GNU C Library is free software; you can redistribute it and/or 928 // modify it under the terms of the GNU Lesser General Public 929 // License as published by the Free Software Foundation; either 930 // version 2.1 of the License, or (at your option) any later version. 931 // 932 // The GNU C Library is distributed in the hope that it will be useful, 933 // but WITHOUT ANY WARRANTY; without even the implied warranty of 934 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 935 // Lesser General Public License for more details. 936 // 937 // You should have received a copy of the GNU Lesser General Public 938 // License along with the GNU C Library; if not, see 939 // <https://www.gnu.org/licenses/>. 940 941 // Never include this file directly; use <sys/types.h> instead. 942 943 // Timer ID returned by `timer_create'. 944 type timer_t = uintptr /* timer_t.h:7:19 */ 945 946 type useconds_t = uint32 /* types.h:134:22 */ 947 type suseconds_t = int64 /* types.h:138:23 */ 948 949 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 950 // 951 // This file is part of GCC. 952 // 953 // GCC is free software; you can redistribute it and/or modify 954 // it under the terms of the GNU General Public License as published by 955 // the Free Software Foundation; either version 3, or (at your option) 956 // any later version. 957 // 958 // GCC is distributed in the hope that it will be useful, 959 // but WITHOUT ANY WARRANTY; without even the implied warranty of 960 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 961 // GNU General Public License for more details. 962 // 963 // Under Section 7 of GPL version 3, you are granted additional 964 // permissions described in the GCC Runtime Library Exception, version 965 // 3.1, as published by the Free Software Foundation. 966 // 967 // You should have received a copy of the GNU General Public License and 968 // a copy of the GCC Runtime Library Exception along with this program; 969 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 970 // <http://www.gnu.org/licenses/>. 971 972 // ISO C Standard: 7.17 Common definitions <stddef.h> 973 974 // Any one of these symbols __need_* means that GNU libc 975 // wants us just to define one data type. So don't define 976 // the symbols that indicate this file's entire job has been done. 977 978 // This avoids lossage on SunOS but only if stdtypes.h comes first. 979 // There's no way to win with the other order! Sun lossage. 980 981 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 982 // Just ignore it. 983 984 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 985 // _TYPE_size_t which will typedef size_t. fixincludes patched the 986 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 987 // not defined, and so that defining this macro defines _GCC_SIZE_T. 988 // If we find that the macros are still defined at this point, we must 989 // invoke them so that the type is defined as expected. 990 991 // In case nobody has defined these types, but we aren't running under 992 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 993 // __WCHAR_TYPE__ have reasonable values. This can happen if the 994 // parts of GCC is compiled by an older compiler, that actually 995 // include gstddef.h, such as collect2. 996 997 // Signed type of difference of two pointers. 998 999 // Define this type if we are doing the whole job, 1000 // or if we want this type in particular. 1001 1002 // Unsigned type of `sizeof' something. 1003 1004 // Define this type if we are doing the whole job, 1005 // or if we want this type in particular. 1006 1007 // Wide character type. 1008 // Locale-writers should change this as necessary to 1009 // be big enough to hold unique values not between 0 and 127, 1010 // and not (wchar_t) -1, for each defined multibyte character. 1011 1012 // Define this type if we are doing the whole job, 1013 // or if we want this type in particular. 1014 1015 // A null pointer constant. 1016 1017 // Old compatibility names for C types. 1018 type ulong = uint64 /* types.h:148:27 */ 1019 type ushort = uint16 /* types.h:149:28 */ 1020 type uint = uint32 /* types.h:150:22 */ 1021 1022 // These size-specific names are used by some of the inet code. 1023 1024 // Define intN_t types. 1025 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1026 // This file is part of the GNU C Library. 1027 // 1028 // The GNU C Library is free software; you can redistribute it and/or 1029 // modify it under the terms of the GNU Lesser General Public 1030 // License as published by the Free Software Foundation; either 1031 // version 2.1 of the License, or (at your option) any later version. 1032 // 1033 // The GNU C Library is distributed in the hope that it will be useful, 1034 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1035 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1036 // Lesser General Public License for more details. 1037 // 1038 // You should have received a copy of the GNU Lesser General Public 1039 // License along with the GNU C Library; if not, see 1040 // <https://www.gnu.org/licenses/>. 1041 1042 // bits/types.h -- definitions of __*_t types underlying *_t types. 1043 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1044 // This file is part of the GNU C Library. 1045 // 1046 // The GNU C Library is free software; you can redistribute it and/or 1047 // modify it under the terms of the GNU Lesser General Public 1048 // License as published by the Free Software Foundation; either 1049 // version 2.1 of the License, or (at your option) any later version. 1050 // 1051 // The GNU C Library is distributed in the hope that it will be useful, 1052 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1053 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1054 // Lesser General Public License for more details. 1055 // 1056 // You should have received a copy of the GNU Lesser General Public 1057 // License along with the GNU C Library; if not, see 1058 // <https://www.gnu.org/licenses/>. 1059 1060 // Never include this file directly; use <sys/types.h> instead. 1061 1062 type int8_t = int8 /* stdint-intn.h:24:18 */ 1063 type int16_t = int16 /* stdint-intn.h:25:19 */ 1064 type int32_t = int32 /* stdint-intn.h:26:19 */ 1065 type int64_t = int64 /* stdint-intn.h:27:19 */ 1066 1067 // These were defined by ISO C without the first `_'. 1068 type u_int8_t = uint8 /* types.h:158:19 */ 1069 type u_int16_t = uint16 /* types.h:159:20 */ 1070 type u_int32_t = uint32 /* types.h:160:20 */ 1071 type u_int64_t = uint64 /* types.h:161:20 */ 1072 1073 type register_t = int32 /* types.h:164:13 */ 1074 1075 // A set of signals to be blocked, unblocked, or waited for. 1076 type sigset_t = struct{ F__val [16]uint64 } /* sigset_t.h:7:20 */ 1077 1078 // Get definition of timer specification structures. 1079 1080 // bits/types.h -- definitions of __*_t types underlying *_t types. 1081 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1082 // This file is part of the GNU C Library. 1083 // 1084 // The GNU C Library is free software; you can redistribute it and/or 1085 // modify it under the terms of the GNU Lesser General Public 1086 // License as published by the Free Software Foundation; either 1087 // version 2.1 of the License, or (at your option) any later version. 1088 // 1089 // The GNU C Library is distributed in the hope that it will be useful, 1090 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1091 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1092 // Lesser General Public License for more details. 1093 // 1094 // You should have received a copy of the GNU Lesser General Public 1095 // License along with the GNU C Library; if not, see 1096 // <https://www.gnu.org/licenses/>. 1097 1098 // Never include this file directly; use <sys/types.h> instead. 1099 1100 // A time value that is accurate to the nearest 1101 // microsecond but also has a range of years. 1102 type timeval = struct { 1103 Ftv_sec int64 1104 Ftv_usec int64 1105 } /* struct_timeval.h:8:1 */ 1106 1107 // NB: Include guard matches what <linux/time.h> uses. 1108 1109 // bits/types.h -- definitions of __*_t types underlying *_t types. 1110 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1111 // This file is part of the GNU C Library. 1112 // 1113 // The GNU C Library is free software; you can redistribute it and/or 1114 // modify it under the terms of the GNU Lesser General Public 1115 // License as published by the Free Software Foundation; either 1116 // version 2.1 of the License, or (at your option) any later version. 1117 // 1118 // The GNU C Library is distributed in the hope that it will be useful, 1119 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1120 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1121 // Lesser General Public License for more details. 1122 // 1123 // You should have received a copy of the GNU Lesser General Public 1124 // License along with the GNU C Library; if not, see 1125 // <https://www.gnu.org/licenses/>. 1126 1127 // Never include this file directly; use <sys/types.h> instead. 1128 1129 // Endian macros for string.h functions 1130 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1131 // This file is part of the GNU C Library. 1132 // 1133 // The GNU C Library is free software; you can redistribute it and/or 1134 // modify it under the terms of the GNU Lesser General Public 1135 // License as published by the Free Software Foundation; either 1136 // version 2.1 of the License, or (at your option) any later version. 1137 // 1138 // The GNU C Library is distributed in the hope that it will be useful, 1139 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1140 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1141 // Lesser General Public License for more details. 1142 // 1143 // You should have received a copy of the GNU Lesser General Public 1144 // License along with the GNU C Library; if not, see 1145 // <http://www.gnu.org/licenses/>. 1146 1147 // POSIX.1b structure for a time value. This is like a `struct timeval' but 1148 // has nanoseconds instead of microseconds. 1149 type timespec = struct { 1150 Ftv_sec int64 1151 Ftv_nsec int64 1152 } /* struct_timespec.h:10:1 */ 1153 1154 // Some versions of <linux/posix_types.h> define this macros. 1155 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 1156 1157 // fd_set for select and pselect. 1158 type fd_set = struct{ Ffds_bits [16]int64 } /* select.h:70:5 */ 1159 1160 // Maximum number of file descriptors in `fd_set'. 1161 1162 // Sometimes the fd_set member is assumed to have this type. 1163 type fd_mask = int64 /* select.h:77:19 */ 1164 1165 // Define some inlines helping to catch common problems. 1166 1167 type blksize_t = int64 /* types.h:185:21 */ 1168 1169 // Types from the Large File Support interface. 1170 type blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks. 1171 type fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks. 1172 type fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes. 1173 1174 type blkcnt64_t = int64 /* types.h:219:22 */ // Type to count number of disk blocks. 1175 type fsblkcnt64_t = uint64 /* types.h:220:24 */ // Type to count file system blocks. 1176 type fsfilcnt64_t = uint64 /* types.h:221:24 */ // Type to count file system inodes. 1177 1178 // Now add the thread types. 1179 // Declaration of common pthread types for all architectures. 1180 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1181 // This file is part of the GNU C Library. 1182 // 1183 // The GNU C Library is free software; you can redistribute it and/or 1184 // modify it under the terms of the GNU Lesser General Public 1185 // License as published by the Free Software Foundation; either 1186 // version 2.1 of the License, or (at your option) any later version. 1187 // 1188 // The GNU C Library is distributed in the hope that it will be useful, 1189 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1190 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1191 // Lesser General Public License for more details. 1192 // 1193 // You should have received a copy of the GNU Lesser General Public 1194 // License along with the GNU C Library; if not, see 1195 // <https://www.gnu.org/licenses/>. 1196 1197 // For internal mutex and condition variable definitions. 1198 // Common threading primitives definitions for both POSIX and C11. 1199 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1200 // This file is part of the GNU C Library. 1201 // 1202 // The GNU C Library is free software; you can redistribute it and/or 1203 // modify it under the terms of the GNU Lesser General Public 1204 // License as published by the Free Software Foundation; either 1205 // version 2.1 of the License, or (at your option) any later version. 1206 // 1207 // The GNU C Library is distributed in the hope that it will be useful, 1208 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1209 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1210 // Lesser General Public License for more details. 1211 // 1212 // You should have received a copy of the GNU Lesser General Public 1213 // License along with the GNU C Library; if not, see 1214 // <https://www.gnu.org/licenses/>. 1215 1216 // Arch-specific definitions. Each architecture must define the following 1217 // macros to define the expected sizes of pthread data types: 1218 // 1219 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1220 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1221 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1222 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1223 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1224 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1225 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1226 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1227 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1228 // 1229 // The additional macro defines any constraint for the lock alignment 1230 // inside the thread structures: 1231 // 1232 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1233 // 1234 // Same idea but for the once locking primitive: 1235 // 1236 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1237 1238 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1239 // This file is part of the GNU C Library. 1240 // 1241 // The GNU C Library is free software; you can redistribute it and/or 1242 // modify it under the terms of the GNU Lesser General Public 1243 // License as published by the Free Software Foundation; either 1244 // version 2.1 of the License, or (at your option) any later version. 1245 // 1246 // The GNU C Library is distributed in the hope that it will be useful, 1247 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1248 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1249 // Lesser General Public License for more details. 1250 // 1251 // You should have received a copy of the GNU Lesser General Public 1252 // License along with the GNU C Library; if not, see 1253 // <https://www.gnu.org/licenses/>. 1254 1255 // Determine the wordsize from the preprocessor defines. 1256 1257 // Both x86-64 and x32 use the 64-bit system call interface. 1258 1259 // Common definition of pthread_mutex_t. 1260 1261 type __pthread_internal_list = struct { 1262 F__prev uintptr 1263 F__next uintptr 1264 } /* thread-shared-types.h:49:9 */ 1265 1266 type __pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 1267 1268 // Arch-specific mutex definitions. A generic implementation is provided 1269 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 1270 // can override it by defining: 1271 // 1272 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 1273 // definition). It should contains at least the internal members 1274 // defined in the generic version. 1275 // 1276 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 1277 // atomic operations. 1278 // 1279 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 1280 // It should initialize the mutex internal flag. 1281 1282 // x86 internal mutex struct definitions. 1283 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1284 // This file is part of the GNU C Library. 1285 // 1286 // The GNU C Library is free software; you can redistribute it and/or 1287 // modify it under the terms of the GNU Lesser General Public 1288 // License as published by the Free Software Foundation; either 1289 // version 2.1 of the License, or (at your option) any later version. 1290 // 1291 // The GNU C Library is distributed in the hope that it will be useful, 1292 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1293 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1294 // Lesser General Public License for more details. 1295 // 1296 // You should have received a copy of the GNU Lesser General Public 1297 // License along with the GNU C Library; if not, see 1298 // <http://www.gnu.org/licenses/>. 1299 1300 type __pthread_mutex_s = struct { 1301 F__lock int32 1302 F__count uint32 1303 F__owner int32 1304 F__nusers uint32 1305 F__kind int32 1306 F__spins int16 1307 F__elision int16 1308 F__list struct { 1309 F__prev uintptr 1310 F__next uintptr 1311 } 1312 } /* struct_mutex.h:22:1 */ 1313 1314 // Arch-sepecific read-write lock definitions. A generic implementation is 1315 // provided by struct_rwlock.h. If required, an architecture can override it 1316 // by defining: 1317 // 1318 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 1319 // It should contain at least the internal members defined in the 1320 // generic version. 1321 // 1322 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 1323 // It should initialize the rwlock internal type. 1324 1325 // x86 internal rwlock struct definitions. 1326 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1327 // 1328 // This file is part of the GNU C Library. 1329 // 1330 // The GNU C Library is free software; you can redistribute it and/or 1331 // modify it under the terms of the GNU Lesser General Public 1332 // License as published by the Free Software Foundation; either 1333 // version 2.1 of the License, or (at your option) any later version. 1334 // 1335 // The GNU C Library is distributed in the hope that it will be useful, 1336 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1337 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1338 // Lesser General Public License for more details. 1339 // 1340 // You should have received a copy of the GNU Lesser General Public 1341 // License along with the GNU C Library; if not, see 1342 // <http://www.gnu.org/licenses/>. 1343 1344 type __pthread_rwlock_arch_t = struct { 1345 F__readers uint32 1346 F__writers uint32 1347 F__wrphase_futex uint32 1348 F__writers_futex uint32 1349 F__pad3 uint32 1350 F__pad4 uint32 1351 F__cur_writer int32 1352 F__shared int32 1353 F__rwelision int8 1354 F__pad1 [7]uint8 1355 F__pad2 uint64 1356 F__flags uint32 1357 F__ccgo_pad1 [4]byte 1358 } /* struct_rwlock.h:23:1 */ 1359 1360 // Common definition of pthread_cond_t. 1361 1362 type __pthread_cond_s = struct { 1363 F__0 struct{ F__wseq uint64 } 1364 F__8 struct{ F__g1_start uint64 } 1365 F__g_refs [2]uint32 1366 F__g_size [2]uint32 1367 F__g1_orig_size uint32 1368 F__wrefs uint32 1369 F__g_signals [2]uint32 1370 } /* thread-shared-types.h:92:1 */ 1371 1372 // Thread identifiers. The structure of the attribute type is not 1373 // exposed on purpose. 1374 type pthread_t = uint64 /* pthreadtypes.h:27:27 */ 1375 1376 // Data structures for mutex handling. The structure of the attribute 1377 // type is not exposed on purpose. 1378 type pthread_mutexattr_t = struct { 1379 F__ccgo_pad1 [0]uint32 1380 F__size [4]int8 1381 } /* pthreadtypes.h:36:3 */ 1382 1383 // Data structure for condition variable handling. The structure of 1384 // the attribute type is not exposed on purpose. 1385 type pthread_condattr_t = struct { 1386 F__ccgo_pad1 [0]uint32 1387 F__size [4]int8 1388 } /* pthreadtypes.h:45:3 */ 1389 1390 // Keys for thread-specific data 1391 type pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 1392 1393 // Once-only execution 1394 type pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 1395 1396 type pthread_attr_t1 = struct { 1397 F__ccgo_pad1 [0]uint64 1398 F__size [56]int8 1399 } /* pthreadtypes.h:56:1 */ 1400 1401 type pthread_attr_t = pthread_attr_t1 /* pthreadtypes.h:62:30 */ 1402 1403 type pthread_mutex_t = struct{ F__data __pthread_mutex_s } /* pthreadtypes.h:72:3 */ 1404 1405 type pthread_cond_t = struct{ F__data __pthread_cond_s } /* pthreadtypes.h:80:3 */ 1406 1407 // Data structure for reader-writer lock variable handling. The 1408 // structure of the attribute type is deliberately not exposed. 1409 type pthread_rwlock_t = struct{ F__data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 1410 1411 type pthread_rwlockattr_t = struct { 1412 F__ccgo_pad1 [0]uint64 1413 F__size [8]int8 1414 } /* pthreadtypes.h:97:3 */ 1415 1416 // POSIX spinlock data type. 1417 type pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 1418 1419 // POSIX barriers data type. The structure of the type is 1420 // deliberately not exposed. 1421 type pthread_barrier_t = struct { 1422 F__ccgo_pad1 [0]uint64 1423 F__size [32]int8 1424 } /* pthreadtypes.h:112:3 */ 1425 1426 type pthread_barrierattr_t = struct { 1427 F__ccgo_pad1 [0]uint32 1428 F__size [4]int8 1429 } /* pthreadtypes.h:118:3 */ 1430 1431 // Reentrant versions of the `random' family of functions. 1432 // These functions all use the following data structure to contain 1433 // state, rather than global state variables. 1434 1435 type random_data = struct { 1436 Ffptr uintptr 1437 Frptr uintptr 1438 Fstate uintptr 1439 Frand_type int32 1440 Frand_deg int32 1441 Frand_sep int32 1442 F__ccgo_pad1 [4]byte 1443 Fend_ptr uintptr 1444 } /* stdlib.h:423:1 */ 1445 1446 // Data structure for communication with thread safe versions. This 1447 // type is to be regarded as opaque. It's only exported because users 1448 // have to allocate objects of this type. 1449 type drand48_data = struct { 1450 F__x [3]uint16 1451 F__old_x [3]uint16 1452 F__c uint16 1453 F__init uint16 1454 F__a uint64 1455 } /* stdlib.h:490:1 */ 1456 1457 type comparison_fn_t = uintptr /* stdlib.h:811:23 */ 1458 1459 // Floating-point inline functions for stdlib.h. 1460 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 1461 // This file is part of the GNU C Library. 1462 // 1463 // The GNU C Library is free software; you can redistribute it and/or 1464 // modify it under the terms of the GNU Lesser General Public 1465 // License as published by the Free Software Foundation; either 1466 // version 2.1 of the License, or (at your option) any later version. 1467 // 1468 // The GNU C Library is distributed in the hope that it will be useful, 1469 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1470 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1471 // Lesser General Public License for more details. 1472 // 1473 // You should have received a copy of the GNU Lesser General Public 1474 // License along with the GNU C Library; if not, see 1475 // <https://www.gnu.org/licenses/>. 1476 1477 // Define some macros helping to catch buffer overflows. 1478 1479 func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* Autest.c:35:1: */ 1480 bp := tls.Alloc(64) 1481 defer tls.Free(64) 1482 1483 // var test_data Xauth at bp, 64 1484 1485 var name uintptr = ts /* "XAU-TEST-1" */ 1486 var data uintptr = ts + 11 /* "Do not begin the..." */ 1487 var file uintptr = uintptr(0) 1488 var state int32 = 0 1489 var output uintptr 1490 1491 for *(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&argv, 8))) != 0 { 1492 if !(libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+60 /* "-file" */) != 0) { 1493 file = *(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&argv, 8))) 1494 } else if state == 0 { 1495 name = *(*uintptr)(unsafe.Pointer(argv)) 1496 state++ 1497 } else if state == 1 { 1498 data = *(*uintptr)(unsafe.Pointer(argv)) 1499 state++ 1500 } 1501 } 1502 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Ffamily = uint16(0) 1503 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Faddress_length = uint16(0) 1504 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Faddress = ts + 66 /* "" */ 1505 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Fnumber_length = uint16(0) 1506 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Fnumber = ts + 66 /* "" */ 1507 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Fname_length = uint16(libc.Xstrlen(tls, name)) 1508 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Fname = name 1509 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Fdata_length = uint16(libc.Xstrlen(tls, data)) 1510 (*Xauth)(unsafe.Pointer(bp /* &test_data */)).Fdata = data 1511 if !(file != 0) { 1512 output = libc.Xtmpfile(tls) 1513 } else { 1514 output = libc.Xfopen(tls, file, ts+67 /* "w" */) 1515 } 1516 if output != 0 { 1517 state = xau.XXauWriteAuth(tls, output, bp /* &test_data */) 1518 libc.Xfclose(tls, output) 1519 } 1520 if libc.AssignInt32(&state, 1) != 0 { 1521 return 0 1522 } 1523 return 1 1524 } 1525 1526 var ts1 = "XAU-TEST-1\x00Do not begin the test until instructed to do so.\x00-file\x00\x00w\x00" 1527 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data