github.com/afumu/libc@v0.0.6/locale/locale_linux_riscv64.go (about)

     1  // Code generated by 'ccgo locale/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 locale/locale_linux_riscv64.go -pkgname locale', DO NOT EDIT.
     2  
     3  package locale
     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  	LC_ADDRESS                = 9
    19  	LC_ADDRESS_MASK           = 512
    20  	LC_ALL                    = 6
    21  	LC_ALL_MASK               = 8127
    22  	LC_COLLATE                = 3
    23  	LC_COLLATE_MASK           = 8
    24  	LC_CTYPE                  = 0
    25  	LC_CTYPE_MASK             = 1
    26  	LC_IDENTIFICATION         = 12
    27  	LC_IDENTIFICATION_MASK    = 4096
    28  	LC_MEASUREMENT            = 11
    29  	LC_MEASUREMENT_MASK       = 2048
    30  	LC_MESSAGES               = 5
    31  	LC_MESSAGES_MASK          = 32
    32  	LC_MONETARY               = 4
    33  	LC_MONETARY_MASK          = 16
    34  	LC_NAME                   = 8
    35  	LC_NAME_MASK              = 256
    36  	LC_NUMERIC                = 1
    37  	LC_NUMERIC_MASK           = 2
    38  	LC_PAPER                  = 7
    39  	LC_PAPER_MASK             = 128
    40  	LC_TELEPHONE              = 10
    41  	LC_TELEPHONE_MASK         = 1024
    42  	LC_TIME                   = 2
    43  	LC_TIME_MASK              = 4
    44  	X_ATFILE_SOURCE           = 1
    45  	X_BITS_LOCALE_H           = 1
    46  	X_BITS_TYPES_LOCALE_T_H   = 1
    47  	X_BITS_TYPES___LOCALE_T_H = 1
    48  	X_DEFAULT_SOURCE          = 1
    49  	X_FEATURES_H              = 1
    50  	X_FILE_OFFSET_BITS        = 64
    51  	X_LOCALE_H                = 1
    52  	X_LP64                    = 1
    53  	X_POSIX_C_SOURCE          = 200809
    54  	X_POSIX_SOURCE            = 1
    55  	X_STDC_PREDEF_H           = 1
    56  	X_SYS_CDEFS_H             = 1
    57  	Linux                     = 1
    58  	Unix                      = 1
    59  )
    60  
    61  type Ptrdiff_t = int64 /* <builtin>:3:26 */
    62  
    63  type Size_t = uint64 /* <builtin>:9:23 */
    64  
    65  type Wchar_t = int32 /* <builtin>:15:24 */
    66  
    67  type X__int128_t = struct {
    68  	Flo int64
    69  	Fhi int64
    70  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
    71  type X__uint128_t = struct {
    72  	Flo uint64
    73  	Fhi uint64
    74  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
    75  
    76  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
    77  type X__float128 = float64        /* <builtin>:47:21 */
    78  
    79  // Copyright (C) 1991-2021 Free Software Foundation, Inc.
    80  //    This file is part of the GNU C Library.
    81  //
    82  //    The GNU C Library is free software; you can redistribute it and/or
    83  //    modify it under the terms of the GNU Lesser General Public
    84  //    License as published by the Free Software Foundation; either
    85  //    version 2.1 of the License, or (at your option) any later version.
    86  //
    87  //    The GNU C Library is distributed in the hope that it will be useful,
    88  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    89  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    90  //    Lesser General Public License for more details.
    91  //
    92  //    You should have received a copy of the GNU Lesser General Public
    93  //    License along with the GNU C Library; if not, see
    94  //    <https://www.gnu.org/licenses/>.
    95  
    96  //	ISO C99 Standard: 7.11 Localization	<locale.h>
    97  
    98  // Copyright (C) 1991-2021 Free Software Foundation, Inc.
    99  //    This file is part of the GNU C Library.
   100  //
   101  //    The GNU C Library is free software; you can redistribute it and/or
   102  //    modify it under the terms of the GNU Lesser General Public
   103  //    License as published by the Free Software Foundation; either
   104  //    version 2.1 of the License, or (at your option) any later version.
   105  //
   106  //    The GNU C Library is distributed in the hope that it will be useful,
   107  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   108  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   109  //    Lesser General Public License for more details.
   110  //
   111  //    You should have received a copy of the GNU Lesser General Public
   112  //    License along with the GNU C Library; if not, see
   113  //    <https://www.gnu.org/licenses/>.
   114  
   115  // These are defined by the user (or the compiler)
   116  //    to specify the desired environment:
   117  //
   118  //    __STRICT_ANSI__	ISO Standard C.
   119  //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
   120  //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
   121  //    _ISOC2X_SOURCE	Extensions to ISO C99 from ISO C2X.
   122  //    __STDC_WANT_LIB_EXT2__
   123  // 			Extensions to ISO C99 from TR 27431-2:2010.
   124  //    __STDC_WANT_IEC_60559_BFP_EXT__
   125  // 			Extensions to ISO C11 from TS 18661-1:2014.
   126  //    __STDC_WANT_IEC_60559_FUNCS_EXT__
   127  // 			Extensions to ISO C11 from TS 18661-4:2015.
   128  //    __STDC_WANT_IEC_60559_TYPES_EXT__
   129  // 			Extensions to ISO C11 from TS 18661-3:2015.
   130  //    __STDC_WANT_IEC_60559_EXT__
   131  // 			ISO C2X interfaces defined only in Annex F.
   132  //
   133  //    _POSIX_SOURCE	IEEE Std 1003.1.
   134  //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
   135  // 			if >=199309L, add IEEE Std 1003.1b-1993;
   136  // 			if >=199506L, add IEEE Std 1003.1c-1995;
   137  // 			if >=200112L, all of IEEE 1003.1-2004
   138  // 			if >=200809L, all of IEEE 1003.1-2008
   139  //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
   140  // 			Single Unix conformance is wanted, to 600 for the
   141  // 			sixth revision, to 700 for the seventh revision.
   142  //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
   143  //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
   144  //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
   145  //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
   146  //    _ATFILE_SOURCE	Additional *at interfaces.
   147  //    _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
   148  // 			MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
   149  //    _GNU_SOURCE		All of the above, plus GNU extensions.
   150  //    _DEFAULT_SOURCE	The default set of features (taking precedence over
   151  // 			__STRICT_ANSI__).
   152  //
   153  //    _FORTIFY_SOURCE	Add security hardening to many library functions.
   154  // 			Set to 1 or 2; 2 performs stricter checks than 1.
   155  //
   156  //    _REENTRANT, _THREAD_SAFE
   157  // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
   158  //
   159  //    The `-ansi' switch to the GNU C compiler, and standards conformance
   160  //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
   161  //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
   162  //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
   163  //    200809L, as well as enabling miscellaneous functions from BSD and
   164  //    SVID.  If more than one of these are defined, they accumulate.  For
   165  //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
   166  //    give you ISO C, 1003.1, and 1003.2, but nothing else.
   167  //
   168  //    These are defined by this file and are used by the
   169  //    header files to decide what to declare or define:
   170  //
   171  //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
   172  // 			to 1 or 0; the subsequent macros are either defined
   173  // 			or undefined, and those tests should be moved to
   174  // 			__GLIBC_USE.
   175  //    __USE_ISOC11		Define ISO C11 things.
   176  //    __USE_ISOC99		Define ISO C99 things.
   177  //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
   178  //    __USE_ISOCXX11	Define ISO C++11 things.
   179  //    __USE_POSIX		Define IEEE Std 1003.1 things.
   180  //    __USE_POSIX2		Define IEEE Std 1003.2 things.
   181  //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
   182  //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
   183  //    __USE_XOPEN		Define XPG things.
   184  //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
   185  //    __USE_UNIX98		Define Single Unix V2 things.
   186  //    __USE_XOPEN2K        Define XPG6 things.
   187  //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
   188  //    __USE_XOPEN2K8       Define XPG7 things.
   189  //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
   190  //    __USE_LARGEFILE	Define correct standard I/O things.
   191  //    __USE_LARGEFILE64	Define LFS things with separate names.
   192  //    __USE_FILE_OFFSET64	Define 64bit interface as default.
   193  //    __USE_MISC		Define things from 4.3BSD or System V Unix.
   194  //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
   195  //    __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
   196  // 			MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
   197  //    __USE_GNU		Define GNU extensions.
   198  //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
   199  //
   200  //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
   201  //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
   202  //    only for compatibility.  All new code should use the other symbols
   203  //    to test for features.
   204  //
   205  //    All macros listed above as possibly being defined by this file are
   206  //    explicitly undefined if they are not explicitly defined.
   207  //    Feature-test macros that are not defined by the user or compiler
   208  //    but are implied by the other feature-test macros defined (or by the
   209  //    lack of any definitions) are defined by the file.
   210  //
   211  //    ISO C feature test macros depend on the definition of the macro
   212  //    when an affected header is included, not when the first system
   213  //    header is included, and so they are handled in
   214  //    <bits/libc-header-start.h>, which does not have a multiple include
   215  //    guard.  Feature test macros that can be handled from the first
   216  //    system header included are handled here.
   217  
   218  // Undefine everything, so we get a clean slate.
   219  
   220  // Suppress kernel-name space pollution unless user expressedly asks
   221  //    for it.
   222  
   223  // Convenience macro to test the version of gcc.
   224  //    Use like this:
   225  //    #if __GNUC_PREREQ (2,8)
   226  //    ... code requiring gcc 2.8 or later ...
   227  //    #endif
   228  //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
   229  //    added in 2.0.
   230  
   231  // Similarly for clang.  Features added to GCC after version 4.2 may
   232  //    or may not also be available in clang, and clang's definitions of
   233  //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
   234  //    features can be queried via __has_extension/__has_feature.
   235  
   236  // Whether to use feature set F.
   237  
   238  // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
   239  //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
   240  //    issue a warning; the expectation is that the source is being
   241  //    transitioned to use the new macro.
   242  
   243  // If _GNU_SOURCE was defined by the user, turn on all the other features.
   244  
   245  // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
   246  //    define _DEFAULT_SOURCE.
   247  
   248  // This is to enable the ISO C2X extension.
   249  
   250  // This is to enable the ISO C11 extension.
   251  
   252  // This is to enable the ISO C99 extension.
   253  
   254  // This is to enable the ISO C90 Amendment 1:1995 extension.
   255  
   256  // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
   257  //    is defined, use POSIX.1-2008 (or another version depending on
   258  //    _XOPEN_SOURCE).
   259  
   260  // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
   261  //    defined in all multithreaded code.  GNU libc has not required this
   262  //    for many years.  We now treat them as compatibility synonyms for
   263  //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
   264  //    comprehensive support for multithreaded code.  Using them never
   265  //    lowers the selected level of POSIX conformance, only raises it.
   266  
   267  // Features part to handle 64-bit time_t support.
   268  //    Copyright (C) 2021 Free Software Foundation, Inc.
   269  //    This file is part of the GNU C Library.
   270  //
   271  //    The GNU C Library is free software; you can redistribute it and/or
   272  //    modify it under the terms of the GNU Lesser General Public
   273  //    License as published by the Free Software Foundation; either
   274  //    version 2.1 of the License, or (at your option) any later version.
   275  //
   276  //    The GNU C Library is distributed in the hope that it will be useful,
   277  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   278  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   279  //    Lesser General Public License for more details.
   280  //
   281  //    You should have received a copy of the GNU Lesser General Public
   282  //    License along with the GNU C Library; if not, see
   283  //    <https://www.gnu.org/licenses/>.
   284  
   285  // We need to know the word size in order to check the time size.
   286  // Determine the wordsize from the preprocessor defines.  RISC-V version.
   287  //    Copyright (C) 2002-2021 Free Software Foundation, Inc.
   288  //    This file is part of the GNU C Library.
   289  //
   290  //    The GNU C Library is free software; you can redistribute it and/or
   291  //    modify it under the terms of the GNU Lesser General Public
   292  //    License as published by the Free Software Foundation; either
   293  //    version 2.1 of the License, or (at your option) any later version.
   294  //
   295  //    The GNU C Library is distributed in the hope that it will be useful,
   296  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   297  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   298  //    Lesser General Public License for more details.
   299  //
   300  //    You should have received a copy of the GNU Lesser General Public
   301  //    License along with the GNU C Library.  If not, see
   302  //    <https://www.gnu.org/licenses/>.
   303  
   304  // Bit size of the time_t type at glibc build time, RISC-V case.
   305  //    Copyright (C) 2020-2021 Free Software Foundation, Inc.
   306  //    This file is part of the GNU C Library.
   307  //
   308  //    The GNU C Library is free software; you can redistribute it and/or
   309  //    modify it under the terms of the GNU Lesser General Public
   310  //    License as published by the Free Software Foundation; either
   311  //    version 2.1 of the License, or (at your option) any later version.
   312  //
   313  //    The GNU C Library is distributed in the hope that it will be useful,
   314  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   315  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   316  //    Lesser General Public License for more details.
   317  //
   318  //    You should have received a copy of the GNU Lesser General Public
   319  //    License along with the GNU C Library; if not, see
   320  //    <https://www.gnu.org/licenses/>.
   321  
   322  // Determine the wordsize from the preprocessor defines.  RISC-V version.
   323  //    Copyright (C) 2002-2021 Free Software Foundation, Inc.
   324  //    This file is part of the GNU C Library.
   325  //
   326  //    The GNU C Library is free software; you can redistribute it and/or
   327  //    modify it under the terms of the GNU Lesser General Public
   328  //    License as published by the Free Software Foundation; either
   329  //    version 2.1 of the License, or (at your option) any later version.
   330  //
   331  //    The GNU C Library is distributed in the hope that it will be useful,
   332  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   333  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   334  //    Lesser General Public License for more details.
   335  //
   336  //    You should have received a copy of the GNU Lesser General Public
   337  //    License along with the GNU C Library.  If not, see
   338  //    <https://www.gnu.org/licenses/>.
   339  
   340  // RV32 and RV64 both use 64-bit time_t
   341  
   342  // The function 'gets' existed in C89, but is impossible to use
   343  //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
   344  //    compatibility with various implementations of <cstdio>, this test
   345  //    must consider only the value of __cplusplus when compiling C++.
   346  
   347  // GNU formerly extended the scanf functions with modified format
   348  //    specifiers %as, %aS, and %a[...] that allocate a buffer for the
   349  //    input using malloc.  This extension conflicts with ISO C99, which
   350  //    defines %a as a standalone format specifier that reads a floating-
   351  //    point number; moreover, POSIX.1-2008 provides the same feature
   352  //    using the modifier letter 'm' instead (%ms, %mS, %m[...]).
   353  //
   354  //    We now follow C99 unless GNU extensions are active and the compiler
   355  //    is specifically in C89 or C++98 mode (strict or not).  For
   356  //    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
   357  //    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
   358  //    old extension.
   359  
   360  // Get definitions of __STDC_* predefined macros, if the compiler has
   361  //    not preincluded this header automatically.
   362  // Copyright (C) 1991-2021 Free Software Foundation, Inc.
   363  //    This file is part of the GNU C Library.
   364  //
   365  //    The GNU C Library is free software; you can redistribute it and/or
   366  //    modify it under the terms of the GNU Lesser General Public
   367  //    License as published by the Free Software Foundation; either
   368  //    version 2.1 of the License, or (at your option) any later version.
   369  //
   370  //    The GNU C Library is distributed in the hope that it will be useful,
   371  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   372  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   373  //    Lesser General Public License for more details.
   374  //
   375  //    You should have received a copy of the GNU Lesser General Public
   376  //    License along with the GNU C Library; if not, see
   377  //    <https://www.gnu.org/licenses/>.
   378  
   379  // This macro indicates that the installed library is the GNU C Library.
   380  //    For historic reasons the value now is 6 and this will stay from now
   381  //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
   382  //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
   383  //    GNU C library version and use the values in <gnu/lib-names.h> to get
   384  //    the sonames of the shared libraries.
   385  
   386  // Major and minor version number of the GNU C library package.  Use
   387  //    these macros to test for features in specific releases.
   388  
   389  // This is here only because every header file already includes this one.
   390  // Copyright (C) 1992-2021 Free Software Foundation, Inc.
   391  //    This file is part of the GNU C Library.
   392  //
   393  //    The GNU C Library is free software; you can redistribute it and/or
   394  //    modify it under the terms of the GNU Lesser General Public
   395  //    License as published by the Free Software Foundation; either
   396  //    version 2.1 of the License, or (at your option) any later version.
   397  //
   398  //    The GNU C Library is distributed in the hope that it will be useful,
   399  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   400  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   401  //    Lesser General Public License for more details.
   402  //
   403  //    You should have received a copy of the GNU Lesser General Public
   404  //    License along with the GNU C Library; if not, see
   405  //    <https://www.gnu.org/licenses/>.
   406  
   407  // We are almost always included from features.h.
   408  
   409  // The GNU libc does not support any K&R compilers or the traditional mode
   410  //    of ISO C compilers anymore.  Check for some of the combinations not
   411  //    supported anymore.
   412  
   413  // Some user header file might have defined this before.
   414  
   415  // Compilers that lack __has_attribute may object to
   416  //        #if defined __has_attribute && __has_attribute (...)
   417  //    even though they do not need to evaluate the right-hand side of the &&.
   418  //    Similarly for __has_builtin, etc.
   419  
   420  // All functions, except those with callbacks or those that
   421  //    synchronize memory, are leaf functions.
   422  
   423  // GCC can always grok prototypes.  For C++ programs we add throw()
   424  //    to help it optimize the function calls.  But this only works with
   425  //    gcc 2.8.x and egcs.  For gcc 3.4 and up we even mark C functions
   426  //    as non-throwing using a function attribute since programs can use
   427  //    the -fexceptions options for C code as well.
   428  
   429  // These two macros are not used in glibc anymore.  They are kept here
   430  //    only because some other projects expect the macros to be defined.
   431  
   432  // For these things, GCC behaves the ANSI way normally,
   433  //    and the non-ANSI way under -traditional.
   434  
   435  // This is not a typedef so `const __ptr_t' does the right thing.
   436  
   437  // C++ needs to know that types and declarations are C, not C++.
   438  
   439  // Fortify support.
   440  
   441  // Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
   442  
   443  // Support for flexible arrays.
   444  //    Headers that should use flexible arrays only if they're "real"
   445  //    (e.g. only if they won't affect sizeof()) should test
   446  //    #if __glibc_c99_flexarr_available.
   447  
   448  // __asm__ ("xyz") is used throughout the headers to rename functions
   449  //    at the assembly language level.  This is wrapped by the __REDIRECT
   450  //    macro, in order to support compilers that can do this some other
   451  //    way.  When compilers don't support asm-names at all, we have to do
   452  //    preprocessor tricks instead (which don't have exactly the right
   453  //    semantics, but it's the best we can do).
   454  //
   455  //    Example:
   456  //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
   457  
   458  //
   459  // #elif __SOME_OTHER_COMPILER__
   460  //
   461  // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
   462  
   463  // GCC and clang have various useful declarations that can be made with
   464  //    the '__attribute__' syntax.  All of the ways we use this do fine if
   465  //    they are omitted for compilers that don't understand it.
   466  
   467  // At some point during the gcc 2.96 development the `malloc' attribute
   468  //    for functions was introduced.  We don't want to use it unconditionally
   469  //    (although this would be possible) since it generates warnings.
   470  
   471  // Tell the compiler which arguments to an allocation function
   472  //    indicate the size of the allocation.
   473  
   474  // At some point during the gcc 2.96 development the `pure' attribute
   475  //    for functions was introduced.  We don't want to use it unconditionally
   476  //    (although this would be possible) since it generates warnings.
   477  
   478  // This declaration tells the compiler that the value is constant.
   479  
   480  // At some point during the gcc 3.1 development the `used' attribute
   481  //    for functions was introduced.  We don't want to use it unconditionally
   482  //    (although this would be possible) since it generates warnings.
   483  
   484  // Since version 3.2, gcc allows marking deprecated functions.
   485  
   486  // Since version 4.5, gcc also allows one to specify the message printed
   487  //    when a deprecated function is used.  clang claims to be gcc 4.2, but
   488  //    may also support this feature.
   489  
   490  // At some point during the gcc 2.8 development the `format_arg' attribute
   491  //    for functions was introduced.  We don't want to use it unconditionally
   492  //    (although this would be possible) since it generates warnings.
   493  //    If several `format_arg' attributes are given for the same function, in
   494  //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
   495  //    all designated arguments are considered.
   496  
   497  // At some point during the gcc 2.97 development the `strfmon' format
   498  //    attribute for functions was introduced.  We don't want to use it
   499  //    unconditionally (although this would be possible) since it
   500  //    generates warnings.
   501  
   502  // The nonnull function attribute marks pointer parameters that
   503  //    must not be NULL.
   504  
   505  // The returns_nonnull function attribute marks the return type of the function
   506  //    as always being non-null.
   507  
   508  // If fortification mode, we warn about unused results of certain
   509  //    function calls which can lead to problems.
   510  
   511  // Forces a function to be always inlined.
   512  // The Linux kernel defines __always_inline in stddef.h (283d7573), and
   513  //    it conflicts with this definition.  Therefore undefine it first to
   514  //    allow either header to be included first.
   515  
   516  // Associate error messages with the source location of the call site rather
   517  //    than with the source location inside the function.
   518  
   519  // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
   520  //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
   521  //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
   522  //    older than 4.3 may define these macros and still not guarantee GNU inlining
   523  //    semantics.
   524  //
   525  //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
   526  //    semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
   527  //    __GNUC_GNU_INLINE__ macro definitions.
   528  
   529  // GCC 4.3 and above allow passing all anonymous arguments of an
   530  //    __extern_always_inline function to some other vararg function.
   531  
   532  // It is possible to compile containing GCC extensions even if GCC is
   533  //    run in pedantic mode if the uses are carefully marked using the
   534  //    `__extension__' keyword.  But this is not generally available before
   535  //    version 2.8.
   536  
   537  // __restrict is known in EGCS 1.2 and above, and in clang.
   538  //    It works also in C++ mode (outside of arrays), but only when spelled
   539  //    as '__restrict', not 'restrict'.
   540  
   541  // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
   542  //      array_name[restrict]
   543  //    GCC 3.1 and clang support this.
   544  //    This syntax is not usable in C++ mode.
   545  
   546  // Describes a char array whose address can safely be passed as the first
   547  //    argument to strncpy and strncat, as the char array is not necessarily
   548  //    a NUL-terminated string.
   549  
   550  // Undefine (also defined in libc-symbols.h).
   551  // Copies attributes from the declaration or type referenced by
   552  //    the argument.
   553  
   554  // The #ifndef lets Gnulib avoid including these on non-glibc
   555  //    platforms, where the includes typically do not exist.
   556  // Determine the wordsize from the preprocessor defines.  RISC-V version.
   557  //    Copyright (C) 2002-2021 Free Software Foundation, Inc.
   558  //    This file is part of the GNU C Library.
   559  //
   560  //    The GNU C Library is free software; you can redistribute it and/or
   561  //    modify it under the terms of the GNU Lesser General Public
   562  //    License as published by the Free Software Foundation; either
   563  //    version 2.1 of the License, or (at your option) any later version.
   564  //
   565  //    The GNU C Library is distributed in the hope that it will be useful,
   566  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   567  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   568  //    Lesser General Public License for more details.
   569  //
   570  //    You should have received a copy of the GNU Lesser General Public
   571  //    License along with the GNU C Library.  If not, see
   572  //    <https://www.gnu.org/licenses/>.
   573  
   574  // Properties of long double type.  ldbl-128 version.
   575  //    Copyright (C) 2016-2021 Free Software Foundation, Inc.
   576  //    This file is part of the GNU C Library.
   577  //
   578  //    The GNU C Library is free software; you can redistribute it and/or
   579  //    modify it under the terms of the GNU Lesser General Public
   580  //    License  published by the Free Software Foundation; either
   581  //    version 2.1 of the License, or (at your option) any later version.
   582  //
   583  //    The GNU C Library is distributed in the hope that it will be useful,
   584  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   585  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   586  //    Lesser General Public License for more details.
   587  //
   588  //    You should have received a copy of the GNU Lesser General Public
   589  //    License along with the GNU C Library; if not, see
   590  //    <https://www.gnu.org/licenses/>.
   591  
   592  // long double is distinct from double, so there is nothing to
   593  //    define here.
   594  
   595  // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
   596  //    intended for use in preprocessor macros.
   597  //
   598  //    Note: MESSAGE must be a _single_ string; concatenation of string
   599  //    literals is not supported.
   600  
   601  // Generic selection (ISO C11) is a C-only feature, available in GCC
   602  //    since version 4.9.  Previous versions do not provide generic
   603  //    selection, even though they might set __STDC_VERSION__ to 201112L,
   604  //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
   605  //    when testing __STDC_VERSION__ for generic selection support.
   606  //    On the other hand, Clang also defines __GNUC__, so a clang-specific
   607  //    check is required to enable the use of generic selection.
   608  
   609  // Designates a 1-based positional argument ref-index of pointer type
   610  //    that can be used to access size-index elements of the pointed-to
   611  //    array according to access mode, or at least one element when
   612  //    size-index is not provided:
   613  //      access (access-mode, <ref-index> [, <size-index>])
   614  
   615  // Designates dealloc as a function to call to deallocate objects
   616  //    allocated by the declared function.
   617  
   618  // Specify that a function such as setjmp or vfork may return
   619  //    twice.
   620  
   621  // If we don't have __REDIRECT, prototypes will be missing if
   622  //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
   623  
   624  // Decide whether we can define 'extern inline' functions in headers.
   625  
   626  // This is here only because every header file already includes this one.
   627  //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
   628  //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
   629  //    that will always return failure (and set errno to ENOSYS).
   630  // This file is automatically generated.
   631  //    This file selects the right generated file of `__stub_FUNCTION' macros
   632  //    based on the architecture being compiled for.
   633  
   634  // Determine the wordsize from the preprocessor defines.  RISC-V version.
   635  //    Copyright (C) 2002-2021 Free Software Foundation, Inc.
   636  //    This file is part of the GNU C Library.
   637  //
   638  //    The GNU C Library is free software; you can redistribute it and/or
   639  //    modify it under the terms of the GNU Lesser General Public
   640  //    License as published by the Free Software Foundation; either
   641  //    version 2.1 of the License, or (at your option) any later version.
   642  //
   643  //    The GNU C Library is distributed in the hope that it will be useful,
   644  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   645  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   646  //    Lesser General Public License for more details.
   647  //
   648  //    You should have received a copy of the GNU Lesser General Public
   649  //    License along with the GNU C Library.  If not, see
   650  //    <https://www.gnu.org/licenses/>.
   651  
   652  // This file is automatically generated.
   653  //    It defines a symbol `__stub_FUNCTION' for each function
   654  //    in the C library which is a stub, meaning it will fail
   655  //    every time called, usually setting errno to ENOSYS.
   656  
   657  // Copyright (C) 1989-2021 Free Software Foundation, Inc.
   658  //
   659  // This file is part of GCC.
   660  //
   661  // GCC is free software; you can redistribute it and/or modify
   662  // it under the terms of the GNU General Public License as published by
   663  // the Free Software Foundation; either version 3, or (at your option)
   664  // any later version.
   665  //
   666  // GCC is distributed in the hope that it will be useful,
   667  // but WITHOUT ANY WARRANTY; without even the implied warranty of
   668  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   669  // GNU General Public License for more details.
   670  //
   671  // Under Section 7 of GPL version 3, you are granted additional
   672  // permissions described in the GCC Runtime Library Exception, version
   673  // 3.1, as published by the Free Software Foundation.
   674  //
   675  // You should have received a copy of the GNU General Public License and
   676  // a copy of the GCC Runtime Library Exception along with this program;
   677  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
   678  // <http://www.gnu.org/licenses/>.
   679  
   680  // ISO C Standard:  7.17  Common definitions  <stddef.h>
   681  
   682  // Any one of these symbols __need_* means that GNU libc
   683  //    wants us just to define one data type.  So don't define
   684  //    the symbols that indicate this file's entire job has been done.
   685  
   686  // This avoids lossage on SunOS but only if stdtypes.h comes first.
   687  //    There's no way to win with the other order!  Sun lossage.
   688  
   689  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
   690  //    Just ignore it.
   691  
   692  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
   693  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
   694  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
   695  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
   696  //    If we find that the macros are still defined at this point, we must
   697  //    invoke them so that the type is defined as expected.
   698  
   699  // In case nobody has defined these types, but we aren't running under
   700  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
   701  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
   702  //    parts of GCC is compiled by an older compiler, that actually
   703  //    include gstddef.h, such as collect2.
   704  
   705  // Signed type of difference of two pointers.
   706  
   707  // Define this type if we are doing the whole job,
   708  //    or if we want this type in particular.
   709  
   710  // Unsigned type of `sizeof' something.
   711  
   712  // Define this type if we are doing the whole job,
   713  //    or if we want this type in particular.
   714  
   715  // Wide character type.
   716  //    Locale-writers should change this as necessary to
   717  //    be big enough to hold unique values not between 0 and 127,
   718  //    and not (wchar_t) -1, for each defined multibyte character.
   719  
   720  // Define this type if we are doing the whole job,
   721  //    or if we want this type in particular.
   722  
   723  // A null pointer constant.
   724  
   725  // Definition of locale category symbol values.
   726  //    Copyright (C) 2001-2021 Free Software Foundation, Inc.
   727  //    This file is part of the GNU C Library.
   728  //
   729  //    The GNU C Library is free software; you can redistribute it and/or
   730  //    modify it under the terms of the GNU Lesser General Public
   731  //    License as published by the Free Software Foundation; either
   732  //    version 2.1 of the License, or (at your option) any later version.
   733  //
   734  //    The GNU C Library is distributed in the hope that it will be useful,
   735  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   736  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   737  //    Lesser General Public License for more details.
   738  //
   739  //    You should have received a copy of the GNU Lesser General Public
   740  //    License along with the GNU C Library; if not, see
   741  //    <https://www.gnu.org/licenses/>.
   742  
   743  // These are the possibilities for the first argument to setlocale.
   744  //    The code assumes that the lowest LC_* symbol has the value zero.
   745  
   746  // Structure giving information about numeric and monetary notation.
   747  type Lconv = struct {
   748  	Fdecimal_point      uintptr
   749  	Fthousands_sep      uintptr
   750  	Fgrouping           uintptr
   751  	Fint_curr_symbol    uintptr
   752  	Fcurrency_symbol    uintptr
   753  	Fmon_decimal_point  uintptr
   754  	Fmon_thousands_sep  uintptr
   755  	Fmon_grouping       uintptr
   756  	Fpositive_sign      uintptr
   757  	Fnegative_sign      uintptr
   758  	Fint_frac_digits    uint8
   759  	Ffrac_digits        uint8
   760  	Fp_cs_precedes      uint8
   761  	Fp_sep_by_space     uint8
   762  	Fn_cs_precedes      uint8
   763  	Fn_sep_by_space     uint8
   764  	Fp_sign_posn        uint8
   765  	Fn_sign_posn        uint8
   766  	Fint_p_cs_precedes  uint8
   767  	Fint_p_sep_by_space uint8
   768  	Fint_n_cs_precedes  uint8
   769  	Fint_n_sep_by_space uint8
   770  	Fint_p_sign_posn    uint8
   771  	Fint_n_sign_posn    uint8
   772  	F__ccgo_pad1        [2]byte
   773  } /* locale.h:51:1 */
   774  
   775  // POSIX.1-2008 extends the locale interface with functions for
   776  //    explicit creation and manipulation of 'locale_t' objects
   777  //    representing locale contexts, and a set of parallel
   778  //    locale-sensitive text processing functions that take a locale_t
   779  //    argument.  This enables applications to work with data from
   780  //    multiple locales simultaneously and thread-safely.
   781  // Definition of locale_t.
   782  //    Copyright (C) 2017-2021 Free Software Foundation, Inc.
   783  //    This file is part of the GNU C Library.
   784  //
   785  //    The GNU C Library is free software; you can redistribute it and/or
   786  //    modify it under the terms of the GNU Lesser General Public
   787  //    License as published by the Free Software Foundation; either
   788  //    version 2.1 of the License, or (at your option) any later version.
   789  //
   790  //    The GNU C Library is distributed in the hope that it will be useful,
   791  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   792  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   793  //    Lesser General Public License for more details.
   794  //
   795  //    You should have received a copy of the GNU Lesser General Public
   796  //    License along with the GNU C Library; if not, see
   797  //    <https://www.gnu.org/licenses/>.
   798  
   799  // Definition of struct __locale_struct and __locale_t.
   800  //    Copyright (C) 1997-2021 Free Software Foundation, Inc.
   801  //    This file is part of the GNU C Library.
   802  //    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
   803  //
   804  //    The GNU C Library is free software; you can redistribute it and/or
   805  //    modify it under the terms of the GNU Lesser General Public
   806  //    License as published by the Free Software Foundation; either
   807  //    version 2.1 of the License, or (at your option) any later version.
   808  //
   809  //    The GNU C Library is distributed in the hope that it will be useful,
   810  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   811  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   812  //    Lesser General Public License for more details.
   813  //
   814  //    You should have received a copy of the GNU Lesser General Public
   815  //    License along with the GNU C Library; if not, see
   816  //    <https://www.gnu.org/licenses/>.
   817  
   818  // POSIX.1-2008: the locale_t type, representing a locale context
   819  //    (implementation-namespace version).  This type should be treated
   820  //    as opaque by applications; some details are exposed for the sake of
   821  //    efficiency in e.g. ctype functions.
   822  
   823  type X__locale_struct = struct {
   824  	F__locales       [13]uintptr
   825  	F__ctype_b       uintptr
   826  	F__ctype_tolower uintptr
   827  	F__ctype_toupper uintptr
   828  	F__names         [13]uintptr
   829  } /* __locale_t.h:28:1 */
   830  
   831  type X__locale_t = uintptr /* __locale_t.h:42:32 */
   832  
   833  type Locale_t = X__locale_t /* locale_t.h:24:20 */
   834  
   835  // This value can be passed to `uselocale' and may be returned by it.
   836  //    Passing this value to any other function has undefined behavior.
   837  
   838  var _ uint8 /* gen.c:2:13: */