modernc.org/xdmcp@v1.0.17/internal/test/main_linux_386.go (about) 1 // Code generated by 'ccgo -export-fields F -lmodernc.org/xdmcp/lib -o internal/test/main_linux_386.go -trace-translation-units /tmp/go-generate-3388712527/cdb.json test/Array', 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/xdmcp/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 // was definitions for sign-extending bitfields on architectures without 25 // native types smaller than 64-bit, now just backwards compatibility 26 27 // this version should leave result of type (t *), but that should only be 28 // used when not in MUSTCOPY 29 30 // 31 // 32 // Copyright 1989, 1991, 1998 The Open Group 33 // 34 // Permission to use, copy, modify, distribute, and sell this software and its 35 // documentation for any purpose is hereby granted without fee, provided that 36 // the above copyright notice appear in all copies and that both that 37 // copyright notice and this permission notice appear in supporting 38 // documentation. 39 // 40 // The above copyright notice and this permission notice shall be included in 41 // all copies or substantial portions of the Software. 42 // 43 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 44 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 45 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 46 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 47 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 48 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 49 // 50 // Except as contained in this notice, the name of The Open Group shall not be 51 // used in advertising or otherwise to promote the sale, use or other dealings 52 // in this Software without prior written authorization from The Open Group. 53 // * 54 // 55 56 // Definitions to make function prototypes manageable 57 58 // Function prototype configuration (see configure for more info) 59 60 // http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute 61 62 // Added in X11R6.9, so available in any version of modular xproto 63 64 // Added in X11R6.9, so available in any version of modular xproto 65 66 // Branch prediction hints for individual conditionals 67 // requires xproto >= 7.0.9 68 69 // Bulk branch prediction hints via marking error path functions as "cold" 70 // requires xproto >= 7.0.25 71 72 // Added in X11R6.9, so available in any version of modular xproto 73 74 // requires xproto >= 7.0.30 75 76 // requires xproto >= 7.0.17 77 78 // Added in X11R6.9, so available in any version of modular xproto 79 80 // requires xproto >= 7.0.22 - since this uses either gcc or C99 variable 81 // argument macros, must be only used inside #ifdef _X_NONNULL guards, as 82 // many legacy X clients are compiled in C89 mode still. 83 84 // requires xproto >= 7.0.22 85 86 // C99 keyword "inline" or equivalent extensions in pre-C99 compilers 87 // requires xproto >= 7.0.9 88 // (introduced in 7.0.8 but didn't support all compilers until 7.0.9) 89 90 // C99 keyword "restrict" or equivalent extensions in pre-C99 compilers 91 // requires xproto >= 7.0.21 92 93 // requires xproto >= 7.0.30 94 95 // IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned 96 // multicast addresses for XDMCP, where X in the prefix may be replaced 97 // by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, 98 // 5 for Site-Local, and so on. We set the default here to the Link-Local 99 // version to most closely match the old IPv4 subnet broadcast behavior. 100 // Both xdm and X -query allow specifying a different address if a different 101 // scope is defined. 102 103 const ( /* Xdmcp.h:46:1: */ 104 BROADCAST_QUERY = 1 105 QUERY = 2 106 INDIRECT_QUERY = 3 107 FORWARD_QUERY = 4 108 WILLING = 5 109 UNWILLING = 6 110 REQUEST = 7 111 ACCEPT = 8 112 DECLINE = 9 113 MANAGE = 10 114 REFUSE = 11 115 FAILED = 12 116 KEEPALIVE = 13 117 ALIVE = 14 118 ) 119 120 const ( /* Xdmcp.h:52:1: */ 121 XDM_QUERY = 0 122 XDM_BROADCAST = 1 123 XDM_INDIRECT = 2 124 XDM_COLLECT_QUERY = 3 125 XDM_COLLECT_BROADCAST_QUERY = 4 126 XDM_COLLECT_INDIRECT_QUERY = 5 127 XDM_START_CONNECTION = 6 128 XDM_AWAIT_REQUEST_RESPONSE = 7 129 XDM_AWAIT_MANAGE_RESPONSE = 8 130 XDM_MANAGE = 9 131 XDM_RUN_SESSION = 10 132 XDM_OFF = 11 133 XDM_AWAIT_USER_INPUT = 12 134 XDM_KEEPALIVE = 13 135 XDM_AWAIT_ALIVE_RESPONSE = 14 136 XDM_KEEP_ME_LAST = 15 137 ) 138 139 // A null pointer constant. 140 141 // XPG requires a few symbols from <sys/wait.h> being defined. 142 // Definitions of flag bits for `waitpid' et al. 143 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 144 // This file is part of the GNU C Library. 145 // 146 // The GNU C Library is free software; you can redistribute it and/or 147 // modify it under the terms of the GNU Lesser General Public 148 // License as published by the Free Software Foundation; either 149 // version 2.1 of the License, or (at your option) any later version. 150 // 151 // The GNU C Library is distributed in the hope that it will be useful, 152 // but WITHOUT ANY WARRANTY; without even the implied warranty of 153 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 154 // Lesser General Public License for more details. 155 // 156 // You should have received a copy of the GNU Lesser General Public 157 // License along with the GNU C Library; if not, see 158 // <https://www.gnu.org/licenses/>. 159 160 // Bits in the third argument to `waitpid'. 161 162 // Bits in the fourth argument to `waitid'. 163 164 // The following values are used by the `waitid' function. 165 166 // The Linux kernel defines these bare, rather than an enum, 167 // which causes a conflict if the include order is reversed. 168 169 const ( /* waitflags.h:52:1: */ 170 P_ALL = 0 // Wait for any child. 171 P_PID = 1 // Wait for specified process. 172 P_PGID = 2 173 ) 174 175 type ptrdiff_t = int32 /* <builtin>:3:26 */ 176 177 type size_t = uint32 /* <builtin>:9:23 */ 178 179 type wchar_t = int32 /* <builtin>:15:24 */ 180 181 // The tag name of this struct is _G_fpos_t to preserve historic 182 // C++ mangled names for functions taking fpos_t arguments. 183 // That name should not be used in new code. 184 type _G_fpos_t = struct { 185 F__pos int32 186 F__state struct { 187 F__count int32 188 F__value struct{ F__wch uint32 } 189 } 190 } /* __fpos_t.h:10:9 */ 191 192 // bits/types.h -- definitions of __*_t types underlying *_t types. 193 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 194 // This file is part of the GNU C Library. 195 // 196 // The GNU C Library is free software; you can redistribute it and/or 197 // modify it under the terms of the GNU Lesser General Public 198 // License as published by the Free Software Foundation; either 199 // version 2.1 of the License, or (at your option) any later version. 200 // 201 // The GNU C Library is distributed in the hope that it will be useful, 202 // but WITHOUT ANY WARRANTY; without even the implied warranty of 203 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 204 // Lesser General Public License for more details. 205 // 206 // You should have received a copy of the GNU Lesser General Public 207 // License along with the GNU C Library; if not, see 208 // <https://www.gnu.org/licenses/>. 209 210 // Never include this file directly; use <sys/types.h> instead. 211 212 // The tag name of this struct is _G_fpos64_t to preserve historic 213 // C++ mangled names for functions taking fpos_t and/or fpos64_t 214 // arguments. That name should not be used in new code. 215 type _G_fpos64_t = struct { 216 F__pos int64 217 F__state struct { 218 F__count int32 219 F__value struct{ F__wch uint32 } 220 } 221 } /* __fpos64_t.h:10:9 */ 222 223 type _IO_FILE = struct { 224 F_flags int32 225 F_IO_read_ptr uintptr 226 F_IO_read_end uintptr 227 F_IO_read_base uintptr 228 F_IO_write_base uintptr 229 F_IO_write_ptr uintptr 230 F_IO_write_end uintptr 231 F_IO_buf_base uintptr 232 F_IO_buf_end uintptr 233 F_IO_save_base uintptr 234 F_IO_backup_base uintptr 235 F_IO_save_end uintptr 236 F_markers uintptr 237 F_chain uintptr 238 F_fileno int32 239 F_flags2 int32 240 F_old_offset int32 241 F_cur_column uint16 242 F_vtable_offset int8 243 F_shortbuf [1]int8 244 F_lock uintptr 245 F_offset int64 246 F_codecvt uintptr 247 F_wide_data uintptr 248 F_freeres_list uintptr 249 F_freeres_buf uintptr 250 F__pad5 size_t 251 F_mode int32 252 F_unused2 [40]int8 253 } /* __FILE.h:4:1 */ 254 255 // The opaque type of streams. This is the definition used elsewhere. 256 type FILE = _IO_FILE /* FILE.h:7:25 */ 257 258 // These macros are used by bits/stdio.h and internal headers. 259 260 // Many more flag bits are defined internally. 261 262 type va_list = uintptr /* stdio.h:52:24 */ 263 264 type off_t = int64 /* stdio.h:65:19 */ 265 266 type ssize_t = int32 /* stdio.h:77:19 */ 267 268 // The type of the second argument to `fgetpos' and `fsetpos'. 269 type fpos_t = _G_fpos64_t /* stdio.h:86:20 */ 270 271 // A null pointer constant. 272 273 // XPG requires a few symbols from <sys/wait.h> being defined. 274 // Definitions of flag bits for `waitpid' et al. 275 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 276 // This file is part of the GNU C Library. 277 // 278 // The GNU C Library is free software; you can redistribute it and/or 279 // modify it under the terms of the GNU Lesser General Public 280 // License as published by the Free Software Foundation; either 281 // version 2.1 of the License, or (at your option) any later version. 282 // 283 // The GNU C Library is distributed in the hope that it will be useful, 284 // but WITHOUT ANY WARRANTY; without even the implied warranty of 285 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 286 // Lesser General Public License for more details. 287 // 288 // You should have received a copy of the GNU Lesser General Public 289 // License along with the GNU C Library; if not, see 290 // <https://www.gnu.org/licenses/>. 291 292 // Bits in the third argument to `waitpid'. 293 294 // Bits in the fourth argument to `waitid'. 295 296 // The following values are used by the `waitid' function. 297 298 // The Linux kernel defines these bare, rather than an enum, 299 // which causes a conflict if the include order is reversed. 300 301 type idtype_t = uint32 /* waitflags.h:57:3 */ 302 // Definitions of status bits for `wait' et al. 303 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 304 // This file is part of the GNU C Library. 305 // 306 // The GNU C Library is free software; you can redistribute it and/or 307 // modify it under the terms of the GNU Lesser General Public 308 // License as published by the Free Software Foundation; either 309 // version 2.1 of the License, or (at your option) any later version. 310 // 311 // The GNU C Library is distributed in the hope that it will be useful, 312 // but WITHOUT ANY WARRANTY; without even the implied warranty of 313 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 314 // Lesser General Public License for more details. 315 // 316 // You should have received a copy of the GNU Lesser General Public 317 // License along with the GNU C Library; if not, see 318 // <https://www.gnu.org/licenses/>. 319 320 // Everything extant so far uses these same bits. 321 322 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 323 324 // If WIFSIGNALED(STATUS), the terminating signal. 325 326 // If WIFSTOPPED(STATUS), the signal that stopped the child. 327 328 // Nonzero if STATUS indicates normal termination. 329 330 // Nonzero if STATUS indicates termination by a signal. 331 332 // Nonzero if STATUS indicates the child is stopped. 333 334 // Nonzero if STATUS indicates the child continued after a stop. We only 335 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 336 337 // Nonzero if STATUS indicates the child dumped core. 338 339 // Macros for constructing status values. 340 341 // Define the macros <sys/wait.h> also would define this way. 342 343 // _FloatN API tests for enablement. 344 // Macros to control TS 18661-3 glibc features on x86. 345 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 346 // This file is part of the GNU C Library. 347 // 348 // The GNU C Library is free software; you can redistribute it and/or 349 // modify it under the terms of the GNU Lesser General Public 350 // License as published by the Free Software Foundation; either 351 // version 2.1 of the License, or (at your option) any later version. 352 // 353 // The GNU C Library is distributed in the hope that it will be useful, 354 // but WITHOUT ANY WARRANTY; without even the implied warranty of 355 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 356 // Lesser General Public License for more details. 357 // 358 // You should have received a copy of the GNU Lesser General Public 359 // License along with the GNU C Library; if not, see 360 // <https://www.gnu.org/licenses/>. 361 362 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 363 // This file is part of the GNU C Library. 364 // 365 // The GNU C Library is free software; you can redistribute it and/or 366 // modify it under the terms of the GNU Lesser General Public 367 // License as published by the Free Software Foundation; either 368 // version 2.1 of the License, or (at your option) any later version. 369 // 370 // The GNU C Library is distributed in the hope that it will be useful, 371 // but WITHOUT ANY WARRANTY; without even the implied warranty of 372 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 373 // Lesser General Public License for more details. 374 // 375 // You should have received a copy of the GNU Lesser General Public 376 // License along with the GNU C Library; if not, see 377 // <https://www.gnu.org/licenses/>. 378 379 // Defined to 1 if the current compiler invocation provides a 380 // floating-point type with the IEEE 754 binary128 format, and this 381 // glibc includes corresponding *f128 interfaces for it. The required 382 // libgcc support was added some time after the basic compiler 383 // support, for x86_64 and x86. 384 385 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 386 // from the default float, double and long double types in this glibc. 387 388 // Defined to 1 if the current compiler invocation provides a 389 // floating-point type with the right format for _Float64x, and this 390 // glibc includes corresponding *f64x interfaces for it. 391 392 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 393 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 394 // the format of _Float128, which must be different from that of long 395 // double. 396 397 // Defined to concatenate the literal suffix to be used with _Float128 398 // types, if __HAVE_FLOAT128 is 1. 399 400 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 401 402 // The remaining of this file provides support for older compilers. 403 404 // The type _Float128 exists only since GCC 7.0. 405 406 // __builtin_huge_valf128 doesn't exist before GCC 7.0. 407 408 // Older GCC has only a subset of built-in functions for _Float128 on 409 // x86, and __builtin_infq is not usable in static initializers. 410 // Converting a narrower sNaN to _Float128 produces a quiet NaN, so 411 // attempts to use _Float128 sNaNs will not work properly with older 412 // compilers. 413 414 // In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, 415 // e.g.: __builtin_signbitf128, before GCC 6. However, there has never 416 // been a __builtin_signbitf128 in GCC and the type-generic builtin is 417 // only available since GCC 6. 418 419 // Macros to control TS 18661-3 glibc features where the same 420 // definitions are appropriate for all platforms. 421 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 422 // This file is part of the GNU C Library. 423 // 424 // The GNU C Library is free software; you can redistribute it and/or 425 // modify it under the terms of the GNU Lesser General Public 426 // License as published by the Free Software Foundation; either 427 // version 2.1 of the License, or (at your option) any later version. 428 // 429 // The GNU C Library is distributed in the hope that it will be useful, 430 // but WITHOUT ANY WARRANTY; without even the implied warranty of 431 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 432 // Lesser General Public License for more details. 433 // 434 // You should have received a copy of the GNU Lesser General Public 435 // License along with the GNU C Library; if not, see 436 // <https://www.gnu.org/licenses/>. 437 438 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 439 // This file is part of the GNU C Library. 440 // 441 // The GNU C Library is free software; you can redistribute it and/or 442 // modify it under the terms of the GNU Lesser General Public 443 // License as published by the Free Software Foundation; either 444 // version 2.1 of the License, or (at your option) any later version. 445 // 446 // The GNU C Library is distributed in the hope that it will be useful, 447 // but WITHOUT ANY WARRANTY; without even the implied warranty of 448 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 449 // Lesser General Public License for more details. 450 // 451 // You should have received a copy of the GNU Lesser General Public 452 // License along with the GNU C Library; if not, see 453 // <https://www.gnu.org/licenses/>. 454 455 // Properties of long double type. ldbl-96 version. 456 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 457 // This file is part of the GNU C Library. 458 // 459 // The GNU C Library is free software; you can redistribute it and/or 460 // modify it under the terms of the GNU Lesser General Public 461 // License published by the Free Software Foundation; either 462 // version 2.1 of the License, or (at your option) any later version. 463 // 464 // The GNU C Library is distributed in the hope that it will be useful, 465 // but WITHOUT ANY WARRANTY; without even the implied warranty of 466 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 467 // Lesser General Public License for more details. 468 // 469 // You should have received a copy of the GNU Lesser General Public 470 // License along with the GNU C Library; if not, see 471 // <https://www.gnu.org/licenses/>. 472 473 // long double is distinct from double, so there is nothing to 474 // define here. 475 476 // This header should be included at the bottom of each bits/floatn.h. 477 // It defines the following macros for each _FloatN and _FloatNx type, 478 // where the same definitions, or definitions based only on the macros 479 // in bits/floatn.h, are appropriate for all glibc configurations. 480 481 // Defined to 1 if the current compiler invocation provides a 482 // floating-point type with the right format for this type, and this 483 // glibc includes corresponding *fN or *fNx interfaces for it. 484 485 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 486 // type is the first with its format in the sequence of (the default 487 // choices for) float, double, long double, _Float16, _Float32, 488 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 489 // glibc; that is, if functions present once per floating-point format 490 // rather than once per type are present for this type. 491 // 492 // All configurations supported by glibc have _Float32 the same format 493 // as float, _Float64 and _Float32x the same format as double, the 494 // _Float64x the same format as either long double or _Float128. No 495 // configurations support _Float128x or, as of GCC 7, have compiler 496 // support for a type meeting the requirements for _Float128x. 497 498 // Defined to 1 if the corresponding _FloatN type is not binary compatible 499 // with the corresponding ISO C type in the current compilation unit as 500 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 501 // in glibc. 502 503 // Defined to 1 if any _FloatN or _FloatNx types that are not 504 // ABI-distinct are however distinct types at the C language level (so 505 // for the purposes of __builtin_types_compatible_p and _Generic). 506 507 // Defined to concatenate the literal suffix to be used with _FloatN 508 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 509 // literal suffixes exist since GCC 7, for C only. 510 511 // Defined to a complex type if __HAVE_<type> is 1. 512 513 // The remaining of this file provides support for older compilers. 514 515 // If double, long double and _Float64 all have the same set of 516 // values, TS 18661-3 requires the usual arithmetic conversions on 517 // long double and _Float64 to produce _Float64. For this to be the 518 // case when building with a compiler without a distinct _Float64 519 // type, _Float64 must be a typedef for long double, not for 520 // double. 521 522 // Returned by `div'. 523 type div_t = struct { 524 Fquot int32 525 Frem int32 526 } /* stdlib.h:62:5 */ 527 528 // Returned by `ldiv'. 529 type ldiv_t = struct { 530 Fquot int32 531 Frem int32 532 } /* stdlib.h:70:5 */ 533 534 // Returned by `lldiv'. 535 type lldiv_t = struct { 536 Fquot int64 537 Frem int64 538 } /* stdlib.h:80:5 */ 539 540 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 541 // This file is part of the GNU C Library. 542 // 543 // The GNU C Library is free software; you can redistribute it and/or 544 // modify it under the terms of the GNU Lesser General Public 545 // License as published by the Free Software Foundation; either 546 // version 2.1 of the License, or (at your option) any later version. 547 // 548 // The GNU C Library is distributed in the hope that it will be useful, 549 // but WITHOUT ANY WARRANTY; without even the implied warranty of 550 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 551 // Lesser General Public License for more details. 552 // 553 // You should have received a copy of the GNU Lesser General Public 554 // License along with the GNU C Library; if not, see 555 // <https://www.gnu.org/licenses/>. 556 557 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 558 559 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 560 // This file is part of the GNU C Library. 561 // 562 // The GNU C Library is free software; you can redistribute it and/or 563 // modify it under the terms of the GNU Lesser General Public 564 // License as published by the Free Software Foundation; either 565 // version 2.1 of the License, or (at your option) any later version. 566 // 567 // The GNU C Library is distributed in the hope that it will be useful, 568 // but WITHOUT ANY WARRANTY; without even the implied warranty of 569 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 570 // Lesser General Public License for more details. 571 // 572 // You should have received a copy of the GNU Lesser General Public 573 // License along with the GNU C Library; if not, see 574 // <https://www.gnu.org/licenses/>. 575 576 // bits/types.h -- definitions of __*_t types underlying *_t types. 577 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 578 // This file is part of the GNU C Library. 579 // 580 // The GNU C Library is free software; you can redistribute it and/or 581 // modify it under the terms of the GNU Lesser General Public 582 // License as published by the Free Software Foundation; either 583 // version 2.1 of the License, or (at your option) any later version. 584 // 585 // The GNU C Library is distributed in the hope that it will be useful, 586 // but WITHOUT ANY WARRANTY; without even the implied warranty of 587 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 588 // Lesser General Public License for more details. 589 // 590 // You should have received a copy of the GNU Lesser General Public 591 // License along with the GNU C Library; if not, see 592 // <https://www.gnu.org/licenses/>. 593 594 // Never include this file directly; use <sys/types.h> instead. 595 596 type u_char = uint8 /* types.h:33:18 */ 597 type u_short = uint16 /* types.h:34:19 */ 598 type u_int = uint32 /* types.h:35:17 */ 599 type u_long = uint32 /* types.h:36:18 */ 600 type quad_t = int64 /* types.h:37:18 */ 601 type u_quad_t = uint64 /* types.h:38:20 */ 602 type fsid_t = struct{ F__val [2]int32 } /* types.h:39:18 */ 603 type loff_t = int64 /* types.h:42:18 */ 604 605 type ino_t = uint64 /* types.h:49:19 */ 606 607 type dev_t = uint64 /* types.h:59:17 */ 608 609 type gid_t = uint32 /* types.h:64:17 */ 610 611 type mode_t = uint32 /* types.h:69:18 */ 612 613 type nlink_t = uint32 /* types.h:74:19 */ 614 615 type uid_t = uint32 /* types.h:79:17 */ 616 617 type pid_t = int32 /* types.h:97:17 */ 618 619 type id_t = uint32 /* types.h:103:16 */ 620 621 type daddr_t = int32 /* types.h:114:19 */ 622 type caddr_t = uintptr /* types.h:115:19 */ 623 624 type key_t = int32 /* types.h:121:17 */ 625 626 // bits/types.h -- definitions of __*_t types underlying *_t types. 627 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 628 // This file is part of the GNU C Library. 629 // 630 // The GNU C Library is free software; you can redistribute it and/or 631 // modify it under the terms of the GNU Lesser General Public 632 // License as published by the Free Software Foundation; either 633 // version 2.1 of the License, or (at your option) any later version. 634 // 635 // The GNU C Library is distributed in the hope that it will be useful, 636 // but WITHOUT ANY WARRANTY; without even the implied warranty of 637 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 638 // Lesser General Public License for more details. 639 // 640 // You should have received a copy of the GNU Lesser General Public 641 // License along with the GNU C Library; if not, see 642 // <https://www.gnu.org/licenses/>. 643 644 // Never include this file directly; use <sys/types.h> instead. 645 646 // Returned by `clock'. 647 type clock_t = int32 /* clock_t.h:7:19 */ 648 649 // bits/types.h -- definitions of __*_t types underlying *_t types. 650 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 651 // This file is part of the GNU C Library. 652 // 653 // The GNU C Library is free software; you can redistribute it and/or 654 // modify it under the terms of the GNU Lesser General Public 655 // License as published by the Free Software Foundation; either 656 // version 2.1 of the License, or (at your option) any later version. 657 // 658 // The GNU C Library is distributed in the hope that it will be useful, 659 // but WITHOUT ANY WARRANTY; without even the implied warranty of 660 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 661 // Lesser General Public License for more details. 662 // 663 // You should have received a copy of the GNU Lesser General Public 664 // License along with the GNU C Library; if not, see 665 // <https://www.gnu.org/licenses/>. 666 667 // Never include this file directly; use <sys/types.h> instead. 668 669 // Clock ID used in clock and timer functions. 670 type clockid_t = int32 /* clockid_t.h:7:21 */ 671 672 // bits/types.h -- definitions of __*_t types underlying *_t types. 673 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 674 // This file is part of the GNU C Library. 675 // 676 // The GNU C Library is free software; you can redistribute it and/or 677 // modify it under the terms of the GNU Lesser General Public 678 // License as published by the Free Software Foundation; either 679 // version 2.1 of the License, or (at your option) any later version. 680 // 681 // The GNU C Library is distributed in the hope that it will be useful, 682 // but WITHOUT ANY WARRANTY; without even the implied warranty of 683 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 684 // Lesser General Public License for more details. 685 // 686 // You should have received a copy of the GNU Lesser General Public 687 // License along with the GNU C Library; if not, see 688 // <https://www.gnu.org/licenses/>. 689 690 // Never include this file directly; use <sys/types.h> instead. 691 692 // Returned by `time'. 693 type time_t = int32 /* time_t.h:7:18 */ 694 695 // bits/types.h -- definitions of __*_t types underlying *_t types. 696 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 697 // This file is part of the GNU C Library. 698 // 699 // The GNU C Library is free software; you can redistribute it and/or 700 // modify it under the terms of the GNU Lesser General Public 701 // License as published by the Free Software Foundation; either 702 // version 2.1 of the License, or (at your option) any later version. 703 // 704 // The GNU C Library is distributed in the hope that it will be useful, 705 // but WITHOUT ANY WARRANTY; without even the implied warranty of 706 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 707 // Lesser General Public License for more details. 708 // 709 // You should have received a copy of the GNU Lesser General Public 710 // License along with the GNU C Library; if not, see 711 // <https://www.gnu.org/licenses/>. 712 713 // Never include this file directly; use <sys/types.h> instead. 714 715 // Timer ID returned by `timer_create'. 716 type timer_t = uintptr /* timer_t.h:7:19 */ 717 718 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 719 // 720 // This file is part of GCC. 721 // 722 // GCC is free software; you can redistribute it and/or modify 723 // it under the terms of the GNU General Public License as published by 724 // the Free Software Foundation; either version 3, or (at your option) 725 // any later version. 726 // 727 // GCC is distributed in the hope that it will be useful, 728 // but WITHOUT ANY WARRANTY; without even the implied warranty of 729 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 730 // GNU General Public License for more details. 731 // 732 // Under Section 7 of GPL version 3, you are granted additional 733 // permissions described in the GCC Runtime Library Exception, version 734 // 3.1, as published by the Free Software Foundation. 735 // 736 // You should have received a copy of the GNU General Public License and 737 // a copy of the GCC Runtime Library Exception along with this program; 738 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 739 // <http://www.gnu.org/licenses/>. 740 741 // ISO C Standard: 7.17 Common definitions <stddef.h> 742 743 // Any one of these symbols __need_* means that GNU libc 744 // wants us just to define one data type. So don't define 745 // the symbols that indicate this file's entire job has been done. 746 747 // This avoids lossage on SunOS but only if stdtypes.h comes first. 748 // There's no way to win with the other order! Sun lossage. 749 750 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 751 // Just ignore it. 752 753 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 754 // _TYPE_size_t which will typedef size_t. fixincludes patched the 755 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 756 // not defined, and so that defining this macro defines _GCC_SIZE_T. 757 // If we find that the macros are still defined at this point, we must 758 // invoke them so that the type is defined as expected. 759 760 // In case nobody has defined these types, but we aren't running under 761 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 762 // __WCHAR_TYPE__ have reasonable values. This can happen if the 763 // parts of GCC is compiled by an older compiler, that actually 764 // include gstddef.h, such as collect2. 765 766 // Signed type of difference of two pointers. 767 768 // Define this type if we are doing the whole job, 769 // or if we want this type in particular. 770 771 // Unsigned type of `sizeof' something. 772 773 // Define this type if we are doing the whole job, 774 // or if we want this type in particular. 775 776 // Wide character type. 777 // Locale-writers should change this as necessary to 778 // be big enough to hold unique values not between 0 and 127, 779 // and not (wchar_t) -1, for each defined multibyte character. 780 781 // Define this type if we are doing the whole job, 782 // or if we want this type in particular. 783 784 // A null pointer constant. 785 786 // Old compatibility names for C types. 787 type ulong = uint32 /* types.h:148:27 */ 788 type ushort = uint16 /* types.h:149:28 */ 789 type uint = uint32 /* types.h:150:22 */ 790 791 // These size-specific names are used by some of the inet code. 792 793 // Define intN_t types. 794 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 795 // This file is part of the GNU C Library. 796 // 797 // The GNU C Library is free software; you can redistribute it and/or 798 // modify it under the terms of the GNU Lesser General Public 799 // License as published by the Free Software Foundation; either 800 // version 2.1 of the License, or (at your option) any later version. 801 // 802 // The GNU C Library is distributed in the hope that it will be useful, 803 // but WITHOUT ANY WARRANTY; without even the implied warranty of 804 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 805 // Lesser General Public License for more details. 806 // 807 // You should have received a copy of the GNU Lesser General Public 808 // License along with the GNU C Library; if not, see 809 // <https://www.gnu.org/licenses/>. 810 811 // bits/types.h -- definitions of __*_t types underlying *_t types. 812 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 813 // This file is part of the GNU C Library. 814 // 815 // The GNU C Library is free software; you can redistribute it and/or 816 // modify it under the terms of the GNU Lesser General Public 817 // License as published by the Free Software Foundation; either 818 // version 2.1 of the License, or (at your option) any later version. 819 // 820 // The GNU C Library is distributed in the hope that it will be useful, 821 // but WITHOUT ANY WARRANTY; without even the implied warranty of 822 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 823 // Lesser General Public License for more details. 824 // 825 // You should have received a copy of the GNU Lesser General Public 826 // License along with the GNU C Library; if not, see 827 // <https://www.gnu.org/licenses/>. 828 829 // Never include this file directly; use <sys/types.h> instead. 830 831 type int8_t = int8 /* stdint-intn.h:24:18 */ 832 type int16_t = int16 /* stdint-intn.h:25:19 */ 833 type int32_t = int32 /* stdint-intn.h:26:19 */ 834 type int64_t = int64 /* stdint-intn.h:27:19 */ 835 836 // These were defined by ISO C without the first `_'. 837 type u_int8_t = uint8 /* types.h:158:19 */ 838 type u_int16_t = uint16 /* types.h:159:20 */ 839 type u_int32_t = uint32 /* types.h:160:20 */ 840 type u_int64_t = uint64 /* types.h:161:20 */ 841 842 type register_t = int32 /* types.h:164:13 */ 843 844 // A set of signals to be blocked, unblocked, or waited for. 845 type sigset_t = struct{ F__val [32]uint32 } /* sigset_t.h:7:20 */ 846 847 // Get definition of timer specification structures. 848 849 // bits/types.h -- definitions of __*_t types underlying *_t types. 850 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 851 // This file is part of the GNU C Library. 852 // 853 // The GNU C Library is free software; you can redistribute it and/or 854 // modify it under the terms of the GNU Lesser General Public 855 // License as published by the Free Software Foundation; either 856 // version 2.1 of the License, or (at your option) any later version. 857 // 858 // The GNU C Library is distributed in the hope that it will be useful, 859 // but WITHOUT ANY WARRANTY; without even the implied warranty of 860 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 861 // Lesser General Public License for more details. 862 // 863 // You should have received a copy of the GNU Lesser General Public 864 // License along with the GNU C Library; if not, see 865 // <https://www.gnu.org/licenses/>. 866 867 // Never include this file directly; use <sys/types.h> instead. 868 869 // A time value that is accurate to the nearest 870 // microsecond but also has a range of years. 871 type timeval = struct { 872 Ftv_sec int32 873 Ftv_usec int32 874 } /* struct_timeval.h:8:1 */ 875 876 // NB: Include guard matches what <linux/time.h> uses. 877 878 // bits/types.h -- definitions of __*_t types underlying *_t types. 879 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 880 // This file is part of the GNU C Library. 881 // 882 // The GNU C Library is free software; you can redistribute it and/or 883 // modify it under the terms of the GNU Lesser General Public 884 // License as published by the Free Software Foundation; either 885 // version 2.1 of the License, or (at your option) any later version. 886 // 887 // The GNU C Library is distributed in the hope that it will be useful, 888 // but WITHOUT ANY WARRANTY; without even the implied warranty of 889 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 890 // Lesser General Public License for more details. 891 // 892 // You should have received a copy of the GNU Lesser General Public 893 // License along with the GNU C Library; if not, see 894 // <https://www.gnu.org/licenses/>. 895 896 // Never include this file directly; use <sys/types.h> instead. 897 898 // Endian macros for string.h functions 899 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 900 // This file is part of the GNU C Library. 901 // 902 // The GNU C Library is free software; you can redistribute it and/or 903 // modify it under the terms of the GNU Lesser General Public 904 // License as published by the Free Software Foundation; either 905 // version 2.1 of the License, or (at your option) any later version. 906 // 907 // The GNU C Library is distributed in the hope that it will be useful, 908 // but WITHOUT ANY WARRANTY; without even the implied warranty of 909 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 910 // Lesser General Public License for more details. 911 // 912 // You should have received a copy of the GNU Lesser General Public 913 // License along with the GNU C Library; if not, see 914 // <http://www.gnu.org/licenses/>. 915 916 // POSIX.1b structure for a time value. This is like a `struct timeval' but 917 // has nanoseconds instead of microseconds. 918 type timespec = struct { 919 Ftv_sec int32 920 Ftv_nsec int32 921 } /* struct_timespec.h:10:1 */ 922 923 type suseconds_t = int32 /* select.h:43:23 */ 924 925 // Some versions of <linux/posix_types.h> define this macros. 926 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 927 928 // fd_set for select and pselect. 929 type fd_set = struct{ F__fds_bits [32]int32 } /* select.h:70:5 */ 930 931 // Maximum number of file descriptors in `fd_set'. 932 933 // Sometimes the fd_set member is assumed to have this type. 934 type fd_mask = int32 /* select.h:77:19 */ 935 936 // Define some inlines helping to catch common problems. 937 938 type blksize_t = int32 /* types.h:185:21 */ 939 940 // Types from the Large File Support interface. 941 type blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks. 942 type fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks. 943 type fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes. 944 945 // Now add the thread types. 946 // Declaration of common pthread types for all architectures. 947 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 948 // This file is part of the GNU C Library. 949 // 950 // The GNU C Library is free software; you can redistribute it and/or 951 // modify it under the terms of the GNU Lesser General Public 952 // License as published by the Free Software Foundation; either 953 // version 2.1 of the License, or (at your option) any later version. 954 // 955 // The GNU C Library 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 GNU 958 // Lesser General Public License for more details. 959 // 960 // You should have received a copy of the GNU Lesser General Public 961 // License along with the GNU C Library; if not, see 962 // <https://www.gnu.org/licenses/>. 963 964 // For internal mutex and condition variable definitions. 965 // Common threading primitives definitions for both POSIX and C11. 966 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 967 // This file is part of the GNU C Library. 968 // 969 // The GNU C Library is free software; you can redistribute it and/or 970 // modify it under the terms of the GNU Lesser General Public 971 // License as published by the Free Software Foundation; either 972 // version 2.1 of the License, or (at your option) any later version. 973 // 974 // The GNU C Library is distributed in the hope that it will be useful, 975 // but WITHOUT ANY WARRANTY; without even the implied warranty of 976 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 977 // Lesser General Public License for more details. 978 // 979 // You should have received a copy of the GNU Lesser General Public 980 // License along with the GNU C Library; if not, see 981 // <https://www.gnu.org/licenses/>. 982 983 // Arch-specific definitions. Each architecture must define the following 984 // macros to define the expected sizes of pthread data types: 985 // 986 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 987 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 988 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 989 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 990 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 991 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 992 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 993 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 994 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 995 // 996 // The additional macro defines any constraint for the lock alignment 997 // inside the thread structures: 998 // 999 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1000 // 1001 // Same idea but for the once locking primitive: 1002 // 1003 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1004 1005 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1006 // This file is part of the GNU C Library. 1007 // 1008 // The GNU C Library is free software; you can redistribute it and/or 1009 // modify it under the terms of the GNU Lesser General Public 1010 // License as published by the Free Software Foundation; either 1011 // version 2.1 of the License, or (at your option) any later version. 1012 // 1013 // The GNU C Library is distributed in the hope that it will be useful, 1014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1016 // Lesser General Public License for more details. 1017 // 1018 // You should have received a copy of the GNU Lesser General Public 1019 // License along with the GNU C Library; if not, see 1020 // <https://www.gnu.org/licenses/>. 1021 1022 // Determine the wordsize from the preprocessor defines. 1023 1024 // Extra attributes for the cleanup functions. 1025 1026 // Common definition of pthread_mutex_t. 1027 1028 type __pthread_internal_list = struct { 1029 F__prev uintptr 1030 F__next uintptr 1031 } /* thread-shared-types.h:49:9 */ 1032 1033 type __pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 1034 1035 // Arch-specific mutex definitions. A generic implementation is provided 1036 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 1037 // can override it by defining: 1038 // 1039 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 1040 // definition). It should contains at least the internal members 1041 // defined in the generic version. 1042 // 1043 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 1044 // atomic operations. 1045 // 1046 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 1047 // It should initialize the mutex internal flag. 1048 1049 // x86 internal mutex struct definitions. 1050 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1051 // This file is part of the GNU C Library. 1052 // 1053 // The GNU C Library is free software; you can redistribute it and/or 1054 // modify it under the terms of the GNU Lesser General Public 1055 // License as published by the Free Software Foundation; either 1056 // version 2.1 of the License, or (at your option) any later version. 1057 // 1058 // The GNU C Library is distributed in the hope that it will be useful, 1059 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1060 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1061 // Lesser General Public License for more details. 1062 // 1063 // You should have received a copy of the GNU Lesser General Public 1064 // License along with the GNU C Library; if not, see 1065 // <http://www.gnu.org/licenses/>. 1066 1067 type __pthread_mutex_s = struct { 1068 F__lock int32 1069 F__count uint32 1070 F__owner int32 1071 F__kind int32 1072 F__nusers uint32 1073 F__20 struct { 1074 F__ccgo_pad1 [0]uint32 1075 F__elision_data struct { 1076 F__espins int16 1077 F__eelision int16 1078 } 1079 } 1080 } /* struct_mutex.h:22:1 */ 1081 1082 // Arch-sepecific read-write lock definitions. A generic implementation is 1083 // provided by struct_rwlock.h. If required, an architecture can override it 1084 // by defining: 1085 // 1086 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 1087 // It should contain at least the internal members defined in the 1088 // generic version. 1089 // 1090 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 1091 // It should initialize the rwlock internal type. 1092 1093 // x86 internal rwlock struct definitions. 1094 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1095 // 1096 // This file is part of the GNU C Library. 1097 // 1098 // The GNU C Library is free software; you can redistribute it and/or 1099 // modify it under the terms of the GNU Lesser General Public 1100 // License as published by the Free Software Foundation; either 1101 // version 2.1 of the License, or (at your option) any later version. 1102 // 1103 // The GNU C Library is distributed in the hope that it will be useful, 1104 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1105 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1106 // Lesser General Public License for more details. 1107 // 1108 // You should have received a copy of the GNU Lesser General Public 1109 // License along with the GNU C Library; if not, see 1110 // <http://www.gnu.org/licenses/>. 1111 1112 type __pthread_rwlock_arch_t = struct { 1113 F__readers uint32 1114 F__writers uint32 1115 F__wrphase_futex uint32 1116 F__writers_futex uint32 1117 F__pad3 uint32 1118 F__pad4 uint32 1119 F__flags uint8 1120 F__shared uint8 1121 F__rwelision int8 1122 F__pad2 uint8 1123 F__cur_writer int32 1124 } /* struct_rwlock.h:23:1 */ 1125 1126 // Common definition of pthread_cond_t. 1127 1128 type __pthread_cond_s = struct { 1129 F__0 struct{ F__wseq uint64 } 1130 F__8 struct{ F__g1_start uint64 } 1131 F__g_refs [2]uint32 1132 F__g_size [2]uint32 1133 F__g1_orig_size uint32 1134 F__wrefs uint32 1135 F__g_signals [2]uint32 1136 } /* thread-shared-types.h:92:1 */ 1137 1138 // Thread identifiers. The structure of the attribute type is not 1139 // exposed on purpose. 1140 type pthread_t = uint32 /* pthreadtypes.h:27:27 */ 1141 1142 // Data structures for mutex handling. The structure of the attribute 1143 // type is not exposed on purpose. 1144 type pthread_mutexattr_t = struct { 1145 F__ccgo_pad1 [0]uint32 1146 F__size [4]int8 1147 } /* pthreadtypes.h:36:3 */ 1148 1149 // Data structure for condition variable handling. The structure of 1150 // the attribute type is not exposed on purpose. 1151 type pthread_condattr_t = struct { 1152 F__ccgo_pad1 [0]uint32 1153 F__size [4]int8 1154 } /* pthreadtypes.h:45:3 */ 1155 1156 // Keys for thread-specific data 1157 type pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 1158 1159 // Once-only execution 1160 type pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 1161 1162 type pthread_attr_t1 = struct { 1163 F__ccgo_pad1 [0]uint32 1164 F__size [36]int8 1165 } /* pthreadtypes.h:56:1 */ 1166 1167 type pthread_attr_t = pthread_attr_t1 /* pthreadtypes.h:62:30 */ 1168 1169 type pthread_mutex_t = struct{ F__data __pthread_mutex_s } /* pthreadtypes.h:72:3 */ 1170 1171 type pthread_cond_t = struct{ F__data __pthread_cond_s } /* pthreadtypes.h:80:3 */ 1172 1173 // Data structure for reader-writer lock variable handling. The 1174 // structure of the attribute type is deliberately not exposed. 1175 type pthread_rwlock_t = struct{ F__data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 1176 1177 type pthread_rwlockattr_t = struct { 1178 F__ccgo_pad1 [0]uint32 1179 F__size [8]int8 1180 } /* pthreadtypes.h:97:3 */ 1181 1182 // POSIX spinlock data type. 1183 type pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 1184 1185 // POSIX barriers data type. The structure of the type is 1186 // deliberately not exposed. 1187 type pthread_barrier_t = struct { 1188 F__ccgo_pad1 [0]uint32 1189 F__size [20]int8 1190 } /* pthreadtypes.h:112:3 */ 1191 1192 type pthread_barrierattr_t = struct { 1193 F__ccgo_pad1 [0]uint32 1194 F__size [4]int8 1195 } /* pthreadtypes.h:118:3 */ 1196 1197 // Reentrant versions of the `random' family of functions. 1198 // These functions all use the following data structure to contain 1199 // state, rather than global state variables. 1200 1201 type random_data = struct { 1202 Ffptr uintptr 1203 Frptr uintptr 1204 Fstate uintptr 1205 Frand_type int32 1206 Frand_deg int32 1207 Frand_sep int32 1208 Fend_ptr uintptr 1209 } /* stdlib.h:423:1 */ 1210 1211 // Data structure for communication with thread safe versions. This 1212 // type is to be regarded as opaque. It's only exported because users 1213 // have to allocate objects of this type. 1214 type drand48_data = struct { 1215 F__x [3]uint16 1216 F__old_x [3]uint16 1217 F__c uint16 1218 F__init uint16 1219 F__a uint64 1220 } /* stdlib.h:490:1 */ 1221 1222 // POSIX.1-2008 extended locale interface (see locale.h). 1223 // Definition of locale_t. 1224 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1225 // This file is part of the GNU C Library. 1226 // 1227 // The GNU C Library is free software; you can redistribute it and/or 1228 // modify it under the terms of the GNU Lesser General Public 1229 // License as published by the Free Software Foundation; either 1230 // version 2.1 of the License, or (at your option) any later version. 1231 // 1232 // The GNU C Library is distributed in the hope that it will be useful, 1233 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1234 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1235 // Lesser General Public License for more details. 1236 // 1237 // You should have received a copy of the GNU Lesser General Public 1238 // License along with the GNU C Library; if not, see 1239 // <https://www.gnu.org/licenses/>. 1240 1241 // Definition of struct __locale_struct and __locale_t. 1242 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 1243 // This file is part of the GNU C Library. 1244 // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 1245 // 1246 // The GNU C Library is free software; you can redistribute it and/or 1247 // modify it under the terms of the GNU Lesser General Public 1248 // License as published by the Free Software Foundation; either 1249 // version 2.1 of the License, or (at your option) any later version. 1250 // 1251 // The GNU C Library is distributed in the hope that it will be useful, 1252 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1253 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1254 // Lesser General Public License for more details. 1255 // 1256 // You should have received a copy of the GNU Lesser General Public 1257 // License along with the GNU C Library; if not, see 1258 // <https://www.gnu.org/licenses/>. 1259 1260 // POSIX.1-2008: the locale_t type, representing a locale context 1261 // (implementation-namespace version). This type should be treated 1262 // as opaque by applications; some details are exposed for the sake of 1263 // efficiency in e.g. ctype functions. 1264 1265 type __locale_struct = struct { 1266 F__locales [13]uintptr 1267 F__ctype_b uintptr 1268 F__ctype_tolower uintptr 1269 F__ctype_toupper uintptr 1270 F__names [13]uintptr 1271 } /* __locale_t.h:28:1 */ 1272 1273 type locale_t = uintptr /* locale_t.h:24:20 */ 1274 1275 // When possible, define assert so that it does not add extra 1276 // parentheses around EXPR. Otherwise, those added parentheses would 1277 // suppress warnings we'd expect to be detected by gcc's -Wparentheses. 1278 // The first occurrence of EXPR is not evaluated due to the sizeof, 1279 // but will trigger any pedantic warnings masked by the __extension__ 1280 // for the second occurrence. The ternary operator is required to 1281 // support function pointers and bit fields in this context, and to 1282 // suppress the evaluation of variable length arrays. 1283 1284 // Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' 1285 // which contains the name of the function currently being defined. 1286 // This is broken in G++ before version 2.6. 1287 // C9x has a similar variable called __func__, but prefer the GCC one since 1288 // it demangles C++ function names. 1289 1290 // Copyright 1989 Network Computing Devices, Inc., Mountain View, California. 1291 // 1292 // Permission to use, copy, modify, and distribute this software and its 1293 // documentation for any purpose and without fee is hereby granted, provided 1294 // that the above copyright notice appear in all copies and that both that 1295 // copyright notice and this permission notice appear in supporting 1296 // documentation, and that the name of N.C.D. not be used in advertising or 1297 // publicity pertaining to distribution of the software without specific, 1298 // written prior permission. N.C.D. makes no representations about the 1299 // suitability of this software for any purpose. It is provided "as is" 1300 // without express or implied warranty. 1301 // 1302 1303 //********************************************************** 1304 // 1305 // Copyright 1987, 1998 The Open Group 1306 // 1307 // Permission to use, copy, modify, distribute, and sell this software and its 1308 // documentation for any purpose is hereby granted without fee, provided that 1309 // the above copyright notice appear in all copies and that both that 1310 // copyright notice and this permission notice appear in supporting 1311 // documentation. 1312 // 1313 // The above copyright notice and this permission notice shall be included in 1314 // all copies or substantial portions of the Software. 1315 // 1316 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1317 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1318 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1319 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 1320 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1321 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1322 // 1323 // Except as contained in this notice, the name of The Open Group shall not be 1324 // used in advertising or otherwise to promote the sale, use or other dealings 1325 // in this Software without prior written authorization from The Open Group. 1326 // 1327 // 1328 // Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 1329 // 1330 // All Rights Reserved 1331 // 1332 // Permission to use, copy, modify, and distribute this software and its 1333 // documentation for any purpose and without fee is hereby granted, 1334 // provided that the above copyright notice appear in all copies and that 1335 // both that copyright notice and this permission notice appear in 1336 // supporting documentation, and that the name of Digital not be 1337 // used in advertising or publicity pertaining to distribution of the 1338 // software without specific, written prior permission. 1339 // 1340 // DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 1341 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 1342 // DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 1343 // ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 1344 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 1345 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 1346 // SOFTWARE. 1347 // 1348 // ***************************************************************** 1349 // Xmd.h: MACHINE DEPENDENT DECLARATIONS. 1350 1351 // Special per-machine configuration flags. 1352 1353 // Definition of macro used to set constants for size of network structures; 1354 // machines with preprocessors that can't handle all of the sz_ symbols 1355 // can define this macro to be sizeof(x) if and only if their compiler doesn't 1356 // pad out structures (esp. the xTextElt structure which contains only two 1357 // one-byte fields). Network structures should always define sz_symbols. 1358 // 1359 // The sz_ prefix is used instead of something more descriptive so that the 1360 // symbols are no more than 32 characters long (which causes problems for some 1361 // compilers and preprocessors). 1362 // 1363 // The extra indirection is to get macro arguments to expand correctly before 1364 // the concatenation, rather than afterward. 1365 1366 // Bitfield suffixes for the protocol structure elements, if you 1367 // need them. Note that bitfields are not guaranteed to be signed 1368 // (or even unsigned) according to ANSI C. 1369 type INT32 = int32 /* Xmd.h:100:14 */ 1370 type INT16 = int16 /* Xmd.h:102:15 */ 1371 1372 type INT8 = int8 /* Xmd.h:104:24 */ 1373 1374 type CARD64 = uint64 /* Xmd.h:110:28 */ 1375 type CARD32 = uint32 /* Xmd.h:111:23 */ 1376 type CARD16 = uint16 /* Xmd.h:113:24 */ 1377 type CARD8 = uint8 /* Xmd.h:114:24 */ 1378 1379 type BITS32 = CARD32 /* Xmd.h:116:17 */ 1380 type BITS16 = CARD16 /* Xmd.h:117:17 */ 1381 1382 type BYTE = CARD8 /* Xmd.h:119:16 */ 1383 type BOOL = CARD8 /* Xmd.h:120:16 */ 1384 1385 // was definitions for sign-extending bitfields on architectures without 1386 // native types smaller than 64-bit, now just backwards compatibility 1387 1388 // this version should leave result of type (t *), but that should only be 1389 // used when not in MUSTCOPY 1390 1391 // 1392 // 1393 // Copyright 1989, 1991, 1998 The Open Group 1394 // 1395 // Permission to use, copy, modify, distribute, and sell this software and its 1396 // documentation for any purpose is hereby granted without fee, provided that 1397 // the above copyright notice appear in all copies and that both that 1398 // copyright notice and this permission notice appear in supporting 1399 // documentation. 1400 // 1401 // The above copyright notice and this permission notice shall be included in 1402 // all copies or substantial portions of the Software. 1403 // 1404 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1405 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1406 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1407 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 1408 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1409 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1410 // 1411 // Except as contained in this notice, the name of The Open Group shall not be 1412 // used in advertising or otherwise to promote the sale, use or other dealings 1413 // in this Software without prior written authorization from The Open Group. 1414 // * 1415 // 1416 1417 // Definitions to make function prototypes manageable 1418 1419 // Function prototype configuration (see configure for more info) 1420 1421 // http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute 1422 1423 // Added in X11R6.9, so available in any version of modular xproto 1424 1425 // Added in X11R6.9, so available in any version of modular xproto 1426 1427 // Branch prediction hints for individual conditionals 1428 // requires xproto >= 7.0.9 1429 1430 // Bulk branch prediction hints via marking error path functions as "cold" 1431 // requires xproto >= 7.0.25 1432 1433 // Added in X11R6.9, so available in any version of modular xproto 1434 1435 // requires xproto >= 7.0.30 1436 1437 // requires xproto >= 7.0.17 1438 1439 // Added in X11R6.9, so available in any version of modular xproto 1440 1441 // requires xproto >= 7.0.22 - since this uses either gcc or C99 variable 1442 // argument macros, must be only used inside #ifdef _X_NONNULL guards, as 1443 // many legacy X clients are compiled in C89 mode still. 1444 1445 // requires xproto >= 7.0.22 1446 1447 // C99 keyword "inline" or equivalent extensions in pre-C99 compilers 1448 // requires xproto >= 7.0.9 1449 // (introduced in 7.0.8 but didn't support all compilers until 7.0.9) 1450 1451 // C99 keyword "restrict" or equivalent extensions in pre-C99 compilers 1452 // requires xproto >= 7.0.21 1453 1454 // requires xproto >= 7.0.30 1455 1456 // IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned 1457 // multicast addresses for XDMCP, where X in the prefix may be replaced 1458 // by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, 1459 // 5 for Site-Local, and so on. We set the default here to the Link-Local 1460 // version to most closely match the old IPv4 subnet broadcast behavior. 1461 // Both xdm and X -query allow specifying a different address if a different 1462 // scope is defined. 1463 1464 type xdmOpCode = uint32 /* Xdmcp.h:50:3 */ 1465 1466 type xdmcp_states = uint32 /* Xdmcp.h:62:3 */ 1467 1468 type CARD8Ptr = uintptr /* Xdmcp.h:76:15 */ 1469 type CARD16Ptr = uintptr /* Xdmcp.h:77:16 */ 1470 type CARD32Ptr = uintptr /* Xdmcp.h:78:16 */ 1471 1472 type _ARRAY8 = struct { 1473 Flength CARD16 1474 F__ccgo_pad1 [2]byte 1475 Fdata CARD8Ptr 1476 } /* Xdmcp.h:80:9 */ 1477 1478 type ARRAY8 = _ARRAY8 /* Xdmcp.h:83:3 */ 1479 type ARRAY8Ptr = uintptr /* Xdmcp.h:83:11 */ 1480 1481 type _ARRAY16 = struct { 1482 Flength CARD8 1483 F__ccgo_pad1 [3]byte 1484 Fdata CARD16Ptr 1485 } /* Xdmcp.h:85:9 */ 1486 1487 type ARRAY16 = _ARRAY16 /* Xdmcp.h:88:3 */ 1488 type ARRAY16Ptr = uintptr /* Xdmcp.h:88:12 */ 1489 1490 type _ARRAY32 = struct { 1491 Flength CARD8 1492 F__ccgo_pad1 [3]byte 1493 Fdata CARD32Ptr 1494 } /* Xdmcp.h:90:9 */ 1495 1496 type ARRAY32 = _ARRAY32 /* Xdmcp.h:93:3 */ 1497 type ARRAY32Ptr = uintptr /* Xdmcp.h:93:12 */ 1498 1499 type _ARRAYofARRAY8 = struct { 1500 Flength CARD8 1501 F__ccgo_pad1 [3]byte 1502 Fdata ARRAY8Ptr 1503 } /* Xdmcp.h:95:9 */ 1504 1505 type ARRAYofARRAY8 = _ARRAYofARRAY8 /* Xdmcp.h:98:3 */ 1506 type ARRAYofARRAY8Ptr = uintptr /* Xdmcp.h:98:18 */ 1507 1508 type _XdmcpHeader = struct { 1509 Fversion CARD16 1510 Fopcode CARD16 1511 Flength CARD16 1512 } /* Xdmcp.h:100:9 */ 1513 1514 type XdmcpHeader = _XdmcpHeader /* Xdmcp.h:102:3 */ 1515 type XdmcpHeaderPtr = uintptr /* Xdmcp.h:102:16 */ 1516 1517 type _XdmcpBuffer = struct { 1518 Fdata uintptr 1519 Fsize int32 1520 Fpointer int32 1521 Fcount int32 1522 } /* Xdmcp.h:104:9 */ 1523 1524 type XdmcpBuffer = _XdmcpBuffer /* Xdmcp.h:109:3 */ 1525 type XdmcpBufferPtr = uintptr /* Xdmcp.h:109:16 */ 1526 1527 type _XdmAuthKey = struct{ Fdata [8]BYTE } /* Xdmcp.h:111:9 */ 1528 1529 type XdmAuthKeyRec = _XdmAuthKey /* Xdmcp.h:113:3 */ 1530 type XdmAuthKeyPtr = uintptr /* Xdmcp.h:113:18 */ 1531 1532 // implementation-independent network address structure. 1533 // Equiv to sockaddr* for sockets. 1534 1535 type XdmcpNetaddr = uintptr /* Xdmcp.h:119:14 */ 1536 1537 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 1538 // This file is part of the GNU C Library. 1539 // 1540 // The GNU C Library is free software; you can redistribute it and/or 1541 // modify it under the terms of the GNU Lesser General Public 1542 // License as published by the Free Software Foundation; either 1543 // version 2.1 of the License, or (at your option) any later version. 1544 // 1545 // The GNU C Library is distributed in the hope that it will be useful, 1546 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1547 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1548 // Lesser General Public License for more details. 1549 // 1550 // You should have received a copy of the GNU Lesser General Public 1551 // License along with the GNU C Library; if not, see 1552 // <https://www.gnu.org/licenses/>. 1553 1554 // ISO C99: 7.8 Format conversion of integer types <inttypes.h> 1555 1556 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1557 // This file is part of the GNU C Library. 1558 // 1559 // The GNU C Library is free software; you can redistribute it and/or 1560 // modify it under the terms of the GNU Lesser General Public 1561 // License as published by the Free Software Foundation; either 1562 // version 2.1 of the License, or (at your option) any later version. 1563 // 1564 // The GNU C Library is distributed in the hope that it will be useful, 1565 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1566 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1567 // Lesser General Public License for more details. 1568 // 1569 // You should have received a copy of the GNU Lesser General Public 1570 // License along with the GNU C Library; if not, see 1571 // <https://www.gnu.org/licenses/>. 1572 1573 // Get the type definitions. 1574 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 1575 // This file is part of the GNU C Library. 1576 // 1577 // The GNU C Library is free software; you can redistribute it and/or 1578 // modify it under the terms of the GNU Lesser General Public 1579 // License as published by the Free Software Foundation; either 1580 // version 2.1 of the License, or (at your option) any later version. 1581 // 1582 // The GNU C Library is distributed in the hope that it will be useful, 1583 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1584 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1585 // Lesser General Public License for more details. 1586 // 1587 // You should have received a copy of the GNU Lesser General Public 1588 // License along with the GNU C Library; if not, see 1589 // <https://www.gnu.org/licenses/>. 1590 1591 // ISO C99: 7.18 Integer types <stdint.h> 1592 1593 // Handle feature test macros at the start of a header. 1594 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 1595 // This file is part of the GNU C Library. 1596 // 1597 // The GNU C Library is free software; you can redistribute it and/or 1598 // modify it under the terms of the GNU Lesser General Public 1599 // License as published by the Free Software Foundation; either 1600 // version 2.1 of the License, or (at your option) any later version. 1601 // 1602 // The GNU C Library is distributed in the hope that it will be useful, 1603 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1604 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1605 // Lesser General Public License for more details. 1606 // 1607 // You should have received a copy of the GNU Lesser General Public 1608 // License along with the GNU C Library; if not, see 1609 // <https://www.gnu.org/licenses/>. 1610 1611 // This header is internal to glibc and should not be included outside 1612 // of glibc headers. Headers including it must define 1613 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 1614 // cannot have multiple include guards because ISO C feature test 1615 // macros depend on the definition of the macro when an affected 1616 // header is included, not when the first system header is 1617 // included. 1618 1619 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1620 // This file is part of the GNU C Library. 1621 // 1622 // The GNU C Library is free software; you can redistribute it and/or 1623 // modify it under the terms of the GNU Lesser General Public 1624 // License as published by the Free Software Foundation; either 1625 // version 2.1 of the License, or (at your option) any later version. 1626 // 1627 // The GNU C Library is distributed in the hope that it will be useful, 1628 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1629 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1630 // Lesser General Public License for more details. 1631 // 1632 // You should have received a copy of the GNU Lesser General Public 1633 // License along with the GNU C Library; if not, see 1634 // <https://www.gnu.org/licenses/>. 1635 1636 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 1637 // macro. 1638 1639 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 1640 // macro. Most but not all symbols enabled by that macro in TS 1641 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 1642 // still require that macro in C2X. 1643 1644 // ISO/IEC TS 18661-4:2015 defines the 1645 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 1646 // functions, the symbols from this TS are enabled unconditionally in 1647 // C2X. 1648 1649 // ISO/IEC TS 18661-3:2015 defines the 1650 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 1651 // bits/types.h -- definitions of __*_t types underlying *_t types. 1652 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1653 // This file is part of the GNU C Library. 1654 // 1655 // The GNU C Library is free software; you can redistribute it and/or 1656 // modify it under the terms of the GNU Lesser General Public 1657 // License as published by the Free Software Foundation; either 1658 // version 2.1 of the License, or (at your option) any later version. 1659 // 1660 // The GNU C Library is distributed in the hope that it will be useful, 1661 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1662 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1663 // Lesser General Public License for more details. 1664 // 1665 // You should have received a copy of the GNU Lesser General Public 1666 // License along with the GNU C Library; if not, see 1667 // <https://www.gnu.org/licenses/>. 1668 1669 // Never include this file directly; use <sys/types.h> instead. 1670 1671 // wchar_t type related definitions. 1672 // Copyright (C) 2000-2020 Free Software Foundation, Inc. 1673 // This file is part of the GNU C Library. 1674 // 1675 // The GNU C Library is free software; you can redistribute it and/or 1676 // modify it under the terms of the GNU Lesser General Public 1677 // License as published by the Free Software Foundation; either 1678 // version 2.1 of the License, or (at your option) any later version. 1679 // 1680 // The GNU C Library is distributed in the hope that it will be useful, 1681 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1682 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1683 // Lesser General Public License for more details. 1684 // 1685 // You should have received a copy of the GNU Lesser General Public 1686 // License along with the GNU C Library; if not, see 1687 // <https://www.gnu.org/licenses/>. 1688 1689 // The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__ 1690 // are not defined, give the right value and type as long as both int 1691 // and wchar_t are 32-bit types. Adding L'\0' to a constant value 1692 // ensures that the type is correct; it is necessary to use (L'\0' + 1693 // 0) rather than just L'\0' so that the type in C++ is the promoted 1694 // version of wchar_t rather than the distinct wchar_t type itself. 1695 // Because wchar_t in preprocessor #if expressions is treated as 1696 // intmax_t or uintmax_t, the expression (L'\0' - 1) would have the 1697 // wrong value for WCHAR_MAX in such expressions and so cannot be used 1698 // to define __WCHAR_MAX in the unsigned case. 1699 1700 // Determine the wordsize from the preprocessor defines. 1701 1702 // Exact integral types. 1703 1704 // Signed. 1705 // Define intN_t types. 1706 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1707 // This file is part of the GNU C Library. 1708 // 1709 // The GNU C Library is free software; you can redistribute it and/or 1710 // modify it under the terms of the GNU Lesser General Public 1711 // License as published by the Free Software Foundation; either 1712 // version 2.1 of the License, or (at your option) any later version. 1713 // 1714 // The GNU C Library is distributed in the hope that it will be useful, 1715 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1716 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1717 // Lesser General Public License for more details. 1718 // 1719 // You should have received a copy of the GNU Lesser General Public 1720 // License along with the GNU C Library; if not, see 1721 // <https://www.gnu.org/licenses/>. 1722 1723 // Unsigned. 1724 // Define uintN_t types. 1725 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1726 // This file is part of the GNU C Library. 1727 // 1728 // The GNU C Library is free software; you can redistribute it and/or 1729 // modify it under the terms of the GNU Lesser General Public 1730 // License as published by the Free Software Foundation; either 1731 // version 2.1 of the License, or (at your option) any later version. 1732 // 1733 // The GNU C Library is distributed in the hope that it will be useful, 1734 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1735 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1736 // Lesser General Public License for more details. 1737 // 1738 // You should have received a copy of the GNU Lesser General Public 1739 // License along with the GNU C Library; if not, see 1740 // <https://www.gnu.org/licenses/>. 1741 1742 // bits/types.h -- definitions of __*_t types underlying *_t types. 1743 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1744 // This file is part of the GNU C Library. 1745 // 1746 // The GNU C Library is free software; you can redistribute it and/or 1747 // modify it under the terms of the GNU Lesser General Public 1748 // License as published by the Free Software Foundation; either 1749 // version 2.1 of the License, or (at your option) any later version. 1750 // 1751 // The GNU C Library is distributed in the hope that it will be useful, 1752 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1753 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1754 // Lesser General Public License for more details. 1755 // 1756 // You should have received a copy of the GNU Lesser General Public 1757 // License along with the GNU C Library; if not, see 1758 // <https://www.gnu.org/licenses/>. 1759 1760 // Never include this file directly; use <sys/types.h> instead. 1761 1762 type uint8_t = uint8 /* stdint-uintn.h:24:19 */ 1763 type uint16_t = uint16 /* stdint-uintn.h:25:20 */ 1764 type uint32_t = uint32 /* stdint-uintn.h:26:20 */ 1765 type uint64_t = uint64 /* stdint-uintn.h:27:20 */ 1766 1767 // Small types. 1768 1769 // Signed. 1770 type int_least8_t = int8 /* stdint.h:43:24 */ 1771 type int_least16_t = int16 /* stdint.h:44:25 */ 1772 type int_least32_t = int32 /* stdint.h:45:25 */ 1773 type int_least64_t = int64 /* stdint.h:46:25 */ 1774 1775 // Unsigned. 1776 type uint_least8_t = uint8 /* stdint.h:49:25 */ 1777 type uint_least16_t = uint16 /* stdint.h:50:26 */ 1778 type uint_least32_t = uint32 /* stdint.h:51:26 */ 1779 type uint_least64_t = uint64 /* stdint.h:52:26 */ 1780 1781 // Fast types. 1782 1783 // Signed. 1784 type int_fast8_t = int8 /* stdint.h:58:22 */ 1785 type int_fast16_t = int32 /* stdint.h:64:15 */ 1786 type int_fast32_t = int32 /* stdint.h:65:15 */ 1787 1788 type int_fast64_t = int64 /* stdint.h:67:24 */ 1789 1790 // Unsigned. 1791 type uint_fast8_t = uint8 /* stdint.h:71:24 */ 1792 type uint_fast16_t = uint32 /* stdint.h:77:23 */ 1793 type uint_fast32_t = uint32 /* stdint.h:78:23 */ 1794 1795 type uint_fast64_t = uint64 /* stdint.h:80:32 */ 1796 1797 // Types for `void *' pointers. 1798 type intptr_t = int32 /* stdint.h:93:15 */ 1799 type uintptr_t = uint32 /* stdint.h:96:23 */ 1800 1801 // Largest integral types. 1802 type intmax_t = int64 /* stdint.h:101:21 */ 1803 type uintmax_t = uint64 /* stdint.h:102:22 */ 1804 1805 // Macros for printing format specifiers. 1806 1807 // Decimal notation. 1808 1809 // Octal notation. 1810 1811 // Unsigned integers. 1812 1813 // lowercase hexadecimal notation. 1814 1815 // UPPERCASE hexadecimal notation. 1816 1817 // Macros for printing `intmax_t' and `uintmax_t'. 1818 1819 // Macros for printing `intptr_t' and `uintptr_t'. 1820 1821 // Macros for scanning format specifiers. 1822 1823 // Signed decimal notation. 1824 1825 // Signed decimal notation. 1826 1827 // Unsigned decimal notation. 1828 1829 // Octal notation. 1830 1831 // Hexadecimal notation. 1832 1833 // Macros for scanning `intmax_t' and `uintmax_t'. 1834 1835 // Macros for scaning `intptr_t' and `uintptr_t'. 1836 1837 // We have to define the `uintmax_t' type using `lldiv_t'. 1838 type imaxdiv_t = struct { 1839 Fquot int64 1840 Frem int64 1841 } /* inttypes.h:284:5 */ 1842 1843 // Test what happens if you try to allocate an array with too many entries 1844 1845 func TestAllocOversizeArrays(tls *libc.TLS) { /* Array.c:49:1: */ 1846 bp := tls.Alloc(320) 1847 defer tls.Free(320) 1848 1849 { 1850 *(*ARRAY8)(unsafe.Pointer(bp + 256 /* newArray */)) = ARRAY8{Flength: libc.Uint16FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 1851 var result int32 1852 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp, ts+30 /* "ARRAY8" */, ((65535)+1))) 1853 result = xdmcp.XXdmcpAllocARRAY8(tls, bp+256 /* &newArray */, ((65535) + 1)) 1854 if result == 0 { 1855 } else { 1856 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(51), uintptr(unsafe.Pointer(&__func__))) 1857 } 1858 if int32((*ARRAY8)(unsafe.Pointer(bp+256 /* &newArray */)).Flength) == 0 { 1859 } else { 1860 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(51), uintptr(unsafe.Pointer(&__func__))) 1861 } 1862 if (*ARRAY8)(unsafe.Pointer(bp+256 /* &newArray */)).Fdata == (uintptr(0)) { 1863 } else { 1864 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(51), uintptr(unsafe.Pointer(&__func__))) 1865 } 1866 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+16, ts+30 /* "ARRAY8" */, ((65535)+1))) 1867 result = xdmcp.XXdmcpReallocARRAY8(tls, bp+256 /* &newArray */, ((65535) + 1)) 1868 if result == 0 { 1869 } else { 1870 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(51), uintptr(unsafe.Pointer(&__func__))) 1871 } 1872 if int32((*ARRAY8)(unsafe.Pointer(bp+256 /* &newArray */)).Flength) == 0 { 1873 } else { 1874 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(51), uintptr(unsafe.Pointer(&__func__))) 1875 } 1876 if (*ARRAY8)(unsafe.Pointer(bp+256 /* &newArray */)).Fdata == (uintptr(0)) { 1877 } else { 1878 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(51), uintptr(unsafe.Pointer(&__func__))) 1879 } 1880 xdmcp.XXdmcpDisposeARRAY8(tls, bp+256 /* &newArray */) 1881 } 1882 1883 { 1884 *(*ARRAY16)(unsafe.Pointer(bp + 264 /* newArray */)) = ARRAY16{Flength: libc.Uint8FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 1885 var result int32 1886 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+32, ts+139 /* "ARRAY16" */, ((255)+1))) 1887 result = xdmcp.XXdmcpAllocARRAY16(tls, bp+264 /* &newArray */, ((255) + 1)) 1888 if result == 0 { 1889 } else { 1890 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(52), uintptr(unsafe.Pointer(&__func__))) 1891 } 1892 if int32((*ARRAY16)(unsafe.Pointer(bp+264 /* &newArray */)).Flength) == 0 { 1893 } else { 1894 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(52), uintptr(unsafe.Pointer(&__func__))) 1895 } 1896 if (*ARRAY16)(unsafe.Pointer(bp+264 /* &newArray */)).Fdata == (uintptr(0)) { 1897 } else { 1898 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(52), uintptr(unsafe.Pointer(&__func__))) 1899 } 1900 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+48, ts+139 /* "ARRAY16" */, ((255)+1))) 1901 result = xdmcp.XXdmcpReallocARRAY16(tls, bp+264 /* &newArray */, ((255) + 1)) 1902 if result == 0 { 1903 } else { 1904 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(52), uintptr(unsafe.Pointer(&__func__))) 1905 } 1906 if int32((*ARRAY16)(unsafe.Pointer(bp+264 /* &newArray */)).Flength) == 0 { 1907 } else { 1908 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(52), uintptr(unsafe.Pointer(&__func__))) 1909 } 1910 if (*ARRAY16)(unsafe.Pointer(bp+264 /* &newArray */)).Fdata == (uintptr(0)) { 1911 } else { 1912 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(52), uintptr(unsafe.Pointer(&__func__))) 1913 } 1914 xdmcp.XXdmcpDisposeARRAY16(tls, bp+264 /* &newArray */) 1915 } 1916 1917 { 1918 *(*ARRAY32)(unsafe.Pointer(bp + 272 /* newArray */)) = ARRAY32{Flength: libc.Uint8FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 1919 var result int32 1920 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+64, ts+147 /* "ARRAY32" */, ((255)+1))) 1921 result = xdmcp.XXdmcpAllocARRAY32(tls, bp+272 /* &newArray */, ((255) + 1)) 1922 if result == 0 { 1923 } else { 1924 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(53), uintptr(unsafe.Pointer(&__func__))) 1925 } 1926 if int32((*ARRAY32)(unsafe.Pointer(bp+272 /* &newArray */)).Flength) == 0 { 1927 } else { 1928 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(53), uintptr(unsafe.Pointer(&__func__))) 1929 } 1930 if (*ARRAY32)(unsafe.Pointer(bp+272 /* &newArray */)).Fdata == (uintptr(0)) { 1931 } else { 1932 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(53), uintptr(unsafe.Pointer(&__func__))) 1933 } 1934 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+80, ts+147 /* "ARRAY32" */, ((255)+1))) 1935 result = xdmcp.XXdmcpReallocARRAY32(tls, bp+272 /* &newArray */, ((255) + 1)) 1936 if result == 0 { 1937 } else { 1938 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(53), uintptr(unsafe.Pointer(&__func__))) 1939 } 1940 if int32((*ARRAY32)(unsafe.Pointer(bp+272 /* &newArray */)).Flength) == 0 { 1941 } else { 1942 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(53), uintptr(unsafe.Pointer(&__func__))) 1943 } 1944 if (*ARRAY32)(unsafe.Pointer(bp+272 /* &newArray */)).Fdata == (uintptr(0)) { 1945 } else { 1946 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(53), uintptr(unsafe.Pointer(&__func__))) 1947 } 1948 xdmcp.XXdmcpDisposeARRAY32(tls, bp+272 /* &newArray */) 1949 } 1950 1951 { 1952 *(*ARRAYofARRAY8)(unsafe.Pointer(bp + 280 /* newArray */)) = ARRAYofARRAY8{Flength: libc.Uint8FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 1953 var result int32 1954 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+96, ts+155 /* "ARRAYofARRAY8" */, ((255)+1))) 1955 result = xdmcp.XXdmcpAllocARRAYofARRAY8(tls, bp+280 /* &newArray */, ((255) + 1)) 1956 if result == 0 { 1957 } else { 1958 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(54), uintptr(unsafe.Pointer(&__func__))) 1959 } 1960 if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp+280 /* &newArray */)).Flength) == 0 { 1961 } else { 1962 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(54), uintptr(unsafe.Pointer(&__func__))) 1963 } 1964 if (*ARRAYofARRAY8)(unsafe.Pointer(bp+280 /* &newArray */)).Fdata == (uintptr(0)) { 1965 } else { 1966 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(54), uintptr(unsafe.Pointer(&__func__))) 1967 } 1968 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+112, ts+155 /* "ARRAYofARRAY8" */, ((255)+1))) 1969 result = xdmcp.XXdmcpReallocARRAYofARRAY8(tls, bp+280 /* &newArray */, ((255) + 1)) 1970 if result == 0 { 1971 } else { 1972 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(54), uintptr(unsafe.Pointer(&__func__))) 1973 } 1974 if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp+280 /* &newArray */)).Flength) == 0 { 1975 } else { 1976 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(54), uintptr(unsafe.Pointer(&__func__))) 1977 } 1978 if (*ARRAYofARRAY8)(unsafe.Pointer(bp+280 /* &newArray */)).Fdata == (uintptr(0)) { 1979 } else { 1980 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(54), uintptr(unsafe.Pointer(&__func__))) 1981 } 1982 xdmcp.XXdmcpDisposeARRAYofARRAY8(tls, bp+280 /* &newArray */) 1983 } 1984 1985 { 1986 *(*ARRAY8)(unsafe.Pointer(bp + 288 /* newArray */)) = ARRAY8{Flength: libc.Uint16FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 1987 var result int32 1988 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+128, ts+30 /* "ARRAY8" */, -1)) 1989 result = xdmcp.XXdmcpAllocARRAY8(tls, bp+288 /* &newArray */, -1) 1990 if result == 0 { 1991 } else { 1992 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(55), uintptr(unsafe.Pointer(&__func__))) 1993 } 1994 if int32((*ARRAY8)(unsafe.Pointer(bp+288 /* &newArray */)).Flength) == 0 { 1995 } else { 1996 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(55), uintptr(unsafe.Pointer(&__func__))) 1997 } 1998 if (*ARRAY8)(unsafe.Pointer(bp+288 /* &newArray */)).Fdata == (uintptr(0)) { 1999 } else { 2000 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(55), uintptr(unsafe.Pointer(&__func__))) 2001 } 2002 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+144, ts+30 /* "ARRAY8" */, -1)) 2003 result = xdmcp.XXdmcpReallocARRAY8(tls, bp+288 /* &newArray */, -1) 2004 if result == 0 { 2005 } else { 2006 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(55), uintptr(unsafe.Pointer(&__func__))) 2007 } 2008 if int32((*ARRAY8)(unsafe.Pointer(bp+288 /* &newArray */)).Flength) == 0 { 2009 } else { 2010 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(55), uintptr(unsafe.Pointer(&__func__))) 2011 } 2012 if (*ARRAY8)(unsafe.Pointer(bp+288 /* &newArray */)).Fdata == (uintptr(0)) { 2013 } else { 2014 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(55), uintptr(unsafe.Pointer(&__func__))) 2015 } 2016 xdmcp.XXdmcpDisposeARRAY8(tls, bp+288 /* &newArray */) 2017 } 2018 2019 { 2020 *(*ARRAY16)(unsafe.Pointer(bp + 296 /* newArray */)) = ARRAY16{Flength: libc.Uint8FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 2021 var result int32 2022 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+160, ts+139 /* "ARRAY16" */, -1)) 2023 result = xdmcp.XXdmcpAllocARRAY16(tls, bp+296 /* &newArray */, -1) 2024 if result == 0 { 2025 } else { 2026 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(56), uintptr(unsafe.Pointer(&__func__))) 2027 } 2028 if int32((*ARRAY16)(unsafe.Pointer(bp+296 /* &newArray */)).Flength) == 0 { 2029 } else { 2030 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(56), uintptr(unsafe.Pointer(&__func__))) 2031 } 2032 if (*ARRAY16)(unsafe.Pointer(bp+296 /* &newArray */)).Fdata == (uintptr(0)) { 2033 } else { 2034 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(56), uintptr(unsafe.Pointer(&__func__))) 2035 } 2036 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+176, ts+139 /* "ARRAY16" */, -1)) 2037 result = xdmcp.XXdmcpReallocARRAY16(tls, bp+296 /* &newArray */, -1) 2038 if result == 0 { 2039 } else { 2040 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(56), uintptr(unsafe.Pointer(&__func__))) 2041 } 2042 if int32((*ARRAY16)(unsafe.Pointer(bp+296 /* &newArray */)).Flength) == 0 { 2043 } else { 2044 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(56), uintptr(unsafe.Pointer(&__func__))) 2045 } 2046 if (*ARRAY16)(unsafe.Pointer(bp+296 /* &newArray */)).Fdata == (uintptr(0)) { 2047 } else { 2048 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(56), uintptr(unsafe.Pointer(&__func__))) 2049 } 2050 xdmcp.XXdmcpDisposeARRAY16(tls, bp+296 /* &newArray */) 2051 } 2052 2053 { 2054 *(*ARRAY32)(unsafe.Pointer(bp + 304 /* newArray */)) = ARRAY32{Flength: libc.Uint8FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 2055 var result int32 2056 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+192, ts+147 /* "ARRAY32" */, -1)) 2057 result = xdmcp.XXdmcpAllocARRAY32(tls, bp+304 /* &newArray */, -1) 2058 if result == 0 { 2059 } else { 2060 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(57), uintptr(unsafe.Pointer(&__func__))) 2061 } 2062 if int32((*ARRAY32)(unsafe.Pointer(bp+304 /* &newArray */)).Flength) == 0 { 2063 } else { 2064 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(57), uintptr(unsafe.Pointer(&__func__))) 2065 } 2066 if (*ARRAY32)(unsafe.Pointer(bp+304 /* &newArray */)).Fdata == (uintptr(0)) { 2067 } else { 2068 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(57), uintptr(unsafe.Pointer(&__func__))) 2069 } 2070 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+208, ts+147 /* "ARRAY32" */, -1)) 2071 result = xdmcp.XXdmcpReallocARRAY32(tls, bp+304 /* &newArray */, -1) 2072 if result == 0 { 2073 } else { 2074 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(57), uintptr(unsafe.Pointer(&__func__))) 2075 } 2076 if int32((*ARRAY32)(unsafe.Pointer(bp+304 /* &newArray */)).Flength) == 0 { 2077 } else { 2078 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(57), uintptr(unsafe.Pointer(&__func__))) 2079 } 2080 if (*ARRAY32)(unsafe.Pointer(bp+304 /* &newArray */)).Fdata == (uintptr(0)) { 2081 } else { 2082 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(57), uintptr(unsafe.Pointer(&__func__))) 2083 } 2084 xdmcp.XXdmcpDisposeARRAY32(tls, bp+304 /* &newArray */) 2085 } 2086 2087 { 2088 *(*ARRAYofARRAY8)(unsafe.Pointer(bp + 312 /* newArray */)) = ARRAYofARRAY8{Flength: libc.Uint8FromInt32(-1), Fdata: libc.UintptrFromInt32(-1)} 2089 var result int32 2090 libc.Xprintf(tls, ts /* "Checking XdmcpAl..." */, libc.VaList(bp+224, ts+155 /* "ARRAYofARRAY8" */, -1)) 2091 result = xdmcp.XXdmcpAllocARRAYofARRAY8(tls, bp+312 /* &newArray */, -1) 2092 if result == 0 { 2093 } else { 2094 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(58), uintptr(unsafe.Pointer(&__func__))) 2095 } 2096 if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp+312 /* &newArray */)).Flength) == 0 { 2097 } else { 2098 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(58), uintptr(unsafe.Pointer(&__func__))) 2099 } 2100 if (*ARRAYofARRAY8)(unsafe.Pointer(bp+312 /* &newArray */)).Fdata == (uintptr(0)) { 2101 } else { 2102 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(58), uintptr(unsafe.Pointer(&__func__))) 2103 } 2104 libc.Xprintf(tls, ts+107 /* "Checking XdmcpRe..." */, libc.VaList(bp+240, ts+155 /* "ARRAYofARRAY8" */, -1)) 2105 result = xdmcp.XXdmcpReallocARRAYofARRAY8(tls, bp+312 /* &newArray */, -1) 2106 if result == 0 { 2107 } else { 2108 libc.X__assert_fail(tls, ts+37 /* "result == 0" */, ts+49 /* "Array.c" */, uint32(58), uintptr(unsafe.Pointer(&__func__))) 2109 } 2110 if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp+312 /* &newArray */)).Flength) == 0 { 2111 } else { 2112 libc.X__assert_fail(tls, ts+57 /* "newArray.length ..." */, ts+49 /* "Array.c" */, uint32(58), uintptr(unsafe.Pointer(&__func__))) 2113 } 2114 if (*ARRAYofARRAY8)(unsafe.Pointer(bp+312 /* &newArray */)).Fdata == (uintptr(0)) { 2115 } else { 2116 libc.X__assert_fail(tls, ts+78 /* "newArray.data ==..." */, ts+49 /* "Array.c" */, uint32(58), uintptr(unsafe.Pointer(&__func__))) 2117 } 2118 xdmcp.XXdmcpDisposeARRAYofARRAY8(tls, bp+312 /* &newArray */) 2119 } 2120 2121 } 2122 2123 var __func__ = *(*[24]int8)(unsafe.Pointer(ts + 169 /* "TestAllocOversiz..." */)) /* Array.c:50:1 */ 2124 2125 func TestZeroFillARRAYofARRAY8(tls *libc.TLS) { /* Array.c:62:1: */ 2126 bp := tls.Alloc(8) 2127 defer tls.Free(8) 2128 2129 // var aa ARRAYofARRAY8 at bp, 8 2130 2131 var result int32 2132 var noise uintptr 2133 2134 libc.Xprintf(tls, ts+193 /* "Checking XdmcpAl..." */, 0) 2135 // prefill memory with junk - hopefully next malloc will pick up some 2136 noise = libc.Xmalloc(tls, (uint32(32) * uint32(unsafe.Sizeof(ARRAY8{})))) 2137 libc.Xmemset(tls, noise, libc.Int32FromUint32(0xdeadbeef), (uint32(32) * uint32(unsafe.Sizeof(ARRAY8{})))) 2138 libc.Xfree(tls, noise) 2139 result = xdmcp.XXdmcpAllocARRAYofARRAY8(tls, bp /* &aa */, 32) 2140 if result == 1 { 2141 } else { 2142 libc.X__assert_fail(tls, ts+247 /* "result == 1" */, ts+49 /* "Array.c" */, uint32(74), uintptr(unsafe.Pointer(&__func__1))) 2143 } 2144 if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp /* &aa */)).Flength) == 32 { 2145 } else { 2146 libc.X__assert_fail(tls, ts+259 /* "aa.length == 32" */, ts+49 /* "Array.c" */, uint32(75), uintptr(unsafe.Pointer(&__func__1))) 2147 } 2148 if (*_ARRAY8)(unsafe.Pointer((*ARRAYofARRAY8)(unsafe.Pointer(bp /* &aa */)).Fdata+4*8)).Fdata == (uintptr(0)) { 2149 } else { 2150 libc.X__assert_fail(tls, ts+275 /* "aa.data[4].data ..." */, ts+49 /* "Array.c" */, uint32(76), uintptr(unsafe.Pointer(&__func__1))) 2151 } 2152 libc.Xprintf(tls, ts+306 /* "Checking XdmcpRe..." */, 0) 2153 result = xdmcp.XXdmcpAllocARRAYofARRAY8(tls, bp /* &aa */, 48) 2154 if result == 1 { 2155 } else { 2156 libc.X__assert_fail(tls, ts+247 /* "result == 1" */, ts+49 /* "Array.c" */, uint32(79), uintptr(unsafe.Pointer(&__func__1))) 2157 } 2158 if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp /* &aa */)).Flength) == 48 { 2159 } else { 2160 libc.X__assert_fail(tls, ts+362 /* "aa.length == 48" */, ts+49 /* "Array.c" */, uint32(80), uintptr(unsafe.Pointer(&__func__1))) 2161 } 2162 if (*_ARRAY8)(unsafe.Pointer((*ARRAYofARRAY8)(unsafe.Pointer(bp /* &aa */)).Fdata+40*8)).Fdata == (uintptr(0)) { 2163 } else { 2164 libc.X__assert_fail(tls, ts+378 /* "aa.data[40].data..." */, ts+49 /* "Array.c" */, uint32(81), uintptr(unsafe.Pointer(&__func__1))) 2165 } 2166 xdmcp.XXdmcpDisposeARRAYofARRAY8(tls, bp /* &aa */) 2167 } 2168 2169 var __func__1 = *(*[26]int8)(unsafe.Pointer(ts + 410 /* "TestZeroFillARRA..." */)) /* Array.c:63:1 */ 2170 2171 func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* Array.c:86:1: */ 2172 TestAllocOversizeArrays(tls) 2173 TestZeroFillARRAYofARRAY8(tls) 2174 2175 libc.Xexit(tls, 0) 2176 return int32(0) 2177 } 2178 2179 var ts1 = "Checking XdmcpAlloc%s(%d)...\n\x00ARRAY8\x00result == 0\x00Array.c\x00newArray.length == 0\x00newArray.data == ((void *)0)\x00Checking XdmcpRealloc%s(%d)...\n\x00ARRAY16\x00ARRAY32\x00ARRAYofARRAY8\x00TestAllocOversizeArrays\x00Checking XdmcpAllocARRAYofARRAY8 zero fills array...\n\x00result == 1\x00aa.length == 32\x00aa.data[4].data == ((void *)0)\x00Checking XdmcpReallocARRAYofARRAY8 zero fills array...\n\x00aa.length == 48\x00aa.data[40].data == ((void *)0)\x00TestZeroFillARRAYofARRAY8\x00" 2180 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data