gtsocial-umbx

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

fcntl_linux_amd64.go (49533B)


      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 -ignore-unsupported-alignment -o fcntl/fcntl_linux_amd64.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      // fcntl-linux.h:388:1:
     19 	AT_FDCWD              = -100       // fcntl-linux.h:371:1:
     20 	AT_REMOVEDIR          = 0x200      // fcntl-linux.h:375:1:
     21 	AT_SYMLINK_FOLLOW     = 0x400      // fcntl-linux.h:377:1:
     22 	AT_SYMLINK_NOFOLLOW   = 0x100      // fcntl-linux.h:374:1:
     23 	FAPPEND               = 1024       // fcntl-linux.h:304:1:
     24 	FASYNC                = 8192       // fcntl-linux.h:306:1:
     25 	FD_CLOEXEC            = 1          // fcntl-linux.h:219:1:
     26 	FFSYNC                = 1052672    // fcntl-linux.h:305:1:
     27 	FNDELAY               = 2048       // fcntl-linux.h:308:1:
     28 	FNONBLOCK             = 2048       // fcntl-linux.h:307:1:
     29 	F_DUPFD               = 0          // fcntl-linux.h:167:1:
     30 	F_DUPFD_CLOEXEC       = 1030       // fcntl-linux.h:214:1:
     31 	F_EXLCK               = 4          // fcntl-linux.h:231:1:
     32 	F_GETFD               = 1          // fcntl-linux.h:168:1:
     33 	F_GETFL               = 3          // fcntl-linux.h:170:1:
     34 	F_GETLK               = 5          // fcntl-linux.h:109:1:
     35 	F_GETLK64             = 5          // fcntl.h:29:1:
     36 	F_GETOWN              = 9          // fcntl-linux.h:180:1:
     37 	F_LOCK                = 1          // fcntl.h:238:1:
     38 	F_OK                  = 0          // fcntl.h:131:1:
     39 	F_RDLCK               = 0          // fcntl-linux.h:223:1:
     40 	F_SETFD               = 2          // fcntl-linux.h:169:1:
     41 	F_SETFL               = 4          // fcntl-linux.h:171:1:
     42 	F_SETLK               = 6          // fcntl-linux.h:110:1:
     43 	F_SETLK64             = 6          // fcntl.h:30:1:
     44 	F_SETLKW              = 7          // fcntl-linux.h:111:1:
     45 	F_SETLKW64            = 7          // fcntl.h:31:1:
     46 	F_SETOWN              = 8          // fcntl-linux.h:179:1:
     47 	F_SHLCK               = 8          // fcntl-linux.h:232:1:
     48 	F_TEST                = 3          // fcntl.h:240:1:
     49 	F_TLOCK               = 2          // fcntl.h:239:1:
     50 	F_ULOCK               = 0          // fcntl.h:237:1:
     51 	F_UNLCK               = 2          // fcntl-linux.h:225:1:
     52 	F_WRLCK               = 1          // fcntl-linux.h:224:1:
     53 	LOCK_EX               = 2          // fcntl-linux.h:238:1:
     54 	LOCK_NB               = 4          // fcntl-linux.h:239:1:
     55 	LOCK_SH               = 1          // fcntl-linux.h:237:1:
     56 	LOCK_UN               = 8          // fcntl-linux.h:241:1:
     57 	O_ACCMODE             = 0003       // fcntl-linux.h:42:1:
     58 	O_APPEND              = 02000      // fcntl-linux.h:59:1:
     59 	O_ASYNC               = 020000     // fcntl-linux.h:72:1:
     60 	O_CLOEXEC             = 524288     // fcntl-linux.h:144:1:
     61 	O_CREAT               = 0100       // fcntl-linux.h:47:1:
     62 	O_DIRECTORY           = 65536      // fcntl-linux.h:142:1:
     63 	O_DSYNC               = 4096       // fcntl-linux.h:158:1:
     64 	O_EXCL                = 0200       // fcntl-linux.h:50:1:
     65 	O_FSYNC               = 1052672    // fcntl-linux.h:70:1:
     66 	O_NDELAY              = 2048       // fcntl-linux.h:65:1:
     67 	O_NOCTTY              = 0400       // fcntl-linux.h:53:1:
     68 	O_NOFOLLOW            = 131072     // fcntl-linux.h:143:1:
     69 	O_NONBLOCK            = 04000      // fcntl-linux.h:62:1:
     70 	O_RDONLY              = 00         // fcntl-linux.h:43:1:
     71 	O_RDWR                = 02         // fcntl-linux.h:45:1:
     72 	O_RSYNC               = 1052672    // fcntl-linux.h:162:1:
     73 	O_SYNC                = 04010000   // fcntl-linux.h:68:1:
     74 	O_TRUNC               = 01000      // fcntl-linux.h:56:1:
     75 	O_WRONLY              = 01         // fcntl-linux.h:44:1:
     76 	POSIX_FADV_DONTNEED   = 4          // fcntl-linux.h:321:1:
     77 	POSIX_FADV_NOREUSE    = 5          // fcntl-linux.h:322:1:
     78 	POSIX_FADV_NORMAL     = 0          // fcntl-linux.h:317:1:
     79 	POSIX_FADV_RANDOM     = 1          // fcntl-linux.h:318:1:
     80 	POSIX_FADV_SEQUENTIAL = 2          // fcntl-linux.h:319:1:
     81 	POSIX_FADV_WILLNEED   = 3          // fcntl-linux.h:320:1:
     82 	R_OK                  = 4          // fcntl.h:128:1:
     83 	SEEK_CUR              = 1          // fcntl.h:138:1:
     84 	SEEK_END              = 2          // fcntl.h:139:1:
     85 	SEEK_SET              = 0          // fcntl.h:137:1:
     86 	S_IFBLK               = 24576      // fcntl.h:83:1:
     87 	S_IFCHR               = 8192       // fcntl.h:82:1:
     88 	S_IFDIR               = 16384      // fcntl.h:81:1:
     89 	S_IFIFO               = 4096       // fcntl.h:86:1:
     90 	S_IFLNK               = 40960      // fcntl.h:89:1:
     91 	S_IFMT                = 61440      // fcntl.h:80:1:
     92 	S_IFREG               = 32768      // fcntl.h:84:1:
     93 	S_IFSOCK              = 49152      // fcntl.h:92:1:
     94 	S_IRGRP               = 32         // fcntl.h:111:1:
     95 	S_IROTH               = 4          // fcntl.h:117:1:
     96 	S_IRUSR               = 256        // fcntl.h:105:1:
     97 	S_IRWXG               = 56         // fcntl.h:115:1:
     98 	S_IRWXO               = 7          // fcntl.h:121:1:
     99 	S_IRWXU               = 448        // fcntl.h:109:1:
    100 	S_ISGID               = 1024       // fcntl.h:98:1:
    101 	S_ISUID               = 2048       // fcntl.h:97:1:
    102 	S_ISVTX               = 512        // fcntl.h:102:1:
    103 	S_IWGRP               = 16         // fcntl.h:112:1:
    104 	S_IWOTH               = 2          // fcntl.h:118:1:
    105 	S_IWUSR               = 128        // fcntl.h:106:1:
    106 	S_IXGRP               = 8          // fcntl.h:113:1:
    107 	S_IXOTH               = 1          // fcntl.h:119:1:
    108 	S_IXUSR               = 64         // fcntl.h:107:1:
    109 	UTIME_NOW             = 1073741823 // stat.h:206:1:
    110 	UTIME_OMIT            = 1073741822 // stat.h:207:1:
    111 	W_OK                  = 2          // fcntl.h:129:1:
    112 	X_OK                  = 1          // fcntl.h:130:1:
    113 	X_ATFILE_SOURCE       = 1          // features.h:342:1:
    114 	X_BITS_ENDIANNESS_H   = 1          // endianness.h:2:1:
    115 	X_BITS_ENDIAN_H       = 1          // endian.h:20:1:
    116 	X_BITS_STAT_H         = 1          // stat.h:23:1:
    117 	X_BITS_TIME64_H       = 1          // time64.h:24:1:
    118 	X_BITS_TYPESIZES_H    = 1          // typesizes.h:24:1:
    119 	X_BITS_TYPES_H        = 1          // types.h:24:1:
    120 	X_DEFAULT_SOURCE      = 1          // features.h:227:1:
    121 	X_FCNTL_H             = 1          // fcntl.h:23:1:
    122 	X_FEATURES_H          = 1          // features.h:19:1:
    123 	X_FILE_OFFSET_BITS    = 64         // <builtin>:25:1:
    124 	X_LP64                = 1          // <predefined>:284:1:
    125 	X_MKNOD_VER_LINUX     = 0          // stat.h:41:1:
    126 	X_POSIX_C_SOURCE      = 200809     // features.h:281:1:
    127 	X_POSIX_SOURCE        = 1          // features.h:279:1:
    128 	X_STATBUF_ST_BLKSIZE  = 0          // stat.h:172:1:
    129 	X_STATBUF_ST_NSEC     = 0          // stat.h:175:1:
    130 	X_STATBUF_ST_RDEV     = 0          // stat.h:173:1:
    131 	X_STAT_VER            = 1          // stat.h:44:1:
    132 	X_STAT_VER_KERNEL     = 0          // stat.h:37:1:
    133 	X_STAT_VER_LINUX      = 1          // stat.h:38:1:
    134 	X_STDC_PREDEF_H       = 1          // <predefined>:162:1:
    135 	X_STRUCT_TIMESPEC     = 1          // struct_timespec.h:3:1:
    136 	X_SYS_CDEFS_H         = 1          // cdefs.h:19:1:
    137 	Linux                 = 1          // <predefined>:231:1:
    138 	Unix                  = 1          // <predefined>:177: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 = int32 /* <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 // Both x86-64 and x32 use the 64-bit system call interface.
    547 // Properties of long double type.  ldbl-96 version.
    548 //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
    549 //    This file is part of the GNU C Library.
    550 //
    551 //    The GNU C Library is free software; you can redistribute it and/or
    552 //    modify it under the terms of the GNU Lesser General Public
    553 //    License  published by the Free Software Foundation; either
    554 //    version 2.1 of the License, or (at your option) any later version.
    555 //
    556 //    The GNU C Library is distributed in the hope that it will be useful,
    557 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    558 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    559 //    Lesser General Public License for more details.
    560 //
    561 //    You should have received a copy of the GNU Lesser General Public
    562 //    License along with the GNU C Library; if not, see
    563 //    <https://www.gnu.org/licenses/>.
    564 
    565 // long double is distinct from double, so there is nothing to
    566 //    define here.
    567 
    568 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
    569 //    intended for use in preprocessor macros.
    570 //
    571 //    Note: MESSAGE must be a _single_ string; concatenation of string
    572 //    literals is not supported.
    573 
    574 // Generic selection (ISO C11) is a C-only feature, available in GCC
    575 //    since version 4.9.  Previous versions do not provide generic
    576 //    selection, even though they might set __STDC_VERSION__ to 201112L,
    577 //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
    578 //    when testing __STDC_VERSION__ for generic selection support.
    579 //    On the other hand, Clang also defines __GNUC__, so a clang-specific
    580 //    check is required to enable the use of generic selection.
    581 
    582 // If we don't have __REDIRECT, prototypes will be missing if
    583 //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
    584 
    585 // Decide whether we can define 'extern inline' functions in headers.
    586 
    587 // This is here only because every header file already includes this one.
    588 //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
    589 //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
    590 //    that will always return failure (and set errno to ENOSYS).
    591 // This file is automatically generated.
    592 //    This file selects the right generated file of `__stub_FUNCTION' macros
    593 //    based on the architecture being compiled for.
    594 
    595 // This file is automatically generated.
    596 //    It defines a symbol `__stub_FUNCTION' for each function
    597 //    in the C library which is a stub, meaning it will fail
    598 //    every time called, usually setting errno to ENOSYS.
    599 
    600 // This must be early so <bits/fcntl.h> can define types winningly.
    601 
    602 // Get __mode_t, __dev_t and __off_t  .
    603 // bits/types.h -- definitions of __*_t types underlying *_t types.
    604 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
    605 //    This file is part of the GNU C Library.
    606 //
    607 //    The GNU C Library is free software; you can redistribute it and/or
    608 //    modify it under the terms of the GNU Lesser General Public
    609 //    License as published by the Free Software Foundation; either
    610 //    version 2.1 of the License, or (at your option) any later version.
    611 //
    612 //    The GNU C Library is distributed in the hope that it will be useful,
    613 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    614 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    615 //    Lesser General Public License for more details.
    616 //
    617 //    You should have received a copy of the GNU Lesser General Public
    618 //    License along with the GNU C Library; if not, see
    619 //    <https://www.gnu.org/licenses/>.
    620 
    621 // Never include this file directly; use <sys/types.h> instead.
    622 
    623 // Copyright (C) 1991-2020 Free Software Foundation, Inc.
    624 //    This file is part of the GNU C Library.
    625 //
    626 //    The GNU C Library is free software; you can redistribute it and/or
    627 //    modify it under the terms of the GNU Lesser General Public
    628 //    License as published by the Free Software Foundation; either
    629 //    version 2.1 of the License, or (at your option) any later version.
    630 //
    631 //    The GNU C Library is distributed in the hope that it will be useful,
    632 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    633 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    634 //    Lesser General Public License for more details.
    635 //
    636 //    You should have received a copy of the GNU Lesser General Public
    637 //    License along with the GNU C Library; if not, see
    638 //    <https://www.gnu.org/licenses/>.
    639 
    640 // Determine the wordsize from the preprocessor defines.
    641 
    642 // Both x86-64 and x32 use the 64-bit system call interface.
    643 // Bit size of the time_t type at glibc build time, x86-64 and x32 case.
    644 //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
    645 //    This file is part of the GNU C Library.
    646 //
    647 //    The GNU C Library is free software; you can redistribute it and/or
    648 //    modify it under the terms of the GNU Lesser General Public
    649 //    License as published by the Free Software Foundation; either
    650 //    version 2.1 of the License, or (at your option) any later version.
    651 //
    652 //    The GNU C Library is distributed in the hope that it will be useful,
    653 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    654 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    655 //    Lesser General Public License for more details.
    656 //
    657 //    You should have received a copy of the GNU Lesser General Public
    658 //    License along with the GNU C Library; if not, see
    659 //    <https://www.gnu.org/licenses/>.
    660 
    661 // For others, time size is word size.
    662 
    663 // Convenience types.
    664 type X__u_char = uint8   /* types.h:31:23 */
    665 type X__u_short = uint16 /* types.h:32:28 */
    666 type X__u_int = uint32   /* types.h:33:22 */
    667 type X__u_long = uint64  /* types.h:34:27 */
    668 
    669 // Fixed-size types, underlying types depend on word size and compiler.
    670 type X__int8_t = int8     /* types.h:37:21 */
    671 type X__uint8_t = uint8   /* types.h:38:23 */
    672 type X__int16_t = int16   /* types.h:39:26 */
    673 type X__uint16_t = uint16 /* types.h:40:28 */
    674 type X__int32_t = int32   /* types.h:41:20 */
    675 type X__uint32_t = uint32 /* types.h:42:22 */
    676 type X__int64_t = int64   /* types.h:44:25 */
    677 type X__uint64_t = uint64 /* types.h:45:27 */
    678 
    679 // Smallest types with at least a given width.
    680 type X__int_least8_t = X__int8_t     /* types.h:52:18 */
    681 type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
    682 type X__int_least16_t = X__int16_t   /* types.h:54:19 */
    683 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
    684 type X__int_least32_t = X__int32_t   /* types.h:56:19 */
    685 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
    686 type X__int_least64_t = X__int64_t   /* types.h:58:19 */
    687 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
    688 
    689 // quad_t is also 64 bits.
    690 type X__quad_t = int64    /* types.h:63:18 */
    691 type X__u_quad_t = uint64 /* types.h:64:27 */
    692 
    693 // Largest integral types.
    694 type X__intmax_t = int64   /* types.h:72:18 */
    695 type X__uintmax_t = uint64 /* types.h:73:27 */
    696 
    697 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
    698 //    macros for each of the OS types we define below.  The definitions
    699 //    of those macros must use the following macros for underlying types.
    700 //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
    701 //    variants of each of the following integer types on this machine.
    702 //
    703 // 	16		-- "natural" 16-bit type (always short)
    704 // 	32		-- "natural" 32-bit type (always int)
    705 // 	64		-- "natural" 64-bit type (long or long long)
    706 // 	LONG32		-- 32-bit type, traditionally long
    707 // 	QUAD		-- 64-bit type, traditionally long long
    708 // 	WORD		-- natural type of __WORDSIZE bits (int or long)
    709 // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
    710 //
    711 //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
    712 //    conventional uses of `long' or `long long' type modifiers match the
    713 //    types we define, even when a less-adorned type would be the same size.
    714 //    This matters for (somewhat) portably writing printf/scanf formats for
    715 //    these types, where using the appropriate l or ll format modifiers can
    716 //    make the typedefs and the formats match up across all GNU platforms.  If
    717 //    we used `long' when it's 64 bits where `long long' is expected, then the
    718 //    compiler would warn about the formats not matching the argument types,
    719 //    and the programmer changing them to shut up the compiler would break the
    720 //    program's portability.
    721 //
    722 //    Here we assume what is presently the case in all the GCC configurations
    723 //    we support: long long is always 64 bits, long is always word/address size,
    724 //    and int is always 32 bits.
    725 
    726 // No need to mark the typedef with __extension__.
    727 // bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
    728 //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
    729 //    This file is part of the GNU C Library.
    730 //
    731 //    The GNU C Library is free software; you can redistribute it and/or
    732 //    modify it under the terms of the GNU Lesser General Public
    733 //    License as published by the Free Software Foundation; either
    734 //    version 2.1 of the License, or (at your option) any later version.
    735 //
    736 //    The GNU C Library is distributed in the hope that it will be useful,
    737 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    738 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    739 //    Lesser General Public License for more details.
    740 //
    741 //    You should have received a copy of the GNU Lesser General Public
    742 //    License along with the GNU C Library; if not, see
    743 //    <https://www.gnu.org/licenses/>.
    744 
    745 // See <bits/types.h> for the meaning of these macros.  This file exists so
    746 //    that <bits/types.h> need not vary across different GNU platforms.
    747 
    748 // X32 kernel interface is 64-bit.
    749 
    750 // Tell the libc code that off_t and off64_t are actually the same type
    751 //    for all ABI purposes, even if possibly expressed as different base types
    752 //    for C type-checking purposes.
    753 
    754 // Same for ino_t and ino64_t.
    755 
    756 // And for __rlim_t and __rlim64_t.
    757 
    758 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
    759 
    760 // Number of descriptors that can fit in an `fd_set'.
    761 
    762 // bits/time64.h -- underlying types for __time64_t.  Generic version.
    763 //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
    764 //    This file is part of the GNU C Library.
    765 //
    766 //    The GNU C Library is free software; you can redistribute it and/or
    767 //    modify it under the terms of the GNU Lesser General Public
    768 //    License as published by the Free Software Foundation; either
    769 //    version 2.1 of the License, or (at your option) any later version.
    770 //
    771 //    The GNU C Library is distributed in the hope that it will be useful,
    772 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    773 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    774 //    Lesser General Public License for more details.
    775 //
    776 //    You should have received a copy of the GNU Lesser General Public
    777 //    License along with the GNU C Library; if not, see
    778 //    <https://www.gnu.org/licenses/>.
    779 
    780 // Define __TIME64_T_TYPE so that it is always a 64-bit type.
    781 
    782 // If we already have 64-bit time type then use it.
    783 
    784 type X__dev_t = uint64                     /* types.h:145:25 */ // Type of device numbers.
    785 type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
    786 type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
    787 type X__ino_t = uint64                     /* types.h:148:25 */ // Type of file serial numbers.
    788 type X__ino64_t = uint64                   /* types.h:149:27 */ // Type of file serial numbers (LFS).
    789 type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
    790 type X__nlink_t = uint64                   /* types.h:151:27 */ // Type of file link counts.
    791 type X__off_t = int64                      /* types.h:152:25 */ // Type of file sizes and offsets.
    792 type X__off64_t = int64                    /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
    793 type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
    794 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
    795 type X__clock_t = int64                    /* types.h:156:27 */ // Type of CPU usage counts.
    796 type X__rlim_t = uint64                    /* types.h:157:26 */ // Type for resource measurement.
    797 type X__rlim64_t = uint64                  /* types.h:158:28 */ // Type for resource measurement (LFS).
    798 type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
    799 type X__time_t = int64                     /* types.h:160:26 */ // Seconds since the Epoch.
    800 type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
    801 type X__suseconds_t = int64                /* types.h:162:31 */ // Signed count of microseconds.
    802 
    803 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
    804 type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
    805 
    806 // Clock ID used in clock and timer functions.
    807 type X__clockid_t = int32 /* types.h:168:29 */
    808 
    809 // Timer ID returned by `timer_create'.
    810 type X__timer_t = uintptr /* types.h:171:12 */
    811 
    812 // Type to represent block size.
    813 type X__blksize_t = int64 /* types.h:174:29 */
    814 
    815 // Types from the Large File Support interface.
    816 
    817 // Type to count number of disk blocks.
    818 type X__blkcnt_t = int64   /* types.h:179:28 */
    819 type X__blkcnt64_t = int64 /* types.h:180:30 */
    820 
    821 // Type to count file system blocks.
    822 type X__fsblkcnt_t = uint64   /* types.h:183:30 */
    823 type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
    824 
    825 // Type to count file system nodes.
    826 type X__fsfilcnt_t = uint64   /* types.h:187:30 */
    827 type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
    828 
    829 // Type of miscellaneous file system fields.
    830 type X__fsword_t = int64 /* types.h:191:28 */
    831 
    832 type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
    833 
    834 // Signed long type used in system calls.
    835 type X__syscall_slong_t = int64 /* types.h:196:33 */
    836 // Unsigned long type used in system calls.
    837 type X__syscall_ulong_t = uint64 /* types.h:198:33 */
    838 
    839 // These few don't really vary by system, they always correspond
    840 //
    841 //	to one of the other defined types.
    842 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
    843 type X__caddr_t = uintptr   /* types.h:203:14 */
    844 
    845 // Duplicates info from stdint.h but this is used in unistd.h.
    846 type X__intptr_t = int64 /* types.h:206:25 */
    847 
    848 // Duplicate info from sys/socket.h.
    849 type X__socklen_t = uint32 /* types.h:209:23 */
    850 
    851 // C99: An integer type that can be accessed as an atomic entity,
    852 //
    853 //	even in the presence of asynchronous interrupts.
    854 //	It is not currently necessary for this to be machine-specific.
    855 type X__sig_atomic_t = int32 /* types.h:214:13 */
    856 
    857 // Seconds since the Epoch, visible to user code when time_t is too
    858 //    narrow only for consistency with the old way of widening too-narrow
    859 //    types.  User code should never use __time64_t.
    860 
    861 // Get the definitions of O_*, F_*, FD_*: all the
    862 //    numbers and flag bits for `open', `fcntl', et al.
    863 // O_*, F_*, FD_* bit values for Linux/x86.
    864 //    Copyright (C) 2001-2020 Free Software Foundation, Inc.
    865 //    This file is part of the GNU C Library.
    866 //
    867 //    The GNU C Library is free software; you can redistribute it and/or
    868 //    modify it under the terms of the GNU Lesser General Public
    869 //    License as published by the Free Software Foundation; either
    870 //    version 2.1 of the License, or (at your option) any later version.
    871 //
    872 //    The GNU C Library is distributed in the hope that it will be useful,
    873 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    874 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    875 //    Lesser General Public License for more details.
    876 //
    877 //    You should have received a copy of the GNU Lesser General Public
    878 //    License along with the GNU C Library; if not, see
    879 //    <https://www.gnu.org/licenses/>.
    880 
    881 // Not necessary, we always have 64-bit offsets.
    882 
    883 type Flock = struct {
    884 	Fl_type      int16
    885 	Fl_whence    int16
    886 	F__ccgo_pad1 [4]byte
    887 	Fl_start     X__off64_t
    888 	Fl_len       X__off64_t
    889 	Fl_pid       X__pid_t
    890 	F__ccgo_pad2 [4]byte
    891 } /* fcntl.h:35:1 */
    892 
    893 // Include generic Linux declarations.
    894 // O_*, F_*, FD_* bit values for Linux.
    895 //    Copyright (C) 2001-2020 Free Software Foundation, Inc.
    896 //    This file is part of the GNU C Library.
    897 //
    898 //    The GNU C Library is free software; you can redistribute it and/or
    899 //    modify it under the terms of the GNU Lesser General Public
    900 //    License as published by the Free Software Foundation; either
    901 //    version 2.1 of the License, or (at your option) any later version.
    902 //
    903 //    The GNU C Library is distributed in the hope that it will be useful,
    904 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    905 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    906 //    Lesser General Public License for more details.
    907 //
    908 //    You should have received a copy of the GNU Lesser General Public
    909 //    License along with the GNU C Library; if not, see
    910 //    <https://www.gnu.org/licenses/>.
    911 
    912 // This file contains shared definitions between Linux architectures
    913 //    and is included by <bits/fcntl.h> to declare them.  The various
    914 //    #ifndef cases allow the architecture specific file to define those
    915 //    values with different values.
    916 //
    917 //    A minimal <bits/fcntl.h> contains just:
    918 //
    919 //    struct flock {...}
    920 //    #ifdef __USE_LARGEFILE64
    921 //    struct flock64 {...}
    922 //    #endif
    923 //    #include <bits/fcntl-linux.h>
    924 
    925 // open/fcntl.
    926 
    927 // open file description locks.
    928 //
    929 //    Usually record locks held by a process are released on *any* close and are
    930 //    not inherited across a fork.
    931 //
    932 //    These cmd values will set locks that conflict with process-associated record
    933 //    locks, but are "owned" by the opened file description, not the process.
    934 //    This means that they are inherited across fork or clone with CLONE_FILES
    935 //    like BSD (flock) locks, and they are only released automatically when the
    936 //    last reference to the the file description against which they were acquired
    937 //    is put.
    938 
    939 // For now, Linux has no separate synchronicity options for read
    940 //    operations.  We define O_RSYNC therefore as the same as O_SYNC
    941 //    since this is a superset.
    942 
    943 // Values for the second argument to `fcntl'.
    944 
    945 // For F_[GET|SET]FD.
    946 
    947 // For posix fcntl() and `l_type' field of a `struct flock' for lockf().
    948 
    949 // For old implementation of BSD flock.
    950 
    951 // Operations for BSD flock, also used by the kernel implementation.
    952 
    953 // Define some more compatibility macros to be backward compatible with
    954 //    BSD systems which did not managed to hide these kernel macros.
    955 
    956 // Advise to `posix_fadvise'.
    957 
    958 // Values for `*at' functions.
    959 
    960 // Detect if open needs mode as a third argument (or for openat as a fourth
    961 //    argument).
    962 
    963 // POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
    964 //
    965 //	Earlier POSIX standards permitted any type ending in `_t' to be defined
    966 //	by any POSIX header, so we don't conditionalize the definitions here.
    967 type Mode_t = X__mode_t /* fcntl.h:50:18 */
    968 
    969 type Off_t = X__off64_t /* fcntl.h:58:19 */
    970 
    971 type Pid_t = X__pid_t /* fcntl.h:69:17 */
    972 
    973 // For XPG all symbols from <sys/stat.h> should also be available.
    974 // NB: Include guard matches what <linux/time.h> uses.
    975 
    976 // bits/types.h -- definitions of __*_t types underlying *_t types.
    977 //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
    978 //    This file is part of the GNU C Library.
    979 //
    980 //    The GNU C Library is free software; you can redistribute it and/or
    981 //    modify it under the terms of the GNU Lesser General Public
    982 //    License as published by the Free Software Foundation; either
    983 //    version 2.1 of the License, or (at your option) any later version.
    984 //
    985 //    The GNU C Library is distributed in the hope that it will be useful,
    986 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
    987 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    988 //    Lesser General Public License for more details.
    989 //
    990 //    You should have received a copy of the GNU Lesser General Public
    991 //    License along with the GNU C Library; if not, see
    992 //    <https://www.gnu.org/licenses/>.
    993 
    994 // Never include this file directly; use <sys/types.h> instead.
    995 
    996 // Endian macros for string.h functions
    997 //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
    998 //    This file is part of the GNU C Library.
    999 //
   1000 //    The GNU C Library is free software; you can redistribute it and/or
   1001 //    modify it under the terms of the GNU Lesser General Public
   1002 //    License as published by the Free Software Foundation; either
   1003 //    version 2.1 of the License, or (at your option) any later version.
   1004 //
   1005 //    The GNU C Library is distributed in the hope that it will be useful,
   1006 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1007 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1008 //    Lesser General Public License for more details.
   1009 //
   1010 //    You should have received a copy of the GNU Lesser General Public
   1011 //    License along with the GNU C Library; if not, see
   1012 //    <http://www.gnu.org/licenses/>.
   1013 
   1014 // Definitions for byte order, according to significance of bytes,
   1015 //    from low addresses to high addresses.  The value is what you get by
   1016 //    putting '4' in the most significant byte, '3' in the second most
   1017 //    significant byte, '2' in the second least significant byte, and '1'
   1018 //    in the least significant byte, and then writing down one digit for
   1019 //    each byte, starting with the byte at the lowest address at the left,
   1020 //    and proceeding to the byte with the highest address at the right.
   1021 
   1022 // This file defines `__BYTE_ORDER' for the particular machine.
   1023 
   1024 // i386/x86_64 are little-endian.
   1025 
   1026 // Some machines may need to use a different endianness for floating point
   1027 //    values.
   1028 
   1029 // POSIX.1b structure for a time value.  This is like a `struct timeval' but
   1030 //
   1031 //	has nanoseconds instead of microseconds.
   1032 type Timespec = struct {
   1033 	Ftv_sec  X__time_t
   1034 	Ftv_nsec X__syscall_slong_t
   1035 } /* struct_timespec.h:10:1 */
   1036 
   1037 // Copyright (C) 1999-2020 Free Software Foundation, Inc.
   1038 //    This file is part of the GNU C Library.
   1039 //
   1040 //    The GNU C Library is free software; you can redistribute it and/or
   1041 //    modify it under the terms of the GNU Lesser General Public
   1042 //    License as published by the Free Software Foundation; either
   1043 //    version 2.1 of the License, or (at your option) any later version.
   1044 //
   1045 //    The GNU C Library is distributed in the hope that it will be useful,
   1046 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   1047 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   1048 //    Lesser General Public License for more details.
   1049 //
   1050 //    You should have received a copy of the GNU Lesser General Public
   1051 //    License along with the GNU C Library; if not, see
   1052 //    <https://www.gnu.org/licenses/>.
   1053 
   1054 // Versions of the `struct stat' data structure.
   1055 
   1056 // x86-64 versions of the `xmknod' interface.
   1057 
   1058 type Stat = struct {
   1059 	Fst_dev     X__dev_t
   1060 	Fst_ino     X__ino_t
   1061 	Fst_nlink   X__nlink_t
   1062 	Fst_mode    X__mode_t
   1063 	Fst_uid     X__uid_t
   1064 	Fst_gid     X__gid_t
   1065 	F__pad0     int32
   1066 	Fst_rdev    X__dev_t
   1067 	Fst_size    X__off_t
   1068 	Fst_blksize X__blksize_t
   1069 	Fst_blocks  X__blkcnt_t
   1070 	Fst_atim    struct {
   1071 		Ftv_sec  X__time_t
   1072 		Ftv_nsec X__syscall_slong_t
   1073 	}
   1074 	Fst_mtim struct {
   1075 		Ftv_sec  X__time_t
   1076 		Ftv_nsec X__syscall_slong_t
   1077 	}
   1078 	Fst_ctim struct {
   1079 		Ftv_sec  X__time_t
   1080 		Ftv_nsec X__syscall_slong_t
   1081 	}
   1082 	F__glibc_reserved [3]X__syscall_slong_t
   1083 } /* stat.h:46:1 */
   1084 
   1085 // Define some inlines helping to catch common problems.
   1086 
   1087 var _ int8 /* gen.c:2:13: */