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