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

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