modernc.org/xdmcp@v1.0.17/internal/test/main_linux_amd64.go (about)

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