gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

fcntl_linux_arm64.go (51667B)


      1 // Code generated by 'ccgo fcntl/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 fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
      2 
      3 package fcntl
      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 	AT_EACCESS            = 0x200
     19 	AT_FDCWD              = -100
     20 	AT_REMOVEDIR          = 0x200
     21 	AT_SYMLINK_FOLLOW     = 0x400
     22 	AT_SYMLINK_NOFOLLOW   = 0x100
     23 	FAPPEND               = 1024
     24 	FASYNC                = 8192
     25 	FD_CLOEXEC            = 1
     26 	FFSYNC                = 1052672
     27 	FNDELAY               = 2048
     28 	FNONBLOCK             = 2048
     29 	F_DUPFD               = 0
     30 	F_DUPFD_CLOEXEC       = 1030
     31 	F_EXLCK               = 4
     32 	F_GETFD               = 1
     33 	F_GETFL               = 3
     34 	F_GETLK               = 5
     35 	F_GETLK64             = 5
     36 	F_GETOWN              = 9
     37 	F_LOCK                = 1
     38 	F_OK                  = 0
     39 	F_RDLCK               = 0
     40 	F_SETFD               = 2
     41 	F_SETFL               = 4
     42 	F_SETLK               = 6
     43 	F_SETLK64             = 6
     44 	F_SETLKW              = 7
     45 	F_SETLKW64            = 7
     46 	F_SETOWN              = 8
     47 	F_SHLCK               = 8
     48 	F_TEST                = 3
     49 	F_TLOCK               = 2
     50 	F_ULOCK               = 0
     51 	F_UNLCK               = 2
     52 	F_WRLCK               = 1
     53 	LOCK_EX               = 2
     54 	LOCK_NB               = 4
     55 	LOCK_SH               = 1
     56 	LOCK_UN               = 8
     57 	O_ACCMODE             = 0003
     58 	O_APPEND              = 02000
     59 	O_ASYNC               = 020000
     60 	O_CLOEXEC             = 524288
     61 	O_CREAT               = 0100
     62 	O_DIRECTORY           = 16384
     63 	O_DSYNC               = 4096
     64 	O_EXCL                = 0200
     65 	O_FSYNC               = 1052672
     66 	O_NDELAY              = 2048
     67 	O_NOCTTY              = 0400
     68 	O_NOFOLLOW            = 32768
     69 	O_NONBLOCK            = 04000
     70 	O_RDONLY              = 00
     71 	O_RDWR                = 02
     72 	O_RSYNC               = 1052672
     73 	O_SYNC                = 04010000
     74 	O_TRUNC               = 01000
     75 	O_WRONLY              = 01
     76 	POSIX_FADV_DONTNEED   = 4
     77 	POSIX_FADV_NOREUSE    = 5
     78 	POSIX_FADV_NORMAL     = 0
     79 	POSIX_FADV_RANDOM     = 1
     80 	POSIX_FADV_SEQUENTIAL = 2
     81 	POSIX_FADV_WILLNEED   = 3
     82 	R_OK                  = 4
     83 	SEEK_CUR              = 1
     84 	SEEK_END              = 2
     85 	SEEK_SET              = 0
     86 	S_IFBLK               = 24576
     87 	S_IFCHR               = 8192
     88 	S_IFDIR               = 16384
     89 	S_IFIFO               = 4096
     90 	S_IFLNK               = 40960
     91 	S_IFMT                = 61440
     92 	S_IFREG               = 32768
     93 	S_IFSOCK              = 49152
     94 	S_IRGRP               = 32
     95 	S_IROTH               = 4
     96 	S_IRUSR               = 256
     97 	S_IRWXG               = 56
     98 	S_IRWXO               = 7
     99 	S_IRWXU               = 448
    100 	S_ISGID               = 1024
    101 	S_ISUID               = 2048
    102 	S_ISVTX               = 512
    103 	S_IWGRP               = 16
    104 	S_IWOTH               = 2
    105 	S_IWUSR               = 128
    106 	S_IXGRP               = 8
    107 	S_IXOTH               = 1
    108 	S_IXUSR               = 64
    109 	UTIME_NOW             = 1073741823
    110 	UTIME_OMIT            = 1073741822
    111 	W_OK                  = 2
    112 	X_OK                  = 1
    113 	X_ATFILE_SOURCE       = 1
    114 	X_BITS_ENDIANNESS_H   = 1
    115 	X_BITS_ENDIAN_H       = 1
    116 	X_BITS_STAT_H         = 1
    117 	X_BITS_TIME64_H       = 1
    118 	X_BITS_TYPESIZES_H    = 1
    119 	X_BITS_TYPES_H        = 1
    120 	X_DEFAULT_SOURCE      = 1
    121 	X_FCNTL_H             = 1
    122 	X_FEATURES_H          = 1
    123 	X_FILE_OFFSET_BITS    = 64
    124 	X_LP64                = 1
    125 	X_MKNOD_VER_LINUX     = 0
    126 	X_POSIX_C_SOURCE      = 200809
    127 	X_POSIX_SOURCE        = 1
    128 	X_STATBUF_ST_BLKSIZE  = 0
    129 	X_STATBUF_ST_NSEC     = 0
    130 	X_STATBUF_ST_RDEV     = 0
    131 	X_STAT_VER            = 0
    132 	X_STAT_VER_KERNEL     = 0
    133 	X_STAT_VER_LINUX      = 0
    134 	X_STDC_PREDEF_H       = 1
    135 	X_STRUCT_TIMESPEC     = 1
    136 	X_SYS_CDEFS_H         = 1
    137 	Linux                 = 1
    138 	Unix                  = 1
    139 )
    140 
    141 type Ptrdiff_t = int64 /* <builtin>:3:26 */
    142 
    143 type Size_t = uint64 /* <builtin>:9:23 */
    144 
    145 type Wchar_t = uint32 /* <builtin>:15:24 */
    146 
    147 type X__int128_t = struct {
    148 	Flo int64
    149 	Fhi int64
    150 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
    151 type X__uint128_t = struct {
    152 	Flo uint64
    153 	Fhi uint64
    154 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
    155 
    156 type X__builtin_va_list = uintptr /* <builtin>:46:14 */
    157 type X__float128 = float64        /* <builtin>:47:21 */
    158 
    159 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    160 //    This file is part of the GNU C Library.
    161 //
    162 //    The GNU C Library is free software; you can redistribute it and/or
    163 //    modify it under the terms of the GNU Lesser General Public
    164 //    License as published by the Free Software Foundation; either
    165 //    version 2.1 of the License, or (at your option) any later version.
    166 //
    167 //    The GNU C Library is distributed in the hope that it will be useful,
    168 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    169 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    170 //    Lesser General Public License for more details.
    171 //
    172 //    You should have received a copy of the GNU Lesser General Public
    173 //    License along with the GNU C Library; if not, see
    174 //    <https://www.gnu.org/licenses/>.
    175 
    176 //	POSIX Standard: 6.5 File Control Operations	<fcntl.h>
    177 
    178 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    179 //    This file is part of the GNU C Library.
    180 //
    181 //    The GNU C Library is free software; you can redistribute it and/or
    182 //    modify it under the terms of the GNU Lesser General Public
    183 //    License as published by the Free Software Foundation; either
    184 //    version 2.1 of the License, or (at your option) any later version.
    185 //
    186 //    The GNU C Library is distributed in the hope that it will be useful,
    187 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    188 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    189 //    Lesser General Public License for more details.
    190 //
    191 //    You should have received a copy of the GNU Lesser General Public
    192 //    License along with the GNU C Library; if not, see
    193 //    <https://www.gnu.org/licenses/>.
    194 
    195 // These are defined by the user (or the compiler)
    196 //    to specify the desired environment:
    197 //
    198 //    __STRICT_ANSI__	ISO Standard C.
    199 //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
    200 //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
    201 //    _ISOC2X_SOURCE	Extensions to ISO C99 from ISO C2X.
    202 //    __STDC_WANT_LIB_EXT2__
    203 // 			Extensions to ISO C99 from TR 27431-2:2010.
    204 //    __STDC_WANT_IEC_60559_BFP_EXT__
    205 // 			Extensions to ISO C11 from TS 18661-1:2014.
    206 //    __STDC_WANT_IEC_60559_FUNCS_EXT__
    207 // 			Extensions to ISO C11 from TS 18661-4:2015.
    208 //    __STDC_WANT_IEC_60559_TYPES_EXT__
    209 // 			Extensions to ISO C11 from TS 18661-3:2015.
    210 //
    211 //    _POSIX_SOURCE	IEEE Std 1003.1.
    212 //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
    213 // 			if >=199309L, add IEEE Std 1003.1b-1993;
    214 // 			if >=199506L, add IEEE Std 1003.1c-1995;
    215 // 			if >=200112L, all of IEEE 1003.1-2004
    216 // 			if >=200809L, all of IEEE 1003.1-2008
    217 //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
    218 // 			Single Unix conformance is wanted, to 600 for the
    219 // 			sixth revision, to 700 for the seventh revision.
    220 //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
    221 //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
    222 //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
    223 //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
    224 //    _ATFILE_SOURCE	Additional *at interfaces.
    225 //    _GNU_SOURCE		All of the above, plus GNU extensions.
    226 //    _DEFAULT_SOURCE	The default set of features (taking precedence over
    227 // 			__STRICT_ANSI__).
    228 //
    229 //    _FORTIFY_SOURCE	Add security hardening to many library functions.
    230 // 			Set to 1 or 2; 2 performs stricter checks than 1.
    231 //
    232 //    _REENTRANT, _THREAD_SAFE
    233 // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
    234 //
    235 //    The `-ansi' switch to the GNU C compiler, and standards conformance
    236 //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
    237 //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
    238 //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
    239 //    200809L, as well as enabling miscellaneous functions from BSD and
    240 //    SVID.  If more than one of these are defined, they accumulate.  For
    241 //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
    242 //    give you ISO C, 1003.1, and 1003.2, but nothing else.
    243 //
    244 //    These are defined by this file and are used by the
    245 //    header files to decide what to declare or define:
    246 //
    247 //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
    248 // 			to 1 or 0; the subsequent macros are either defined
    249 // 			or undefined, and those tests should be moved to
    250 // 			__GLIBC_USE.
    251 //    __USE_ISOC11		Define ISO C11 things.
    252 //    __USE_ISOC99		Define ISO C99 things.
    253 //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
    254 //    __USE_ISOCXX11	Define ISO C++11 things.
    255 //    __USE_POSIX		Define IEEE Std 1003.1 things.
    256 //    __USE_POSIX2		Define IEEE Std 1003.2 things.
    257 //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
    258 //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
    259 //    __USE_XOPEN		Define XPG things.
    260 //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
    261 //    __USE_UNIX98		Define Single Unix V2 things.
    262 //    __USE_XOPEN2K        Define XPG6 things.
    263 //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
    264 //    __USE_XOPEN2K8       Define XPG7 things.
    265 //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
    266 //    __USE_LARGEFILE	Define correct standard I/O things.
    267 //    __USE_LARGEFILE64	Define LFS things with separate names.
    268 //    __USE_FILE_OFFSET64	Define 64bit interface as default.
    269 //    __USE_MISC		Define things from 4.3BSD or System V Unix.
    270 //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
    271 //    __USE_GNU		Define GNU extensions.
    272 //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
    273 //
    274 //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
    275 //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
    276 //    only for compatibility.  All new code should use the other symbols
    277 //    to test for features.
    278 //
    279 //    All macros listed above as possibly being defined by this file are
    280 //    explicitly undefined if they are not explicitly defined.
    281 //    Feature-test macros that are not defined by the user or compiler
    282 //    but are implied by the other feature-test macros defined (or by the
    283 //    lack of any definitions) are defined by the file.
    284 //
    285 //    ISO C feature test macros depend on the definition of the macro
    286 //    when an affected header is included, not when the first system
    287 //    header is included, and so they are handled in
    288 //    <bits/libc-header-start.h>, which does not have a multiple include
    289 //    guard.  Feature test macros that can be handled from the first
    290 //    system header included are handled here.
    291 
    292 // Undefine everything, so we get a clean slate.
    293 
    294 // Suppress kernel-name space pollution unless user expressedly asks
    295 //    for it.
    296 
    297 // Convenience macro to test the version of gcc.
    298 //    Use like this:
    299 //    #if __GNUC_PREREQ (2,8)
    300 //    ... code requiring gcc 2.8 or later ...
    301 //    #endif
    302 //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
    303 //    added in 2.0.
    304 
    305 // Similarly for clang.  Features added to GCC after version 4.2 may
    306 //    or may not also be available in clang, and clang's definitions of
    307 //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
    308 //    features can be queried via __has_extension/__has_feature.
    309 
    310 // Whether to use feature set F.
    311 
    312 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
    313 //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
    314 //    issue a warning; the expectation is that the source is being
    315 //    transitioned to use the new macro.
    316 
    317 // If _GNU_SOURCE was defined by the user, turn on all the other features.
    318 
    319 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
    320 //    define _DEFAULT_SOURCE.
    321 
    322 // This is to enable the ISO C2X extension.
    323 
    324 // This is to enable the ISO C11 extension.
    325 
    326 // This is to enable the ISO C99 extension.
    327 
    328 // This is to enable the ISO C90 Amendment 1:1995 extension.
    329 
    330 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
    331 //    is defined, use POSIX.1-2008 (or another version depending on
    332 //    _XOPEN_SOURCE).
    333 
    334 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
    335 //    defined in all multithreaded code.  GNU libc has not required this
    336 //    for many years.  We now treat them as compatibility synonyms for
    337 //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
    338 //    comprehensive support for multithreaded code.  Using them never
    339 //    lowers the selected level of POSIX conformance, only raises it.
    340 
    341 // The function 'gets' existed in C89, but is impossible to use
    342 //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
    343 //    compatibility with various implementations of <cstdio>, this test
    344 //    must consider only the value of __cplusplus when compiling C++.
    345 
    346 // GNU formerly extended the scanf functions with modified format
    347 //    specifiers %as, %aS, and %a[...] that allocate a buffer for the
    348 //    input using malloc.  This extension conflicts with ISO C99, which
    349 //    defines %a as a standalone format specifier that reads a floating-
    350 //    point number; moreover, POSIX.1-2008 provides the same feature
    351 //    using the modifier letter 'm' instead (%ms, %mS, %m[...]).
    352 //
    353 //    We now follow C99 unless GNU extensions are active and the compiler
    354 //    is specifically in C89 or C++98 mode (strict or not).  For
    355 //    instance, with GCC, -std=gnu11 will have C99-compliant scanf with
    356 //    or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
    357 //    old extension.
    358 
    359 // Get definitions of __STDC_* predefined macros, if the compiler has
    360 //    not preincluded this header automatically.
    361 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    362 //    This file is part of the GNU C Library.
    363 //
    364 //    The GNU C Library is free software; you can redistribute it and/or
    365 //    modify it under the terms of the GNU Lesser General Public
    366 //    License as published by the Free Software Foundation; either
    367 //    version 2.1 of the License, or (at your option) any later version.
    368 //
    369 //    The GNU C Library is distributed in the hope that it will be useful,
    370 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    371 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    372 //    Lesser General Public License for more details.
    373 //
    374 //    You should have received a copy of the GNU Lesser General Public
    375 //    License along with the GNU C Library; if not, see
    376 //    <https://www.gnu.org/licenses/>.
    377 
    378 // This macro indicates that the installed library is the GNU C Library.
    379 //    For historic reasons the value now is 6 and this will stay from now
    380 //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
    381 //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
    382 //    GNU C library version and use the values in <gnu/lib-names.h> to get
    383 //    the sonames of the shared libraries.
    384 
    385 // Major and minor version number of the GNU C library package.  Use
    386 //    these macros to test for features in specific releases.
    387 
    388 // This is here only because every header file already includes this one.
    389 // Copyright (C) 1992-2020 Free Software Foundation, Inc.
    390 //    This file is part of the GNU C Library.
    391 //
    392 //    The GNU C Library is free software; you can redistribute it and/or
    393 //    modify it under the terms of the GNU Lesser General Public
    394 //    License as published by the Free Software Foundation; either
    395 //    version 2.1 of the License, or (at your option) any later version.
    396 //
    397 //    The GNU C Library is distributed in the hope that it will be useful,
    398 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    399 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    400 //    Lesser General Public License for more details.
    401 //
    402 //    You should have received a copy of the GNU Lesser General Public
    403 //    License along with the GNU C Library; if not, see
    404 //    <https://www.gnu.org/licenses/>.
    405 
    406 // We are almost always included from features.h.
    407 
    408 // The GNU libc does not support any K&R compilers or the traditional mode
    409 //    of ISO C compilers anymore.  Check for some of the combinations not
    410 //    anymore supported.
    411 
    412 // Some user header file might have defined this before.
    413 
    414 // All functions, except those with callbacks or those that
    415 //    synchronize memory, are leaf functions.
    416 
    417 // GCC can always grok prototypes.  For C++ programs we add throw()
    418 //    to help it optimize the function calls.  But this works only with
    419 //    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
    420 //    as non-throwing using a function attribute since programs can use
    421 //    the -fexceptions options for C code as well.
    422 
    423 // Compilers that are not clang may object to
    424 //        #if defined __clang__ && __has_extension(...)
    425 //    even though they do not need to evaluate the right-hand side of the &&.
    426 
    427 // These two macros are not used in glibc anymore.  They are kept here
    428 //    only because some other projects expect the macros to be defined.
    429 
    430 // For these things, GCC behaves the ANSI way normally,
    431 //    and the non-ANSI way under -traditional.
    432 
    433 // This is not a typedef so `const __ptr_t' does the right thing.
    434 
    435 // C++ needs to know that types and declarations are C, not C++.
    436 
    437 // Fortify support.
    438 
    439 // Support for flexible arrays.
    440 //    Headers that should use flexible arrays only if they're "real"
    441 //    (e.g. only if they won't affect sizeof()) should test
    442 //    #if __glibc_c99_flexarr_available.
    443 
    444 // __asm__ ("xyz") is used throughout the headers to rename functions
    445 //    at the assembly language level.  This is wrapped by the __REDIRECT
    446 //    macro, in order to support compilers that can do this some other
    447 //    way.  When compilers don't support asm-names at all, we have to do
    448 //    preprocessor tricks instead (which don't have exactly the right
    449 //    semantics, but it's the best we can do).
    450 //
    451 //    Example:
    452 //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
    453 
    454 //
    455 // #elif __SOME_OTHER_COMPILER__
    456 //
    457 // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
    458 
    459 // GCC has various useful declarations that can be made with the
    460 //    `__attribute__' syntax.  All of the ways we use this do fine if
    461 //    they are omitted for compilers that don't understand it.
    462 
    463 // At some point during the gcc 2.96 development the `malloc' attribute
    464 //    for functions was introduced.  We don't want to use it unconditionally
    465 //    (although this would be possible) since it generates warnings.
    466 
    467 // Tell the compiler which arguments to an allocation function
    468 //    indicate the size of the allocation.
    469 
    470 // At some point during the gcc 2.96 development the `pure' attribute
    471 //    for functions was introduced.  We don't want to use it unconditionally
    472 //    (although this would be possible) since it generates warnings.
    473 
    474 // This declaration tells the compiler that the value is constant.
    475 
    476 // At some point during the gcc 3.1 development the `used' attribute
    477 //    for functions was introduced.  We don't want to use it unconditionally
    478 //    (although this would be possible) since it generates warnings.
    479 
    480 // Since version 3.2, gcc allows marking deprecated functions.
    481 
    482 // Since version 4.5, gcc also allows one to specify the message printed
    483 //    when a deprecated function is used.  clang claims to be gcc 4.2, but
    484 //    may also support this feature.
    485 
    486 // At some point during the gcc 2.8 development the `format_arg' attribute
    487 //    for functions was introduced.  We don't want to use it unconditionally
    488 //    (although this would be possible) since it generates warnings.
    489 //    If several `format_arg' attributes are given for the same function, in
    490 //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
    491 //    all designated arguments are considered.
    492 
    493 // At some point during the gcc 2.97 development the `strfmon' format
    494 //    attribute for functions was introduced.  We don't want to use it
    495 //    unconditionally (although this would be possible) since it
    496 //    generates warnings.
    497 
    498 // The nonull function attribute allows to mark pointer parameters which
    499 //    must not be NULL.
    500 
    501 // If fortification mode, we warn about unused results of certain
    502 //    function calls which can lead to problems.
    503 
    504 // Forces a function to be always inlined.
    505 // The Linux kernel defines __always_inline in stddef.h (283d7573), and
    506 //    it conflicts with this definition.  Therefore undefine it first to
    507 //    allow either header to be included first.
    508 
    509 // Associate error messages with the source location of the call site rather
    510 //    than with the source location inside the function.
    511 
    512 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
    513 //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
    514 //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
    515 //    older than 4.3 may define these macros and still not guarantee GNU inlining
    516 //    semantics.
    517 //
    518 //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
    519 //    semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
    520 //    __GNUC_GNU_INLINE__ macro definitions.
    521 
    522 // GCC 4.3 and above allow passing all anonymous arguments of an
    523 //    __extern_always_inline function to some other vararg function.
    524 
    525 // It is possible to compile containing GCC extensions even if GCC is
    526 //    run in pedantic mode if the uses are carefully marked using the
    527 //    `__extension__' keyword.  But this is not generally available before
    528 //    version 2.8.
    529 
    530 // __restrict is known in EGCS 1.2 and above.
    531 
    532 // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
    533 //      array_name[restrict]
    534 //    GCC 3.1 supports this.
    535 
    536 // Describes a char array whose address can safely be passed as the first
    537 //    argument to strncpy and strncat, as the char array is not necessarily
    538 //    a NUL-terminated string.
    539 
    540 // Undefine (also defined in libc-symbols.h).
    541 // Copies attributes from the declaration or type referenced by
    542 //    the argument.
    543 
    544 // Determine the wordsize from the preprocessor defines.
    545 //
    546 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    547 //    This file is part of the GNU C Library.
    548 //
    549 //    The GNU C Library is free software; you can redistribute it and/or
    550 //    modify it under the terms of the GNU Lesser General Public
    551 //    License as published by the Free Software Foundation; either
    552 //    version 2.1 of the License, or (at your option) any later version.
    553 //
    554 //    The GNU C Library is distributed in the hope that it will be useful,
    555 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    556 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    557 //    Lesser General Public License for more details.
    558 //
    559 //    You should have received a copy of the GNU Lesser General Public
    560 //    License along with the GNU C Library; if not, see
    561 //    <https://www.gnu.org/licenses/>.
    562 
    563 // Properties of long double type.  ldbl-128 version.
    564 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    565 //    This file is part of the GNU C Library.
    566 //
    567 //    The GNU C Library is free software; you can redistribute it and/or
    568 //    modify it under the terms of the GNU Lesser General Public
    569 //    License  published by the Free Software Foundation; either
    570 //    version 2.1 of the License, or (at your option) any later version.
    571 //
    572 //    The GNU C Library is distributed in the hope that it will be useful,
    573 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    574 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    575 //    Lesser General Public License for more details.
    576 //
    577 //    You should have received a copy of the GNU Lesser General Public
    578 //    License along with the GNU C Library; if not, see
    579 //    <https://www.gnu.org/licenses/>.
    580 
    581 // long double is distinct from double, so there is nothing to
    582 //    define here.
    583 
    584 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
    585 //    intended for use in preprocessor macros.
    586 //
    587 //    Note: MESSAGE must be a _single_ string; concatenation of string
    588 //    literals is not supported.
    589 
    590 // Generic selection (ISO C11) is a C-only feature, available in GCC
    591 //    since version 4.9.  Previous versions do not provide generic
    592 //    selection, even though they might set __STDC_VERSION__ to 201112L,
    593 //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
    594 //    when testing __STDC_VERSION__ for generic selection support.
    595 //    On the other hand, Clang also defines __GNUC__, so a clang-specific
    596 //    check is required to enable the use of generic selection.
    597 
    598 // If we don't have __REDIRECT, prototypes will be missing if
    599 //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
    600 
    601 // Decide whether we can define 'extern inline' functions in headers.
    602 
    603 // This is here only because every header file already includes this one.
    604 //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
    605 //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
    606 //    that will always return failure (and set errno to ENOSYS).
    607 // This file is automatically generated.
    608 //    This file selects the right generated file of `__stub_FUNCTION' macros
    609 //    based on the architecture being compiled for.
    610 
    611 // Determine the wordsize from the preprocessor defines.
    612 //
    613 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    614 //    This file is part of the GNU C Library.
    615 //
    616 //    The GNU C Library is free software; you can redistribute it and/or
    617 //    modify it under the terms of the GNU Lesser General Public
    618 //    License as published by the Free Software Foundation; either
    619 //    version 2.1 of the License, or (at your option) any later version.
    620 //
    621 //    The GNU C Library is distributed in the hope that it will be useful,
    622 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    623 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    624 //    Lesser General Public License for more details.
    625 //
    626 //    You should have received a copy of the GNU Lesser General Public
    627 //    License along with the GNU C Library; if not, see
    628 //    <https://www.gnu.org/licenses/>.
    629 
    630 // This file is automatically generated.
    631 //    It defines a symbol `__stub_FUNCTION' for each function
    632 //    in the C library which is a stub, meaning it will fail
    633 //    every time called, usually setting errno to ENOSYS.
    634 
    635 // This must be early so <bits/fcntl.h> can define types winningly.
    636 
    637 // Get __mode_t, __dev_t and __off_t  .
    638 // bits/types.h -- definitions of __*_t types underlying *_t types.
    639 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
    640 //    This file is part of the GNU C Library.
    641 //
    642 //    The GNU C Library is free software; you can redistribute it and/or
    643 //    modify it under the terms of the GNU Lesser General Public
    644 //    License as published by the Free Software Foundation; either
    645 //    version 2.1 of the License, or (at your option) any later version.
    646 //
    647 //    The GNU C Library is distributed in the hope that it will be useful,
    648 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    649 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    650 //    Lesser General Public License for more details.
    651 //
    652 //    You should have received a copy of the GNU Lesser General Public
    653 //    License along with the GNU C Library; if not, see
    654 //    <https://www.gnu.org/licenses/>.
    655 
    656 // Never include this file directly; use <sys/types.h> instead.
    657 
    658 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    659 //    This file is part of the GNU C Library.
    660 //
    661 //    The GNU C Library is free software; you can redistribute it and/or
    662 //    modify it under the terms of the GNU Lesser General Public
    663 //    License as published by the Free Software Foundation; either
    664 //    version 2.1 of the License, or (at your option) any later version.
    665 //
    666 //    The GNU C Library 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 GNU
    669 //    Lesser General Public License for more details.
    670 //
    671 //    You should have received a copy of the GNU Lesser General Public
    672 //    License along with the GNU C Library; if not, see
    673 //    <https://www.gnu.org/licenses/>.
    674 
    675 // Determine the wordsize from the preprocessor defines.
    676 //
    677 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    678 //    This file is part of the GNU C Library.
    679 //
    680 //    The GNU C Library is free software; you can redistribute it and/or
    681 //    modify it under the terms of the GNU Lesser General Public
    682 //    License as published by the Free Software Foundation; either
    683 //    version 2.1 of the License, or (at your option) any later version.
    684 //
    685 //    The GNU C Library is distributed in the hope that it will be useful,
    686 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    687 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    688 //    Lesser General Public License for more details.
    689 //
    690 //    You should have received a copy of the GNU Lesser General Public
    691 //    License along with the GNU C Library; if not, see
    692 //    <https://www.gnu.org/licenses/>.
    693 
    694 // Bit size of the time_t type at glibc build time, general case.
    695 //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
    696 //    This file is part of the GNU C Library.
    697 //
    698 //    The GNU C Library is free software; you can redistribute it and/or
    699 //    modify it under the terms of the GNU Lesser General Public
    700 //    License as published by the Free Software Foundation; either
    701 //    version 2.1 of the License, or (at your option) any later version.
    702 //
    703 //    The GNU C Library is distributed in the hope that it will be useful,
    704 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    705 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    706 //    Lesser General Public License for more details.
    707 //
    708 //    You should have received a copy of the GNU Lesser General Public
    709 //    License along with the GNU C Library; if not, see
    710 //    <https://www.gnu.org/licenses/>.
    711 
    712 // Determine the wordsize from the preprocessor defines.
    713 //
    714 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    715 //    This file is part of the GNU C Library.
    716 //
    717 //    The GNU C Library is free software; you can redistribute it and/or
    718 //    modify it under the terms of the GNU Lesser General Public
    719 //    License as published by the Free Software Foundation; either
    720 //    version 2.1 of the License, or (at your option) any later version.
    721 //
    722 //    The GNU C Library is distributed in the hope that it will be useful,
    723 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    724 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    725 //    Lesser General Public License for more details.
    726 //
    727 //    You should have received a copy of the GNU Lesser General Public
    728 //    License along with the GNU C Library; if not, see
    729 //    <https://www.gnu.org/licenses/>.
    730 
    731 // Size in bits of the 'time_t' type of the default ABI.
    732 
    733 // Convenience types.
    734 type X__u_char = uint8   /* types.h:31:23 */
    735 type X__u_short = uint16 /* types.h:32:28 */
    736 type X__u_int = uint32   /* types.h:33:22 */
    737 type X__u_long = uint64  /* types.h:34:27 */
    738 
    739 // Fixed-size types, underlying types depend on word size and compiler.
    740 type X__int8_t = int8     /* types.h:37:21 */
    741 type X__uint8_t = uint8   /* types.h:38:23 */
    742 type X__int16_t = int16   /* types.h:39:26 */
    743 type X__uint16_t = uint16 /* types.h:40:28 */
    744 type X__int32_t = int32   /* types.h:41:20 */
    745 type X__uint32_t = uint32 /* types.h:42:22 */
    746 type X__int64_t = int64   /* types.h:44:25 */
    747 type X__uint64_t = uint64 /* types.h:45:27 */
    748 
    749 // Smallest types with at least a given width.
    750 type X__int_least8_t = X__int8_t     /* types.h:52:18 */
    751 type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
    752 type X__int_least16_t = X__int16_t   /* types.h:54:19 */
    753 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
    754 type X__int_least32_t = X__int32_t   /* types.h:56:19 */
    755 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
    756 type X__int_least64_t = X__int64_t   /* types.h:58:19 */
    757 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
    758 
    759 // quad_t is also 64 bits.
    760 type X__quad_t = int64    /* types.h:63:18 */
    761 type X__u_quad_t = uint64 /* types.h:64:27 */
    762 
    763 // Largest integral types.
    764 type X__intmax_t = int64   /* types.h:72:18 */
    765 type X__uintmax_t = uint64 /* types.h:73:27 */
    766 
    767 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
    768 //    macros for each of the OS types we define below.  The definitions
    769 //    of those macros must use the following macros for underlying types.
    770 //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
    771 //    variants of each of the following integer types on this machine.
    772 //
    773 // 	16		-- "natural" 16-bit type (always short)
    774 // 	32		-- "natural" 32-bit type (always int)
    775 // 	64		-- "natural" 64-bit type (long or long long)
    776 // 	LONG32		-- 32-bit type, traditionally long
    777 // 	QUAD		-- 64-bit type, traditionally long long
    778 // 	WORD		-- natural type of __WORDSIZE bits (int or long)
    779 // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
    780 //
    781 //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
    782 //    conventional uses of `long' or `long long' type modifiers match the
    783 //    types we define, even when a less-adorned type would be the same size.
    784 //    This matters for (somewhat) portably writing printf/scanf formats for
    785 //    these types, where using the appropriate l or ll format modifiers can
    786 //    make the typedefs and the formats match up across all GNU platforms.  If
    787 //    we used `long' when it's 64 bits where `long long' is expected, then the
    788 //    compiler would warn about the formats not matching the argument types,
    789 //    and the programmer changing them to shut up the compiler would break the
    790 //    program's portability.
    791 //
    792 //    Here we assume what is presently the case in all the GCC configurations
    793 //    we support: long long is always 64 bits, long is always word/address size,
    794 //    and int is always 32 bits.
    795 
    796 // No need to mark the typedef with __extension__.
    797 // bits/typesizes.h -- underlying types for *_t.  For the generic Linux ABI.
    798 //    Copyright (C) 2011-2020 Free Software Foundation, Inc.
    799 //    This file is part of the GNU C Library.
    800 //    Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
    801 //
    802 //    The GNU C Library is free software; you can redistribute it and/or
    803 //    modify it under the terms of the GNU Lesser General Public
    804 //    License as published by the Free Software Foundation; either
    805 //    version 2.1 of the License, or (at your option) any later version.
    806 //
    807 //    The GNU C Library is distributed in the hope that it will be useful,
    808 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    809 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    810 //    Lesser General Public License for more details.
    811 //
    812 //    You should have received a copy of the GNU Lesser General Public
    813 //    License along with the GNU C Library.  If not, see
    814 //    <https://www.gnu.org/licenses/>.
    815 
    816 // See <bits/types.h> for the meaning of these macros.  This file exists so
    817 //    that <bits/types.h> need not vary across different GNU platforms.
    818 
    819 // Tell the libc code that off_t and off64_t are actually the same type
    820 //    for all ABI purposes, even if possibly expressed as different base types
    821 //    for C type-checking purposes.
    822 
    823 // Same for ino_t and ino64_t.
    824 
    825 // And for __rlim_t and __rlim64_t.
    826 
    827 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
    828 // Number of descriptors that can fit in an `fd_set'.
    829 
    830 // bits/time64.h -- underlying types for __time64_t.  Generic version.
    831 //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
    832 //    This file is part of the GNU C Library.
    833 //
    834 //    The GNU C Library is free software; you can redistribute it and/or
    835 //    modify it under the terms of the GNU Lesser General Public
    836 //    License as published by the Free Software Foundation; either
    837 //    version 2.1 of the License, or (at your option) any later version.
    838 //
    839 //    The GNU C Library is distributed in the hope that it will be useful,
    840 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    841 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    842 //    Lesser General Public License for more details.
    843 //
    844 //    You should have received a copy of the GNU Lesser General Public
    845 //    License along with the GNU C Library; if not, see
    846 //    <https://www.gnu.org/licenses/>.
    847 
    848 // Define __TIME64_T_TYPE so that it is always a 64-bit type.
    849 
    850 // If we already have 64-bit time type then use it.
    851 
    852 type X__dev_t = uint64                     /* types.h:145:25 */ // Type of device numbers.
    853 type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
    854 type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
    855 type X__ino_t = uint64                     /* types.h:148:25 */ // Type of file serial numbers.
    856 type X__ino64_t = uint64                   /* types.h:149:27 */ // Type of file serial numbers (LFS).
    857 type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
    858 type X__nlink_t = uint32                   /* types.h:151:27 */ // Type of file link counts.
    859 type X__off_t = int64                      /* types.h:152:25 */ // Type of file sizes and offsets.
    860 type X__off64_t = int64                    /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
    861 type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
    862 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
    863 type X__clock_t = int64                    /* types.h:156:27 */ // Type of CPU usage counts.
    864 type X__rlim_t = uint64                    /* types.h:157:26 */ // Type for resource measurement.
    865 type X__rlim64_t = uint64                  /* types.h:158:28 */ // Type for resource measurement (LFS).
    866 type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
    867 type X__time_t = int64                     /* types.h:160:26 */ // Seconds since the Epoch.
    868 type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
    869 type X__suseconds_t = int64                /* types.h:162:31 */ // Signed count of microseconds.
    870 
    871 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
    872 type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
    873 
    874 // Clock ID used in clock and timer functions.
    875 type X__clockid_t = int32 /* types.h:168:29 */
    876 
    877 // Timer ID returned by `timer_create'.
    878 type X__timer_t = uintptr /* types.h:171:12 */
    879 
    880 // Type to represent block size.
    881 type X__blksize_t = int32 /* types.h:174:29 */
    882 
    883 // Types from the Large File Support interface.
    884 
    885 // Type to count number of disk blocks.
    886 type X__blkcnt_t = int64   /* types.h:179:28 */
    887 type X__blkcnt64_t = int64 /* types.h:180:30 */
    888 
    889 // Type to count file system blocks.
    890 type X__fsblkcnt_t = uint64   /* types.h:183:30 */
    891 type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
    892 
    893 // Type to count file system nodes.
    894 type X__fsfilcnt_t = uint64   /* types.h:187:30 */
    895 type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
    896 
    897 // Type of miscellaneous file system fields.
    898 type X__fsword_t = int64 /* types.h:191:28 */
    899 
    900 type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
    901 
    902 // Signed long type used in system calls.
    903 type X__syscall_slong_t = int64 /* types.h:196:33 */
    904 // Unsigned long type used in system calls.
    905 type X__syscall_ulong_t = uint64 /* types.h:198:33 */
    906 
    907 // These few don't really vary by system, they always correspond
    908 //
    909 //	to one of the other defined types.
    910 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
    911 type X__caddr_t = uintptr   /* types.h:203:14 */
    912 
    913 // Duplicates info from stdint.h but this is used in unistd.h.
    914 type X__intptr_t = int64 /* types.h:206:25 */
    915 
    916 // Duplicate info from sys/socket.h.
    917 type X__socklen_t = uint32 /* types.h:209:23 */
    918 
    919 // C99: An integer type that can be accessed as an atomic entity,
    920 //
    921 //	even in the presence of asynchronous interrupts.
    922 //	It is not currently necessary for this to be machine-specific.
    923 type X__sig_atomic_t = int32 /* types.h:214:13 */
    924 
    925 // Seconds since the Epoch, visible to user code when time_t is too
    926 //    narrow only for consistency with the old way of widening too-narrow
    927 //    types.  User code should never use __time64_t.
    928 
    929 // Get the definitions of O_*, F_*, FD_*: all the
    930 //    numbers and flag bits for `open', `fcntl', et al.
    931 // O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
    932 //    Copyright (C) 2011-2020 Free Software Foundation, Inc.
    933 //
    934 //    This file is part of the GNU C Library.
    935 //
    936 //    The GNU C Library is free software; you can redistribute it and/or
    937 //    modify it under the terms of the GNU Lesser General Public
    938 //    License as published by the Free Software Foundation; either
    939 //    version 2.1 of the License, or (at your option) any later version.
    940 //
    941 //    The GNU C Library is distributed in the hope that it will be useful,
    942 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    943 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    944 //    Lesser General Public License for more details.
    945 //
    946 //    You should have received a copy of the GNU Lesser General Public
    947 //    License along with the GNU C Library.  If not, see
    948 //    <https://www.gnu.org/licenses/>.
    949 
    950 type Flock = struct {
    951 	Fl_type      int16
    952 	Fl_whence    int16
    953 	F__ccgo_pad1 [4]byte
    954 	Fl_start     X__off_t
    955 	Fl_len       X__off_t
    956 	Fl_pid       X__pid_t
    957 	F__ccgo_pad2 [4]byte
    958 } /* fcntl.h:40:1 */
    959 
    960 // Include generic Linux declarations.
    961 // O_*, F_*, FD_* bit values for Linux.
    962 //    Copyright (C) 2001-2020 Free Software Foundation, Inc.
    963 //    This file is part of the GNU C Library.
    964 //
    965 //    The GNU C Library is free software; you can redistribute it and/or
    966 //    modify it under the terms of the GNU Lesser General Public
    967 //    License as published by the Free Software Foundation; either
    968 //    version 2.1 of the License, or (at your option) any later version.
    969 //
    970 //    The GNU C Library is distributed in the hope that it will be useful,
    971 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    972 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    973 //    Lesser General Public License for more details.
    974 //
    975 //    You should have received a copy of the GNU Lesser General Public
    976 //    License along with the GNU C Library; if not, see
    977 //    <https://www.gnu.org/licenses/>.
    978 
    979 // This file contains shared definitions between Linux architectures
    980 //    and is included by <bits/fcntl.h> to declare them.  The various
    981 //    #ifndef cases allow the architecture specific file to define those
    982 //    values with different values.
    983 //
    984 //    A minimal <bits/fcntl.h> contains just:
    985 //
    986 //    struct flock {...}
    987 //    #ifdef __USE_LARGEFILE64
    988 //    struct flock64 {...}
    989 //    #endif
    990 //    #include <bits/fcntl-linux.h>
    991 
    992 // open/fcntl.
    993 
    994 // open file description locks.
    995 //
    996 //    Usually record locks held by a process are released on *any* close and are
    997 //    not inherited across a fork.
    998 //
    999 //    These cmd values will set locks that conflict with process-associated record
   1000 //    locks, but are "owned" by the opened file description, not the process.
   1001 //    This means that they are inherited across fork or clone with CLONE_FILES
   1002 //    like BSD (flock) locks, and they are only released automatically when the
   1003 //    last reference to the the file description against which they were acquired
   1004 //    is put.
   1005 
   1006 // For now, Linux has no separate synchronicity options for read
   1007 //    operations.  We define O_RSYNC therefore as the same as O_SYNC
   1008 //    since this is a superset.
   1009 
   1010 // Values for the second argument to `fcntl'.
   1011 
   1012 // For F_[GET|SET]FD.
   1013 
   1014 // For posix fcntl() and `l_type' field of a `struct flock' for lockf().
   1015 
   1016 // For old implementation of BSD flock.
   1017 
   1018 // Operations for BSD flock, also used by the kernel implementation.
   1019 
   1020 // Define some more compatibility macros to be backward compatible with
   1021 //    BSD systems which did not managed to hide these kernel macros.
   1022 
   1023 // Advise to `posix_fadvise'.
   1024 
   1025 // Values for `*at' functions.
   1026 
   1027 // Detect if open needs mode as a third argument (or for openat as a fourth
   1028 //    argument).
   1029 
   1030 // POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
   1031 //
   1032 //	Earlier POSIX standards permitted any type ending in `_t' to be defined
   1033 //	by any POSIX header, so we don't conditionalize the definitions here.
   1034 type Mode_t = X__mode_t /* fcntl.h:50:18 */
   1035 
   1036 type Off_t = X__off64_t /* fcntl.h:58:19 */
   1037 
   1038 type Pid_t = X__pid_t /* fcntl.h:69:17 */
   1039 
   1040 // For XPG all symbols from <sys/stat.h> should also be available.
   1041 // NB: Include guard matches what <linux/time.h> uses.
   1042 
   1043 // bits/types.h -- definitions of __*_t types underlying *_t types.
   1044 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
   1045 //    This file is part of the GNU C Library.
   1046 //
   1047 //    The GNU C Library is free software; you can redistribute it and/or
   1048 //    modify it under the terms of the GNU Lesser General Public
   1049 //    License as published by the Free Software Foundation; either
   1050 //    version 2.1 of the License, or (at your option) any later version.
   1051 //
   1052 //    The GNU C Library is distributed in the hope that it will be useful,
   1053 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1054 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1055 //    Lesser General Public License for more details.
   1056 //
   1057 //    You should have received a copy of the GNU Lesser General Public
   1058 //    License along with the GNU C Library; if not, see
   1059 //    <https://www.gnu.org/licenses/>.
   1060 
   1061 // Never include this file directly; use <sys/types.h> instead.
   1062 
   1063 // Endian macros for string.h functions
   1064 //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
   1065 //    This file is part of the GNU C Library.
   1066 //
   1067 //    The GNU C Library is free software; you can redistribute it and/or
   1068 //    modify it under the terms of the GNU Lesser General Public
   1069 //    License as published by the Free Software Foundation; either
   1070 //    version 2.1 of the License, or (at your option) any later version.
   1071 //
   1072 //    The GNU C Library is distributed in the hope that it will be useful,
   1073 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1074 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1075 //    Lesser General Public License for more details.
   1076 //
   1077 //    You should have received a copy of the GNU Lesser General Public
   1078 //    License along with the GNU C Library; if not, see
   1079 //    <http://www.gnu.org/licenses/>.
   1080 
   1081 // Definitions for byte order, according to significance of bytes,
   1082 //    from low addresses to high addresses.  The value is what you get by
   1083 //    putting '4' in the most significant byte, '3' in the second most
   1084 //    significant byte, '2' in the second least significant byte, and '1'
   1085 //    in the least significant byte, and then writing down one digit for
   1086 //    each byte, starting with the byte at the lowest address at the left,
   1087 //    and proceeding to the byte with the highest address at the right.
   1088 
   1089 // This file defines `__BYTE_ORDER' for the particular machine.
   1090 
   1091 // AArch64 has selectable endianness.
   1092 
   1093 // Some machines may need to use a different endianness for floating point
   1094 //    values.
   1095 
   1096 // POSIX.1b structure for a time value.  This is like a `struct timeval' but
   1097 //
   1098 //	has nanoseconds instead of microseconds.
   1099 type Timespec = struct {
   1100 	Ftv_sec  X__time_t
   1101 	Ftv_nsec X__syscall_slong_t
   1102 } /* struct_timespec.h:10:1 */
   1103 
   1104 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
   1105 //    This file is part of the GNU C Library.
   1106 //    Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
   1107 //
   1108 //    The GNU C Library is free software; you can redistribute it and/or
   1109 //    modify it under the terms of the GNU Lesser General Public
   1110 //    License as published by the Free Software Foundation; either
   1111 //    version 2.1 of the License, or (at your option) any later version.
   1112 //
   1113 //    The GNU C Library is distributed in the hope that it will be useful,
   1114 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1115 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1116 //    Lesser General Public License for more details.
   1117 //
   1118 //    You should have received a copy of the GNU Lesser General Public
   1119 //    License along with the GNU C Library.  If not, see
   1120 //    <https://www.gnu.org/licenses/>.
   1121 
   1122 // Endian macros for string.h functions
   1123 //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
   1124 //    This file is part of the GNU C Library.
   1125 //
   1126 //    The GNU C Library is free software; you can redistribute it and/or
   1127 //    modify it under the terms of the GNU Lesser General Public
   1128 //    License as published by the Free Software Foundation; either
   1129 //    version 2.1 of the License, or (at your option) any later version.
   1130 //
   1131 //    The GNU C Library is distributed in the hope that it will be useful,
   1132 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1133 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1134 //    Lesser General Public License for more details.
   1135 //
   1136 //    You should have received a copy of the GNU Lesser General Public
   1137 //    License along with the GNU C Library; if not, see
   1138 //    <http://www.gnu.org/licenses/>.
   1139 
   1140 // Determine the wordsize from the preprocessor defines.
   1141 //
   1142 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
   1143 //    This file is part of the GNU C Library.
   1144 //
   1145 //    The GNU C Library is free software; you can redistribute it and/or
   1146 //    modify it under the terms of the GNU Lesser General Public
   1147 //    License as published by the Free Software Foundation; either
   1148 //    version 2.1 of the License, or (at your option) any later version.
   1149 //
   1150 //    The GNU C Library is distributed in the hope that it will be useful,
   1151 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1152 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1153 //    Lesser General Public License for more details.
   1154 //
   1155 //    You should have received a copy of the GNU Lesser General Public
   1156 //    License along with the GNU C Library; if not, see
   1157 //    <https://www.gnu.org/licenses/>.
   1158 
   1159 // 64-bit libc uses the kernel's 'struct stat', accessed via the
   1160 //    stat() syscall; 32-bit libc uses the kernel's 'struct stat64'
   1161 //    and accesses it via the stat64() syscall.  All the various
   1162 //    APIs offered by libc use the kernel shape for their struct stat
   1163 //    structure; the only difference is that 32-bit programs not
   1164 //    using __USE_FILE_OFFSET64 only see the low 32 bits of some
   1165 //    of the fields (specifically st_ino, st_size, and st_blocks).
   1166 
   1167 // Versions of the `xmknod' interface.
   1168 
   1169 type Stat = struct {
   1170 	Fst_dev     X__dev_t
   1171 	Fst_ino     X__ino64_t
   1172 	Fst_mode    X__mode_t
   1173 	Fst_nlink   X__nlink_t
   1174 	Fst_uid     X__uid_t
   1175 	Fst_gid     X__gid_t
   1176 	Fst_rdev    X__dev_t
   1177 	F__pad1     X__dev_t
   1178 	Fst_size    X__off64_t
   1179 	Fst_blksize X__blksize_t
   1180 	F__pad2     int32
   1181 	Fst_blocks  X__blkcnt64_t
   1182 	Fst_atim    struct {
   1183 		Ftv_sec  X__time_t
   1184 		Ftv_nsec X__syscall_slong_t
   1185 	}
   1186 	Fst_mtim struct {
   1187 		Ftv_sec  X__time_t
   1188 		Ftv_nsec X__syscall_slong_t
   1189 	}
   1190 	Fst_ctim struct {
   1191 		Ftv_sec  X__time_t
   1192 		Ftv_nsec X__syscall_slong_t
   1193 	}
   1194 	F__glibc_reserved [2]int32
   1195 } /* stat.h:58:1 */
   1196 
   1197 // Define some inlines helping to catch common problems.
   1198 
   1199 var _ uint8 /* gen.c:2:13: */