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

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