modernc.org/z@v1.7.4/internal/minigzip_linux_arm.go (about)

     1  // Code generated by 'ccgo -lmodernc.org/z/lib -o internal/minigzip_linux_arm.go -trace-translation-units /tmp/go-generate-1705985058/cdb.json minigzip64', 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/z/lib"
    14  )
    15  
    16  var _ = math.Pi
    17  var _ reflect.Kind
    18  var _ atomic.Value
    19  var _ unsafe.Pointer
    20  var _ types.Size_t
    21  
    22  func main() { libc.Start(main1) }
    23  
    24  // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
    25  //    the `_SC_*' symbols for the NAME argument to `sysconf';
    26  //    and the `_CS_*' symbols for the NAME argument to `confstr'.
    27  // `sysconf', `pathconf', and `confstr' NAME values.  Generic version.
    28  //    Copyright (C) 1993-2020 Free Software Foundation, Inc.
    29  //    This file is part of the GNU C Library.
    30  //
    31  //    The GNU C Library is free software; you can redistribute it and/or
    32  //    modify it under the terms of the GNU Lesser General Public
    33  //    License as published by the Free Software Foundation; either
    34  //    version 2.1 of the License, or (at your option) any later version.
    35  //
    36  //    The GNU C Library is distributed in the hope that it will be useful,
    37  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    38  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    39  //    Lesser General Public License for more details.
    40  //
    41  //    You should have received a copy of the GNU Lesser General Public
    42  //    License along with the GNU C Library; if not, see
    43  //    <https://www.gnu.org/licenses/>.
    44  
    45  // Values for the NAME argument to `pathconf' and `fpathconf'.
    46  const ( /* confname.h:24:1: */
    47  	_PC_LINK_MAX           = 0
    48  	_PC_MAX_CANON          = 1
    49  	_PC_MAX_INPUT          = 2
    50  	_PC_NAME_MAX           = 3
    51  	_PC_PATH_MAX           = 4
    52  	_PC_PIPE_BUF           = 5
    53  	_PC_CHOWN_RESTRICTED   = 6
    54  	_PC_NO_TRUNC           = 7
    55  	_PC_VDISABLE           = 8
    56  	_PC_SYNC_IO            = 9
    57  	_PC_ASYNC_IO           = 10
    58  	_PC_PRIO_IO            = 11
    59  	_PC_SOCK_MAXBUF        = 12
    60  	_PC_FILESIZEBITS       = 13
    61  	_PC_REC_INCR_XFER_SIZE = 14
    62  	_PC_REC_MAX_XFER_SIZE  = 15
    63  	_PC_REC_MIN_XFER_SIZE  = 16
    64  	_PC_REC_XFER_ALIGN     = 17
    65  	_PC_ALLOC_SIZE_MIN     = 18
    66  	_PC_SYMLINK_MAX        = 19
    67  	_PC_2_SYMLINKS         = 20
    68  )
    69  
    70  // Values for the NAME argument to `confstr'.
    71  const ( /* confname.h:533:1: */
    72  	_CS_PATH = 0 // The default search path.
    73  
    74  	_CS_V6_WIDTH_RESTRICTED_ENVS = 1
    75  
    76  	_CS_GNU_LIBC_VERSION       = 2
    77  	_CS_GNU_LIBPTHREAD_VERSION = 3
    78  
    79  	_CS_V5_WIDTH_RESTRICTED_ENVS = 4
    80  
    81  	_CS_V7_WIDTH_RESTRICTED_ENVS = 5
    82  
    83  	_CS_LFS_CFLAGS      = 1000
    84  	_CS_LFS_LDFLAGS     = 1001
    85  	_CS_LFS_LIBS        = 1002
    86  	_CS_LFS_LINTFLAGS   = 1003
    87  	_CS_LFS64_CFLAGS    = 1004
    88  	_CS_LFS64_LDFLAGS   = 1005
    89  	_CS_LFS64_LIBS      = 1006
    90  	_CS_LFS64_LINTFLAGS = 1007
    91  
    92  	_CS_XBS5_ILP32_OFF32_CFLAGS     = 1100
    93  	_CS_XBS5_ILP32_OFF32_LDFLAGS    = 1101
    94  	_CS_XBS5_ILP32_OFF32_LIBS       = 1102
    95  	_CS_XBS5_ILP32_OFF32_LINTFLAGS  = 1103
    96  	_CS_XBS5_ILP32_OFFBIG_CFLAGS    = 1104
    97  	_CS_XBS5_ILP32_OFFBIG_LDFLAGS   = 1105
    98  	_CS_XBS5_ILP32_OFFBIG_LIBS      = 1106
    99  	_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107
   100  	_CS_XBS5_LP64_OFF64_CFLAGS      = 1108
   101  	_CS_XBS5_LP64_OFF64_LDFLAGS     = 1109
   102  	_CS_XBS5_LP64_OFF64_LIBS        = 1110
   103  	_CS_XBS5_LP64_OFF64_LINTFLAGS   = 1111
   104  	_CS_XBS5_LPBIG_OFFBIG_CFLAGS    = 1112
   105  	_CS_XBS5_LPBIG_OFFBIG_LDFLAGS   = 1113
   106  	_CS_XBS5_LPBIG_OFFBIG_LIBS      = 1114
   107  	_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115
   108  
   109  	_CS_POSIX_V6_ILP32_OFF32_CFLAGS     = 1116
   110  	_CS_POSIX_V6_ILP32_OFF32_LDFLAGS    = 1117
   111  	_CS_POSIX_V6_ILP32_OFF32_LIBS       = 1118
   112  	_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS  = 1119
   113  	_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    = 1120
   114  	_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS   = 1121
   115  	_CS_POSIX_V6_ILP32_OFFBIG_LIBS      = 1122
   116  	_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
   117  	_CS_POSIX_V6_LP64_OFF64_CFLAGS      = 1124
   118  	_CS_POSIX_V6_LP64_OFF64_LDFLAGS     = 1125
   119  	_CS_POSIX_V6_LP64_OFF64_LIBS        = 1126
   120  	_CS_POSIX_V6_LP64_OFF64_LINTFLAGS   = 1127
   121  	_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    = 1128
   122  	_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS   = 1129
   123  	_CS_POSIX_V6_LPBIG_OFFBIG_LIBS      = 1130
   124  	_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
   125  
   126  	_CS_POSIX_V7_ILP32_OFF32_CFLAGS     = 1132
   127  	_CS_POSIX_V7_ILP32_OFF32_LDFLAGS    = 1133
   128  	_CS_POSIX_V7_ILP32_OFF32_LIBS       = 1134
   129  	_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS  = 1135
   130  	_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS    = 1136
   131  	_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS   = 1137
   132  	_CS_POSIX_V7_ILP32_OFFBIG_LIBS      = 1138
   133  	_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
   134  	_CS_POSIX_V7_LP64_OFF64_CFLAGS      = 1140
   135  	_CS_POSIX_V7_LP64_OFF64_LDFLAGS     = 1141
   136  	_CS_POSIX_V7_LP64_OFF64_LIBS        = 1142
   137  	_CS_POSIX_V7_LP64_OFF64_LINTFLAGS   = 1143
   138  	_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS    = 1144
   139  	_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS   = 1145
   140  	_CS_POSIX_V7_LPBIG_OFFBIG_LIBS      = 1146
   141  	_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
   142  
   143  	_CS_V6_ENV = 1148
   144  	_CS_V7_ENV = 1149
   145  )
   146  
   147  // Values for the argument to `sysconf'.
   148  const ( /* confname.h:71:1: */
   149  	_SC_ARG_MAX               = 0
   150  	_SC_CHILD_MAX             = 1
   151  	_SC_CLK_TCK               = 2
   152  	_SC_NGROUPS_MAX           = 3
   153  	_SC_OPEN_MAX              = 4
   154  	_SC_STREAM_MAX            = 5
   155  	_SC_TZNAME_MAX            = 6
   156  	_SC_JOB_CONTROL           = 7
   157  	_SC_SAVED_IDS             = 8
   158  	_SC_REALTIME_SIGNALS      = 9
   159  	_SC_PRIORITY_SCHEDULING   = 10
   160  	_SC_TIMERS                = 11
   161  	_SC_ASYNCHRONOUS_IO       = 12
   162  	_SC_PRIORITIZED_IO        = 13
   163  	_SC_SYNCHRONIZED_IO       = 14
   164  	_SC_FSYNC                 = 15
   165  	_SC_MAPPED_FILES          = 16
   166  	_SC_MEMLOCK               = 17
   167  	_SC_MEMLOCK_RANGE         = 18
   168  	_SC_MEMORY_PROTECTION     = 19
   169  	_SC_MESSAGE_PASSING       = 20
   170  	_SC_SEMAPHORES            = 21
   171  	_SC_SHARED_MEMORY_OBJECTS = 22
   172  	_SC_AIO_LISTIO_MAX        = 23
   173  	_SC_AIO_MAX               = 24
   174  	_SC_AIO_PRIO_DELTA_MAX    = 25
   175  	_SC_DELAYTIMER_MAX        = 26
   176  	_SC_MQ_OPEN_MAX           = 27
   177  	_SC_MQ_PRIO_MAX           = 28
   178  	_SC_VERSION               = 29
   179  	_SC_PAGESIZE              = 30
   180  	_SC_RTSIG_MAX             = 31
   181  	_SC_SEM_NSEMS_MAX         = 32
   182  	_SC_SEM_VALUE_MAX         = 33
   183  	_SC_SIGQUEUE_MAX          = 34
   184  	_SC_TIMER_MAX             = 35
   185  
   186  	// Values for the argument to `sysconf'
   187  	//        corresponding to _POSIX2_* symbols.
   188  	_SC_BC_BASE_MAX        = 36
   189  	_SC_BC_DIM_MAX         = 37
   190  	_SC_BC_SCALE_MAX       = 38
   191  	_SC_BC_STRING_MAX      = 39
   192  	_SC_COLL_WEIGHTS_MAX   = 40
   193  	_SC_EQUIV_CLASS_MAX    = 41
   194  	_SC_EXPR_NEST_MAX      = 42
   195  	_SC_LINE_MAX           = 43
   196  	_SC_RE_DUP_MAX         = 44
   197  	_SC_CHARCLASS_NAME_MAX = 45
   198  
   199  	_SC_2_VERSION   = 46
   200  	_SC_2_C_BIND    = 47
   201  	_SC_2_C_DEV     = 48
   202  	_SC_2_FORT_DEV  = 49
   203  	_SC_2_FORT_RUN  = 50
   204  	_SC_2_SW_DEV    = 51
   205  	_SC_2_LOCALEDEF = 52
   206  
   207  	_SC_PII                 = 53
   208  	_SC_PII_XTI             = 54
   209  	_SC_PII_SOCKET          = 55
   210  	_SC_PII_INTERNET        = 56
   211  	_SC_PII_OSI             = 57
   212  	_SC_POLL                = 58
   213  	_SC_SELECT              = 59
   214  	_SC_UIO_MAXIOV          = 60
   215  	_SC_IOV_MAX             = 60
   216  	_SC_PII_INTERNET_STREAM = 61
   217  	_SC_PII_INTERNET_DGRAM  = 62
   218  	_SC_PII_OSI_COTS        = 63
   219  	_SC_PII_OSI_CLTS        = 64
   220  	_SC_PII_OSI_M           = 65
   221  	_SC_T_IOV_MAX           = 66
   222  
   223  	// Values according to POSIX 1003.1c (POSIX threads).
   224  	_SC_THREADS                      = 67
   225  	_SC_THREAD_SAFE_FUNCTIONS        = 68
   226  	_SC_GETGR_R_SIZE_MAX             = 69
   227  	_SC_GETPW_R_SIZE_MAX             = 70
   228  	_SC_LOGIN_NAME_MAX               = 71
   229  	_SC_TTY_NAME_MAX                 = 72
   230  	_SC_THREAD_DESTRUCTOR_ITERATIONS = 73
   231  	_SC_THREAD_KEYS_MAX              = 74
   232  	_SC_THREAD_STACK_MIN             = 75
   233  	_SC_THREAD_THREADS_MAX           = 76
   234  	_SC_THREAD_ATTR_STACKADDR        = 77
   235  	_SC_THREAD_ATTR_STACKSIZE        = 78
   236  	_SC_THREAD_PRIORITY_SCHEDULING   = 79
   237  	_SC_THREAD_PRIO_INHERIT          = 80
   238  	_SC_THREAD_PRIO_PROTECT          = 81
   239  	_SC_THREAD_PROCESS_SHARED        = 82
   240  
   241  	_SC_NPROCESSORS_CONF = 83
   242  	_SC_NPROCESSORS_ONLN = 84
   243  	_SC_PHYS_PAGES       = 85
   244  	_SC_AVPHYS_PAGES     = 86
   245  	_SC_ATEXIT_MAX       = 87
   246  	_SC_PASS_MAX         = 88
   247  
   248  	_SC_XOPEN_VERSION     = 89
   249  	_SC_XOPEN_XCU_VERSION = 90
   250  	_SC_XOPEN_UNIX        = 91
   251  	_SC_XOPEN_CRYPT       = 92
   252  	_SC_XOPEN_ENH_I18N    = 93
   253  	_SC_XOPEN_SHM         = 94
   254  
   255  	_SC_2_CHAR_TERM = 95
   256  	_SC_2_C_VERSION = 96
   257  	_SC_2_UPE       = 97
   258  
   259  	_SC_XOPEN_XPG2 = 98
   260  	_SC_XOPEN_XPG3 = 99
   261  	_SC_XOPEN_XPG4 = 100
   262  
   263  	_SC_CHAR_BIT   = 101
   264  	_SC_CHAR_MAX   = 102
   265  	_SC_CHAR_MIN   = 103
   266  	_SC_INT_MAX    = 104
   267  	_SC_INT_MIN    = 105
   268  	_SC_LONG_BIT   = 106
   269  	_SC_WORD_BIT   = 107
   270  	_SC_MB_LEN_MAX = 108
   271  	_SC_NZERO      = 109
   272  	_SC_SSIZE_MAX  = 110
   273  	_SC_SCHAR_MAX  = 111
   274  	_SC_SCHAR_MIN  = 112
   275  	_SC_SHRT_MAX   = 113
   276  	_SC_SHRT_MIN   = 114
   277  	_SC_UCHAR_MAX  = 115
   278  	_SC_UINT_MAX   = 116
   279  	_SC_ULONG_MAX  = 117
   280  	_SC_USHRT_MAX  = 118
   281  
   282  	_SC_NL_ARGMAX  = 119
   283  	_SC_NL_LANGMAX = 120
   284  	_SC_NL_MSGMAX  = 121
   285  	_SC_NL_NMAX    = 122
   286  	_SC_NL_SETMAX  = 123
   287  	_SC_NL_TEXTMAX = 124
   288  
   289  	_SC_XBS5_ILP32_OFF32  = 125
   290  	_SC_XBS5_ILP32_OFFBIG = 126
   291  	_SC_XBS5_LP64_OFF64   = 127
   292  	_SC_XBS5_LPBIG_OFFBIG = 128
   293  
   294  	_SC_XOPEN_LEGACY           = 129
   295  	_SC_XOPEN_REALTIME         = 130
   296  	_SC_XOPEN_REALTIME_THREADS = 131
   297  
   298  	_SC_ADVISORY_INFO          = 132
   299  	_SC_BARRIERS               = 133
   300  	_SC_BASE                   = 134
   301  	_SC_C_LANG_SUPPORT         = 135
   302  	_SC_C_LANG_SUPPORT_R       = 136
   303  	_SC_CLOCK_SELECTION        = 137
   304  	_SC_CPUTIME                = 138
   305  	_SC_THREAD_CPUTIME         = 139
   306  	_SC_DEVICE_IO              = 140
   307  	_SC_DEVICE_SPECIFIC        = 141
   308  	_SC_DEVICE_SPECIFIC_R      = 142
   309  	_SC_FD_MGMT                = 143
   310  	_SC_FIFO                   = 144
   311  	_SC_PIPE                   = 145
   312  	_SC_FILE_ATTRIBUTES        = 146
   313  	_SC_FILE_LOCKING           = 147
   314  	_SC_FILE_SYSTEM            = 148
   315  	_SC_MONOTONIC_CLOCK        = 149
   316  	_SC_MULTI_PROCESS          = 150
   317  	_SC_SINGLE_PROCESS         = 151
   318  	_SC_NETWORKING             = 152
   319  	_SC_READER_WRITER_LOCKS    = 153
   320  	_SC_SPIN_LOCKS             = 154
   321  	_SC_REGEXP                 = 155
   322  	_SC_REGEX_VERSION          = 156
   323  	_SC_SHELL                  = 157
   324  	_SC_SIGNALS                = 158
   325  	_SC_SPAWN                  = 159
   326  	_SC_SPORADIC_SERVER        = 160
   327  	_SC_THREAD_SPORADIC_SERVER = 161
   328  	_SC_SYSTEM_DATABASE        = 162
   329  	_SC_SYSTEM_DATABASE_R      = 163
   330  	_SC_TIMEOUTS               = 164
   331  	_SC_TYPED_MEMORY_OBJECTS   = 165
   332  	_SC_USER_GROUPS            = 166
   333  	_SC_USER_GROUPS_R          = 167
   334  	_SC_2_PBS                  = 168
   335  	_SC_2_PBS_ACCOUNTING       = 169
   336  	_SC_2_PBS_LOCATE           = 170
   337  	_SC_2_PBS_MESSAGE          = 171
   338  	_SC_2_PBS_TRACK            = 172
   339  	_SC_SYMLOOP_MAX            = 173
   340  	_SC_STREAMS                = 174
   341  	_SC_2_PBS_CHECKPOINT       = 175
   342  
   343  	_SC_V6_ILP32_OFF32  = 176
   344  	_SC_V6_ILP32_OFFBIG = 177
   345  	_SC_V6_LP64_OFF64   = 178
   346  	_SC_V6_LPBIG_OFFBIG = 179
   347  
   348  	_SC_HOST_NAME_MAX      = 180
   349  	_SC_TRACE              = 181
   350  	_SC_TRACE_EVENT_FILTER = 182
   351  	_SC_TRACE_INHERIT      = 183
   352  	_SC_TRACE_LOG          = 184
   353  
   354  	_SC_LEVEL1_ICACHE_SIZE     = 185
   355  	_SC_LEVEL1_ICACHE_ASSOC    = 186
   356  	_SC_LEVEL1_ICACHE_LINESIZE = 187
   357  	_SC_LEVEL1_DCACHE_SIZE     = 188
   358  	_SC_LEVEL1_DCACHE_ASSOC    = 189
   359  	_SC_LEVEL1_DCACHE_LINESIZE = 190
   360  	_SC_LEVEL2_CACHE_SIZE      = 191
   361  	_SC_LEVEL2_CACHE_ASSOC     = 192
   362  	_SC_LEVEL2_CACHE_LINESIZE  = 193
   363  	_SC_LEVEL3_CACHE_SIZE      = 194
   364  	_SC_LEVEL3_CACHE_ASSOC     = 195
   365  	_SC_LEVEL3_CACHE_LINESIZE  = 196
   366  	_SC_LEVEL4_CACHE_SIZE      = 197
   367  	_SC_LEVEL4_CACHE_ASSOC     = 198
   368  	_SC_LEVEL4_CACHE_LINESIZE  = 199
   369  	// Leave room here, maybe we need a few more cache levels some day.
   370  
   371  	_SC_IPV6        = 235
   372  	_SC_RAW_SOCKETS = 236
   373  
   374  	_SC_V7_ILP32_OFF32  = 237
   375  	_SC_V7_ILP32_OFFBIG = 238
   376  	_SC_V7_LP64_OFF64   = 239
   377  	_SC_V7_LPBIG_OFFBIG = 240
   378  
   379  	_SC_SS_REPL_MAX = 241
   380  
   381  	_SC_TRACE_EVENT_NAME_MAX = 242
   382  	_SC_TRACE_NAME_MAX       = 243
   383  	_SC_TRACE_SYS_MAX        = 244
   384  	_SC_TRACE_USER_EVENT_MAX = 245
   385  
   386  	_SC_XOPEN_STREAMS = 246
   387  
   388  	_SC_THREAD_ROBUST_PRIO_INHERIT = 247
   389  	_SC_THREAD_ROBUST_PRIO_PROTECT = 248
   390  )
   391  
   392  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   393  //    This file is part of the GNU C Library.
   394  //
   395  //    The GNU C Library is free software; you can redistribute it and/or
   396  //    modify it under the terms of the GNU Lesser General Public
   397  //    License as published by the Free Software Foundation; either
   398  //    version 2.1 of the License, or (at your option) any later version.
   399  //
   400  //    The GNU C Library is distributed in the hope that it will be useful,
   401  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   402  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   403  //    Lesser General Public License for more details.
   404  //
   405  //    You should have received a copy of the GNU Lesser General Public
   406  //    License along with the GNU C Library; if not, see
   407  //    <https://www.gnu.org/licenses/>.
   408  
   409  //	ISO C99 Standard: 7.20 General utilities	<stdlib.h>
   410  
   411  // Handle feature test macros at the start of a header.
   412  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   413  //    This file is part of the GNU C Library.
   414  //
   415  //    The GNU C Library is free software; you can redistribute it and/or
   416  //    modify it under the terms of the GNU Lesser General Public
   417  //    License as published by the Free Software Foundation; either
   418  //    version 2.1 of the License, or (at your option) any later version.
   419  //
   420  //    The GNU C Library is distributed in the hope that it will be useful,
   421  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   422  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   423  //    Lesser General Public License for more details.
   424  //
   425  //    You should have received a copy of the GNU Lesser General Public
   426  //    License along with the GNU C Library; if not, see
   427  //    <https://www.gnu.org/licenses/>.
   428  
   429  // This header is internal to glibc and should not be included outside
   430  //    of glibc headers.  Headers including it must define
   431  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
   432  //    cannot have multiple include guards because ISO C feature test
   433  //    macros depend on the definition of the macro when an affected
   434  //    header is included, not when the first system header is
   435  //    included.
   436  
   437  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   438  //    This file is part of the GNU C Library.
   439  //
   440  //    The GNU C Library is free software; you can redistribute it and/or
   441  //    modify it under the terms of the GNU Lesser General Public
   442  //    License as published by the Free Software Foundation; either
   443  //    version 2.1 of the License, or (at your option) any later version.
   444  //
   445  //    The GNU C Library is distributed in the hope that it will be useful,
   446  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   447  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   448  //    Lesser General Public License for more details.
   449  //
   450  //    You should have received a copy of the GNU Lesser General Public
   451  //    License along with the GNU C Library; if not, see
   452  //    <https://www.gnu.org/licenses/>.
   453  
   454  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
   455  //    macro.
   456  
   457  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
   458  //    macro.  Most but not all symbols enabled by that macro in TS
   459  //    18661-1 are enabled unconditionally in C2X; the symbols in Annex F
   460  //    still require that macro in C2X.
   461  
   462  // ISO/IEC TS 18661-4:2015 defines the
   463  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.  Other than the reduction
   464  //    functions, the symbols from this TS are enabled unconditionally in
   465  //    C2X.
   466  
   467  // ISO/IEC TS 18661-3:2015 defines the
   468  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
   469  
   470  // Get size_t, wchar_t and NULL from <stddef.h>.
   471  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
   472  //
   473  // This file is part of GCC.
   474  //
   475  // GCC is free software; you can redistribute it and/or modify
   476  // it under the terms of the GNU General Public License as published by
   477  // the Free Software Foundation; either version 3, or (at your option)
   478  // any later version.
   479  //
   480  // GCC is distributed in the hope that it will be useful,
   481  // but WITHOUT ANY WARRANTY; without even the implied warranty of
   482  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   483  // GNU General Public License for more details.
   484  //
   485  // Under Section 7 of GPL version 3, you are granted additional
   486  // permissions described in the GCC Runtime Library Exception, version
   487  // 3.1, as published by the Free Software Foundation.
   488  //
   489  // You should have received a copy of the GNU General Public License and
   490  // a copy of the GCC Runtime Library Exception along with this program;
   491  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   492  // <http://www.gnu.org/licenses/>.
   493  
   494  // ISO C Standard:  7.17  Common definitions  <stddef.h>
   495  
   496  // Any one of these symbols __need_* means that GNU libc
   497  //    wants us just to define one data type.  So don't define
   498  //    the symbols that indicate this file's entire job has been done.
   499  
   500  // This avoids lossage on SunOS but only if stdtypes.h comes first.
   501  //    There's no way to win with the other order!  Sun lossage.
   502  
   503  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
   504  //    Just ignore it.
   505  
   506  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
   507  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
   508  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
   509  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
   510  //    If we find that the macros are still defined at this point, we must
   511  //    invoke them so that the type is defined as expected.
   512  
   513  // In case nobody has defined these types, but we aren't running under
   514  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
   515  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
   516  //    parts of GCC is compiled by an older compiler, that actually
   517  //    include gstddef.h, such as collect2.
   518  
   519  // Signed type of difference of two pointers.
   520  
   521  // Define this type if we are doing the whole job,
   522  //    or if we want this type in particular.
   523  
   524  // If this symbol has done its job, get rid of it.
   525  
   526  // Unsigned type of `sizeof' something.
   527  
   528  // Define this type if we are doing the whole job,
   529  //    or if we want this type in particular.
   530  
   531  // Wide character type.
   532  //    Locale-writers should change this as necessary to
   533  //    be big enough to hold unique values not between 0 and 127,
   534  //    and not (wchar_t) -1, for each defined multibyte character.
   535  
   536  // Define this type if we are doing the whole job,
   537  //    or if we want this type in particular.
   538  
   539  // A null pointer constant.
   540  
   541  // Offset of member MEMBER in a struct of type TYPE.
   542  
   543  // XPG requires a few symbols from <sys/wait.h> being defined.
   544  // Definitions of flag bits for `waitpid' et al.
   545  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
   546  //    This file is part of the GNU C Library.
   547  //
   548  //    The GNU C Library is free software; you can redistribute it and/or
   549  //    modify it under the terms of the GNU Lesser General Public
   550  //    License as published by the Free Software Foundation; either
   551  //    version 2.1 of the License, or (at your option) any later version.
   552  //
   553  //    The GNU C Library is distributed in the hope that it will be useful,
   554  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   555  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   556  //    Lesser General Public License for more details.
   557  //
   558  //    You should have received a copy of the GNU Lesser General Public
   559  //    License along with the GNU C Library; if not, see
   560  //    <https://www.gnu.org/licenses/>.
   561  
   562  // Bits in the third argument to `waitpid'.
   563  
   564  // Bits in the fourth argument to `waitid'.
   565  
   566  // The following values are used by the `waitid' function.
   567  
   568  // The Linux kernel defines these bare, rather than an enum,
   569  //    which causes a conflict if the include order is reversed.
   570  
   571  const ( /* waitflags.h:52:1: */
   572  	P_ALL  = 0 // Wait for any child.
   573  	P_PID  = 1 // Wait for specified process.
   574  	P_PGID = 2
   575  )
   576  
   577  type ptrdiff_t = int32 /* <builtin>:3:26 */
   578  
   579  type size_t = uint32 /* <builtin>:9:23 */
   580  
   581  type wchar_t = uint32 /* <builtin>:15:24 */
   582  
   583  // A null pointer constant.
   584  
   585  // Offset of member MEMBER in a struct of type TYPE.
   586  
   587  // Type whose alignment is supported in every context and is at least
   588  //    as great as that of any standard type not using alignment
   589  //    specifiers.
   590  type max_align_t = struct {
   591  	__max_align_ll int64
   592  	__max_align_ld float64
   593  } /* stddef.h:426:3 */
   594  
   595  type z_size_t = size_t /* zconf.h:248:21 */
   596  
   597  // Maximum value for memLevel in deflateInit2
   598  
   599  // Maximum value for windowBits in deflateInit2 and inflateInit2.
   600  // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
   601  // created by gzip. (Files created by minigzip can still be extracted by
   602  // gzip.)
   603  
   604  // The memory requirements for deflate are (in bytes):
   605  //             (1 << (windowBits+2)) +  (1 << (memLevel+9))
   606  //  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
   607  //  plus a few kilobytes for small objects. For example, if you want to reduce
   608  //  the default memory requirements from 256K to 128K, compile with
   609  //      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
   610  //  Of course this will generally degrade compression (there's no free lunch).
   611  //
   612  //    The memory requirements for inflate are (in bytes) 1 << windowBits
   613  //  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
   614  //  for small objects.
   615  
   616  // Type declarations
   617  
   618  // The following definitions for FAR are needed only for MSDOS mixed
   619  // model programming (small or medium model with some far allocations).
   620  // This was tested only with MSC; for other MSDOS compilers you may have
   621  // to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
   622  // just define FAR to be empty.
   623  
   624  type Byte = uint8   /* zconf.h:391:24 */ // 8 bits
   625  type uInt = uint32  /* zconf.h:393:24 */ // 16 bits or more
   626  type uLong = uint32 /* zconf.h:394:24 */ // 32 bits or more
   627  
   628  type Bytef = Byte   /* zconf.h:400:22 */
   629  type charf = uint8  /* zconf.h:402:19 */
   630  type intf = int32   /* zconf.h:403:19 */
   631  type uIntf = uInt   /* zconf.h:404:19 */
   632  type uLongf = uLong /* zconf.h:405:19 */
   633  
   634  type voidpc = uintptr /* zconf.h:408:23 */
   635  type voidpf = uintptr /* zconf.h:409:23 */
   636  type voidp = uintptr  /* zconf.h:410:23 */
   637  
   638  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
   639  //
   640  // This file is part of GCC.
   641  //
   642  // GCC is free software; you can redistribute it and/or modify it under
   643  // the terms of the GNU General Public License as published by the Free
   644  // Software Foundation; either version 3, or (at your option) any later
   645  // version.
   646  //
   647  // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
   648  // WARRANTY; without even the implied warranty of MERCHANTABILITY or
   649  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   650  // for more details.
   651  //
   652  // Under Section 7 of GPL version 3, you are granted additional
   653  // permissions described in the GCC Runtime Library Exception, version
   654  // 3.1, as published by the Free Software Foundation.
   655  //
   656  // You should have received a copy of the GNU General Public License and
   657  // a copy of the GCC Runtime Library Exception along with this program;
   658  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   659  // <http://www.gnu.org/licenses/>.
   660  
   661  // This administrivia gets added to the beginning of limits.h
   662  //    if the system has its own version of limits.h.
   663  
   664  // We use _GCC_LIMITS_H_ because we want this not to match
   665  //    any macros that the system's limits.h uses for its own purposes.
   666  
   667  // Use "..." so that we find syslimits.h only in this same directory.
   668  // syslimits.h stands for the system's own limits.h file.
   669  //    If we can use it ok unmodified, then we install this text.
   670  //    If fixincludes fixes it, then the fixed version is installed
   671  //    instead of this text.
   672  
   673  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   674  //    This file is part of the GNU C Library.
   675  //
   676  //    The GNU C Library is free software; you can redistribute it and/or
   677  //    modify it under the terms of the GNU Lesser General Public
   678  //    License as published by the Free Software Foundation; either
   679  //    version 2.1 of the License, or (at your option) any later version.
   680  //
   681  //    The GNU C Library is distributed in the hope that it will be useful,
   682  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   683  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   684  //    Lesser General Public License for more details.
   685  //
   686  //    You should have received a copy of the GNU Lesser General Public
   687  //    License along with the GNU C Library; if not, see
   688  //    <https://www.gnu.org/licenses/>.
   689  
   690  //	ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types	<limits.h>
   691  
   692  // Handle feature test macros at the start of a header.
   693  //    Copyright (C) 2016-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  // This header is internal to glibc and should not be included outside
   711  //    of glibc headers.  Headers including it must define
   712  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
   713  //    cannot have multiple include guards because ISO C feature test
   714  //    macros depend on the definition of the macro when an affected
   715  //    header is included, not when the first system header is
   716  //    included.
   717  
   718  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   719  //    This file is part of the GNU C Library.
   720  //
   721  //    The GNU C Library is free software; you can redistribute it and/or
   722  //    modify it under the terms of the GNU Lesser General Public
   723  //    License as published by the Free Software Foundation; either
   724  //    version 2.1 of the License, or (at your option) any later version.
   725  //
   726  //    The GNU C Library is distributed in the hope that it will be useful,
   727  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   728  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   729  //    Lesser General Public License for more details.
   730  //
   731  //    You should have received a copy of the GNU Lesser General Public
   732  //    License along with the GNU C Library; if not, see
   733  //    <https://www.gnu.org/licenses/>.
   734  
   735  // These are defined by the user (or the compiler)
   736  //    to specify the desired environment:
   737  //
   738  //    __STRICT_ANSI__	ISO Standard C.
   739  //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
   740  //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
   741  //    _ISOC2X_SOURCE	Extensions to ISO C99 from ISO C2X.
   742  //    __STDC_WANT_LIB_EXT2__
   743  // 			Extensions to ISO C99 from TR 27431-2:2010.
   744  //    __STDC_WANT_IEC_60559_BFP_EXT__
   745  // 			Extensions to ISO C11 from TS 18661-1:2014.
   746  //    __STDC_WANT_IEC_60559_FUNCS_EXT__
   747  // 			Extensions to ISO C11 from TS 18661-4:2015.
   748  //    __STDC_WANT_IEC_60559_TYPES_EXT__
   749  // 			Extensions to ISO C11 from TS 18661-3:2015.
   750  //
   751  //    _POSIX_SOURCE	IEEE Std 1003.1.
   752  //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
   753  // 			if >=199309L, add IEEE Std 1003.1b-1993;
   754  // 			if >=199506L, add IEEE Std 1003.1c-1995;
   755  // 			if >=200112L, all of IEEE 1003.1-2004
   756  // 			if >=200809L, all of IEEE 1003.1-2008
   757  //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
   758  // 			Single Unix conformance is wanted, to 600 for the
   759  // 			sixth revision, to 700 for the seventh revision.
   760  //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
   761  //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
   762  //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
   763  //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
   764  //    _ATFILE_SOURCE	Additional *at interfaces.
   765  //    _GNU_SOURCE		All of the above, plus GNU extensions.
   766  //    _DEFAULT_SOURCE	The default set of features (taking precedence over
   767  // 			__STRICT_ANSI__).
   768  //
   769  //    _FORTIFY_SOURCE	Add security hardening to many library functions.
   770  // 			Set to 1 or 2; 2 performs stricter checks than 1.
   771  //
   772  //    _REENTRANT, _THREAD_SAFE
   773  // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
   774  //
   775  //    The `-ansi' switch to the GNU C compiler, and standards conformance
   776  //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
   777  //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
   778  //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
   779  //    200809L, as well as enabling miscellaneous functions from BSD and
   780  //    SVID.  If more than one of these are defined, they accumulate.  For
   781  //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
   782  //    give you ISO C, 1003.1, and 1003.2, but nothing else.
   783  //
   784  //    These are defined by this file and are used by the
   785  //    header files to decide what to declare or define:
   786  //
   787  //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
   788  // 			to 1 or 0; the subsequent macros are either defined
   789  // 			or undefined, and those tests should be moved to
   790  // 			__GLIBC_USE.
   791  //    __USE_ISOC11		Define ISO C11 things.
   792  //    __USE_ISOC99		Define ISO C99 things.
   793  //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
   794  //    __USE_ISOCXX11	Define ISO C++11 things.
   795  //    __USE_POSIX		Define IEEE Std 1003.1 things.
   796  //    __USE_POSIX2		Define IEEE Std 1003.2 things.
   797  //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
   798  //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
   799  //    __USE_XOPEN		Define XPG things.
   800  //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
   801  //    __USE_UNIX98		Define Single Unix V2 things.
   802  //    __USE_XOPEN2K        Define XPG6 things.
   803  //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
   804  //    __USE_XOPEN2K8       Define XPG7 things.
   805  //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
   806  //    __USE_LARGEFILE	Define correct standard I/O things.
   807  //    __USE_LARGEFILE64	Define LFS things with separate names.
   808  //    __USE_FILE_OFFSET64	Define 64bit interface as default.
   809  //    __USE_MISC		Define things from 4.3BSD or System V Unix.
   810  //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
   811  //    __USE_GNU		Define GNU extensions.
   812  //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
   813  //
   814  //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
   815  //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
   816  //    only for compatibility.  All new code should use the other symbols
   817  //    to test for features.
   818  //
   819  //    All macros listed above as possibly being defined by this file are
   820  //    explicitly undefined if they are not explicitly defined.
   821  //    Feature-test macros that are not defined by the user or compiler
   822  //    but are implied by the other feature-test macros defined (or by the
   823  //    lack of any definitions) are defined by the file.
   824  //
   825  //    ISO C feature test macros depend on the definition of the macro
   826  //    when an affected header is included, not when the first system
   827  //    header is included, and so they are handled in
   828  //    <bits/libc-header-start.h>, which does not have a multiple include
   829  //    guard.  Feature test macros that can be handled from the first
   830  //    system header included are handled here.
   831  
   832  // Undefine everything, so we get a clean slate.
   833  
   834  // Suppress kernel-name space pollution unless user expressedly asks
   835  //    for it.
   836  
   837  // Convenience macro to test the version of gcc.
   838  //    Use like this:
   839  //    #if __GNUC_PREREQ (2,8)
   840  //    ... code requiring gcc 2.8 or later ...
   841  //    #endif
   842  //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
   843  //    added in 2.0.
   844  
   845  // Similarly for clang.  Features added to GCC after version 4.2 may
   846  //    or may not also be available in clang, and clang's definitions of
   847  //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
   848  //    features can be queried via __has_extension/__has_feature.
   849  
   850  // Whether to use feature set F.
   851  
   852  // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
   853  //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
   854  //    issue a warning; the expectation is that the source is being
   855  //    transitioned to use the new macro.
   856  
   857  // If _GNU_SOURCE was defined by the user, turn on all the other features.
   858  
   859  // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
   860  //    define _DEFAULT_SOURCE.
   861  
   862  // This is to enable the ISO C2X extension.
   863  
   864  // This is to enable the ISO C11 extension.
   865  
   866  // This is to enable the ISO C99 extension.
   867  
   868  // This is to enable the ISO C90 Amendment 1:1995 extension.
   869  
   870  // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
   871  //    is defined, use POSIX.1-2008 (or another version depending on
   872  //    _XOPEN_SOURCE).
   873  
   874  // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
   875  //    defined in all multithreaded code.  GNU libc has not required this
   876  //    for many years.  We now treat them as compatibility synonyms for
   877  //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
   878  //    comprehensive support for multithreaded code.  Using them never
   879  //    lowers the selected level of POSIX conformance, only raises it.
   880  
   881  // The function 'gets' existed in C89, but is impossible to use
   882  //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
   883  //    compatibility with various implementations of <cstdio>, this test
   884  //    must consider only the value of __cplusplus when compiling C++.
   885  
   886  // GNU formerly extended the scanf functions with modified format
   887  //    specifiers %as, %aS, and %a[...] that allocate a buffer for the
   888  //    input using malloc.  This extension conflicts with ISO C99, which
   889  //    defines %a as a standalone format specifier that reads a floating-
   890  //    point number; moreover, POSIX.1-2008 provides the same feature
   891  //    using the modifier letter 'm' instead (%ms, %mS, %m[...]).
   892  //
   893  //    We now follow C99 unless GNU extensions are active and the compiler
   894  //    is specifically in C89 or C++98 mode (strict or not).  For
   895  //    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
   896  //    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
   897  //    old extension.
   898  
   899  // Get definitions of __STDC_* predefined macros, if the compiler has
   900  //    not preincluded this header automatically.
   901  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   902  //    This file is part of the GNU C Library.
   903  //
   904  //    The GNU C Library is free software; you can redistribute it and/or
   905  //    modify it under the terms of the GNU Lesser General Public
   906  //    License as published by the Free Software Foundation; either
   907  //    version 2.1 of the License, or (at your option) any later version.
   908  //
   909  //    The GNU C Library is distributed in the hope that it will be useful,
   910  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   911  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   912  //    Lesser General Public License for more details.
   913  //
   914  //    You should have received a copy of the GNU Lesser General Public
   915  //    License along with the GNU C Library; if not, see
   916  //    <https://www.gnu.org/licenses/>.
   917  
   918  // This macro indicates that the installed library is the GNU C Library.
   919  //    For historic reasons the value now is 6 and this will stay from now
   920  //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
   921  //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
   922  //    GNU C library version and use the values in <gnu/lib-names.h> to get
   923  //    the sonames of the shared libraries.
   924  
   925  // Major and minor version number of the GNU C library package.  Use
   926  //    these macros to test for features in specific releases.
   927  
   928  // This is here only because every header file already includes this one.
   929  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
   930  //    This file is part of the GNU C Library.
   931  //
   932  //    The GNU C Library is free software; you can redistribute it and/or
   933  //    modify it under the terms of the GNU Lesser General Public
   934  //    License as published by the Free Software Foundation; either
   935  //    version 2.1 of the License, or (at your option) any later version.
   936  //
   937  //    The GNU C Library is distributed in the hope that it will be useful,
   938  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   939  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   940  //    Lesser General Public License for more details.
   941  //
   942  //    You should have received a copy of the GNU Lesser General Public
   943  //    License along with the GNU C Library; if not, see
   944  //    <https://www.gnu.org/licenses/>.
   945  
   946  // We are almost always included from features.h.
   947  
   948  // The GNU libc does not support any K&R compilers or the traditional mode
   949  //    of ISO C compilers anymore.  Check for some of the combinations not
   950  //    anymore supported.
   951  
   952  // Some user header file might have defined this before.
   953  
   954  // All functions, except those with callbacks or those that
   955  //    synchronize memory, are leaf functions.
   956  
   957  // GCC can always grok prototypes.  For C++ programs we add throw()
   958  //    to help it optimize the function calls.  But this works only with
   959  //    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
   960  //    as non-throwing using a function attribute since programs can use
   961  //    the -fexceptions options for C code as well.
   962  
   963  // Compilers that are not clang may object to
   964  //        #if defined __clang__ && __has_extension(...)
   965  //    even though they do not need to evaluate the right-hand side of the &&.
   966  
   967  // These two macros are not used in glibc anymore.  They are kept here
   968  //    only because some other projects expect the macros to be defined.
   969  
   970  // For these things, GCC behaves the ANSI way normally,
   971  //    and the non-ANSI way under -traditional.
   972  
   973  // This is not a typedef so `const __ptr_t' does the right thing.
   974  
   975  // C++ needs to know that types and declarations are C, not C++.
   976  
   977  // Fortify support.
   978  
   979  // Support for flexible arrays.
   980  //    Headers that should use flexible arrays only if they're "real"
   981  //    (e.g. only if they won't affect sizeof()) should test
   982  //    #if __glibc_c99_flexarr_available.
   983  
   984  // __asm__ ("xyz") is used throughout the headers to rename functions
   985  //    at the assembly language level.  This is wrapped by the __REDIRECT
   986  //    macro, in order to support compilers that can do this some other
   987  //    way.  When compilers don't support asm-names at all, we have to do
   988  //    preprocessor tricks instead (which don't have exactly the right
   989  //    semantics, but it's the best we can do).
   990  //
   991  //    Example:
   992  //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
   993  
   994  //
   995  // #elif __SOME_OTHER_COMPILER__
   996  //
   997  // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
   998  
   999  // GCC has various useful declarations that can be made with the
  1000  //    `__attribute__' syntax.  All of the ways we use this do fine if
  1001  //    they are omitted for compilers that don't understand it.
  1002  
  1003  // At some point during the gcc 2.96 development the `malloc' attribute
  1004  //    for functions was introduced.  We don't want to use it unconditionally
  1005  //    (although this would be possible) since it generates warnings.
  1006  
  1007  // Tell the compiler which arguments to an allocation function
  1008  //    indicate the size of the allocation.
  1009  
  1010  // At some point during the gcc 2.96 development the `pure' attribute
  1011  //    for functions was introduced.  We don't want to use it unconditionally
  1012  //    (although this would be possible) since it generates warnings.
  1013  
  1014  // This declaration tells the compiler that the value is constant.
  1015  
  1016  // At some point during the gcc 3.1 development the `used' attribute
  1017  //    for functions was introduced.  We don't want to use it unconditionally
  1018  //    (although this would be possible) since it generates warnings.
  1019  
  1020  // Since version 3.2, gcc allows marking deprecated functions.
  1021  
  1022  // Since version 4.5, gcc also allows one to specify the message printed
  1023  //    when a deprecated function is used.  clang claims to be gcc 4.2, but
  1024  //    may also support this feature.
  1025  
  1026  // At some point during the gcc 2.8 development the `format_arg' attribute
  1027  //    for functions was introduced.  We don't want to use it unconditionally
  1028  //    (although this would be possible) since it generates warnings.
  1029  //    If several `format_arg' attributes are given for the same function, in
  1030  //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
  1031  //    all designated arguments are considered.
  1032  
  1033  // At some point during the gcc 2.97 development the `strfmon' format
  1034  //    attribute for functions was introduced.  We don't want to use it
  1035  //    unconditionally (although this would be possible) since it
  1036  //    generates warnings.
  1037  
  1038  // The nonull function attribute allows to mark pointer parameters which
  1039  //    must not be NULL.
  1040  
  1041  // If fortification mode, we warn about unused results of certain
  1042  //    function calls which can lead to problems.
  1043  
  1044  // Forces a function to be always inlined.
  1045  // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  1046  //    it conflicts with this definition.  Therefore undefine it first to
  1047  //    allow either header to be included first.
  1048  
  1049  // Associate error messages with the source location of the call site rather
  1050  //    than with the source location inside the function.
  1051  
  1052  // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  1053  //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
  1054  //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  1055  //    older than 4.3 may define these macros and still not guarantee GNU inlining
  1056  //    semantics.
  1057  //
  1058  //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  1059  //    semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
  1060  //    __GNUC_GNU_INLINE__ macro definitions.
  1061  
  1062  // GCC 4.3 and above allow passing all anonymous arguments of an
  1063  //    __extern_always_inline function to some other vararg function.
  1064  
  1065  // It is possible to compile containing GCC extensions even if GCC is
  1066  //    run in pedantic mode if the uses are carefully marked using the
  1067  //    `__extension__' keyword.  But this is not generally available before
  1068  //    version 2.8.
  1069  
  1070  // __restrict is known in EGCS 1.2 and above.
  1071  
  1072  // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
  1073  //      array_name[restrict]
  1074  //    GCC 3.1 supports this.
  1075  
  1076  // Describes a char array whose address can safely be passed as the first
  1077  //    argument to strncpy and strncat, as the char array is not necessarily
  1078  //    a NUL-terminated string.
  1079  
  1080  // Undefine (also defined in libc-symbols.h).
  1081  // Copies attributes from the declaration or type referenced by
  1082  //    the argument.
  1083  
  1084  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  1085  //    This file is part of the GNU C Library.
  1086  //
  1087  //    The GNU C Library is free software; you can redistribute it and/or
  1088  //    modify it under the terms of the GNU Lesser General Public
  1089  //    License as published by the Free Software Foundation; either
  1090  //    version 2.1 of the License, or (at your option) any later version.
  1091  //
  1092  //    The GNU C Library is distributed in the hope that it will be useful,
  1093  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1094  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1095  //    Lesser General Public License for more details.
  1096  //
  1097  //    You should have received a copy of the GNU Lesser General Public
  1098  //    License along with the GNU C Library; if not, see
  1099  //    <https://www.gnu.org/licenses/>.
  1100  
  1101  // Properties of long double type.
  1102  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  1103  //    This file is part of the GNU C Library.
  1104  //
  1105  //    The GNU C Library is free software; you can redistribute it and/or
  1106  //    modify it under the terms of the GNU Lesser General Public
  1107  //    License  published by the Free Software Foundation; either
  1108  //    version 2.1 of the License, or (at your option) any later version.
  1109  //
  1110  //    The GNU C Library is distributed in the hope that it will be useful,
  1111  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1112  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1113  //    Lesser General Public License for more details.
  1114  //
  1115  //    You should have received a copy of the GNU Lesser General Public
  1116  //    License along with the GNU C Library; if not, see
  1117  //    <https://www.gnu.org/licenses/>.
  1118  
  1119  // This header is included by <sys/cdefs.h>.
  1120  //
  1121  //    If long double is ABI-compatible with double, it should define
  1122  //    __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
  1123  //    __NO_LONG_DOUBLE_MATH undefined.
  1124  //
  1125  //    If this build of the GNU C Library supports both long double
  1126  //    ABI-compatible with double and some other long double format not
  1127  //    ABI-compatible with double, it should define
  1128  //    __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
  1129  //    __LONG_DOUBLE_MATH_OPTIONAL undefined.
  1130  //
  1131  //    If __NO_LONG_DOUBLE_MATH is already defined, this header must not
  1132  //    define anything; this is needed to work with the definition of
  1133  //    __NO_LONG_DOUBLE_MATH in nldbl-compat.h.
  1134  
  1135  // In the default version of this header, long double is
  1136  //    ABI-compatible with double.
  1137  
  1138  // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
  1139  //    intended for use in preprocessor macros.
  1140  //
  1141  //    Note: MESSAGE must be a _single_ string; concatenation of string
  1142  //    literals is not supported.
  1143  
  1144  // Generic selection (ISO C11) is a C-only feature, available in GCC
  1145  //    since version 4.9.  Previous versions do not provide generic
  1146  //    selection, even though they might set __STDC_VERSION__ to 201112L,
  1147  //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
  1148  //    when testing __STDC_VERSION__ for generic selection support.
  1149  //    On the other hand, Clang also defines __GNUC__, so a clang-specific
  1150  //    check is required to enable the use of generic selection.
  1151  
  1152  // If we don't have __REDIRECT, prototypes will be missing if
  1153  //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  1154  
  1155  // Decide whether we can define 'extern inline' functions in headers.
  1156  
  1157  // This is here only because every header file already includes this one.
  1158  //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  1159  //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  1160  //    that will always return failure (and set errno to ENOSYS).
  1161  // This file is automatically generated.
  1162  //    This file selects the right generated file of `__stub_FUNCTION' macros
  1163  //    based on the architecture being compiled for.
  1164  
  1165  // This file is automatically generated.
  1166  //    It defines a symbol `__stub_FUNCTION' for each function
  1167  //    in the C library which is a stub, meaning it will fail
  1168  //    every time called, usually setting errno to ENOSYS.
  1169  
  1170  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
  1171  //    macro.
  1172  
  1173  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
  1174  //    macro.  Most but not all symbols enabled by that macro in TS
  1175  //    18661-1 are enabled unconditionally in C2X; the symbols in Annex F
  1176  //    still require that macro in C2X.
  1177  
  1178  // ISO/IEC TS 18661-4:2015 defines the
  1179  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.  Other than the reduction
  1180  //    functions, the symbols from this TS are enabled unconditionally in
  1181  //    C2X.
  1182  
  1183  // ISO/IEC TS 18661-3:2015 defines the
  1184  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
  1185  
  1186  // Maximum length of any multibyte character in any locale.
  1187  //    We define this value here since the gcc header does not define
  1188  //    the correct value.
  1189  
  1190  // If we are not using GNU CC we have to define all the symbols ourself.
  1191  //    Otherwise use gcc's definitions (see below).
  1192  
  1193  // Get the compiler's limits.h, which defines almost all the ISO constants.
  1194  //
  1195  //     We put this #include_next outside the double inclusion check because
  1196  //     it should be possible to include this file more than once and still get
  1197  //     the definitions from gcc's header.
  1198  
  1199  // The <limits.h> files in some gcc versions don't define LLONG_MIN,
  1200  //    LLONG_MAX, and ULLONG_MAX.  Instead only the values gcc defined for
  1201  //    ages are available.
  1202  
  1203  // The integer width macros are not defined by GCC's <limits.h> before
  1204  //    GCC 7, or if _GNU_SOURCE rather than
  1205  //    __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature.
  1206  
  1207  // POSIX adds things to <limits.h>.
  1208  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1209  //    This file is part of the GNU C Library.
  1210  //
  1211  //    The GNU C Library is free software; you can redistribute it and/or
  1212  //    modify it under the terms of the GNU Lesser General Public
  1213  //    License as published by the Free Software Foundation; either
  1214  //    version 2.1 of the License, or (at your option) any later version.
  1215  //
  1216  //    The GNU C Library is distributed in the hope that it will be useful,
  1217  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1218  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1219  //    Lesser General Public License for more details.
  1220  //
  1221  //    You should have received a copy of the GNU Lesser General Public
  1222  //    License along with the GNU C Library; if not, see
  1223  //    <https://www.gnu.org/licenses/>.
  1224  
  1225  //	POSIX Standard: 2.9.2 Minimum Values	Added to <limits.h>
  1226  //
  1227  //	Never include this file directly; use <limits.h> instead.
  1228  
  1229  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  1230  //    This file is part of the GNU C Library.
  1231  //
  1232  //    The GNU C Library is free software; you can redistribute it and/or
  1233  //    modify it under the terms of the GNU Lesser General Public
  1234  //    License as published by the Free Software Foundation; either
  1235  //    version 2.1 of the License, or (at your option) any later version.
  1236  //
  1237  //    The GNU C Library is distributed in the hope that it will be useful,
  1238  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1239  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1240  //    Lesser General Public License for more details.
  1241  //
  1242  //    You should have received a copy of the GNU Lesser General Public
  1243  //    License along with the GNU C Library; if not, see
  1244  //    <https://www.gnu.org/licenses/>.
  1245  
  1246  // These are the standard-mandated minimum values.
  1247  
  1248  // Minimum number of operations in one list I/O call.
  1249  
  1250  // Minimal number of outstanding asynchronous I/O operations.
  1251  
  1252  // Maximum length of arguments to `execve', including environment.
  1253  
  1254  // Maximum simultaneous processes per real user ID.
  1255  
  1256  // Minimal number of timer expiration overruns.
  1257  
  1258  // Maximum length of a host name (not including the terminating null)
  1259  //    as returned from the GETHOSTNAME function.
  1260  
  1261  // Maximum link count of a file.
  1262  
  1263  // Maximum length of login name.
  1264  
  1265  // Number of bytes in a terminal canonical input queue.
  1266  
  1267  // Number of bytes for which space will be
  1268  //    available in a terminal input queue.
  1269  
  1270  // Maximum number of message queues open for a process.
  1271  
  1272  // Maximum number of supported message priorities.
  1273  
  1274  // Number of bytes in a filename.
  1275  
  1276  // Number of simultaneous supplementary group IDs per process.
  1277  
  1278  // Number of files one process can have open at once.
  1279  
  1280  // Number of bytes in a pathname.
  1281  
  1282  // Number of bytes than can be written atomically to a pipe.
  1283  
  1284  // The number of repeated occurrences of a BRE permitted by the
  1285  //    REGEXEC and REGCOMP functions when using the interval notation.
  1286  
  1287  // Minimal number of realtime signals reserved for the application.
  1288  
  1289  // Number of semaphores a process can have.
  1290  
  1291  // Maximal value of a semaphore.
  1292  
  1293  // Number of pending realtime signals.
  1294  
  1295  // Largest value of a `ssize_t'.
  1296  
  1297  // Number of streams a process can have open at once.
  1298  
  1299  // The number of bytes in a symbolic link.
  1300  
  1301  // The number of symbolic links that can be traversed in the
  1302  //    resolution of a pathname in the absence of a loop.
  1303  
  1304  // Number of timer for a process.
  1305  
  1306  // Maximum number of characters in a tty name.
  1307  
  1308  // Maximum length of a timezone name (element of `tzname').
  1309  
  1310  // Maximum clock resolution in nanoseconds.
  1311  
  1312  // Get the implementation-specific values for the above.
  1313  // Minimum guaranteed maximum values for system limits.  Linux version.
  1314  //    Copyright (C) 1993-2020 Free Software Foundation, Inc.
  1315  //    This file is part of the GNU C Library.
  1316  //
  1317  //    The GNU C Library is free software; you can redistribute it and/or
  1318  //    modify it under the terms of the GNU Lesser General Public License as
  1319  //    published by the Free Software Foundation; either version 2.1 of the
  1320  //    License, or (at your option) any later version.
  1321  //
  1322  //    The GNU C Library is distributed in the hope that it will be useful,
  1323  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1324  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1325  //    Lesser General Public License for more details.
  1326  //
  1327  //    You should have received a copy of the GNU Lesser General Public
  1328  //    License along with the GNU C Library; see the file COPYING.LIB.  If
  1329  //    not, see <https://www.gnu.org/licenses/>.
  1330  
  1331  // The kernel header pollutes the namespace with the NR_OPEN symbol
  1332  //    and defines LINK_MAX although filesystems have different maxima.  A
  1333  //    similar thing is true for OPEN_MAX: the limit can be changed at
  1334  //    runtime and therefore the macro must not be defined.  Remove this
  1335  //    after including the header if necessary.
  1336  
  1337  // The kernel sources contain a file with all the needed information.
  1338  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  1339  
  1340  // Have to remove NR_OPEN?
  1341  // Have to remove LINK_MAX?
  1342  // Have to remove OPEN_MAX?
  1343  // Have to remove ARG_MAX?
  1344  
  1345  // The number of data keys per process.
  1346  // This is the value this implementation supports.
  1347  
  1348  // Controlling the iterations of destructors for thread-specific data.
  1349  // Number of iterations this implementation does.
  1350  
  1351  // The number of threads per process.
  1352  // We have no predefined limit on the number of threads.
  1353  
  1354  // Maximum amount by which a process can descrease its asynchronous I/O
  1355  //    priority level.
  1356  
  1357  // Minimum size for a thread.  We are free to choose a reasonable value.
  1358  
  1359  // Maximum number of timer expiration overruns.
  1360  
  1361  // Maximum tty name length.
  1362  
  1363  // Maximum login name length.  This is arbitrary.
  1364  
  1365  // Maximum host name length.
  1366  
  1367  // Maximum message queue priority level.
  1368  
  1369  // Maximum value the semaphore can have.
  1370  
  1371  // ssize_t is not formally required to be the signed type
  1372  //    corresponding to size_t, but it is for all configurations supported
  1373  //    by glibc.
  1374  
  1375  // This value is a guaranteed minimum maximum.
  1376  //    The current maximum can be got from `sysconf'.
  1377  
  1378  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1379  //    This file is part of the GNU C Library.
  1380  //
  1381  //    The GNU C Library is free software; you can redistribute it and/or
  1382  //    modify it under the terms of the GNU Lesser General Public
  1383  //    License as published by the Free Software Foundation; either
  1384  //    version 2.1 of the License, or (at your option) any later version.
  1385  //
  1386  //    The GNU C Library is distributed in the hope that it will be useful,
  1387  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1388  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1389  //    Lesser General Public License for more details.
  1390  //
  1391  //    You should have received a copy of the GNU Lesser General Public
  1392  //    License along with the GNU C Library; if not, see
  1393  //    <https://www.gnu.org/licenses/>.
  1394  
  1395  // Never include this file directly; include <limits.h> instead.
  1396  
  1397  // The maximum `ibase' and `obase' values allowed by the `bc' utility.
  1398  
  1399  // The maximum number of elements allowed in an array by the `bc' utility.
  1400  
  1401  // The maximum `scale' value allowed by the `bc' utility.
  1402  
  1403  // The maximum length of a string constant accepted by the `bc' utility.
  1404  
  1405  // The maximum number of weights that can be assigned to an entry of
  1406  //    the LC_COLLATE `order' keyword in the locale definition file.
  1407  
  1408  // The maximum number of expressions that can be nested
  1409  //    within parentheses by the `expr' utility.
  1410  
  1411  // The maximum length, in bytes, of an input line.
  1412  
  1413  // The maximum number of repeated occurrences of a regular expression
  1414  //    permitted when using the interval notation `\{M,N\}'.
  1415  
  1416  // The maximum number of bytes in a character class name.  We have no
  1417  //    fixed limit, 2048 is a high number.
  1418  
  1419  // These values are implementation-specific,
  1420  //    and may vary within the implementation.
  1421  //    Their precise values can be obtained from sysconf.
  1422  
  1423  // This value is defined like this in regex.h.
  1424  
  1425  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1426  //
  1427  // This file is part of GCC.
  1428  //
  1429  // GCC is free software; you can redistribute it and/or modify it under
  1430  // the terms of the GNU General Public License as published by the Free
  1431  // Software Foundation; either version 3, or (at your option) any later
  1432  // version.
  1433  //
  1434  // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  1435  // WARRANTY; without even the implied warranty of MERCHANTABILITY or
  1436  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  1437  // for more details.
  1438  //
  1439  // Under Section 7 of GPL version 3, you are granted additional
  1440  // permissions described in the GCC Runtime Library Exception, version
  1441  // 3.1, as published by the Free Software Foundation.
  1442  //
  1443  // You should have received a copy of the GNU General Public License and
  1444  // a copy of the GCC Runtime Library Exception along with this program;
  1445  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1446  // <http://www.gnu.org/licenses/>.
  1447  
  1448  // Number of bits in a `char'.
  1449  
  1450  // Maximum length of a multibyte character.
  1451  
  1452  // Minimum and maximum values a `signed char' can hold.
  1453  
  1454  // Maximum value an `unsigned char' can hold.  (Minimum is 0).
  1455  
  1456  // Minimum and maximum values a `char' can hold.
  1457  
  1458  // Minimum and maximum values a `signed short int' can hold.
  1459  
  1460  // Maximum value an `unsigned short int' can hold.  (Minimum is 0).
  1461  
  1462  // Minimum and maximum values a `signed int' can hold.
  1463  
  1464  // Maximum value an `unsigned int' can hold.  (Minimum is 0).
  1465  
  1466  // Minimum and maximum values a `signed long int' can hold.
  1467  //    (Same as `int').
  1468  
  1469  // Maximum value an `unsigned long int' can hold.  (Minimum is 0).
  1470  
  1471  // Minimum and maximum values a `signed long long int' can hold.
  1472  
  1473  // Maximum value an `unsigned long long int' can hold.  (Minimum is 0).
  1474  
  1475  // This administrivia gets added to the end of limits.h
  1476  //    if the system has its own version of limits.h.
  1477  
  1478  type z_crc_t = uint32 /* zconf.h:429:17 */
  1479  
  1480  type u_char = uint8                    /* types.h:33:18 */
  1481  type u_short = uint16                  /* types.h:34:19 */
  1482  type u_int = uint32                    /* types.h:35:17 */
  1483  type u_long = uint32                   /* types.h:36:18 */
  1484  type quad_t = int64                    /* types.h:37:18 */
  1485  type u_quad_t = uint64                 /* types.h:38:20 */
  1486  type fsid_t = struct{ __val [2]int32 } /* types.h:39:18 */
  1487  type loff_t = int64                    /* types.h:42:18 */
  1488  
  1489  type ino_t = uint64   /* types.h:49:19 */
  1490  type ino64_t = uint64 /* types.h:54:19 */
  1491  
  1492  type dev_t = uint64 /* types.h:59:17 */
  1493  
  1494  type gid_t = uint32 /* types.h:64:17 */
  1495  
  1496  type mode_t = uint32 /* types.h:69:18 */
  1497  
  1498  type nlink_t = uint32 /* types.h:74:19 */
  1499  
  1500  type uid_t = uint32 /* types.h:79:17 */
  1501  
  1502  type off_t = int64   /* types.h:87:19 */
  1503  type off64_t = int64 /* types.h:92:19 */
  1504  
  1505  type pid_t = int32 /* types.h:97:17 */
  1506  
  1507  type id_t = uint32 /* types.h:103:16 */
  1508  
  1509  type ssize_t = int32 /* types.h:108:19 */
  1510  
  1511  type daddr_t = int32   /* types.h:114:19 */
  1512  type caddr_t = uintptr /* types.h:115:19 */
  1513  
  1514  type key_t = int32 /* types.h:121:17 */
  1515  
  1516  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1517  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1518  //    This file is part of the GNU C Library.
  1519  //
  1520  //    The GNU C Library is free software; you can redistribute it and/or
  1521  //    modify it under the terms of the GNU Lesser General Public
  1522  //    License as published by the Free Software Foundation; either
  1523  //    version 2.1 of the License, or (at your option) any later version.
  1524  //
  1525  //    The GNU C Library is distributed in the hope that it will be useful,
  1526  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1527  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1528  //    Lesser General Public License for more details.
  1529  //
  1530  //    You should have received a copy of the GNU Lesser General Public
  1531  //    License along with the GNU C Library; if not, see
  1532  //    <https://www.gnu.org/licenses/>.
  1533  
  1534  // Never include this file directly; use <sys/types.h> instead.
  1535  
  1536  // Returned by `clock'.
  1537  type clock_t = int32 /* clock_t.h:7:19 */
  1538  
  1539  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1540  //    Copyright (C) 2002-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  // Never include this file directly; use <sys/types.h> instead.
  1558  
  1559  // Clock ID used in clock and timer functions.
  1560  type clockid_t = int32 /* clockid_t.h:7:21 */
  1561  
  1562  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1563  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1564  //    This file is part of the GNU C Library.
  1565  //
  1566  //    The GNU C Library is free software; you can redistribute it and/or
  1567  //    modify it under the terms of the GNU Lesser General Public
  1568  //    License as published by the Free Software Foundation; either
  1569  //    version 2.1 of the License, or (at your option) any later version.
  1570  //
  1571  //    The GNU C Library is distributed in the hope that it will be useful,
  1572  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1573  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1574  //    Lesser General Public License for more details.
  1575  //
  1576  //    You should have received a copy of the GNU Lesser General Public
  1577  //    License along with the GNU C Library; if not, see
  1578  //    <https://www.gnu.org/licenses/>.
  1579  
  1580  // Never include this file directly; use <sys/types.h> instead.
  1581  
  1582  // Returned by `time'.
  1583  type time_t = int32 /* time_t.h:7:18 */
  1584  
  1585  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1586  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1587  //    This file is part of the GNU C Library.
  1588  //
  1589  //    The GNU C Library is free software; you can redistribute it and/or
  1590  //    modify it under the terms of the GNU Lesser General Public
  1591  //    License as published by the Free Software Foundation; either
  1592  //    version 2.1 of the License, or (at your option) any later version.
  1593  //
  1594  //    The GNU C Library is distributed in the hope that it will be useful,
  1595  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1596  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1597  //    Lesser General Public License for more details.
  1598  //
  1599  //    You should have received a copy of the GNU Lesser General Public
  1600  //    License along with the GNU C Library; if not, see
  1601  //    <https://www.gnu.org/licenses/>.
  1602  
  1603  // Never include this file directly; use <sys/types.h> instead.
  1604  
  1605  // Timer ID returned by `timer_create'.
  1606  type timer_t = uintptr /* timer_t.h:7:19 */
  1607  
  1608  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  1609  //
  1610  // This file is part of GCC.
  1611  //
  1612  // GCC is free software; you can redistribute it and/or modify
  1613  // it under the terms of the GNU General Public License as published by
  1614  // the Free Software Foundation; either version 3, or (at your option)
  1615  // any later version.
  1616  //
  1617  // GCC is distributed in the hope that it will be useful,
  1618  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1619  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1620  // GNU General Public License for more details.
  1621  //
  1622  // Under Section 7 of GPL version 3, you are granted additional
  1623  // permissions described in the GCC Runtime Library Exception, version
  1624  // 3.1, as published by the Free Software Foundation.
  1625  //
  1626  // You should have received a copy of the GNU General Public License and
  1627  // a copy of the GCC Runtime Library Exception along with this program;
  1628  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1629  // <http://www.gnu.org/licenses/>.
  1630  
  1631  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  1632  
  1633  // Any one of these symbols __need_* means that GNU libc
  1634  //    wants us just to define one data type.  So don't define
  1635  //    the symbols that indicate this file's entire job has been done.
  1636  
  1637  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1638  //    There's no way to win with the other order!  Sun lossage.
  1639  
  1640  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1641  //    Just ignore it.
  1642  
  1643  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1644  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  1645  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1646  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  1647  //    If we find that the macros are still defined at this point, we must
  1648  //    invoke them so that the type is defined as expected.
  1649  
  1650  // In case nobody has defined these types, but we aren't running under
  1651  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1652  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  1653  //    parts of GCC is compiled by an older compiler, that actually
  1654  //    include gstddef.h, such as collect2.
  1655  
  1656  // Signed type of difference of two pointers.
  1657  
  1658  // Define this type if we are doing the whole job,
  1659  //    or if we want this type in particular.
  1660  
  1661  // If this symbol has done its job, get rid of it.
  1662  
  1663  // Unsigned type of `sizeof' something.
  1664  
  1665  // Define this type if we are doing the whole job,
  1666  //    or if we want this type in particular.
  1667  
  1668  // Wide character type.
  1669  //    Locale-writers should change this as necessary to
  1670  //    be big enough to hold unique values not between 0 and 127,
  1671  //    and not (wchar_t) -1, for each defined multibyte character.
  1672  
  1673  // Define this type if we are doing the whole job,
  1674  //    or if we want this type in particular.
  1675  
  1676  // A null pointer constant.
  1677  
  1678  // Offset of member MEMBER in a struct of type TYPE.
  1679  
  1680  // Old compatibility names for C types.
  1681  type ulong = uint32  /* types.h:148:27 */
  1682  type ushort = uint16 /* types.h:149:28 */
  1683  type uint = uint32   /* types.h:150:22 */
  1684  
  1685  // These size-specific names are used by some of the inet code.
  1686  
  1687  // Define intN_t types.
  1688  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1689  //    This file is part of the GNU C Library.
  1690  //
  1691  //    The GNU C Library is free software; you can redistribute it and/or
  1692  //    modify it under the terms of the GNU Lesser General Public
  1693  //    License as published by the Free Software Foundation; either
  1694  //    version 2.1 of the License, or (at your option) any later version.
  1695  //
  1696  //    The GNU C Library is distributed in the hope that it will be useful,
  1697  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1698  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1699  //    Lesser General Public License for more details.
  1700  //
  1701  //    You should have received a copy of the GNU Lesser General Public
  1702  //    License along with the GNU C Library; if not, see
  1703  //    <https://www.gnu.org/licenses/>.
  1704  
  1705  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1706  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1707  //    This file is part of the GNU C Library.
  1708  //
  1709  //    The GNU C Library is free software; you can redistribute it and/or
  1710  //    modify it under the terms of the GNU Lesser General Public
  1711  //    License as published by the Free Software Foundation; either
  1712  //    version 2.1 of the License, or (at your option) any later version.
  1713  //
  1714  //    The GNU C Library is distributed in the hope that it will be useful,
  1715  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1716  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1717  //    Lesser General Public License for more details.
  1718  //
  1719  //    You should have received a copy of the GNU Lesser General Public
  1720  //    License along with the GNU C Library; if not, see
  1721  //    <https://www.gnu.org/licenses/>.
  1722  
  1723  // Never include this file directly; use <sys/types.h> instead.
  1724  
  1725  type int8_t = int8   /* stdint-intn.h:24:18 */
  1726  type int16_t = int16 /* stdint-intn.h:25:19 */
  1727  type int32_t = int32 /* stdint-intn.h:26:19 */
  1728  type int64_t = int64 /* stdint-intn.h:27:19 */
  1729  
  1730  // These were defined by ISO C without the first `_'.
  1731  type u_int8_t = uint8   /* types.h:158:19 */
  1732  type u_int16_t = uint16 /* types.h:159:20 */
  1733  type u_int32_t = uint32 /* types.h:160:20 */
  1734  type u_int64_t = uint64 /* types.h:161:20 */
  1735  
  1736  type register_t = int32 /* types.h:164:13 */
  1737  
  1738  // A set of signals to be blocked, unblocked, or waited for.
  1739  type sigset_t = struct{ __val [32]uint32 } /* sigset_t.h:7:20 */
  1740  
  1741  // Get definition of timer specification structures.
  1742  
  1743  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1744  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1745  //    This file is part of the GNU C Library.
  1746  //
  1747  //    The GNU C Library is free software; you can redistribute it and/or
  1748  //    modify it under the terms of the GNU Lesser General Public
  1749  //    License as published by the Free Software Foundation; either
  1750  //    version 2.1 of the License, or (at your option) any later version.
  1751  //
  1752  //    The GNU C Library is distributed in the hope that it will be useful,
  1753  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1754  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1755  //    Lesser General Public License for more details.
  1756  //
  1757  //    You should have received a copy of the GNU Lesser General Public
  1758  //    License along with the GNU C Library; if not, see
  1759  //    <https://www.gnu.org/licenses/>.
  1760  
  1761  // Never include this file directly; use <sys/types.h> instead.
  1762  
  1763  // A time value that is accurate to the nearest
  1764  //    microsecond but also has a range of years.
  1765  type timeval = struct {
  1766  	tv_sec  int32
  1767  	tv_usec int32
  1768  } /* struct_timeval.h:8:1 */
  1769  
  1770  // NB: Include guard matches what <linux/time.h> uses.
  1771  
  1772  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1773  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1774  //    This file is part of the GNU C Library.
  1775  //
  1776  //    The GNU C Library is free software; you can redistribute it and/or
  1777  //    modify it under the terms of the GNU Lesser General Public
  1778  //    License as published by the Free Software Foundation; either
  1779  //    version 2.1 of the License, or (at your option) any later version.
  1780  //
  1781  //    The GNU C Library is distributed in the hope that it will be useful,
  1782  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1783  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1784  //    Lesser General Public License for more details.
  1785  //
  1786  //    You should have received a copy of the GNU Lesser General Public
  1787  //    License along with the GNU C Library; if not, see
  1788  //    <https://www.gnu.org/licenses/>.
  1789  
  1790  // Never include this file directly; use <sys/types.h> instead.
  1791  
  1792  // Endian macros for string.h functions
  1793  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1794  //    This file is part of the GNU C Library.
  1795  //
  1796  //    The GNU C Library is free software; you can redistribute it and/or
  1797  //    modify it under the terms of the GNU Lesser General Public
  1798  //    License as published by the Free Software Foundation; either
  1799  //    version 2.1 of the License, or (at your option) any later version.
  1800  //
  1801  //    The GNU C Library is distributed in the hope that it will be useful,
  1802  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1803  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1804  //    Lesser General Public License for more details.
  1805  //
  1806  //    You should have received a copy of the GNU Lesser General Public
  1807  //    License along with the GNU C Library; if not, see
  1808  //    <http://www.gnu.org/licenses/>.
  1809  
  1810  // POSIX.1b structure for a time value.  This is like a `struct timeval' but
  1811  //    has nanoseconds instead of microseconds.
  1812  type timespec = struct {
  1813  	tv_sec  int32
  1814  	tv_nsec int32
  1815  } /* struct_timespec.h:10:1 */
  1816  
  1817  type suseconds_t = int32 /* select.h:43:23 */
  1818  
  1819  // Some versions of <linux/posix_types.h> define this macros.
  1820  // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  1821  
  1822  // fd_set for select and pselect.
  1823  type fd_set = struct{ __fds_bits [32]int32 } /* select.h:70:5 */
  1824  
  1825  // Maximum number of file descriptors in `fd_set'.
  1826  
  1827  // Sometimes the fd_set member is assumed to have this type.
  1828  type fd_mask = int32 /* select.h:77:19 */
  1829  
  1830  // Define some inlines helping to catch common problems.
  1831  
  1832  type blksize_t = int32 /* types.h:185:21 */
  1833  
  1834  // Types from the Large File Support interface.
  1835  type blkcnt_t = int64    /* types.h:205:22 */ // Type to count number of disk blocks.
  1836  type fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
  1837  type fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
  1838  
  1839  type blkcnt64_t = int64    /* types.h:219:22 */ // Type to count number of disk blocks.
  1840  type fsblkcnt64_t = uint64 /* types.h:220:24 */ // Type to count file system blocks.
  1841  type fsfilcnt64_t = uint64 /* types.h:221:24 */ // Type to count file system inodes.
  1842  
  1843  // Now add the thread types.
  1844  // Declaration of common pthread types for all architectures.
  1845  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1846  //    This file is part of the GNU C Library.
  1847  //
  1848  //    The GNU C Library is free software; you can redistribute it and/or
  1849  //    modify it under the terms of the GNU Lesser General Public
  1850  //    License as published by the Free Software Foundation; either
  1851  //    version 2.1 of the License, or (at your option) any later version.
  1852  //
  1853  //    The GNU C Library is distributed in the hope that it will be useful,
  1854  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1855  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1856  //    Lesser General Public License for more details.
  1857  //
  1858  //    You should have received a copy of the GNU Lesser General Public
  1859  //    License along with the GNU C Library; if not, see
  1860  //    <https://www.gnu.org/licenses/>.
  1861  
  1862  // For internal mutex and condition variable definitions.
  1863  // Common threading primitives definitions for both POSIX and C11.
  1864  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1865  //    This file is part of the GNU C Library.
  1866  //
  1867  //    The GNU C Library is free software; you can redistribute it and/or
  1868  //    modify it under the terms of the GNU Lesser General Public
  1869  //    License as published by the Free Software Foundation; either
  1870  //    version 2.1 of the License, or (at your option) any later version.
  1871  //
  1872  //    The GNU C Library is distributed in the hope that it will be useful,
  1873  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1874  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1875  //    Lesser General Public License for more details.
  1876  //
  1877  //    You should have received a copy of the GNU Lesser General Public
  1878  //    License along with the GNU C Library; if not, see
  1879  //    <https://www.gnu.org/licenses/>.
  1880  
  1881  // Arch-specific definitions.  Each architecture must define the following
  1882  //    macros to define the expected sizes of pthread data types:
  1883  //
  1884  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  1885  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  1886  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  1887  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  1888  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  1889  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  1890  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  1891  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  1892  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  1893  //
  1894  //    The additional macro defines any constraint for the lock alignment
  1895  //    inside the thread structures:
  1896  //
  1897  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  1898  //
  1899  //    Same idea but for the once locking primitive:
  1900  //
  1901  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  1902  
  1903  // Machine-specific pthread type layouts.  Generic version.
  1904  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1905  //
  1906  //    This file is part of the GNU C Library.
  1907  //
  1908  //    The GNU C Library is free software; you can redistribute it and/or
  1909  //    modify it under the terms of the GNU Lesser General Public
  1910  //    License as published by the Free Software Foundation; either
  1911  //    version 2.1 of the License, or (at your option) any later version.
  1912  //
  1913  //    The GNU C Library is distributed in the hope that it will be useful,
  1914  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1915  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1916  //    Lesser General Public License for more details.
  1917  //
  1918  //    You should have received a copy of the GNU Lesser General Public
  1919  //    License along with the GNU C Library; if not, see
  1920  //    <http://www.gnu.org/licenses/>.
  1921  
  1922  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  1923  //    This file is part of the GNU C Library.
  1924  //
  1925  //    The GNU C Library is free software; you can redistribute it and/or
  1926  //    modify it under the terms of the GNU Lesser General Public
  1927  //    License as published by the Free Software Foundation; either
  1928  //    version 2.1 of the License, or (at your option) any later version.
  1929  //
  1930  //    The GNU C Library is distributed in the hope that it will be useful,
  1931  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1932  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1933  //    Lesser General Public License for more details.
  1934  //
  1935  //    You should have received a copy of the GNU Lesser General Public
  1936  //    License along with the GNU C Library; if not, see
  1937  //    <https://www.gnu.org/licenses/>.
  1938  
  1939  // Common definition of pthread_mutex_t.
  1940  
  1941  type __pthread_internal_list = struct {
  1942  	__prev uintptr
  1943  	__next uintptr
  1944  } /* thread-shared-types.h:49:9 */
  1945  
  1946  type __pthread_internal_slist = struct{ __next uintptr } /* thread-shared-types.h:55:9 */
  1947  
  1948  // Arch-specific mutex definitions.  A generic implementation is provided
  1949  //    by sysdeps/nptl/bits/struct_mutex.h.  If required, an architecture
  1950  //    can override it by defining:
  1951  //
  1952  //    1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  1953  //       definition).  It should contains at least the internal members
  1954  //       defined in the generic version.
  1955  //
  1956  //    2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  1957  //       atomic operations.
  1958  //
  1959  //    3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  1960  //       It should initialize the mutex internal flag.
  1961  
  1962  // Default mutex implementation struct definitions.
  1963  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  1964  //    This file is part of the GNU C Library.
  1965  //
  1966  //    The GNU C Library is free software; you can redistribute it and/or
  1967  //    modify it under the terms of the GNU Lesser General Public
  1968  //    License as published by the Free Software Foundation; either
  1969  //    version 2.1 of the License, or (at your option) any later version.
  1970  //
  1971  //    The GNU C Library is distributed in the hope that it will be useful,
  1972  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1973  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1974  //    Lesser General Public License for more details.
  1975  //
  1976  //    You should have received a copy of the GNU Lesser General Public
  1977  //    License along with the GNU C Library; if not, see
  1978  //    <http://www.gnu.org/licenses/>.
  1979  
  1980  // Generic struct for both POSIX and C11 mutexes.  New ports are expected
  1981  //    to use the default layout, however architecture can redefine it to
  1982  //    add arch-specific extension (such as lock-elision).  The struct have
  1983  //    a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
  1984  
  1985  type __pthread_mutex_s = struct {
  1986  	__lock   int32
  1987  	__count  uint32
  1988  	__owner  int32
  1989  	__kind   int32
  1990  	__nusers uint32
  1991  	__20     struct{ __spins int32 }
  1992  } /* struct_mutex.h:27:1 */
  1993  
  1994  // Arch-sepecific read-write lock definitions.  A generic implementation is
  1995  //    provided by struct_rwlock.h.  If required, an architecture can override it
  1996  //    by defining:
  1997  //
  1998  //    1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  1999  //       It should contain at least the internal members defined in the
  2000  //       generic version.
  2001  //
  2002  //    2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  2003  //       It should initialize the rwlock internal type.
  2004  
  2005  // Default read-write lock implementation struct definitions.
  2006  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2007  //    This file is part of the GNU C Library.
  2008  //
  2009  //    The GNU C Library is free software; you can redistribute it and/or
  2010  //    modify it under the terms of the GNU Lesser General Public
  2011  //    License as published by the Free Software Foundation; either
  2012  //    version 2.1 of the License, or (at your option) any later version.
  2013  //
  2014  //    The GNU C Library is distributed in the hope that it will be useful,
  2015  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2016  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2017  //    Lesser General Public License for more details.
  2018  //
  2019  //    You should have received a copy of the GNU Lesser General Public
  2020  //    License along with the GNU C Library; if not, see
  2021  //    <http://www.gnu.org/licenses/>.
  2022  
  2023  // Endian macros for string.h functions
  2024  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  2025  //    This file is part of the GNU C Library.
  2026  //
  2027  //    The GNU C Library is free software; you can redistribute it and/or
  2028  //    modify it under the terms of the GNU Lesser General Public
  2029  //    License as published by the Free Software Foundation; either
  2030  //    version 2.1 of the License, or (at your option) any later version.
  2031  //
  2032  //    The GNU C Library is distributed in the hope that it will be useful,
  2033  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2034  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2035  //    Lesser General Public License for more details.
  2036  //
  2037  //    You should have received a copy of the GNU Lesser General Public
  2038  //    License along with the GNU C Library; if not, see
  2039  //    <http://www.gnu.org/licenses/>.
  2040  
  2041  // Generic struct for both POSIX read-write lock.  New ports are expected
  2042  //    to use the default layout, however archictetures can redefine it to add
  2043  //    arch-specific extensions (such as lock-elision).  The struct have a size
  2044  //    of 32 bytes on both LP32 and LP64 architectures.
  2045  
  2046  type __pthread_rwlock_arch_t = struct {
  2047  	__readers       uint32
  2048  	__writers       uint32
  2049  	__wrphase_futex uint32
  2050  	__writers_futex uint32
  2051  	__pad3          uint32
  2052  	__pad4          uint32
  2053  	__flags         uint8
  2054  	__shared        uint8
  2055  	__pad1          uint8
  2056  	__pad2          uint8
  2057  	__cur_writer    int32
  2058  } /* struct_rwlock.h:29:1 */
  2059  
  2060  // Common definition of pthread_cond_t.
  2061  
  2062  type __pthread_cond_s = struct {
  2063  	__0            struct{ __wseq uint64 }
  2064  	__8            struct{ __g1_start uint64 }
  2065  	__g_refs       [2]uint32
  2066  	__g_size       [2]uint32
  2067  	__g1_orig_size uint32
  2068  	__wrefs        uint32
  2069  	__g_signals    [2]uint32
  2070  } /* thread-shared-types.h:92:1 */
  2071  
  2072  // Thread identifiers.  The structure of the attribute type is not
  2073  //    exposed on purpose.
  2074  type pthread_t = uint32 /* pthreadtypes.h:27:27 */
  2075  
  2076  // Data structures for mutex handling.  The structure of the attribute
  2077  //    type is not exposed on purpose.
  2078  type pthread_mutexattr_t = struct {
  2079  	_      [0]uint32
  2080  	__size [4]uint8
  2081  } /* pthreadtypes.h:36:3 */
  2082  
  2083  // Data structure for condition variable handling.  The structure of
  2084  //    the attribute type is not exposed on purpose.
  2085  type pthread_condattr_t = struct {
  2086  	_      [0]uint32
  2087  	__size [4]uint8
  2088  } /* pthreadtypes.h:45:3 */
  2089  
  2090  // Keys for thread-specific data
  2091  type pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  2092  
  2093  // Once-only execution
  2094  type pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  2095  
  2096  type pthread_attr_t1 = struct {
  2097  	_      [0]uint32
  2098  	__size [36]uint8
  2099  } /* pthreadtypes.h:56:1 */
  2100  
  2101  type pthread_attr_t = pthread_attr_t1 /* pthreadtypes.h:62:30 */
  2102  
  2103  type pthread_mutex_t = struct{ __data __pthread_mutex_s } /* pthreadtypes.h:72:3 */
  2104  
  2105  type pthread_cond_t = struct{ __data __pthread_cond_s } /* pthreadtypes.h:80:3 */
  2106  
  2107  // Data structure for reader-writer lock variable handling.  The
  2108  //    structure of the attribute type is deliberately not exposed.
  2109  type pthread_rwlock_t = struct{ __data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  2110  
  2111  type pthread_rwlockattr_t = struct {
  2112  	_      [0]uint32
  2113  	__size [8]uint8
  2114  } /* pthreadtypes.h:97:3 */
  2115  
  2116  // POSIX spinlock data type.
  2117  type pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  2118  
  2119  // POSIX barriers data type.  The structure of the type is
  2120  //    deliberately not exposed.
  2121  type pthread_barrier_t = struct {
  2122  	_      [0]uint32
  2123  	__size [20]uint8
  2124  } /* pthreadtypes.h:112:3 */
  2125  
  2126  type pthread_barrierattr_t = struct {
  2127  	_      [0]uint32
  2128  	__size [4]uint8
  2129  } /* pthreadtypes.h:118:3 */
  2130  
  2131  // Define the standard macros for the user,
  2132  //    if this invocation was from the user program.
  2133  
  2134  // Define va_list, if desired, from __gnuc_va_list.
  2135  // We deliberately do not define va_list when called from
  2136  //    stdio.h, because ANSI C says that stdio.h is not supposed to define
  2137  //    va_list.  stdio.h needs to have access to that data type,
  2138  //    but must not use that name.  It should use the name __gnuc_va_list,
  2139  //    which is safe because it is reserved for the implementation.
  2140  
  2141  // The macro _VA_LIST_ is the same thing used by this file in Ultrix.
  2142  //    But on BSD NET2 we must not test or define or undef it.
  2143  //    (Note that the comments in NET 2's ansi.h
  2144  //    are incorrect for _VA_LIST_--see stdio.h!)
  2145  // The macro _VA_LIST_DEFINED is used in Windows NT 3.5
  2146  // The macro _VA_LIST is used in SCO Unix 3.2.
  2147  // The macro _VA_LIST_T_H is used in the Bull dpx2
  2148  // The macro __va_list__ is used by BeOS.
  2149  type va_list = uintptr /* stdarg.h:99:24 */
  2150  
  2151  // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
  2152  // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
  2153  // though the former does not conform to the LFS document), but considering
  2154  // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
  2155  // equivalently requesting no 64-bit operations
  2156  
  2157  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2158  //    This file is part of the GNU C Library.
  2159  //
  2160  //    The GNU C Library is free software; you can redistribute it and/or
  2161  //    modify it under the terms of the GNU Lesser General Public
  2162  //    License as published by the Free Software Foundation; either
  2163  //    version 2.1 of the License, or (at your option) any later version.
  2164  //
  2165  //    The GNU C Library is distributed in the hope that it will be useful,
  2166  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2167  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2168  //    Lesser General Public License for more details.
  2169  //
  2170  //    You should have received a copy of the GNU Lesser General Public
  2171  //    License along with the GNU C Library; if not, see
  2172  //    <https://www.gnu.org/licenses/>.
  2173  
  2174  //	POSIX Standard: 2.10 Symbolic Constants		<unistd.h>
  2175  
  2176  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2177  //    This file is part of the GNU C Library.
  2178  //
  2179  //    The GNU C Library is free software; you can redistribute it and/or
  2180  //    modify it under the terms of the GNU Lesser General Public
  2181  //    License as published by the Free Software Foundation; either
  2182  //    version 2.1 of the License, or (at your option) any later version.
  2183  //
  2184  //    The GNU C Library is distributed in the hope that it will be useful,
  2185  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2186  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2187  //    Lesser General Public License for more details.
  2188  //
  2189  //    You should have received a copy of the GNU Lesser General Public
  2190  //    License along with the GNU C Library; if not, see
  2191  //    <https://www.gnu.org/licenses/>.
  2192  
  2193  // These may be used to determine what facilities are present at compile time.
  2194  //    Their values can be obtained at run time from `sysconf'.
  2195  
  2196  // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008.
  2197  
  2198  // These are not #ifdef __USE_POSIX2 because they are
  2199  //    in the theoretically application-owned namespace.
  2200  
  2201  // The utilities on GNU systems also correspond to this version.
  2202  
  2203  // The utilities on GNU systems also correspond to this version.
  2204  
  2205  // This symbol was required until the 2001 edition of POSIX.
  2206  
  2207  // If defined, the implementation supports the
  2208  //    C Language Bindings Option.
  2209  
  2210  // If defined, the implementation supports the
  2211  //    C Language Development Utilities Option.
  2212  
  2213  // If defined, the implementation supports the
  2214  //    Software Development Utilities Option.
  2215  
  2216  // If defined, the implementation supports the
  2217  //    creation of locales with the localedef utility.
  2218  
  2219  // X/Open version number to which the library conforms.  It is selectable.
  2220  
  2221  // Commands and utilities from XPG4 are available.
  2222  
  2223  // We are compatible with the old published standards as well.
  2224  
  2225  // The X/Open Unix extensions are available.
  2226  
  2227  // The enhanced internationalization capabilities according to XPG4.2
  2228  //    are present.
  2229  
  2230  // The legacy interfaces are also available.
  2231  
  2232  // Get values of POSIX options:
  2233  //
  2234  //    If these symbols are defined, the corresponding features are
  2235  //    always available.  If not, they may be available sometimes.
  2236  //    The current values can be obtained with `sysconf'.
  2237  //
  2238  //    _POSIX_JOB_CONTROL		Job control is supported.
  2239  //    _POSIX_SAVED_IDS		Processes have a saved set-user-ID
  2240  // 				and a saved set-group-ID.
  2241  //    _POSIX_REALTIME_SIGNALS	Real-time, queued signals are supported.
  2242  //    _POSIX_PRIORITY_SCHEDULING	Priority scheduling is supported.
  2243  //    _POSIX_TIMERS		POSIX.4 clocks and timers are supported.
  2244  //    _POSIX_ASYNCHRONOUS_IO	Asynchronous I/O is supported.
  2245  //    _POSIX_PRIORITIZED_IO	Prioritized asynchronous I/O is supported.
  2246  //    _POSIX_SYNCHRONIZED_IO	Synchronizing file data is supported.
  2247  //    _POSIX_FSYNC			The fsync function is present.
  2248  //    _POSIX_MAPPED_FILES		Mapping of files to memory is supported.
  2249  //    _POSIX_MEMLOCK		Locking of all memory is supported.
  2250  //    _POSIX_MEMLOCK_RANGE		Locking of ranges of memory is supported.
  2251  //    _POSIX_MEMORY_PROTECTION	Setting of memory protections is supported.
  2252  //    _POSIX_MESSAGE_PASSING	POSIX.4 message queues are supported.
  2253  //    _POSIX_SEMAPHORES		POSIX.4 counting semaphores are supported.
  2254  //    _POSIX_SHARED_MEMORY_OBJECTS	POSIX.4 shared memory objects are supported.
  2255  //    _POSIX_THREADS		POSIX.1c pthreads are supported.
  2256  //    _POSIX_THREAD_ATTR_STACKADDR	Thread stack address attribute option supported.
  2257  //    _POSIX_THREAD_ATTR_STACKSIZE	Thread stack size attribute option supported.
  2258  //    _POSIX_THREAD_SAFE_FUNCTIONS	Thread-safe functions are supported.
  2259  //    _POSIX_THREAD_PRIORITY_SCHEDULING
  2260  // 				POSIX.1c thread execution scheduling supported.
  2261  //    _POSIX_THREAD_PRIO_INHERIT	Thread priority inheritance option supported.
  2262  //    _POSIX_THREAD_PRIO_PROTECT	Thread priority protection option supported.
  2263  //    _POSIX_THREAD_PROCESS_SHARED	Process-shared synchronization supported.
  2264  //    _POSIX_PII			Protocol-independent interfaces are supported.
  2265  //    _POSIX_PII_XTI		XTI protocol-indep. interfaces are supported.
  2266  //    _POSIX_PII_SOCKET		Socket protocol-indep. interfaces are supported.
  2267  //    _POSIX_PII_INTERNET		Internet family of protocols supported.
  2268  //    _POSIX_PII_INTERNET_STREAM	Connection-mode Internet protocol supported.
  2269  //    _POSIX_PII_INTERNET_DGRAM	Connectionless Internet protocol supported.
  2270  //    _POSIX_PII_OSI		ISO/OSI family of protocols supported.
  2271  //    _POSIX_PII_OSI_COTS		Connection-mode ISO/OSI service supported.
  2272  //    _POSIX_PII_OSI_CLTS		Connectionless ISO/OSI service supported.
  2273  //    _POSIX_POLL			Implementation supports `poll' function.
  2274  //    _POSIX_SELECT		Implementation supports `select' and `pselect'.
  2275  //
  2276  //    _XOPEN_REALTIME		X/Open realtime support is available.
  2277  //    _XOPEN_REALTIME_THREADS	X/Open realtime thread support is available.
  2278  //    _XOPEN_SHM			Shared memory interface according to XPG4.2.
  2279  //
  2280  //    _XBS5_ILP32_OFF32		Implementation provides environment with 32-bit
  2281  // 				int, long, pointer, and off_t types.
  2282  //    _XBS5_ILP32_OFFBIG		Implementation provides environment with 32-bit
  2283  // 				int, long, and pointer and off_t with at least
  2284  // 				64 bits.
  2285  //    _XBS5_LP64_OFF64		Implementation provides environment with 32-bit
  2286  // 				int, and 64-bit long, pointer, and off_t types.
  2287  //    _XBS5_LPBIG_OFFBIG		Implementation provides environment with at
  2288  // 				least 32 bits int and long, pointer, and off_t
  2289  // 				with at least 64 bits.
  2290  //
  2291  //    If any of these symbols is defined as -1, the corresponding option is not
  2292  //    true for any file.  If any is defined as other than -1, the corresponding
  2293  //    option is true for all files.  If a symbol is not defined at all, the value
  2294  //    for a specific file can be obtained from `pathconf' and `fpathconf'.
  2295  //
  2296  //    _POSIX_CHOWN_RESTRICTED	Only the super user can use `chown' to change
  2297  // 				the owner of a file.  `chown' can only be used
  2298  // 				to change the group ID of a file to a group of
  2299  // 				which the calling process is a member.
  2300  //    _POSIX_NO_TRUNC		Pathname components longer than
  2301  // 				NAME_MAX generate an error.
  2302  //    _POSIX_VDISABLE		If defined, if the value of an element of the
  2303  // 				`c_cc' member of `struct termios' is
  2304  // 				_POSIX_VDISABLE, no character will have the
  2305  // 				effect associated with that element.
  2306  //    _POSIX_SYNC_IO		Synchronous I/O may be performed.
  2307  //    _POSIX_ASYNC_IO		Asynchronous I/O may be performed.
  2308  //    _POSIX_PRIO_IO		Prioritized Asynchronous I/O may be performed.
  2309  //
  2310  //    Support for the Large File Support interface is not generally available.
  2311  //    If it is available the following constants are defined to one.
  2312  //    _LFS64_LARGEFILE		Low-level I/O supports large files.
  2313  //    _LFS64_STDIO			Standard I/O supports large files.
  2314  //
  2315  
  2316  // Define POSIX options for Linux.
  2317  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  2318  //    This file is part of the GNU C Library.
  2319  //
  2320  //    The GNU C Library is free software; you can redistribute it and/or
  2321  //    modify it under the terms of the GNU Lesser General Public License as
  2322  //    published by the Free Software Foundation; either version 2.1 of the
  2323  //    License, or (at your option) any later version.
  2324  //
  2325  //    The GNU C Library is distributed in the hope that it will be useful,
  2326  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2327  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2328  //    Lesser General Public License for more details.
  2329  //
  2330  //    You should have received a copy of the GNU Lesser General Public
  2331  //    License along with the GNU C Library; see the file COPYING.LIB.  If
  2332  //    not, see <https://www.gnu.org/licenses/>.
  2333  
  2334  // Job control is supported.
  2335  
  2336  // Processes have a saved set-user-ID and a saved set-group-ID.
  2337  
  2338  // Priority scheduling is not supported with the correct semantics,
  2339  //    but GNU/Linux applications expect that the corresponding interfaces
  2340  //    are available, even though the semantics do not meet the POSIX
  2341  //    requirements.  See glibc bug 14829.
  2342  
  2343  // Synchronizing file data is supported.
  2344  
  2345  // The fsync function is present.
  2346  
  2347  // Mapping of files to memory is supported.
  2348  
  2349  // Locking of all memory is supported.
  2350  
  2351  // Locking of ranges of memory is supported.
  2352  
  2353  // Setting of memory protections is supported.
  2354  
  2355  // Some filesystems allow all users to change file ownership.
  2356  
  2357  // `c_cc' member of 'struct termios' structure can be disabled by
  2358  //    using the value _POSIX_VDISABLE.
  2359  
  2360  // Filenames are not silently truncated.
  2361  
  2362  // X/Open realtime support is available.
  2363  
  2364  // X/Open thread realtime support is available.
  2365  
  2366  // XPG4.2 shared memory is supported.
  2367  
  2368  // Tell we have POSIX threads.
  2369  
  2370  // We have the reentrant functions described in POSIX.
  2371  
  2372  // We provide priority scheduling for threads.
  2373  
  2374  // We support user-defined stack sizes.
  2375  
  2376  // We support user-defined stacks.
  2377  
  2378  // We support priority inheritence.
  2379  
  2380  // We support priority protection, though only for non-robust
  2381  //    mutexes.
  2382  
  2383  // We support priority inheritence for robust mutexes.
  2384  
  2385  // We do not support priority protection for robust mutexes.
  2386  
  2387  // We support POSIX.1b semaphores.
  2388  
  2389  // Real-time signals are supported.
  2390  
  2391  // We support asynchronous I/O.
  2392  // Alternative name for Unix98.
  2393  // Support for prioritization is also available.
  2394  
  2395  // The LFS support in asynchronous I/O is also available.
  2396  
  2397  // The rest of the LFS is also available.
  2398  
  2399  // POSIX shared memory objects are implemented.
  2400  
  2401  // CPU-time clocks support needs to be checked at runtime.
  2402  
  2403  // Clock support in threads must be also checked at runtime.
  2404  
  2405  // GNU libc provides regular expression handling.
  2406  
  2407  // Reader/Writer locks are available.
  2408  
  2409  // We have a POSIX shell.
  2410  
  2411  // We support the Timeouts option.
  2412  
  2413  // We support spinlocks.
  2414  
  2415  // The `spawn' function family is supported.
  2416  
  2417  // We have POSIX timers.
  2418  
  2419  // The barrier functions are available.
  2420  
  2421  // POSIX message queues are available.
  2422  
  2423  // Thread process-shared synchronization is supported.
  2424  
  2425  // The monotonic clock might be available.
  2426  
  2427  // The clock selection interfaces are available.
  2428  
  2429  // Advisory information interfaces are available.
  2430  
  2431  // IPv6 support is available.
  2432  
  2433  // Raw socket support is available.
  2434  
  2435  // We have at least one terminal.
  2436  
  2437  // Neither process nor thread sporadic server interfaces is available.
  2438  
  2439  // trace.h is not available.
  2440  
  2441  // Typed memory objects are not available.
  2442  
  2443  // Get the environment definitions from Unix98.
  2444  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  2445  //    This file is part of the GNU C Library.
  2446  //
  2447  //    The GNU C Library is free software; you can redistribute it and/or
  2448  //    modify it under the terms of the GNU Lesser General Public
  2449  //    License as published by the Free Software Foundation; either
  2450  //    version 2.1 of the License, or (at your option) any later version.
  2451  //
  2452  //    The GNU C Library is distributed in the hope that it will be useful,
  2453  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2454  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2455  //    Lesser General Public License for more details.
  2456  //
  2457  //    You should have received a copy of the GNU Lesser General Public
  2458  //    License along with the GNU C Library; if not, see
  2459  //    <https://www.gnu.org/licenses/>.
  2460  
  2461  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  2462  //    This file is part of the GNU C Library.
  2463  //
  2464  //    The GNU C Library is free software; you can redistribute it and/or
  2465  //    modify it under the terms of the GNU Lesser General Public
  2466  //    License as published by the Free Software Foundation; either
  2467  //    version 2.1 of the License, or (at your option) any later version.
  2468  //
  2469  //    The GNU C Library is distributed in the hope that it will be useful,
  2470  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2471  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2472  //    Lesser General Public License for more details.
  2473  //
  2474  //    You should have received a copy of the GNU Lesser General Public
  2475  //    License along with the GNU C Library; if not, see
  2476  //    <https://www.gnu.org/licenses/>.
  2477  
  2478  // This header should define the following symbols under the described
  2479  //    situations.  A value `1' means that the model is always supported,
  2480  //    `-1' means it is never supported.  Undefined means it cannot be
  2481  //    statically decided.
  2482  //
  2483  //    _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
  2484  //    _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
  2485  //
  2486  //    _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
  2487  //    _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
  2488  //
  2489  //    The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
  2490  //    _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
  2491  //    _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
  2492  //    used in previous versions of the Unix standard and are available
  2493  //    only for compatibility.
  2494  
  2495  // By default we have 32-bit wide `int', `long int', pointers and `off_t'
  2496  //    and all platforms support LFS.
  2497  
  2498  // We optionally provide an environment with the above size but an 64-bit
  2499  //    side `off_t'.  Therefore we don't define _POSIX_V7_ILP32_OFFBIG.
  2500  
  2501  // We can never provide environments with 64-bit wide pointers.
  2502  
  2503  // CFLAGS.
  2504  
  2505  // Standard file descriptors.
  2506  
  2507  // All functions that are not declared anywhere else.
  2508  
  2509  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2510  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2511  //    This file is part of the GNU C Library.
  2512  //
  2513  //    The GNU C Library is free software; you can redistribute it and/or
  2514  //    modify it under the terms of the GNU Lesser General Public
  2515  //    License as published by the Free Software Foundation; either
  2516  //    version 2.1 of the License, or (at your option) any later version.
  2517  //
  2518  //    The GNU C Library is distributed in the hope that it will be useful,
  2519  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2520  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2521  //    Lesser General Public License for more details.
  2522  //
  2523  //    You should have received a copy of the GNU Lesser General Public
  2524  //    License along with the GNU C Library; if not, see
  2525  //    <https://www.gnu.org/licenses/>.
  2526  
  2527  // Never include this file directly; use <sys/types.h> instead.
  2528  
  2529  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  2530  //
  2531  // This file is part of GCC.
  2532  //
  2533  // GCC is free software; you can redistribute it and/or modify
  2534  // it under the terms of the GNU General Public License as published by
  2535  // the Free Software Foundation; either version 3, or (at your option)
  2536  // any later version.
  2537  //
  2538  // GCC is distributed in the hope that it will be useful,
  2539  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2540  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2541  // GNU General Public License for more details.
  2542  //
  2543  // Under Section 7 of GPL version 3, you are granted additional
  2544  // permissions described in the GCC Runtime Library Exception, version
  2545  // 3.1, as published by the Free Software Foundation.
  2546  //
  2547  // You should have received a copy of the GNU General Public License and
  2548  // a copy of the GCC Runtime Library Exception along with this program;
  2549  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  2550  // <http://www.gnu.org/licenses/>.
  2551  
  2552  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  2553  
  2554  // Any one of these symbols __need_* means that GNU libc
  2555  //    wants us just to define one data type.  So don't define
  2556  //    the symbols that indicate this file's entire job has been done.
  2557  
  2558  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  2559  //    There's no way to win with the other order!  Sun lossage.
  2560  
  2561  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  2562  //    Just ignore it.
  2563  
  2564  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  2565  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  2566  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  2567  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  2568  //    If we find that the macros are still defined at this point, we must
  2569  //    invoke them so that the type is defined as expected.
  2570  
  2571  // In case nobody has defined these types, but we aren't running under
  2572  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  2573  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  2574  //    parts of GCC is compiled by an older compiler, that actually
  2575  //    include gstddef.h, such as collect2.
  2576  
  2577  // Signed type of difference of two pointers.
  2578  
  2579  // Define this type if we are doing the whole job,
  2580  //    or if we want this type in particular.
  2581  
  2582  // If this symbol has done its job, get rid of it.
  2583  
  2584  // Unsigned type of `sizeof' something.
  2585  
  2586  // Define this type if we are doing the whole job,
  2587  //    or if we want this type in particular.
  2588  
  2589  // Wide character type.
  2590  //    Locale-writers should change this as necessary to
  2591  //    be big enough to hold unique values not between 0 and 127,
  2592  //    and not (wchar_t) -1, for each defined multibyte character.
  2593  
  2594  // Define this type if we are doing the whole job,
  2595  //    or if we want this type in particular.
  2596  
  2597  // A null pointer constant.
  2598  
  2599  // Offset of member MEMBER in a struct of type TYPE.
  2600  
  2601  // The Single Unix specification says that some more types are
  2602  //    available here.
  2603  
  2604  type useconds_t = uint32 /* unistd.h:255:22 */
  2605  
  2606  type intptr_t = int32 /* unistd.h:267:20 */
  2607  
  2608  type socklen_t = uint32 /* unistd.h:274:21 */
  2609  
  2610  // Define some macros helping to catch buffer overflows.
  2611  
  2612  // System-specific extensions.
  2613  // System-specific extensions of <unistd.h>, Linux version.
  2614  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  2615  //    This file is part of the GNU C Library.
  2616  //
  2617  //    The GNU C Library is free software; you can redistribute it and/or
  2618  //    modify it under the terms of the GNU Lesser General Public
  2619  //    License as published by the Free Software Foundation; either
  2620  //    version 2.1 of the License, or (at your option) any later version.
  2621  //
  2622  //    The GNU C Library is distributed in the hope that it will be useful,
  2623  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2624  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2625  //    Lesser General Public License for more details.
  2626  //
  2627  //    You should have received a copy of the GNU Lesser General Public
  2628  //    License along with the GNU C Library; if not, see
  2629  //    <https://www.gnu.org/licenses/>.
  2630  
  2631  // MVS linker does not support external names larger than 8 bytes
  2632  
  2633  //
  2634  //     The 'zlib' compression library provides in-memory compression and
  2635  //   decompression functions, including integrity checks of the uncompressed data.
  2636  //   This version of the library supports only one compression method (deflation)
  2637  //   but other algorithms will be added later and will have the same stream
  2638  //   interface.
  2639  //
  2640  //     Compression can be done in a single step if the buffers are large enough,
  2641  //   or can be done by repeated calls of the compression function.  In the latter
  2642  //   case, the application must provide more input and/or consume the output
  2643  //   (providing more output space) before each call.
  2644  //
  2645  //     The compressed data format used by default by the in-memory functions is
  2646  //   the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
  2647  //   around a deflate stream, which is itself documented in RFC 1951.
  2648  //
  2649  //     The library also supports reading and writing files in gzip (.gz) format
  2650  //   with an interface similar to that of stdio using the functions that start
  2651  //   with "gz".  The gzip format is different from the zlib format.  gzip is a
  2652  //   gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2653  //
  2654  //     This library can optionally read and write gzip and raw deflate streams in
  2655  //   memory as well.
  2656  //
  2657  //     The zlib format was designed to be compact and fast for use in memory
  2658  //   and on communications channels.  The gzip format was designed for single-
  2659  //   file compression on file systems, has a larger header than zlib to maintain
  2660  //   directory information, and uses a different, slower check method than zlib.
  2661  //
  2662  //     The library does not install any signal handler.  The decoder checks
  2663  //   the consistency of the compressed data, so the library should never crash
  2664  //   even in the case of corrupted input.
  2665  
  2666  type alloc_func = uintptr /* zlib.h:81:16 */
  2667  type free_func = uintptr  /* zlib.h:82:16 */
  2668  
  2669  type z_stream_s = struct {
  2670  	next_in   uintptr
  2671  	avail_in  uInt
  2672  	total_in  uLong
  2673  	next_out  uintptr
  2674  	avail_out uInt
  2675  	total_out uLong
  2676  	msg       uintptr
  2677  	state     uintptr
  2678  	zalloc    alloc_func
  2679  	zfree     free_func
  2680  	opaque    voidpf
  2681  	data_type int32
  2682  	adler     uLong
  2683  	reserved  uLong
  2684  } /* zlib.h:86:9 */
  2685  
  2686  type z_stream = z_stream_s /* zlib.h:106:3 */
  2687  
  2688  type z_streamp = uintptr /* zlib.h:108:22 */
  2689  
  2690  //
  2691  //      gzip header information passed to and from zlib routines.  See RFC 1952
  2692  //   for more details on the meanings of these fields.
  2693  type gz_header_s = struct {
  2694  	text      int32
  2695  	time      uLong
  2696  	xflags    int32
  2697  	os        int32
  2698  	extra     uintptr
  2699  	extra_len uInt
  2700  	extra_max uInt
  2701  	name      uintptr
  2702  	name_max  uInt
  2703  	comment   uintptr
  2704  	comm_max  uInt
  2705  	hcrc      int32
  2706  	done      int32
  2707  } /* zlib.h:114:9 */
  2708  
  2709  //
  2710  //      gzip header information passed to and from zlib routines.  See RFC 1952
  2711  //   for more details on the meanings of these fields.
  2712  type gz_header = gz_header_s /* zlib.h:129:3 */
  2713  
  2714  type gz_headerp = uintptr /* zlib.h:131:23 */
  2715  //
  2716  //      inflateGetHeader() requests that gzip header information be stored in the
  2717  //    provided gz_header structure.  inflateGetHeader() may be called after
  2718  //    inflateInit2() or inflateReset(), and before the first call of inflate().
  2719  //    As inflate() processes the gzip stream, head->done is zero until the header
  2720  //    is completed, at which time head->done is set to one.  If a zlib stream is
  2721  //    being decoded, then head->done is set to -1 to indicate that there will be
  2722  //    no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
  2723  //    used to force inflate() to return immediately after header processing is
  2724  //    complete and before any actual data is decompressed.
  2725  //
  2726  //      The text, time, xflags, and os fields are filled in with the gzip header
  2727  //    contents.  hcrc is set to true if there is a header CRC.  (The header CRC
  2728  //    was valid if done is set to one.) If extra is not Z_NULL, then extra_max
  2729  //    contains the maximum number of bytes to write to extra.  Once done is true,
  2730  //    extra_len contains the actual extra field length, and extra contains the
  2731  //    extra field, or that field truncated if extra_max is less than extra_len.
  2732  //    If name is not Z_NULL, then up to name_max characters are written there,
  2733  //    terminated with a zero unless the length is greater than name_max.  If
  2734  //    comment is not Z_NULL, then up to comm_max characters are written there,
  2735  //    terminated with a zero unless the length is greater than comm_max.  When any
  2736  //    of extra, name, or comment are not Z_NULL and the respective field is not
  2737  //    present in the header, then that field is set to Z_NULL to signal its
  2738  //    absence.  This allows the use of deflateSetHeader() with the returned
  2739  //    structure to duplicate the header.  However if those fields are set to
  2740  //    allocated memory, then the application will need to save those pointers
  2741  //    elsewhere so that they can be eventually freed.
  2742  //
  2743  //      If inflateGetHeader is not used, then the header information is simply
  2744  //    discarded.  The header is always checked for validity, including the header
  2745  //    CRC if present.  inflateReset() will reset the process to discard the header
  2746  //    information.  The application would need to call inflateGetHeader() again to
  2747  //    retrieve the header from the next gzip stream.
  2748  //
  2749  //      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
  2750  //    stream state was inconsistent.
  2751  
  2752  //
  2753  // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
  2754  //                                         unsigned char FAR *window));
  2755  //
  2756  //      Initialize the internal stream state for decompression using inflateBack()
  2757  //    calls.  The fields zalloc, zfree and opaque in strm must be initialized
  2758  //    before the call.  If zalloc and zfree are Z_NULL, then the default library-
  2759  //    derived memory allocation routines are used.  windowBits is the base two
  2760  //    logarithm of the window size, in the range 8..15.  window is a caller
  2761  //    supplied buffer of that size.  Except for special applications where it is
  2762  //    assured that deflate was used with small window sizes, windowBits must be 15
  2763  //    and a 32K byte window must be supplied to be able to decompress general
  2764  //    deflate streams.
  2765  //
  2766  //      See inflateBack() for the usage of these routines.
  2767  //
  2768  //      inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
  2769  //    the parameters are invalid, Z_MEM_ERROR if the internal state could not be
  2770  //    allocated, or Z_VERSION_ERROR if the version of the library does not match
  2771  //    the version of the header file.
  2772  
  2773  type in_func = uintptr  /* zlib.h:1092:18 */
  2774  type out_func = uintptr /* zlib.h:1094:13 */
  2775  //
  2776  //      Same as uncompress, except that sourceLen is a pointer, where the
  2777  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  2778  //    source bytes consumed.
  2779  
  2780  // gzip file access functions
  2781  
  2782  //
  2783  //      This library supports reading and writing files in gzip (.gz) format with
  2784  //    an interface similar to that of stdio, using the functions that start with
  2785  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  2786  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2787  
  2788  type gzFile_s = struct {
  2789  	have uint32
  2790  	next uintptr
  2791  	pos  off64_t
  2792  } /* zlib.h:1300:9 */
  2793  
  2794  //
  2795  //      Same as uncompress, except that sourceLen is a pointer, where the
  2796  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  2797  //    source bytes consumed.
  2798  
  2799  // gzip file access functions
  2800  
  2801  //
  2802  //      This library supports reading and writing files in gzip (.gz) format with
  2803  //    an interface similar to that of stdio, using the functions that start with
  2804  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  2805  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2806  
  2807  type gzFile = uintptr /* zlib.h:1300:25 */
  2808  
  2809  // The tag name of this struct is _G_fpos_t to preserve historic
  2810  //    C++ mangled names for functions taking fpos_t arguments.
  2811  //    That name should not be used in new code.
  2812  type _G_fpos_t = struct {
  2813  	__pos   int32
  2814  	__state struct {
  2815  		__count int32
  2816  		__value struct{ __wch uint32 }
  2817  	}
  2818  } /* __fpos_t.h:10:9 */
  2819  
  2820  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2821  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2822  //    This file is part of the GNU C Library.
  2823  //
  2824  //    The GNU C Library is free software; you can redistribute it and/or
  2825  //    modify it under the terms of the GNU Lesser General Public
  2826  //    License as published by the Free Software Foundation; either
  2827  //    version 2.1 of the License, or (at your option) any later version.
  2828  //
  2829  //    The GNU C Library is distributed in the hope that it will be useful,
  2830  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2831  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2832  //    Lesser General Public License for more details.
  2833  //
  2834  //    You should have received a copy of the GNU Lesser General Public
  2835  //    License along with the GNU C Library; if not, see
  2836  //    <https://www.gnu.org/licenses/>.
  2837  
  2838  // Never include this file directly; use <sys/types.h> instead.
  2839  
  2840  // The tag name of this struct is _G_fpos64_t to preserve historic
  2841  //    C++ mangled names for functions taking fpos_t and/or fpos64_t
  2842  //    arguments.  That name should not be used in new code.
  2843  type _G_fpos64_t = struct {
  2844  	__pos   int64
  2845  	__state struct {
  2846  		__count int32
  2847  		__value struct{ __wch uint32 }
  2848  	}
  2849  } /* __fpos64_t.h:10:9 */
  2850  
  2851  type _IO_FILE = struct {
  2852  	_flags          int32
  2853  	_IO_read_ptr    uintptr
  2854  	_IO_read_end    uintptr
  2855  	_IO_read_base   uintptr
  2856  	_IO_write_base  uintptr
  2857  	_IO_write_ptr   uintptr
  2858  	_IO_write_end   uintptr
  2859  	_IO_buf_base    uintptr
  2860  	_IO_buf_end     uintptr
  2861  	_IO_save_base   uintptr
  2862  	_IO_backup_base uintptr
  2863  	_IO_save_end    uintptr
  2864  	_markers        uintptr
  2865  	_chain          uintptr
  2866  	_fileno         int32
  2867  	_flags2         int32
  2868  	_old_offset     int32
  2869  	_cur_column     uint16
  2870  	_vtable_offset  int8
  2871  	_shortbuf       [1]uint8
  2872  	_lock           uintptr
  2873  	_               [4]byte
  2874  	_offset         int64
  2875  	_codecvt        uintptr
  2876  	_wide_data      uintptr
  2877  	_freeres_list   uintptr
  2878  	_freeres_buf    uintptr
  2879  	__pad5          size_t
  2880  	_mode           int32
  2881  	_unused2        [40]uint8
  2882  } /* __FILE.h:4:1 */
  2883  
  2884  // The opaque type of streams.  This is the definition used elsewhere.
  2885  type FILE = _IO_FILE /* FILE.h:7:25 */
  2886  
  2887  // These macros are used by bits/stdio.h and internal headers.
  2888  
  2889  // Many more flag bits are defined internally.
  2890  
  2891  // The type of the second argument to `fgetpos' and `fsetpos'.
  2892  type fpos_t = _G_fpos64_t   /* stdio.h:86:20 */
  2893  type fpos64_t = _G_fpos64_t /* stdio.h:89:20 */
  2894  
  2895  // POSIX.1-2008 extended locale interface (see locale.h).
  2896  // Definition of locale_t.
  2897  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2898  //    This file is part of the GNU C Library.
  2899  //
  2900  //    The GNU C Library is free software; you can redistribute it and/or
  2901  //    modify it under the terms of the GNU Lesser General Public
  2902  //    License as published by the Free Software Foundation; either
  2903  //    version 2.1 of the License, or (at your option) any later version.
  2904  //
  2905  //    The GNU C Library is distributed in the hope that it will be useful,
  2906  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2907  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2908  //    Lesser General Public License for more details.
  2909  //
  2910  //    You should have received a copy of the GNU Lesser General Public
  2911  //    License along with the GNU C Library; if not, see
  2912  //    <https://www.gnu.org/licenses/>.
  2913  
  2914  // Definition of struct __locale_struct and __locale_t.
  2915  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
  2916  //    This file is part of the GNU C Library.
  2917  //    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  2918  //
  2919  //    The GNU C Library is free software; you can redistribute it and/or
  2920  //    modify it under the terms of the GNU Lesser General Public
  2921  //    License as published by the Free Software Foundation; either
  2922  //    version 2.1 of the License, or (at your option) any later version.
  2923  //
  2924  //    The GNU C Library is distributed in the hope that it will be useful,
  2925  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2926  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2927  //    Lesser General Public License for more details.
  2928  //
  2929  //    You should have received a copy of the GNU Lesser General Public
  2930  //    License along with the GNU C Library; if not, see
  2931  //    <https://www.gnu.org/licenses/>.
  2932  
  2933  // POSIX.1-2008: the locale_t type, representing a locale context
  2934  //    (implementation-namespace version).  This type should be treated
  2935  //    as opaque by applications; some details are exposed for the sake of
  2936  //    efficiency in e.g. ctype functions.
  2937  
  2938  type __locale_struct = struct {
  2939  	__locales       [13]uintptr
  2940  	__ctype_b       uintptr
  2941  	__ctype_tolower uintptr
  2942  	__ctype_toupper uintptr
  2943  	__names         [13]uintptr
  2944  } /* __locale_t.h:28:1 */
  2945  
  2946  type locale_t = uintptr /* locale_t.h:24:20 */
  2947  
  2948  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2949  //    This file is part of the GNU C Library.
  2950  //
  2951  //    The GNU C Library is free software; you can redistribute it and/or
  2952  //    modify it under the terms of the GNU Lesser General Public
  2953  //    License as published by the Free Software Foundation; either
  2954  //    version 2.1 of the License, or (at your option) any later version.
  2955  //
  2956  //    The GNU C Library is distributed in the hope that it will be useful,
  2957  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2958  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2959  //    Lesser General Public License for more details.
  2960  //
  2961  //    You should have received a copy of the GNU Lesser General Public
  2962  //    License along with the GNU C Library; if not, see
  2963  //    <https://www.gnu.org/licenses/>.
  2964  
  2965  //	ISO C99 Standard: 7.20 General utilities	<stdlib.h>
  2966  
  2967  // Handle feature test macros at the start of a header.
  2968  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  2969  //    This file is part of the GNU C Library.
  2970  //
  2971  //    The GNU C Library is free software; you can redistribute it and/or
  2972  //    modify it under the terms of the GNU Lesser General Public
  2973  //    License as published by the Free Software Foundation; either
  2974  //    version 2.1 of the License, or (at your option) any later version.
  2975  //
  2976  //    The GNU C Library is distributed in the hope that it will be useful,
  2977  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2978  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2979  //    Lesser General Public License for more details.
  2980  //
  2981  //    You should have received a copy of the GNU Lesser General Public
  2982  //    License along with the GNU C Library; if not, see
  2983  //    <https://www.gnu.org/licenses/>.
  2984  
  2985  // This header is internal to glibc and should not be included outside
  2986  //    of glibc headers.  Headers including it must define
  2987  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
  2988  //    cannot have multiple include guards because ISO C feature test
  2989  //    macros depend on the definition of the macro when an affected
  2990  //    header is included, not when the first system header is
  2991  //    included.
  2992  
  2993  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2994  //    This file is part of the GNU C Library.
  2995  //
  2996  //    The GNU C Library is free software; you can redistribute it and/or
  2997  //    modify it under the terms of the GNU Lesser General Public
  2998  //    License as published by the Free Software Foundation; either
  2999  //    version 2.1 of the License, or (at your option) any later version.
  3000  //
  3001  //    The GNU C Library is distributed in the hope that it will be useful,
  3002  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3003  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3004  //    Lesser General Public License for more details.
  3005  //
  3006  //    You should have received a copy of the GNU Lesser General Public
  3007  //    License along with the GNU C Library; if not, see
  3008  //    <https://www.gnu.org/licenses/>.
  3009  
  3010  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
  3011  //    macro.
  3012  
  3013  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
  3014  //    macro.  Most but not all symbols enabled by that macro in TS
  3015  //    18661-1 are enabled unconditionally in C2X; the symbols in Annex F
  3016  //    still require that macro in C2X.
  3017  
  3018  // ISO/IEC TS 18661-4:2015 defines the
  3019  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.  Other than the reduction
  3020  //    functions, the symbols from this TS are enabled unconditionally in
  3021  //    C2X.
  3022  
  3023  // ISO/IEC TS 18661-3:2015 defines the
  3024  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
  3025  
  3026  // Get size_t, wchar_t and NULL from <stddef.h>.
  3027  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  3028  //
  3029  // This file is part of GCC.
  3030  //
  3031  // GCC is free software; you can redistribute it and/or modify
  3032  // it under the terms of the GNU General Public License as published by
  3033  // the Free Software Foundation; either version 3, or (at your option)
  3034  // any later version.
  3035  //
  3036  // GCC is distributed in the hope that it will be useful,
  3037  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  3038  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3039  // GNU General Public License for more details.
  3040  //
  3041  // Under Section 7 of GPL version 3, you are granted additional
  3042  // permissions described in the GCC Runtime Library Exception, version
  3043  // 3.1, as published by the Free Software Foundation.
  3044  //
  3045  // You should have received a copy of the GNU General Public License and
  3046  // a copy of the GCC Runtime Library Exception along with this program;
  3047  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  3048  // <http://www.gnu.org/licenses/>.
  3049  
  3050  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  3051  
  3052  // Any one of these symbols __need_* means that GNU libc
  3053  //    wants us just to define one data type.  So don't define
  3054  //    the symbols that indicate this file's entire job has been done.
  3055  
  3056  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  3057  //    There's no way to win with the other order!  Sun lossage.
  3058  
  3059  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  3060  //    Just ignore it.
  3061  
  3062  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  3063  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  3064  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  3065  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  3066  //    If we find that the macros are still defined at this point, we must
  3067  //    invoke them so that the type is defined as expected.
  3068  
  3069  // In case nobody has defined these types, but we aren't running under
  3070  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  3071  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  3072  //    parts of GCC is compiled by an older compiler, that actually
  3073  //    include gstddef.h, such as collect2.
  3074  
  3075  // Signed type of difference of two pointers.
  3076  
  3077  // Define this type if we are doing the whole job,
  3078  //    or if we want this type in particular.
  3079  
  3080  // If this symbol has done its job, get rid of it.
  3081  
  3082  // Unsigned type of `sizeof' something.
  3083  
  3084  // Define this type if we are doing the whole job,
  3085  //    or if we want this type in particular.
  3086  
  3087  // Wide character type.
  3088  //    Locale-writers should change this as necessary to
  3089  //    be big enough to hold unique values not between 0 and 127,
  3090  //    and not (wchar_t) -1, for each defined multibyte character.
  3091  
  3092  // Define this type if we are doing the whole job,
  3093  //    or if we want this type in particular.
  3094  
  3095  // A null pointer constant.
  3096  
  3097  // Offset of member MEMBER in a struct of type TYPE.
  3098  
  3099  // XPG requires a few symbols from <sys/wait.h> being defined.
  3100  // Definitions of flag bits for `waitpid' et al.
  3101  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  3102  //    This file is part of the GNU C Library.
  3103  //
  3104  //    The GNU C Library is free software; you can redistribute it and/or
  3105  //    modify it under the terms of the GNU Lesser General Public
  3106  //    License as published by the Free Software Foundation; either
  3107  //    version 2.1 of the License, or (at your option) any later version.
  3108  //
  3109  //    The GNU C Library is distributed in the hope that it will be useful,
  3110  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3111  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3112  //    Lesser General Public License for more details.
  3113  //
  3114  //    You should have received a copy of the GNU Lesser General Public
  3115  //    License along with the GNU C Library; if not, see
  3116  //    <https://www.gnu.org/licenses/>.
  3117  
  3118  // Bits in the third argument to `waitpid'.
  3119  
  3120  // Bits in the fourth argument to `waitid'.
  3121  
  3122  // The following values are used by the `waitid' function.
  3123  
  3124  // The Linux kernel defines these bare, rather than an enum,
  3125  //    which causes a conflict if the include order is reversed.
  3126  
  3127  type idtype_t = uint32 /* waitflags.h:57:3 */
  3128  // Definitions of status bits for `wait' et al.
  3129  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  3130  //    This file is part of the GNU C Library.
  3131  //
  3132  //    The GNU C Library is free software; you can redistribute it and/or
  3133  //    modify it under the terms of the GNU Lesser General Public
  3134  //    License as published by the Free Software Foundation; either
  3135  //    version 2.1 of the License, or (at your option) any later version.
  3136  //
  3137  //    The GNU C Library is distributed in the hope that it will be useful,
  3138  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3139  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3140  //    Lesser General Public License for more details.
  3141  //
  3142  //    You should have received a copy of the GNU Lesser General Public
  3143  //    License along with the GNU C Library; if not, see
  3144  //    <https://www.gnu.org/licenses/>.
  3145  
  3146  // Everything extant so far uses these same bits.
  3147  
  3148  // If WIFEXITED(STATUS), the low-order 8 bits of the status.
  3149  
  3150  // If WIFSIGNALED(STATUS), the terminating signal.
  3151  
  3152  // If WIFSTOPPED(STATUS), the signal that stopped the child.
  3153  
  3154  // Nonzero if STATUS indicates normal termination.
  3155  
  3156  // Nonzero if STATUS indicates termination by a signal.
  3157  
  3158  // Nonzero if STATUS indicates the child is stopped.
  3159  
  3160  // Nonzero if STATUS indicates the child continued after a stop.  We only
  3161  //    define this if <bits/waitflags.h> provides the WCONTINUED flag bit.
  3162  
  3163  // Nonzero if STATUS indicates the child dumped core.
  3164  
  3165  // Macros for constructing status values.
  3166  
  3167  // Define the macros <sys/wait.h> also would define this way.
  3168  
  3169  // _FloatN API tests for enablement.
  3170  // Macros to control TS 18661-3 glibc features.
  3171  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  3172  //    This file is part of the GNU C Library.
  3173  //
  3174  //    The GNU C Library is free software; you can redistribute it and/or
  3175  //    modify it under the terms of the GNU Lesser General Public
  3176  //    License as published by the Free Software Foundation; either
  3177  //    version 2.1 of the License, or (at your option) any later version.
  3178  //
  3179  //    The GNU C Library is distributed in the hope that it will be useful,
  3180  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3181  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3182  //    Lesser General Public License for more details.
  3183  //
  3184  //    You should have received a copy of the GNU Lesser General Public
  3185  //    License along with the GNU C Library; if not, see
  3186  //    <https://www.gnu.org/licenses/>.
  3187  
  3188  // Defined to 1 if the current compiler invocation provides a
  3189  //    floating-point type with the IEEE 754 binary128 format, and this glibc
  3190  //    includes corresponding *f128 interfaces for it.
  3191  
  3192  // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
  3193  //    from the default float, double and long double types in this glibc.
  3194  
  3195  // Defined to 1 if the current compiler invocation provides a
  3196  //    floating-point type with the right format for _Float64x, and this
  3197  //    glibc includes corresponding *f64x interfaces for it.
  3198  
  3199  // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
  3200  //    of long double.  Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
  3201  //    the format of _Float128, which must be different from that of long
  3202  //    double.
  3203  
  3204  // Defined to concatenate the literal suffix to be used with _Float128
  3205  //    types, if __HAVE_FLOAT128 is 1.
  3206  //    E.g.: #define __f128(x) x##f128.
  3207  
  3208  // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
  3209  //    E.g.: #define __CFLOAT128 _Complex _Float128.
  3210  
  3211  // Macros to control TS 18661-3 glibc features where the same
  3212  //    definitions are appropriate for all platforms.
  3213  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  3214  //    This file is part of the GNU C Library.
  3215  //
  3216  //    The GNU C Library is free software; you can redistribute it and/or
  3217  //    modify it under the terms of the GNU Lesser General Public
  3218  //    License as published by the Free Software Foundation; either
  3219  //    version 2.1 of the License, or (at your option) any later version.
  3220  //
  3221  //    The GNU C Library is distributed in the hope that it will be useful,
  3222  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3223  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3224  //    Lesser General Public License for more details.
  3225  //
  3226  //    You should have received a copy of the GNU Lesser General Public
  3227  //    License along with the GNU C Library; if not, see
  3228  //    <https://www.gnu.org/licenses/>.
  3229  
  3230  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  3231  //    This file is part of the GNU C Library.
  3232  //
  3233  //    The GNU C Library is free software; you can redistribute it and/or
  3234  //    modify it under the terms of the GNU Lesser General Public
  3235  //    License as published by the Free Software Foundation; either
  3236  //    version 2.1 of the License, or (at your option) any later version.
  3237  //
  3238  //    The GNU C Library is distributed in the hope that it will be useful,
  3239  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3240  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3241  //    Lesser General Public License for more details.
  3242  //
  3243  //    You should have received a copy of the GNU Lesser General Public
  3244  //    License along with the GNU C Library; if not, see
  3245  //    <https://www.gnu.org/licenses/>.
  3246  
  3247  // Properties of long double type.
  3248  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  3249  //    This file is part of the GNU C Library.
  3250  //
  3251  //    The GNU C Library is free software; you can redistribute it and/or
  3252  //    modify it under the terms of the GNU Lesser General Public
  3253  //    License  published by the Free Software Foundation; either
  3254  //    version 2.1 of the License, or (at your option) any later version.
  3255  //
  3256  //    The GNU C Library is distributed in the hope that it will be useful,
  3257  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3258  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3259  //    Lesser General Public License for more details.
  3260  //
  3261  //    You should have received a copy of the GNU Lesser General Public
  3262  //    License along with the GNU C Library; if not, see
  3263  //    <https://www.gnu.org/licenses/>.
  3264  
  3265  // This header is included by <sys/cdefs.h>.
  3266  //
  3267  //    If long double is ABI-compatible with double, it should define
  3268  //    __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
  3269  //    __NO_LONG_DOUBLE_MATH undefined.
  3270  //
  3271  //    If this build of the GNU C Library supports both long double
  3272  //    ABI-compatible with double and some other long double format not
  3273  //    ABI-compatible with double, it should define
  3274  //    __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
  3275  //    __LONG_DOUBLE_MATH_OPTIONAL undefined.
  3276  //
  3277  //    If __NO_LONG_DOUBLE_MATH is already defined, this header must not
  3278  //    define anything; this is needed to work with the definition of
  3279  //    __NO_LONG_DOUBLE_MATH in nldbl-compat.h.
  3280  
  3281  // In the default version of this header, long double is
  3282  //    ABI-compatible with double.
  3283  
  3284  // This header should be included at the bottom of each bits/floatn.h.
  3285  //    It defines the following macros for each _FloatN and _FloatNx type,
  3286  //    where the same definitions, or definitions based only on the macros
  3287  //    in bits/floatn.h, are appropriate for all glibc configurations.
  3288  
  3289  // Defined to 1 if the current compiler invocation provides a
  3290  //    floating-point type with the right format for this type, and this
  3291  //    glibc includes corresponding *fN or *fNx interfaces for it.
  3292  
  3293  // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
  3294  //    type is the first with its format in the sequence of (the default
  3295  //    choices for) float, double, long double, _Float16, _Float32,
  3296  //    _Float64, _Float128, _Float32x, _Float64x, _Float128x for this
  3297  //    glibc; that is, if functions present once per floating-point format
  3298  //    rather than once per type are present for this type.
  3299  //
  3300  //    All configurations supported by glibc have _Float32 the same format
  3301  //    as float, _Float64 and _Float32x the same format as double, the
  3302  //    _Float64x the same format as either long double or _Float128.  No
  3303  //    configurations support _Float128x or, as of GCC 7, have compiler
  3304  //    support for a type meeting the requirements for _Float128x.
  3305  
  3306  // Defined to 1 if the corresponding _FloatN type is not binary compatible
  3307  //    with the corresponding ISO C type in the current compilation unit as
  3308  //    opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built
  3309  //    in glibc.
  3310  
  3311  // Defined to 1 if any _FloatN or _FloatNx types that are not
  3312  //    ABI-distinct are however distinct types at the C language level (so
  3313  //    for the purposes of __builtin_types_compatible_p and _Generic).
  3314  
  3315  // Defined to concatenate the literal suffix to be used with _FloatN
  3316  //    or _FloatNx types, if __HAVE_<type> is 1.  The corresponding
  3317  //    literal suffixes exist since GCC 7, for C only.
  3318  
  3319  // Defined to a complex type if __HAVE_<type> is 1.
  3320  
  3321  // The remaining of this file provides support for older compilers.
  3322  
  3323  // If double, long double and _Float64 all have the same set of
  3324  //    values, TS 18661-3 requires the usual arithmetic conversions on
  3325  //    long double and _Float64 to produce _Float64.  For this to be the
  3326  //    case when building with a compiler without a distinct _Float64
  3327  //    type, _Float64 must be a typedef for long double, not for
  3328  //    double.
  3329  
  3330  // Returned by `div'.
  3331  type div_t = struct {
  3332  	quot int32
  3333  	rem  int32
  3334  } /* stdlib.h:62:5 */
  3335  
  3336  // Returned by `ldiv'.
  3337  type ldiv_t = struct {
  3338  	quot int32
  3339  	rem  int32
  3340  } /* stdlib.h:70:5 */
  3341  
  3342  // Returned by `lldiv'.
  3343  type lldiv_t = struct {
  3344  	quot int64
  3345  	rem  int64
  3346  } /* stdlib.h:80:5 */
  3347  
  3348  // Reentrant versions of the `random' family of functions.
  3349  //    These functions all use the following data structure to contain
  3350  //    state, rather than global state variables.
  3351  
  3352  type random_data = struct {
  3353  	fptr      uintptr
  3354  	rptr      uintptr
  3355  	state     uintptr
  3356  	rand_type int32
  3357  	rand_deg  int32
  3358  	rand_sep  int32
  3359  	end_ptr   uintptr
  3360  } /* stdlib.h:423:1 */
  3361  
  3362  // Data structure for communication with thread safe versions.  This
  3363  //    type is to be regarded as opaque.  It's only exported because users
  3364  //    have to allocate objects of this type.
  3365  type drand48_data = struct {
  3366  	__x     [3]uint16
  3367  	__old_x [3]uint16
  3368  	__c     uint16
  3369  	__init  uint16
  3370  	__a     uint64
  3371  } /* stdlib.h:490:1 */
  3372  
  3373  // Floating-point inline functions for stdlib.h.
  3374  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
  3375  //    This file is part of the GNU C Library.
  3376  //
  3377  //    The GNU C Library is free software; you can redistribute it and/or
  3378  //    modify it under the terms of the GNU Lesser General Public
  3379  //    License as published by the Free Software Foundation; either
  3380  //    version 2.1 of the License, or (at your option) any later version.
  3381  //
  3382  //    The GNU C Library is distributed in the hope that it will be useful,
  3383  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3384  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3385  //    Lesser General Public License for more details.
  3386  //
  3387  //    You should have received a copy of the GNU Lesser General Public
  3388  //    License along with the GNU C Library; if not, see
  3389  //    <https://www.gnu.org/licenses/>.
  3390  
  3391  // Define some macros helping to catch buffer overflows.
  3392  
  3393  var prog uintptr /* minigzip.c:336:13: */
  3394  
  3395  // ===========================================================================
  3396  // Display error message and exit
  3397  func error(tls *libc.TLS, msg uintptr) { /* minigzip.c:351:6: */
  3398  	bp := tls.Alloc(16)
  3399  	defer tls.Free(16)
  3400  
  3401  	libc.Xfprintf(tls, libc.Xstderr, ts /* "%s: %s\n" */, libc.VaList(bp, prog, msg))
  3402  	libc.Xexit(tls, 1)
  3403  }
  3404  
  3405  // ===========================================================================
  3406  // Compress input to output then close both files.
  3407  
  3408  func gz_compress(tls *libc.TLS, in uintptr, out gzFile) { /* minigzip.c:362:6: */
  3409  	bp := tls.Alloc(16388)
  3410  	defer tls.Free(16388)
  3411  
  3412  	// var buf [16384]uint8 at bp, 16384
  3413  
  3414  	var len int32
  3415  	// var err int32 at bp+16384, 4
  3416  
  3417  	for {
  3418  		len = int32(libc.Xfread(tls, bp /* &buf[0] */, uint32(1), uint32(unsafe.Sizeof([16384]uint8{})), in))
  3419  		if libc.Xferror(tls, in) != 0 {
  3420  			libc.Xperror(tls, ts+8 /* "fread" */)
  3421  			libc.Xexit(tls, 1)
  3422  		}
  3423  		if len == 0 {
  3424  			break
  3425  		}
  3426  
  3427  		if z.Xgzwrite(tls, out, bp /* &buf[0] */, uint32(len)) != len {
  3428  			error(tls, z.Xgzerror(tls, out, bp+16384 /* &err */))
  3429  		}
  3430  	}
  3431  	libc.Xfclose(tls, in)
  3432  	if z.Xgzclose(tls, out) != 0 {
  3433  		error(tls, ts+14 /* "failed gzclose" */)
  3434  	}
  3435  }
  3436  
  3437  // ===========================================================================
  3438  // Uncompress input to output then close both files.
  3439  func gz_uncompress(tls *libc.TLS, in gzFile, out uintptr) { /* minigzip.c:430:6: */
  3440  	bp := tls.Alloc(16388)
  3441  	defer tls.Free(16388)
  3442  
  3443  	// var buf [16384]uint8 at bp, 16384
  3444  
  3445  	var len int32
  3446  	// var err int32 at bp+16384, 4
  3447  
  3448  	for {
  3449  		len = z.Xgzread(tls, in, bp /* &buf[0] */, uint32(unsafe.Sizeof([16384]uint8{})))
  3450  		if len < 0 {
  3451  			error(tls, z.Xgzerror(tls, in, bp+16384 /* &err */))
  3452  		}
  3453  		if len == 0 {
  3454  			break
  3455  		}
  3456  
  3457  		if int32(libc.Xfwrite(tls, bp /* &buf[0] */, uint32(1), uint32(len), out)) != len {
  3458  			error(tls, ts+29 /* "failed fwrite" */)
  3459  		}
  3460  	}
  3461  	if libc.Xfclose(tls, out) != 0 {
  3462  		error(tls, ts+43 /* "failed fclose" */)
  3463  	}
  3464  
  3465  	if z.Xgzclose(tls, in) != 0 {
  3466  		error(tls, ts+14 /* "failed gzclose" */)
  3467  	}
  3468  }
  3469  
  3470  // ===========================================================================
  3471  // Compress the given file: create a corresponding .gz file and remove the
  3472  // original.
  3473  func file_compress(tls *libc.TLS, file uintptr, mode uintptr) { /* minigzip.c:457:6: */
  3474  	bp := tls.Alloc(1064)
  3475  	defer tls.Free(1064)
  3476  
  3477  	// var outfile [1024]uint8 at bp+40, 1024
  3478  
  3479  	var in uintptr
  3480  	var out gzFile
  3481  
  3482  	if (libc.Xstrlen(tls, file) + libc.Xstrlen(tls, ts+57 /* ".gz" */)) >= size_t(unsafe.Sizeof([1024]uint8{})) {
  3483  		libc.Xfprintf(tls, libc.Xstderr, ts+61 /* "%s: filename too..." */, libc.VaList(bp, prog))
  3484  		libc.Xexit(tls, 1)
  3485  	}
  3486  
  3487  	libc.Xsnprintf(tls, bp+40 /* &outfile[0] */, uint32(unsafe.Sizeof([1024]uint8{})), ts+84 /* "%s%s" */, libc.VaList(bp+8, file, ts+57 /* ".gz" */))
  3488  
  3489  	in = libc.Xfopen(tls, file, ts+89 /* "rb" */)
  3490  	if in == (uintptr(0)) {
  3491  		libc.Xperror(tls, file)
  3492  		libc.Xexit(tls, 1)
  3493  	}
  3494  	out = z.Xgzopen64(tls, bp+40 /* &outfile[0] */, mode)
  3495  	if out == (uintptr(0)) {
  3496  		libc.Xfprintf(tls, libc.Xstderr, ts+92 /* "%s: can't gzopen..." */, libc.VaList(bp+24, prog, bp+40 /* &outfile[0] */))
  3497  		libc.Xexit(tls, 1)
  3498  	}
  3499  	gz_compress(tls, in, out)
  3500  
  3501  	libc.Xunlink(tls, file)
  3502  }
  3503  
  3504  // ===========================================================================
  3505  // Uncompress the given file and remove the original.
  3506  func file_uncompress(tls *libc.TLS, file uintptr) { /* minigzip.c:496:6: */
  3507  	bp := tls.Alloc(1064)
  3508  	defer tls.Free(1064)
  3509  
  3510  	// var buf [1024]uint8 at bp+40, 1024
  3511  
  3512  	var infile uintptr
  3513  	var outfile uintptr
  3514  	var out uintptr
  3515  	var in gzFile
  3516  	var len uint32 = libc.Xstrlen(tls, file)
  3517  
  3518  	if (len + libc.Xstrlen(tls, ts+57 /* ".gz" */)) >= uint32(unsafe.Sizeof([1024]uint8{})) {
  3519  		libc.Xfprintf(tls, libc.Xstderr, ts+61 /* "%s: filename too..." */, libc.VaList(bp, prog))
  3520  		libc.Xexit(tls, 1)
  3521  	}
  3522  
  3523  	libc.Xsnprintf(tls, bp+40 /* &buf[0] */, uint32(unsafe.Sizeof([1024]uint8{})), ts+113 /* "%s" */, libc.VaList(bp+8, file))
  3524  
  3525  	if (len > (uint32(unsafe.Sizeof([4]uint8{})) - uint32(1))) && (libc.Xstrcmp(tls, ((file+uintptr(len))-uintptr((uint32(unsafe.Sizeof([4]uint8{}))-uint32(1)))), ts+57 /* ".gz" */) == 0) {
  3526  		infile = file
  3527  		outfile = bp + 40 /* &buf[0] */
  3528  		*(*uint8)(unsafe.Pointer(outfile + uintptr((len - uint32(3))))) = uint8(0)
  3529  	} else {
  3530  		outfile = file
  3531  		infile = bp + 40 /* &buf[0] */
  3532  		libc.Xsnprintf(tls, (bp + 40 /* &buf[0] */ + uintptr(len)), (uint32(unsafe.Sizeof([1024]uint8{})) - len), ts+113 /* "%s" */, libc.VaList(bp+16, ts+57 /* ".gz" */))
  3533  	}
  3534  	in = z.Xgzopen64(tls, infile, ts+89 /* "rb" */)
  3535  	if in == (uintptr(0)) {
  3536  		libc.Xfprintf(tls, libc.Xstderr, ts+92 /* "%s: can't gzopen..." */, libc.VaList(bp+24, prog, infile))
  3537  		libc.Xexit(tls, 1)
  3538  	}
  3539  	out = libc.Xfopen(tls, outfile, ts+116 /* "wb" */)
  3540  	if out == (uintptr(0)) {
  3541  		libc.Xperror(tls, file)
  3542  		libc.Xexit(tls, 1)
  3543  	}
  3544  
  3545  	gz_uncompress(tls, in, out)
  3546  
  3547  	libc.Xunlink(tls, infile)
  3548  }
  3549  
  3550  // ===========================================================================
  3551  // Usage:  minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...]
  3552  //   -c : write to standard output
  3553  //   -d : decompress
  3554  //   -f : compress with Z_FILTERED
  3555  //   -h : compress with Z_HUFFMAN_ONLY
  3556  //   -r : compress with Z_RLE
  3557  //   -1 to -9 : compression level
  3558  
  3559  func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* minigzip.c:556:5: */
  3560  	bp := tls.Alloc(44)
  3561  	defer tls.Free(44)
  3562  
  3563  	var copyout int32 = 0
  3564  	var uncompr int32 = 0
  3565  	var file gzFile
  3566  	var bname uintptr
  3567  	// var outmode [20]uint8 at bp+24, 20
  3568  
  3569  	libc.Xsnprintf(tls, bp+24 /* &outmode[0] */, uint32(unsafe.Sizeof([20]uint8{})), ts+113 /* "%s" */, libc.VaList(bp, ts+119 /* "wb6 " */))
  3570  
  3571  	prog = *(*uintptr)(unsafe.Pointer(argv))
  3572  	bname = libc.Xstrrchr(tls, *(*uintptr)(unsafe.Pointer(argv)), '/')
  3573  	if bname != 0 {
  3574  		bname++
  3575  	} else {
  3576  		bname = *(*uintptr)(unsafe.Pointer(argv))
  3577  	}
  3578  	argc--
  3579  	argv += 4
  3580  
  3581  	if !(libc.Xstrcmp(tls, bname, ts+124 /* "gunzip" */) != 0) {
  3582  		uncompr = 1
  3583  	} else if !(libc.Xstrcmp(tls, bname, ts+131 /* "zcat" */) != 0) {
  3584  		copyout = libc.AssignInt32(&uncompr, 1)
  3585  	}
  3586  
  3587  	for argc > 0 {
  3588  		if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+136 /* "-c" */) == 0 {
  3589  			copyout = 1
  3590  		} else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+139 /* "-d" */) == 0 {
  3591  			uncompr = 1
  3592  		} else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+142 /* "-f" */) == 0 {
  3593  			*(*uint8)(unsafe.Pointer(bp + 24 /* &outmode[0] */ + 3)) = uint8('f')
  3594  		} else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+145 /* "-h" */) == 0 {
  3595  			*(*uint8)(unsafe.Pointer(bp + 24 /* &outmode[0] */ + 3)) = uint8('h')
  3596  		} else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+148 /* "-r" */) == 0 {
  3597  			*(*uint8)(unsafe.Pointer(bp + 24 /* &outmode[0] */ + 3)) = uint8('R')
  3598  		} else if (((int32(*(*uint8)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(argv)))))) == '-') && (int32(*(*uint8)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(argv))) + 1))) >= '1')) && (int32(*(*uint8)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(argv))) + 1))) <= '9')) && (int32(*(*uint8)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(argv))) + 2))) == 0) {
  3599  			*(*uint8)(unsafe.Pointer(bp + 24 /* &outmode[0] */ + 2)) = *(*uint8)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(argv))) + 1))
  3600  		} else {
  3601  			break
  3602  		}
  3603  		argc--
  3604  		argv += 4
  3605  	}
  3606  	if int32(*(*uint8)(unsafe.Pointer(bp + 24 /* &outmode[0] */ + 3))) == ' ' {
  3607  		*(*uint8)(unsafe.Pointer(bp + 24 /* &outmode[0] */ + 3)) = uint8(0)
  3608  	}
  3609  	if argc == 0 {
  3610  
  3611  		if uncompr != 0 {
  3612  			file = z.Xgzdopen(tls, libc.Xfileno(tls, libc.Xstdin), ts+89 /* "rb" */)
  3613  			if file == (uintptr(0)) {
  3614  				error(tls, ts+151 /* "can't gzdopen st..." */)
  3615  			}
  3616  			gz_uncompress(tls, file, libc.Xstdout)
  3617  		} else {
  3618  			file = z.Xgzdopen(tls, libc.Xfileno(tls, libc.Xstdout), bp+24 /* &outmode[0] */)
  3619  			if file == (uintptr(0)) {
  3620  				error(tls, ts+171 /* "can't gzdopen st..." */)
  3621  			}
  3622  			gz_compress(tls, libc.Xstdin, file)
  3623  		}
  3624  	} else {
  3625  		if copyout != 0 {
  3626  
  3627  		}
  3628  		for ok := true; ok; ok = func() bool { argv += 4; return libc.PreDecInt32(&argc, 1) != 0 }() {
  3629  			if uncompr != 0 {
  3630  				if copyout != 0 {
  3631  					file = z.Xgzopen64(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+89 /* "rb" */)
  3632  					if file == (uintptr(0)) {
  3633  						libc.Xfprintf(tls, libc.Xstderr, ts+92 /* "%s: can't gzopen..." */, libc.VaList(bp+8, prog, *(*uintptr)(unsafe.Pointer(argv))))
  3634  					} else {
  3635  						gz_uncompress(tls, file, libc.Xstdout)
  3636  					}
  3637  				} else {
  3638  					file_uncompress(tls, *(*uintptr)(unsafe.Pointer(argv)))
  3639  				}
  3640  			} else {
  3641  				if copyout != 0 {
  3642  					var in uintptr = libc.Xfopen(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+89 /* "rb" */)
  3643  
  3644  					if in == (uintptr(0)) {
  3645  						libc.Xperror(tls, *(*uintptr)(unsafe.Pointer(argv)))
  3646  					} else {
  3647  						file = z.Xgzdopen(tls, libc.Xfileno(tls, libc.Xstdout), bp+24 /* &outmode[0] */)
  3648  						if file == (uintptr(0)) {
  3649  							error(tls, ts+171 /* "can't gzdopen st..." */)
  3650  						}
  3651  
  3652  						gz_compress(tls, in, file)
  3653  					}
  3654  
  3655  				} else {
  3656  					file_compress(tls, *(*uintptr)(unsafe.Pointer(argv)), bp+24 /* &outmode[0] */)
  3657  				}
  3658  			}
  3659  		}
  3660  	}
  3661  	return 0
  3662  }
  3663  
  3664  var ts1 = "%s: %s\n\x00fread\x00failed gzclose\x00failed fwrite\x00failed fclose\x00.gz\x00%s: filename too long\n\x00%s%s\x00rb\x00%s: can't gzopen %s\n\x00%s\x00wb\x00wb6 \x00gunzip\x00zcat\x00-c\x00-d\x00-f\x00-h\x00-r\x00can't gzdopen stdin\x00can't gzdopen stdout\x00"
  3665  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data