modernc.org/xau@v1.0.16/internal/autest/main_linux_arm64.go (about)

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