github.com/afumu/libc@v0.0.6/dirent/dirent_linux_386.go (about)

     1  // Code generated by 'ccgo dirent/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o dirent/dirent_linux_386.go -pkgname dirent', DO NOT EDIT.
     2  
     3  package dirent
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  )
    11  
    12  var _ = math.Pi
    13  var _ reflect.Kind
    14  var _ atomic.Value
    15  var _ unsafe.Pointer
    16  
    17  const (
    18  	AIO_PRIO_DELTA_MAX                   = 20
    19  	DELAYTIMER_MAX                       = 2147483647
    20  	HOST_NAME_MAX                        = 64
    21  	LOGIN_NAME_MAX                       = 256
    22  	MAXNAMLEN                            = 255
    23  	MAX_CANON                            = 255
    24  	MAX_INPUT                            = 255
    25  	MQ_PRIO_MAX                          = 32768
    26  	NAME_MAX                             = 255
    27  	NGROUPS_MAX                          = 65536
    28  	PATH_MAX                             = 4096
    29  	PIPE_BUF                             = 4096
    30  	PTHREAD_DESTRUCTOR_ITERATIONS        = 4
    31  	PTHREAD_KEYS_MAX                     = 1024
    32  	PTHREAD_STACK_MIN                    = 16384
    33  	RTSIG_MAX                            = 32
    34  	SEM_VALUE_MAX                        = 2147483647
    35  	TTY_NAME_MAX                         = 32
    36  	XATTR_LIST_MAX                       = 65536
    37  	XATTR_NAME_MAX                       = 255
    38  	XATTR_SIZE_MAX                       = 65536
    39  	X_ATFILE_SOURCE                      = 1
    40  	X_BITS_POSIX1_LIM_H                  = 1
    41  	X_BITS_TIME64_H                      = 1
    42  	X_BITS_TYPESIZES_H                   = 1
    43  	X_BITS_TYPES_H                       = 1
    44  	X_BSD_SIZE_T_                        = 0
    45  	X_BSD_SIZE_T_DEFINED_                = 0
    46  	X_DEFAULT_SOURCE                     = 1
    47  	X_DIRENT_H                           = 1
    48  	X_DIRENT_HAVE_D_OFF                  = 0
    49  	X_DIRENT_HAVE_D_RECLEN               = 0
    50  	X_DIRENT_HAVE_D_TYPE                 = 0
    51  	X_DIRENT_MATCHES_DIRENT64            = 0
    52  	X_FEATURES_H                         = 1
    53  	X_FILE_OFFSET_BITS                   = 64
    54  	X_GCC_SIZE_T                         = 0
    55  	X_ILP32                              = 1
    56  	X_LINUX_LIMITS_H                     = 0
    57  	X_POSIX_AIO_LISTIO_MAX               = 2
    58  	X_POSIX_AIO_MAX                      = 1
    59  	X_POSIX_ARG_MAX                      = 4096
    60  	X_POSIX_CHILD_MAX                    = 25
    61  	X_POSIX_CLOCKRES_MIN                 = 20000000
    62  	X_POSIX_C_SOURCE                     = 200809
    63  	X_POSIX_DELAYTIMER_MAX               = 32
    64  	X_POSIX_HOST_NAME_MAX                = 255
    65  	X_POSIX_LINK_MAX                     = 8
    66  	X_POSIX_LOGIN_NAME_MAX               = 9
    67  	X_POSIX_MAX_CANON                    = 255
    68  	X_POSIX_MAX_INPUT                    = 255
    69  	X_POSIX_MQ_OPEN_MAX                  = 8
    70  	X_POSIX_MQ_PRIO_MAX                  = 32
    71  	X_POSIX_NAME_MAX                     = 14
    72  	X_POSIX_NGROUPS_MAX                  = 8
    73  	X_POSIX_OPEN_MAX                     = 20
    74  	X_POSIX_PATH_MAX                     = 256
    75  	X_POSIX_PIPE_BUF                     = 512
    76  	X_POSIX_RE_DUP_MAX                   = 255
    77  	X_POSIX_RTSIG_MAX                    = 8
    78  	X_POSIX_SEM_NSEMS_MAX                = 256
    79  	X_POSIX_SEM_VALUE_MAX                = 32767
    80  	X_POSIX_SIGQUEUE_MAX                 = 32
    81  	X_POSIX_SOURCE                       = 1
    82  	X_POSIX_SSIZE_MAX                    = 32767
    83  	X_POSIX_STREAM_MAX                   = 8
    84  	X_POSIX_SYMLINK_MAX                  = 255
    85  	X_POSIX_SYMLOOP_MAX                  = 8
    86  	X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
    87  	X_POSIX_THREAD_KEYS_MAX              = 128
    88  	X_POSIX_THREAD_THREADS_MAX           = 64
    89  	X_POSIX_TIMER_MAX                    = 32
    90  	X_POSIX_TTY_NAME_MAX                 = 9
    91  	X_POSIX_TZNAME_MAX                   = 6
    92  	X_SIZET_                             = 0
    93  	X_SIZE_T                             = 0
    94  	X_SIZE_T_                            = 0
    95  	X_SIZE_T_DECLARED                    = 0
    96  	X_SIZE_T_DEFINED                     = 0
    97  	X_SIZE_T_DEFINED_                    = 0
    98  	X_STDC_PREDEF_H                      = 1
    99  	X_SYS_CDEFS_H                        = 1
   100  	X_SYS_SIZE_T_H                       = 0
   101  	X_T_SIZE                             = 0
   102  	X_T_SIZE_                            = 0
   103  	I386                                 = 1
   104  	Linux                                = 1
   105  	Unix                                 = 1
   106  )
   107  
   108  // These macros extract size information from a `struct dirent *'.
   109  //    They may evaluate their argument multiple times, so it must not
   110  //    have side effects.  Each of these may involve a relatively costly
   111  //    call to `strlen' on some systems, so these values should be cached.
   112  //
   113  //    _D_EXACT_NAMLEN (DP)	returns the length of DP->d_name, not including
   114  //    its terminating null character.
   115  //
   116  //    _D_ALLOC_NAMLEN (DP)	returns a size at least (_D_EXACT_NAMLEN (DP) + 1);
   117  //    that is, the allocation size needed to hold the DP->d_name string.
   118  //    Use this macro when you don't need the exact length, just an upper bound.
   119  //    This macro is less likely to require calling `strlen' than _D_EXACT_NAMLEN.
   120  //
   121  
   122  // File types for `d_type'.
   123  const ( /* dirent.h:97:1: */
   124  	DT_UNKNOWN = 0
   125  	DT_FIFO    = 1
   126  	DT_CHR     = 2
   127  	DT_DIR     = 4
   128  	DT_BLK     = 6
   129  	DT_REG     = 8
   130  	DT_LNK     = 10
   131  	DT_SOCK    = 12
   132  	DT_WHT     = 14
   133  )
   134  
   135  type Ptrdiff_t = int32 /* <builtin>:3:26 */
   136  
   137  type Size_t = uint32 /* <builtin>:9:23 */
   138  
   139  type Wchar_t = int32 /* <builtin>:15:24 */
   140  
   141  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   142  type X__float128 = float64        /* <builtin>:47:21 */
   143  
   144  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   145  //    This file is part of the GNU C Library.
   146  //
   147  //    The GNU C Library is free software; you can redistribute it and/or
   148  //    modify it under the terms of the GNU Lesser General Public
   149  //    License as published by the Free Software Foundation; either
   150  //    version 2.1 of the License, or (at your option) any later version.
   151  //
   152  //    The GNU C Library is distributed in the hope that it will be useful,
   153  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   154  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   155  //    Lesser General Public License for more details.
   156  //
   157  //    You should have received a copy of the GNU Lesser General Public
   158  //    License along with the GNU C Library; if not, see
   159  //    <https://www.gnu.org/licenses/>.
   160  
   161  //	POSIX Standard: 5.1.2 Directory Operations	<dirent.h>
   162  
   163  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   164  //    This file is part of the GNU C Library.
   165  //
   166  //    The GNU C Library is free software; you can redistribute it and/or
   167  //    modify it under the terms of the GNU Lesser General Public
   168  //    License as published by the Free Software Foundation; either
   169  //    version 2.1 of the License, or (at your option) any later version.
   170  //
   171  //    The GNU C Library is distributed in the hope that it will be useful,
   172  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   173  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   174  //    Lesser General Public License for more details.
   175  //
   176  //    You should have received a copy of the GNU Lesser General Public
   177  //    License along with the GNU C Library; if not, see
   178  //    <https://www.gnu.org/licenses/>.
   179  
   180  // These are defined by the user (or the compiler)
   181  //    to specify the desired environment:
   182  //
   183  //    __STRICT_ANSI__	ISO Standard C.
   184  //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
   185  //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
   186  //    _ISOC2X_SOURCE	Extensions to ISO C99 from ISO C2X.
   187  //    __STDC_WANT_LIB_EXT2__
   188  // 			Extensions to ISO C99 from TR 27431-2:2010.
   189  //    __STDC_WANT_IEC_60559_BFP_EXT__
   190  // 			Extensions to ISO C11 from TS 18661-1:2014.
   191  //    __STDC_WANT_IEC_60559_FUNCS_EXT__
   192  // 			Extensions to ISO C11 from TS 18661-4:2015.
   193  //    __STDC_WANT_IEC_60559_TYPES_EXT__
   194  // 			Extensions to ISO C11 from TS 18661-3:2015.
   195  //
   196  //    _POSIX_SOURCE	IEEE Std 1003.1.
   197  //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
   198  // 			if >=199309L, add IEEE Std 1003.1b-1993;
   199  // 			if >=199506L, add IEEE Std 1003.1c-1995;
   200  // 			if >=200112L, all of IEEE 1003.1-2004
   201  // 			if >=200809L, all of IEEE 1003.1-2008
   202  //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
   203  // 			Single Unix conformance is wanted, to 600 for the
   204  // 			sixth revision, to 700 for the seventh revision.
   205  //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
   206  //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
   207  //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
   208  //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
   209  //    _ATFILE_SOURCE	Additional *at interfaces.
   210  //    _GNU_SOURCE		All of the above, plus GNU extensions.
   211  //    _DEFAULT_SOURCE	The default set of features (taking precedence over
   212  // 			__STRICT_ANSI__).
   213  //
   214  //    _FORTIFY_SOURCE	Add security hardening to many library functions.
   215  // 			Set to 1 or 2; 2 performs stricter checks than 1.
   216  //
   217  //    _REENTRANT, _THREAD_SAFE
   218  // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
   219  //
   220  //    The `-ansi' switch to the GNU C compiler, and standards conformance
   221  //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
   222  //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
   223  //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
   224  //    200809L, as well as enabling miscellaneous functions from BSD and
   225  //    SVID.  If more than one of these are defined, they accumulate.  For
   226  //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
   227  //    give you ISO C, 1003.1, and 1003.2, but nothing else.
   228  //
   229  //    These are defined by this file and are used by the
   230  //    header files to decide what to declare or define:
   231  //
   232  //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
   233  // 			to 1 or 0; the subsequent macros are either defined
   234  // 			or undefined, and those tests should be moved to
   235  // 			__GLIBC_USE.
   236  //    __USE_ISOC11		Define ISO C11 things.
   237  //    __USE_ISOC99		Define ISO C99 things.
   238  //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
   239  //    __USE_ISOCXX11	Define ISO C++11 things.
   240  //    __USE_POSIX		Define IEEE Std 1003.1 things.
   241  //    __USE_POSIX2		Define IEEE Std 1003.2 things.
   242  //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
   243  //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
   244  //    __USE_XOPEN		Define XPG things.
   245  //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
   246  //    __USE_UNIX98		Define Single Unix V2 things.
   247  //    __USE_XOPEN2K        Define XPG6 things.
   248  //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
   249  //    __USE_XOPEN2K8       Define XPG7 things.
   250  //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
   251  //    __USE_LARGEFILE	Define correct standard I/O things.
   252  //    __USE_LARGEFILE64	Define LFS things with separate names.
   253  //    __USE_FILE_OFFSET64	Define 64bit interface as default.
   254  //    __USE_MISC		Define things from 4.3BSD or System V Unix.
   255  //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
   256  //    __USE_GNU		Define GNU extensions.
   257  //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
   258  //
   259  //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
   260  //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
   261  //    only for compatibility.  All new code should use the other symbols
   262  //    to test for features.
   263  //
   264  //    All macros listed above as possibly being defined by this file are
   265  //    explicitly undefined if they are not explicitly defined.
   266  //    Feature-test macros that are not defined by the user or compiler
   267  //    but are implied by the other feature-test macros defined (or by the
   268  //    lack of any definitions) are defined by the file.
   269  //
   270  //    ISO C feature test macros depend on the definition of the macro
   271  //    when an affected header is included, not when the first system
   272  //    header is included, and so they are handled in
   273  //    <bits/libc-header-start.h>, which does not have a multiple include
   274  //    guard.  Feature test macros that can be handled from the first
   275  //    system header included are handled here.
   276  
   277  // Undefine everything, so we get a clean slate.
   278  
   279  // Suppress kernel-name space pollution unless user expressedly asks
   280  //    for it.
   281  
   282  // Convenience macro to test the version of gcc.
   283  //    Use like this:
   284  //    #if __GNUC_PREREQ (2,8)
   285  //    ... code requiring gcc 2.8 or later ...
   286  //    #endif
   287  //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
   288  //    added in 2.0.
   289  
   290  // Similarly for clang.  Features added to GCC after version 4.2 may
   291  //    or may not also be available in clang, and clang's definitions of
   292  //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
   293  //    features can be queried via __has_extension/__has_feature.
   294  
   295  // Whether to use feature set F.
   296  
   297  // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
   298  //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
   299  //    issue a warning; the expectation is that the source is being
   300  //    transitioned to use the new macro.
   301  
   302  // If _GNU_SOURCE was defined by the user, turn on all the other features.
   303  
   304  // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
   305  //    define _DEFAULT_SOURCE.
   306  
   307  // This is to enable the ISO C2X extension.
   308  
   309  // This is to enable the ISO C11 extension.
   310  
   311  // This is to enable the ISO C99 extension.
   312  
   313  // This is to enable the ISO C90 Amendment 1:1995 extension.
   314  
   315  // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
   316  //    is defined, use POSIX.1-2008 (or another version depending on
   317  //    _XOPEN_SOURCE).
   318  
   319  // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
   320  //    defined in all multithreaded code.  GNU libc has not required this
   321  //    for many years.  We now treat them as compatibility synonyms for
   322  //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
   323  //    comprehensive support for multithreaded code.  Using them never
   324  //    lowers the selected level of POSIX conformance, only raises it.
   325  
   326  // The function 'gets' existed in C89, but is impossible to use
   327  //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
   328  //    compatibility with various implementations of <cstdio>, this test
   329  //    must consider only the value of __cplusplus when compiling C++.
   330  
   331  // GNU formerly extended the scanf functions with modified format
   332  //    specifiers %as, %aS, and %a[...] that allocate a buffer for the
   333  //    input using malloc.  This extension conflicts with ISO C99, which
   334  //    defines %a as a standalone format specifier that reads a floating-
   335  //    point number; moreover, POSIX.1-2008 provides the same feature
   336  //    using the modifier letter 'm' instead (%ms, %mS, %m[...]).
   337  //
   338  //    We now follow C99 unless GNU extensions are active and the compiler
   339  //    is specifically in C89 or C++98 mode (strict or not).  For
   340  //    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
   341  //    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
   342  //    old extension.
   343  
   344  // Get definitions of __STDC_* predefined macros, if the compiler has
   345  //    not preincluded this header automatically.
   346  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   347  //    This file is part of the GNU C Library.
   348  //
   349  //    The GNU C Library is free software; you can redistribute it and/or
   350  //    modify it under the terms of the GNU Lesser General Public
   351  //    License as published by the Free Software Foundation; either
   352  //    version 2.1 of the License, or (at your option) any later version.
   353  //
   354  //    The GNU C Library is distributed in the hope that it will be useful,
   355  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   356  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   357  //    Lesser General Public License for more details.
   358  //
   359  //    You should have received a copy of the GNU Lesser General Public
   360  //    License along with the GNU C Library; if not, see
   361  //    <https://www.gnu.org/licenses/>.
   362  
   363  // This macro indicates that the installed library is the GNU C Library.
   364  //    For historic reasons the value now is 6 and this will stay from now
   365  //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
   366  //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
   367  //    GNU C library version and use the values in <gnu/lib-names.h> to get
   368  //    the sonames of the shared libraries.
   369  
   370  // Major and minor version number of the GNU C library package.  Use
   371  //    these macros to test for features in specific releases.
   372  
   373  // This is here only because every header file already includes this one.
   374  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
   375  //    This file is part of the GNU C Library.
   376  //
   377  //    The GNU C Library is free software; you can redistribute it and/or
   378  //    modify it under the terms of the GNU Lesser General Public
   379  //    License as published by the Free Software Foundation; either
   380  //    version 2.1 of the License, or (at your option) any later version.
   381  //
   382  //    The GNU C Library is distributed in the hope that it will be useful,
   383  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   384  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   385  //    Lesser General Public License for more details.
   386  //
   387  //    You should have received a copy of the GNU Lesser General Public
   388  //    License along with the GNU C Library; if not, see
   389  //    <https://www.gnu.org/licenses/>.
   390  
   391  // We are almost always included from features.h.
   392  
   393  // The GNU libc does not support any K&R compilers or the traditional mode
   394  //    of ISO C compilers anymore.  Check for some of the combinations not
   395  //    anymore supported.
   396  
   397  // Some user header file might have defined this before.
   398  
   399  // All functions, except those with callbacks or those that
   400  //    synchronize memory, are leaf functions.
   401  
   402  // GCC can always grok prototypes.  For C++ programs we add throw()
   403  //    to help it optimize the function calls.  But this works only with
   404  //    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
   405  //    as non-throwing using a function attribute since programs can use
   406  //    the -fexceptions options for C code as well.
   407  
   408  // Compilers that are not clang may object to
   409  //        #if defined __clang__ && __has_extension(...)
   410  //    even though they do not need to evaluate the right-hand side of the &&.
   411  
   412  // These two macros are not used in glibc anymore.  They are kept here
   413  //    only because some other projects expect the macros to be defined.
   414  
   415  // For these things, GCC behaves the ANSI way normally,
   416  //    and the non-ANSI way under -traditional.
   417  
   418  // This is not a typedef so `const __ptr_t' does the right thing.
   419  
   420  // C++ needs to know that types and declarations are C, not C++.
   421  
   422  // Fortify support.
   423  
   424  // Support for flexible arrays.
   425  //    Headers that should use flexible arrays only if they're "real"
   426  //    (e.g. only if they won't affect sizeof()) should test
   427  //    #if __glibc_c99_flexarr_available.
   428  
   429  // __asm__ ("xyz") is used throughout the headers to rename functions
   430  //    at the assembly language level.  This is wrapped by the __REDIRECT
   431  //    macro, in order to support compilers that can do this some other
   432  //    way.  When compilers don't support asm-names at all, we have to do
   433  //    preprocessor tricks instead (which don't have exactly the right
   434  //    semantics, but it's the best we can do).
   435  //
   436  //    Example:
   437  //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
   438  
   439  //
   440  // #elif __SOME_OTHER_COMPILER__
   441  //
   442  // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
   443  
   444  // GCC has various useful declarations that can be made with the
   445  //    `__attribute__' syntax.  All of the ways we use this do fine if
   446  //    they are omitted for compilers that don't understand it.
   447  
   448  // At some point during the gcc 2.96 development the `malloc' attribute
   449  //    for functions was introduced.  We don't want to use it unconditionally
   450  //    (although this would be possible) since it generates warnings.
   451  
   452  // Tell the compiler which arguments to an allocation function
   453  //    indicate the size of the allocation.
   454  
   455  // At some point during the gcc 2.96 development the `pure' attribute
   456  //    for functions was introduced.  We don't want to use it unconditionally
   457  //    (although this would be possible) since it generates warnings.
   458  
   459  // This declaration tells the compiler that the value is constant.
   460  
   461  // At some point during the gcc 3.1 development the `used' attribute
   462  //    for functions was introduced.  We don't want to use it unconditionally
   463  //    (although this would be possible) since it generates warnings.
   464  
   465  // Since version 3.2, gcc allows marking deprecated functions.
   466  
   467  // Since version 4.5, gcc also allows one to specify the message printed
   468  //    when a deprecated function is used.  clang claims to be gcc 4.2, but
   469  //    may also support this feature.
   470  
   471  // At some point during the gcc 2.8 development the `format_arg' attribute
   472  //    for functions was introduced.  We don't want to use it unconditionally
   473  //    (although this would be possible) since it generates warnings.
   474  //    If several `format_arg' attributes are given for the same function, in
   475  //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
   476  //    all designated arguments are considered.
   477  
   478  // At some point during the gcc 2.97 development the `strfmon' format
   479  //    attribute for functions was introduced.  We don't want to use it
   480  //    unconditionally (although this would be possible) since it
   481  //    generates warnings.
   482  
   483  // The nonull function attribute allows to mark pointer parameters which
   484  //    must not be NULL.
   485  
   486  // If fortification mode, we warn about unused results of certain
   487  //    function calls which can lead to problems.
   488  
   489  // Forces a function to be always inlined.
   490  // The Linux kernel defines __always_inline in stddef.h (283d7573), and
   491  //    it conflicts with this definition.  Therefore undefine it first to
   492  //    allow either header to be included first.
   493  
   494  // Associate error messages with the source location of the call site rather
   495  //    than with the source location inside the function.
   496  
   497  // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
   498  //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
   499  //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
   500  //    older than 4.3 may define these macros and still not guarantee GNU inlining
   501  //    semantics.
   502  //
   503  //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
   504  //    semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
   505  //    __GNUC_GNU_INLINE__ macro definitions.
   506  
   507  // GCC 4.3 and above allow passing all anonymous arguments of an
   508  //    __extern_always_inline function to some other vararg function.
   509  
   510  // It is possible to compile containing GCC extensions even if GCC is
   511  //    run in pedantic mode if the uses are carefully marked using the
   512  //    `__extension__' keyword.  But this is not generally available before
   513  //    version 2.8.
   514  
   515  // __restrict is known in EGCS 1.2 and above.
   516  
   517  // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
   518  //      array_name[restrict]
   519  //    GCC 3.1 supports this.
   520  
   521  // Describes a char array whose address can safely be passed as the first
   522  //    argument to strncpy and strncat, as the char array is not necessarily
   523  //    a NUL-terminated string.
   524  
   525  // Undefine (also defined in libc-symbols.h).
   526  // Copies attributes from the declaration or type referenced by
   527  //    the argument.
   528  
   529  // Determine the wordsize from the preprocessor defines.
   530  
   531  // Properties of long double type.  ldbl-96 version.
   532  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   533  //    This file is part of the GNU C Library.
   534  //
   535  //    The GNU C Library is free software; you can redistribute it and/or
   536  //    modify it under the terms of the GNU Lesser General Public
   537  //    License  published by the Free Software Foundation; either
   538  //    version 2.1 of the License, or (at your option) any later version.
   539  //
   540  //    The GNU C Library is distributed in the hope that it will be useful,
   541  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   542  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   543  //    Lesser General Public License for more details.
   544  //
   545  //    You should have received a copy of the GNU Lesser General Public
   546  //    License along with the GNU C Library; if not, see
   547  //    <https://www.gnu.org/licenses/>.
   548  
   549  // long double is distinct from double, so there is nothing to
   550  //    define here.
   551  
   552  // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
   553  //    intended for use in preprocessor macros.
   554  //
   555  //    Note: MESSAGE must be a _single_ string; concatenation of string
   556  //    literals is not supported.
   557  
   558  // Generic selection (ISO C11) is a C-only feature, available in GCC
   559  //    since version 4.9.  Previous versions do not provide generic
   560  //    selection, even though they might set __STDC_VERSION__ to 201112L,
   561  //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
   562  //    when testing __STDC_VERSION__ for generic selection support.
   563  //    On the other hand, Clang also defines __GNUC__, so a clang-specific
   564  //    check is required to enable the use of generic selection.
   565  
   566  // If we don't have __REDIRECT, prototypes will be missing if
   567  //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
   568  
   569  // Decide whether we can define 'extern inline' functions in headers.
   570  
   571  // This is here only because every header file already includes this one.
   572  //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
   573  //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
   574  //    that will always return failure (and set errno to ENOSYS).
   575  // This file is automatically generated.
   576  //    This file selects the right generated file of `__stub_FUNCTION' macros
   577  //    based on the architecture being compiled for.
   578  
   579  // This file is automatically generated.
   580  //    It defines a symbol `__stub_FUNCTION' for each function
   581  //    in the C library which is a stub, meaning it will fail
   582  //    every time called, usually setting errno to ENOSYS.
   583  
   584  // bits/types.h -- definitions of __*_t types underlying *_t types.
   585  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   586  //    This file is part of the GNU C Library.
   587  //
   588  //    The GNU C Library is free software; you can redistribute it and/or
   589  //    modify it under the terms of the GNU Lesser General Public
   590  //    License as published by the Free Software Foundation; either
   591  //    version 2.1 of the License, or (at your option) any later version.
   592  //
   593  //    The GNU C Library is distributed in the hope that it will be useful,
   594  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   595  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   596  //    Lesser General Public License for more details.
   597  //
   598  //    You should have received a copy of the GNU Lesser General Public
   599  //    License along with the GNU C Library; if not, see
   600  //    <https://www.gnu.org/licenses/>.
   601  
   602  // Never include this file directly; use <sys/types.h> instead.
   603  
   604  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
   605  //    This file is part of the GNU C Library.
   606  //
   607  //    The GNU C Library is free software; you can redistribute it and/or
   608  //    modify it under the terms of the GNU Lesser General Public
   609  //    License as published by the Free Software Foundation; either
   610  //    version 2.1 of the License, or (at your option) any later version.
   611  //
   612  //    The GNU C Library is distributed in the hope that it will be useful,
   613  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   614  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   615  //    Lesser General Public License for more details.
   616  //
   617  //    You should have received a copy of the GNU Lesser General Public
   618  //    License along with the GNU C Library; if not, see
   619  //    <https://www.gnu.org/licenses/>.
   620  
   621  // Determine the wordsize from the preprocessor defines.
   622  
   623  // Bit size of the time_t type at glibc build time, x86-64 and x32 case.
   624  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
   625  //    This file is part of the GNU C Library.
   626  //
   627  //    The GNU C Library is free software; you can redistribute it and/or
   628  //    modify it under the terms of the GNU Lesser General Public
   629  //    License as published by the Free Software Foundation; either
   630  //    version 2.1 of the License, or (at your option) any later version.
   631  //
   632  //    The GNU C Library is distributed in the hope that it will be useful,
   633  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   634  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   635  //    Lesser General Public License for more details.
   636  //
   637  //    You should have received a copy of the GNU Lesser General Public
   638  //    License along with the GNU C Library; if not, see
   639  //    <https://www.gnu.org/licenses/>.
   640  
   641  // For others, time size is word size.
   642  
   643  // Convenience types.
   644  type X__u_char = uint8   /* types.h:31:23 */
   645  type X__u_short = uint16 /* types.h:32:28 */
   646  type X__u_int = uint32   /* types.h:33:22 */
   647  type X__u_long = uint32  /* types.h:34:27 */
   648  
   649  // Fixed-size types, underlying types depend on word size and compiler.
   650  type X__int8_t = int8     /* types.h:37:21 */
   651  type X__uint8_t = uint8   /* types.h:38:23 */
   652  type X__int16_t = int16   /* types.h:39:26 */
   653  type X__uint16_t = uint16 /* types.h:40:28 */
   654  type X__int32_t = int32   /* types.h:41:20 */
   655  type X__uint32_t = uint32 /* types.h:42:22 */
   656  type X__int64_t = int64   /* types.h:47:44 */
   657  type X__uint64_t = uint64 /* types.h:48:46 */
   658  
   659  // Smallest types with at least a given width.
   660  type X__int_least8_t = X__int8_t     /* types.h:52:18 */
   661  type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
   662  type X__int_least16_t = X__int16_t   /* types.h:54:19 */
   663  type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
   664  type X__int_least32_t = X__int32_t   /* types.h:56:19 */
   665  type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
   666  type X__int_least64_t = X__int64_t   /* types.h:58:19 */
   667  type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
   668  
   669  // quad_t is also 64 bits.
   670  type X__quad_t = int64    /* types.h:66:37 */
   671  type X__u_quad_t = uint64 /* types.h:67:46 */
   672  
   673  // Largest integral types.
   674  type X__intmax_t = int64   /* types.h:75:37 */
   675  type X__uintmax_t = uint64 /* types.h:76:46 */
   676  
   677  // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
   678  //    macros for each of the OS types we define below.  The definitions
   679  //    of those macros must use the following macros for underlying types.
   680  //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
   681  //    variants of each of the following integer types on this machine.
   682  //
   683  // 	16		-- "natural" 16-bit type (always short)
   684  // 	32		-- "natural" 32-bit type (always int)
   685  // 	64		-- "natural" 64-bit type (long or long long)
   686  // 	LONG32		-- 32-bit type, traditionally long
   687  // 	QUAD		-- 64-bit type, traditionally long long
   688  // 	WORD		-- natural type of __WORDSIZE bits (int or long)
   689  // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
   690  //
   691  //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
   692  //    conventional uses of `long' or `long long' type modifiers match the
   693  //    types we define, even when a less-adorned type would be the same size.
   694  //    This matters for (somewhat) portably writing printf/scanf formats for
   695  //    these types, where using the appropriate l or ll format modifiers can
   696  //    make the typedefs and the formats match up across all GNU platforms.  If
   697  //    we used `long' when it's 64 bits where `long long' is expected, then the
   698  //    compiler would warn about the formats not matching the argument types,
   699  //    and the programmer changing them to shut up the compiler would break the
   700  //    program's portability.
   701  //
   702  //    Here we assume what is presently the case in all the GCC configurations
   703  //    we support: long long is always 64 bits, long is always word/address size,
   704  //    and int is always 32 bits.
   705  
   706  // We want __extension__ before typedef's that use nonstandard base types
   707  //    such as `long long' in C89 mode.
   708  // bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
   709  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
   710  //    This file is part of the GNU C Library.
   711  //
   712  //    The GNU C Library is free software; you can redistribute it and/or
   713  //    modify it under the terms of the GNU Lesser General Public
   714  //    License as published by the Free Software Foundation; either
   715  //    version 2.1 of the License, or (at your option) any later version.
   716  //
   717  //    The GNU C Library is distributed in the hope that it will be useful,
   718  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   719  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   720  //    Lesser General Public License for more details.
   721  //
   722  //    You should have received a copy of the GNU Lesser General Public
   723  //    License along with the GNU C Library; if not, see
   724  //    <https://www.gnu.org/licenses/>.
   725  
   726  // See <bits/types.h> for the meaning of these macros.  This file exists so
   727  //    that <bits/types.h> need not vary across different GNU platforms.
   728  
   729  // X32 kernel interface is 64-bit.
   730  
   731  // Number of descriptors that can fit in an `fd_set'.
   732  
   733  // bits/time64.h -- underlying types for __time64_t.  Generic version.
   734  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
   735  //    This file is part of the GNU C Library.
   736  //
   737  //    The GNU C Library is free software; you can redistribute it and/or
   738  //    modify it under the terms of the GNU Lesser General Public
   739  //    License as published by the Free Software Foundation; either
   740  //    version 2.1 of the License, or (at your option) any later version.
   741  //
   742  //    The GNU C Library is distributed in the hope that it will be useful,
   743  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   744  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   745  //    Lesser General Public License for more details.
   746  //
   747  //    You should have received a copy of the GNU Lesser General Public
   748  //    License along with the GNU C Library; if not, see
   749  //    <https://www.gnu.org/licenses/>.
   750  
   751  // Define __TIME64_T_TYPE so that it is always a 64-bit type.
   752  
   753  // Define a 64-bit time type alongsize the 32-bit one.
   754  
   755  type X__dev_t = X__uint64_t                /* types.h:145:25 */ // Type of device numbers.
   756  type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
   757  type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
   758  type X__ino_t = uint32                     /* types.h:148:25 */ // Type of file serial numbers.
   759  type X__ino64_t = X__uint64_t              /* types.h:149:27 */ // Type of file serial numbers (LFS).
   760  type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
   761  type X__nlink_t = uint32                   /* types.h:151:27 */ // Type of file link counts.
   762  type X__off_t = int32                      /* types.h:152:25 */ // Type of file sizes and offsets.
   763  type X__off64_t = X__int64_t               /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
   764  type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
   765  type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
   766  type X__clock_t = int32                    /* types.h:156:27 */ // Type of CPU usage counts.
   767  type X__rlim_t = uint32                    /* types.h:157:26 */ // Type for resource measurement.
   768  type X__rlim64_t = X__uint64_t             /* types.h:158:28 */ // Type for resource measurement (LFS).
   769  type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
   770  type X__time_t = int32                     /* types.h:160:26 */ // Seconds since the Epoch.
   771  type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
   772  type X__suseconds_t = int32                /* types.h:162:31 */ // Signed count of microseconds.
   773  
   774  type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
   775  type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
   776  
   777  // Clock ID used in clock and timer functions.
   778  type X__clockid_t = int32 /* types.h:168:29 */
   779  
   780  // Timer ID returned by `timer_create'.
   781  type X__timer_t = uintptr /* types.h:171:12 */
   782  
   783  // Type to represent block size.
   784  type X__blksize_t = int32 /* types.h:174:29 */
   785  
   786  // Types from the Large File Support interface.
   787  
   788  // Type to count number of disk blocks.
   789  type X__blkcnt_t = int32        /* types.h:179:28 */
   790  type X__blkcnt64_t = X__int64_t /* types.h:180:30 */
   791  
   792  // Type to count file system blocks.
   793  type X__fsblkcnt_t = uint32        /* types.h:183:30 */
   794  type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */
   795  
   796  // Type to count file system nodes.
   797  type X__fsfilcnt_t = uint32        /* types.h:187:30 */
   798  type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
   799  
   800  // Type of miscellaneous file system fields.
   801  type X__fsword_t = int32 /* types.h:191:28 */
   802  
   803  type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error.
   804  
   805  // Signed long type used in system calls.
   806  type X__syscall_slong_t = int32 /* types.h:196:33 */
   807  // Unsigned long type used in system calls.
   808  type X__syscall_ulong_t = uint32 /* types.h:198:33 */
   809  
   810  // These few don't really vary by system, they always correspond
   811  //
   812  //	to one of the other defined types.
   813  type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
   814  type X__caddr_t = uintptr   /* types.h:203:14 */
   815  
   816  // Duplicates info from stdint.h but this is used in unistd.h.
   817  type X__intptr_t = int32 /* types.h:206:25 */
   818  
   819  // Duplicate info from sys/socket.h.
   820  type X__socklen_t = uint32 /* types.h:209:23 */
   821  
   822  // C99: An integer type that can be accessed as an atomic entity,
   823  //
   824  //	even in the presence of asynchronous interrupts.
   825  //	It is not currently necessary for this to be machine-specific.
   826  type X__sig_atomic_t = int32 /* types.h:214:13 */
   827  
   828  // Seconds since the Epoch, visible to user code when time_t is too
   829  //
   830  //	narrow only for consistency with the old way of widening too-narrow
   831  //	types.  User code should never use __time64_t.
   832  type X__time64_t = X__int64_t /* types.h:222:28 */
   833  
   834  // This file defines `struct dirent'.
   835  //
   836  //    It defines the macro `_DIRENT_HAVE_D_NAMLEN' iff there is a `d_namlen'
   837  //    member that gives the length of `d_name'.
   838  //
   839  //    It defines the macro `_DIRENT_HAVE_D_RECLEN' iff there is a `d_reclen'
   840  //    member that gives the size of the entire directory entry.
   841  //
   842  //    It defines the macro `_DIRENT_HAVE_D_OFF' iff there is a `d_off'
   843  //    member that gives the file offset of the next directory entry.
   844  //
   845  //    It defines the macro `_DIRENT_HAVE_D_TYPE' iff there is a `d_type'
   846  //    member that gives the type of the file.
   847  //
   848  
   849  // Copyright (C) 1996-2020 Free Software Foundation, Inc.
   850  //    This file is part of the GNU C Library.
   851  //
   852  //    The GNU C Library is free software; you can redistribute it and/or
   853  //    modify it under the terms of the GNU Lesser General Public
   854  //    License as published by the Free Software Foundation; either
   855  //    version 2.1 of the License, or (at your option) any later version.
   856  //
   857  //    The GNU C Library is distributed in the hope that it will be useful,
   858  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   859  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   860  //    Lesser General Public License for more details.
   861  //
   862  //    You should have received a copy of the GNU Lesser General Public
   863  //    License along with the GNU C Library; if not, see
   864  //    <https://www.gnu.org/licenses/>.
   865  
   866  type Dirent = struct {
   867  	Fd_ino       X__ino64_t
   868  	Fd_off       X__off64_t
   869  	Fd_reclen    uint16
   870  	Fd_type      uint8
   871  	Fd_name      [256]int8
   872  	F__ccgo_pad1 [1]byte
   873  } /* dirent.h:22:1 */
   874  
   875  // System-specific extensions of <dirent.h>.  Linux version.
   876  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
   877  //    This file is part of the GNU C Library.
   878  //
   879  //    The GNU C Library is free software; you can redistribute it and/or
   880  //    modify it under the terms of the GNU Lesser General Public
   881  //    License as published by the Free Software Foundation; either
   882  //    version 2.1 of the License, or (at your option) any later version.
   883  //
   884  //    The GNU C Library is distributed in the hope that it will be useful,
   885  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   886  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   887  //    Lesser General Public License for more details.
   888  //
   889  //    You should have received a copy of the GNU Lesser General Public
   890  //    License along with the GNU C Library; if not, see
   891  //    <https://www.gnu.org/licenses/>.
   892  
   893  var _ int8 /* gen.c:2:13: */