modernc.org/xau@v1.0.16/lib/xau_linux_386.go (about)

     1  // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/xau_linux_386.go -pkgname xau -trace-translation-units /tmp/go-generate-858468609/cdb.json libXau.a', DO NOT EDIT.
     2  
     3  package xau
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  
    11  	"modernc.org/libc"
    12  	"modernc.org/libc/sys/types"
    13  )
    14  
    15  var _ = math.Pi
    16  var _ reflect.Kind
    17  var _ atomic.Value
    18  var _ unsafe.Pointer
    19  var _ types.Size_t
    20  
    21  const (
    22  	BIG_ENDIAN                         = 4321
    23  	BUFSIZ                             = 8192
    24  	BYTE_ORDER                         = 1234
    25  	EOF                                = -1
    26  	EXIT_FAILURE                       = 1
    27  	EXIT_SUCCESS                       = 0
    28  	FD_SETSIZE                         = 1024
    29  	FILENAME_MAX                       = 4096
    30  	FOPEN_MAX                          = 16
    31  	FUNCPROTO                          = 15
    32  	FamilyKrb5Principal                = 253
    33  	FamilyLocal                        = 256
    34  	FamilyLocalHost                    = 252
    35  	FamilyNetname                      = 254
    36  	FamilyWild                         = 65535
    37  	HAVE_CONFIG_H                      = 1
    38  	HAVE_DLFCN_H                       = 1
    39  	HAVE_INTTYPES_H                    = 1
    40  	HAVE_MEMORY_H                      = 1
    41  	HAVE_PATHCONF                      = 1
    42  	HAVE_STDINT_H                      = 1
    43  	HAVE_STDLIB_H                      = 1
    44  	HAVE_STRINGS_H                     = 1
    45  	HAVE_STRING_H                      = 1
    46  	HAVE_SYS_STAT_H                    = 1
    47  	HAVE_SYS_TYPES_H                   = 1
    48  	HAVE_UNISTD_H                      = 1
    49  	LITTLE_ENDIAN                      = 1234
    50  	LOCK_ERROR                         = 1
    51  	LOCK_SUCCESS                       = 0
    52  	LOCK_TIMEOUT                       = 2
    53  	LT_OBJDIR                          = ".libs/"
    54  	L_ctermid                          = 9
    55  	L_cuserid                          = 9
    56  	L_tmpnam                           = 20
    57  	NARROWPROTO                        = 0
    58  	NeedFunctionPrototypes             = 1
    59  	NeedNestedPrototypes               = 1
    60  	NeedVarargsPrototypes              = 1
    61  	NeedWidePrototypes                 = 0
    62  	PACKAGE                            = "libXau"
    63  	PACKAGE_BUGREPORT                  = "https://gitlab.freedesktop.org/xorg/lib/libXau/issues"
    64  	PACKAGE_NAME                       = "libXau"
    65  	PACKAGE_STRING                     = "libXau 1.0.9"
    66  	PACKAGE_TARNAME                    = "libXau"
    67  	PACKAGE_URL                        = ""
    68  	PACKAGE_VERSION                    = "1.0.9"
    69  	PACKAGE_VERSION_MAJOR              = 1
    70  	PACKAGE_VERSION_MINOR              = 0
    71  	PACKAGE_VERSION_PATCHLEVEL         = 9
    72  	PDP_ENDIAN                         = 3412
    73  	P_tmpdir                           = "/tmp"
    74  	RAND_MAX                           = 2147483647
    75  	RENAME_EXCHANGE                    = 2
    76  	RENAME_NOREPLACE                   = 1
    77  	RENAME_WHITEOUT                    = 4
    78  	SEEK_CUR                           = 1
    79  	SEEK_DATA                          = 3
    80  	SEEK_END                           = 2
    81  	SEEK_HOLE                          = 4
    82  	SEEK_SET                           = 0
    83  	STDC_HEADERS                       = 1
    84  	TMP_MAX                            = 238328
    85  	VERSION                            = "1.0.9"
    86  	WCONTINUED                         = 8
    87  	WEXITED                            = 4
    88  	WNOHANG                            = 1
    89  	WNOWAIT                            = 0x01000000
    90  	WSTOPPED                           = 2
    91  	WUNTRACED                          = 2
    92  	X_ALLOCA_H                         = 1
    93  	X_ALL_SOURCE                       = 1
    94  	X_ATFILE_SOURCE                    = 1
    95  	X_BITS_BYTESWAP_H                  = 1
    96  	X_BITS_ENDIANNESS_H                = 1
    97  	X_BITS_ENDIAN_H                    = 1
    98  	X_BITS_FLOATN_COMMON_H             = 0
    99  	X_BITS_FLOATN_H                    = 0
   100  	X_BITS_PTHREADTYPES_ARCH_H         = 1
   101  	X_BITS_PTHREADTYPES_COMMON_H       = 1
   102  	X_BITS_STDINT_INTN_H               = 1
   103  	X_BITS_STDIO_LIM_H                 = 1
   104  	X_BITS_TIME64_H                    = 1
   105  	X_BITS_TYPESIZES_H                 = 1
   106  	X_BITS_TYPES_H                     = 1
   107  	X_BITS_TYPES_LOCALE_T_H            = 1
   108  	X_BITS_TYPES___LOCALE_T_H          = 1
   109  	X_BITS_UINTN_IDENTITY_H            = 1
   110  	X_BSD_SIZE_T_                      = 0
   111  	X_BSD_SIZE_T_DEFINED_              = 0
   112  	X_DEFAULT_SOURCE                   = 1
   113  	X_ENDIAN_H                         = 1
   114  	X_FEATURES_H                       = 1
   115  	X_FILE_OFFSET_BITS                 = 64
   116  	X_GCC_SIZE_T                       = 0
   117  	X_GCC_WCHAR_T                      = 0
   118  	X_GNU_SOURCE                       = 1
   119  	X_ILP32                            = 1
   120  	X_IOFBF                            = 0
   121  	X_IOLBF                            = 1
   122  	X_IONBF                            = 2
   123  	X_IO_EOF_SEEN                      = 0x0010
   124  	X_IO_ERR_SEEN                      = 0x0020
   125  	X_IO_USER_LOCK                     = 0x8000
   126  	X_ISOC11_SOURCE                    = 1
   127  	X_ISOC2X_SOURCE                    = 1
   128  	X_ISOC95_SOURCE                    = 1
   129  	X_ISOC99_SOURCE                    = 1
   130  	X_LARGEFILE64_SOURCE               = 1
   131  	X_LARGEFILE_SOURCE                 = 1
   132  	X_POSIX_C_SOURCE                   = 200809
   133  	X_POSIX_PTHREAD_SEMANTICS          = 1
   134  	X_POSIX_SOURCE                     = 1
   135  	X_RWLOCK_INTERNAL_H                = 0
   136  	X_SIZET_                           = 0
   137  	X_SIZE_T                           = 0
   138  	X_SIZE_T_                          = 0
   139  	X_SIZE_T_DECLARED                  = 0
   140  	X_SIZE_T_DEFINED                   = 0
   141  	X_SIZE_T_DEFINED_                  = 0
   142  	X_STDC_PREDEF_H                    = 1
   143  	X_STDIO_H                          = 1
   144  	X_STDLIB_H                         = 1
   145  	X_STRINGS_H                        = 1
   146  	X_STRING_H                         = 1
   147  	X_STRUCT_TIMESPEC                  = 1
   148  	X_SYS_CDEFS_H                      = 1
   149  	X_SYS_SELECT_H                     = 1
   150  	X_SYS_SIZE_T_H                     = 0
   151  	X_SYS_TYPES_H                      = 1
   152  	X_TANDEM_SOURCE                    = 1
   153  	X_THREAD_MUTEX_INTERNAL_H          = 1
   154  	X_THREAD_SHARED_TYPES_H            = 1
   155  	X_T_SIZE                           = 0
   156  	X_T_SIZE_                          = 0
   157  	X_T_WCHAR                          = 0
   158  	X_T_WCHAR_                         = 0
   159  	X_VA_LIST_DEFINED                  = 0
   160  	X_WCHAR_T                          = 0
   161  	X_WCHAR_T_                         = 0
   162  	X_WCHAR_T_DECLARED                 = 0
   163  	X_WCHAR_T_DEFINED                  = 0
   164  	X_WCHAR_T_DEFINED_                 = 0
   165  	X_WCHAR_T_H                        = 0
   166  	X_XFUNCPROTOBEGIN                  = 0
   167  	X_XFUNCPROTOEND                    = 0
   168  	X_XFUNCPROTO_H_                    = 0
   169  	X_XFUNCS_H_                        = 0
   170  	X_XFUNCS_H_INCLUDED_STRING_H       = 0
   171  	X_XOPEN_SOURCE                     = 700
   172  	X_XOPEN_SOURCE_EXTENDED            = 1
   173  	X_XOSDEFS_H_                       = 0
   174  	X_X_NOTSAN                         = 0
   175  	X_Xauth_h                          = 0
   176  	I386                               = 1
   177  	Linux                              = 1
   178  	Unix                               = 1
   179  	ADJ_ESTERROR                       = 0x0008
   180  	ADJ_FREQUENCY                      = 0x0002
   181  	ADJ_MAXERROR                       = 0x0004
   182  	ADJ_MICRO                          = 0x1000
   183  	ADJ_NANO                           = 0x2000
   184  	ADJ_OFFSET                         = 0x0001
   185  	ADJ_OFFSET_SINGLESHOT              = 0x8001
   186  	ADJ_OFFSET_SS_READ                 = 0xa001
   187  	ADJ_SETOFFSET                      = 0x0100
   188  	ADJ_STATUS                         = 0x0010
   189  	ADJ_TAI                            = 0x0080
   190  	ADJ_TICK                           = 0x4000
   191  	ADJ_TIMECONST                      = 0x0020
   192  	AT_EACCESS                         = 0x200
   193  	AT_EMPTY_PATH                      = 0x1000
   194  	AT_FDCWD                           = -100
   195  	AT_NO_AUTOMOUNT                    = 0x800
   196  	AT_RECURSIVE                       = 0x8000
   197  	AT_REMOVEDIR                       = 0x200
   198  	AT_STATX_DONT_SYNC                 = 0x4000
   199  	AT_STATX_FORCE_SYNC                = 0x2000
   200  	AT_STATX_SYNC_AS_STAT              = 0x0000
   201  	AT_STATX_SYNC_TYPE                 = 0x6000
   202  	AT_SYMLINK_FOLLOW                  = 0x400
   203  	AT_SYMLINK_NOFOLLOW                = 0x100
   204  	CLOCK_BOOTTIME                     = 7
   205  	CLOCK_BOOTTIME_ALARM               = 9
   206  	CLOCK_MONOTONIC                    = 1
   207  	CLOCK_MONOTONIC_COARSE             = 6
   208  	CLOCK_MONOTONIC_RAW                = 4
   209  	CLOCK_PROCESS_CPUTIME_ID           = 2
   210  	CLOCK_REALTIME                     = 0
   211  	CLOCK_REALTIME_ALARM               = 8
   212  	CLOCK_REALTIME_COARSE              = 5
   213  	CLOCK_TAI                          = 11
   214  	CLOCK_THREAD_CPUTIME_ID            = 3
   215  	DN_ACCESS                          = 0x00000001
   216  	DN_ATTRIB                          = 0x00000020
   217  	DN_CREATE                          = 0x00000004
   218  	DN_DELETE                          = 0x00000008
   219  	DN_MODIFY                          = 0x00000002
   220  	DN_MULTISHOT                       = 0x80000000
   221  	DN_RENAME                          = 0x00000010
   222  	FALLOC_FL_COLLAPSE_RANGE           = 0x08
   223  	FALLOC_FL_INSERT_RANGE             = 0x20
   224  	FALLOC_FL_KEEP_SIZE                = 0x01
   225  	FALLOC_FL_NO_HIDE_STALE            = 0x04
   226  	FALLOC_FL_PUNCH_HOLE               = 0x02
   227  	FALLOC_FL_UNSHARE_RANGE            = 0x40
   228  	FALLOC_FL_ZERO_RANGE               = 0x10
   229  	FAPPEND                            = 1024
   230  	FASYNC                             = 8192
   231  	FD_CLOEXEC                         = 1
   232  	FFSYNC                             = 1052672
   233  	FNDELAY                            = 2048
   234  	FNONBLOCK                          = 2048
   235  	F_ADD_SEALS                        = 1033
   236  	F_DUPFD                            = 0
   237  	F_DUPFD_CLOEXEC                    = 1030
   238  	F_EXLCK                            = 4
   239  	F_GETFD                            = 1
   240  	F_GETFL                            = 3
   241  	F_GETLEASE                         = 1025
   242  	F_GETLK                            = 12
   243  	F_GETLK64                          = 12
   244  	F_GETOWN                           = 9
   245  	F_GETOWN_EX                        = 16
   246  	F_GETPIPE_SZ                       = 1032
   247  	F_GETSIG                           = 11
   248  	F_GET_FILE_RW_HINT                 = 1037
   249  	F_GET_RW_HINT                      = 1035
   250  	F_GET_SEALS                        = 1034
   251  	F_LOCK                             = 1
   252  	F_NOTIFY                           = 1026
   253  	F_OFD_GETLK                        = 36
   254  	F_OFD_SETLK                        = 37
   255  	F_OFD_SETLKW                       = 38
   256  	F_OK                               = 0
   257  	F_RDLCK                            = 0
   258  	F_SEAL_FUTURE_WRITE                = 0x0010
   259  	F_SEAL_GROW                        = 0x0004
   260  	F_SEAL_SEAL                        = 0x0001
   261  	F_SEAL_SHRINK                      = 0x0002
   262  	F_SEAL_WRITE                       = 0x0008
   263  	F_SETFD                            = 2
   264  	F_SETFL                            = 4
   265  	F_SETLEASE                         = 1024
   266  	F_SETLK                            = 13
   267  	F_SETLK64                          = 13
   268  	F_SETLKW                           = 14
   269  	F_SETLKW64                         = 14
   270  	F_SETOWN                           = 8
   271  	F_SETOWN_EX                        = 15
   272  	F_SETPIPE_SZ                       = 1031
   273  	F_SETSIG                           = 10
   274  	F_SET_FILE_RW_HINT                 = 1038
   275  	F_SET_RW_HINT                      = 1036
   276  	F_SHLCK                            = 8
   277  	F_TEST                             = 3
   278  	F_TLOCK                            = 2
   279  	F_ULOCK                            = 0
   280  	F_UNLCK                            = 2
   281  	F_WRLCK                            = 1
   282  	LOCK_EX                            = 2
   283  	LOCK_MAND                          = 32
   284  	LOCK_NB                            = 4
   285  	LOCK_READ                          = 64
   286  	LOCK_RW                            = 192
   287  	LOCK_SH                            = 1
   288  	LOCK_UN                            = 8
   289  	LOCK_WRITE                         = 128
   290  	L_INCR                             = 1
   291  	L_SET                              = 0
   292  	L_XTND                             = 2
   293  	MAX_HANDLE_SZ                      = 128
   294  	MOD_CLKA                           = 32769
   295  	MOD_CLKB                           = 16384
   296  	MOD_ESTERROR                       = 8
   297  	MOD_FREQUENCY                      = 2
   298  	MOD_MAXERROR                       = 4
   299  	MOD_MICRO                          = 4096
   300  	MOD_NANO                           = 8192
   301  	MOD_OFFSET                         = 1
   302  	MOD_STATUS                         = 16
   303  	MOD_TAI                            = 128
   304  	MOD_TIMECONST                      = 32
   305  	O_ACCMODE                          = 0003
   306  	O_APPEND                           = 02000
   307  	O_ASYNC                            = 020000
   308  	O_CLOEXEC                          = 524288
   309  	O_CREAT                            = 0100
   310  	O_DIRECT                           = 16384
   311  	O_DIRECTORY                        = 65536
   312  	O_DSYNC                            = 4096
   313  	O_EXCL                             = 0200
   314  	O_FSYNC                            = 1052672
   315  	O_LARGEFILE                        = 32768
   316  	O_NDELAY                           = 2048
   317  	O_NOATIME                          = 262144
   318  	O_NOCTTY                           = 0400
   319  	O_NOFOLLOW                         = 131072
   320  	O_NONBLOCK                         = 04000
   321  	O_PATH                             = 2097152
   322  	O_RDONLY                           = 00
   323  	O_RDWR                             = 02
   324  	O_RSYNC                            = 1052672
   325  	O_SYNC                             = 04010000
   326  	O_TMPFILE                          = 4259840
   327  	O_TRUNC                            = 01000
   328  	O_WRONLY                           = 01
   329  	POSIX_FADV_DONTNEED                = 4
   330  	POSIX_FADV_NOREUSE                 = 5
   331  	POSIX_FADV_NORMAL                  = 0
   332  	POSIX_FADV_RANDOM                  = 1
   333  	POSIX_FADV_SEQUENTIAL              = 2
   334  	POSIX_FADV_WILLNEED                = 3
   335  	RWF_WRITE_LIFE_NOT_SET             = 0
   336  	RWH_WRITE_LIFE_EXTREME             = 5
   337  	RWH_WRITE_LIFE_LONG                = 4
   338  	RWH_WRITE_LIFE_MEDIUM              = 3
   339  	RWH_WRITE_LIFE_NONE                = 1
   340  	RWH_WRITE_LIFE_SHORT               = 2
   341  	R_OK                               = 4
   342  	SPLICE_F_GIFT                      = 8
   343  	SPLICE_F_MORE                      = 4
   344  	SPLICE_F_MOVE                      = 1
   345  	SPLICE_F_NONBLOCK                  = 2
   346  	STA_CLK                            = 0x8000
   347  	STA_CLOCKERR                       = 0x1000
   348  	STA_DEL                            = 0x0020
   349  	STA_FLL                            = 0x0008
   350  	STA_FREQHOLD                       = 0x0080
   351  	STA_INS                            = 0x0010
   352  	STA_MODE                           = 0x4000
   353  	STA_NANO                           = 0x2000
   354  	STA_PLL                            = 0x0001
   355  	STA_PPSERROR                       = 0x0800
   356  	STA_PPSFREQ                        = 0x0002
   357  	STA_PPSJITTER                      = 0x0200
   358  	STA_PPSSIGNAL                      = 0x0100
   359  	STA_PPSTIME                        = 0x0004
   360  	STA_PPSWANDER                      = 0x0400
   361  	STA_RONLY                          = 65280
   362  	STA_UNSYNC                         = 0x0040
   363  	STDERR_FILENO                      = 2
   364  	STDIN_FILENO                       = 0
   365  	STDOUT_FILENO                      = 1
   366  	SYNC_FILE_RANGE_WAIT_AFTER         = 4
   367  	SYNC_FILE_RANGE_WAIT_BEFORE        = 1
   368  	SYNC_FILE_RANGE_WRITE              = 2
   369  	SYNC_FILE_RANGE_WRITE_AND_WAIT     = 7
   370  	S_IFBLK                            = 24576
   371  	S_IFCHR                            = 8192
   372  	S_IFDIR                            = 16384
   373  	S_IFIFO                            = 4096
   374  	S_IFLNK                            = 40960
   375  	S_IFMT                             = 61440
   376  	S_IFREG                            = 32768
   377  	S_IFSOCK                           = 49152
   378  	S_IRGRP                            = 32
   379  	S_IROTH                            = 4
   380  	S_IRUSR                            = 256
   381  	S_IRWXG                            = 56
   382  	S_IRWXO                            = 7
   383  	S_IRWXU                            = 448
   384  	S_ISGID                            = 1024
   385  	S_ISUID                            = 2048
   386  	S_ISVTX                            = 512
   387  	S_IWGRP                            = 16
   388  	S_IWOTH                            = 2
   389  	S_IWUSR                            = 128
   390  	S_IXGRP                            = 8
   391  	S_IXOTH                            = 1
   392  	S_IXUSR                            = 64
   393  	TIMER_ABSTIME                      = 1
   394  	TIME_UTC                           = 1
   395  	UTIME_NOW                          = 1073741823
   396  	UTIME_OMIT                         = 1073741822
   397  	W_OK                               = 2
   398  	X_BIG_ENDIAN                       = 4321
   399  	X_BYTE_ORDER                       = 1234
   400  	X_LITTLE_ENDIAN                    = 1234
   401  	X_OK                               = 1
   402  	X_ASSERT_H                         = 1
   403  	X_ASSERT_H_DECLS                   = 0
   404  	X_BITS_POSIX_OPT_H                 = 1
   405  	X_BITS_STAT_H                      = 1
   406  	X_BITS_TIMEX_H                     = 1
   407  	X_BITS_TIME_H                      = 1
   408  	X_FALLOC_H_                        = 0
   409  	X_FCNTL_H                          = 1
   410  	X_GETOPT_CORE_H                    = 1
   411  	X_GETOPT_POSIX_H                   = 1
   412  	X_LFS64_ASYNCHRONOUS_IO            = 1
   413  	X_LFS64_LARGEFILE                  = 1
   414  	X_LFS64_STDIO                      = 1
   415  	X_LFS_ASYNCHRONOUS_IO              = 1
   416  	X_LFS_LARGEFILE                    = 1
   417  	X_MKNOD_VER                        = 1
   418  	X_MKNOD_VER_LINUX                  = 1
   419  	X_MKNOD_VER_SVR4                   = 2
   420  	X_POSIX2_CHAR_TERM                 = 200809
   421  	X_POSIX2_C_BIND                    = 200809
   422  	X_POSIX2_C_DEV                     = 200809
   423  	X_POSIX2_C_VERSION                 = 200809
   424  	X_POSIX2_LOCALEDEF                 = 200809
   425  	X_POSIX2_SW_DEV                    = 200809
   426  	X_POSIX2_VERSION                   = 200809
   427  	X_POSIX_ADVISORY_INFO              = 200809
   428  	X_POSIX_ASYNCHRONOUS_IO            = 200809
   429  	X_POSIX_ASYNC_IO                   = 1
   430  	X_POSIX_BARRIERS                   = 200809
   431  	X_POSIX_CHOWN_RESTRICTED           = 0
   432  	X_POSIX_CLOCK_SELECTION            = 200809
   433  	X_POSIX_CPUTIME                    = 0
   434  	X_POSIX_FSYNC                      = 200809
   435  	X_POSIX_IPV6                       = 200809
   436  	X_POSIX_JOB_CONTROL                = 1
   437  	X_POSIX_MAPPED_FILES               = 200809
   438  	X_POSIX_MEMLOCK                    = 200809
   439  	X_POSIX_MEMLOCK_RANGE              = 200809
   440  	X_POSIX_MEMORY_PROTECTION          = 200809
   441  	X_POSIX_MESSAGE_PASSING            = 200809
   442  	X_POSIX_MONOTONIC_CLOCK            = 0
   443  	X_POSIX_NO_TRUNC                   = 1
   444  	X_POSIX_PRIORITIZED_IO             = 200809
   445  	X_POSIX_PRIORITY_SCHEDULING        = 200809
   446  	X_POSIX_RAW_SOCKETS                = 200809
   447  	X_POSIX_READER_WRITER_LOCKS        = 200809
   448  	X_POSIX_REALTIME_SIGNALS           = 200809
   449  	X_POSIX_REENTRANT_FUNCTIONS        = 1
   450  	X_POSIX_REGEXP                     = 1
   451  	X_POSIX_SAVED_IDS                  = 1
   452  	X_POSIX_SEMAPHORES                 = 200809
   453  	X_POSIX_SHARED_MEMORY_OBJECTS      = 200809
   454  	X_POSIX_SHELL                      = 1
   455  	X_POSIX_SPAWN                      = 200809
   456  	X_POSIX_SPIN_LOCKS                 = 200809
   457  	X_POSIX_SPORADIC_SERVER            = -1
   458  	X_POSIX_SYNCHRONIZED_IO            = 200809
   459  	X_POSIX_THREADS                    = 200809
   460  	X_POSIX_THREAD_ATTR_STACKADDR      = 200809
   461  	X_POSIX_THREAD_ATTR_STACKSIZE      = 200809
   462  	X_POSIX_THREAD_CPUTIME             = 0
   463  	X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809
   464  	X_POSIX_THREAD_PRIO_INHERIT        = 200809
   465  	X_POSIX_THREAD_PRIO_PROTECT        = 200809
   466  	X_POSIX_THREAD_PROCESS_SHARED      = 200809
   467  	X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809
   468  	X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1
   469  	X_POSIX_THREAD_SAFE_FUNCTIONS      = 200809
   470  	X_POSIX_THREAD_SPORADIC_SERVER     = -1
   471  	X_POSIX_TIMEOUTS                   = 200809
   472  	X_POSIX_TIMERS                     = 200809
   473  	X_POSIX_TRACE                      = -1
   474  	X_POSIX_TRACE_EVENT_FILTER         = -1
   475  	X_POSIX_TRACE_INHERIT              = -1
   476  	X_POSIX_TRACE_LOG                  = -1
   477  	X_POSIX_TYPED_MEMORY_OBJECTS       = -1
   478  	X_POSIX_V6_ILP32_OFF32             = 1
   479  	X_POSIX_V6_ILP32_OFFBIG            = 1
   480  	X_POSIX_V7_ILP32_OFF32             = 1
   481  	X_POSIX_V7_ILP32_OFFBIG            = 1
   482  	X_POSIX_VDISABLE                   = 0
   483  	X_POSIX_VERSION                    = 200809
   484  	X_STATBUF_ST_BLKSIZE               = 0
   485  	X_STATBUF_ST_NSEC                  = 0
   486  	X_STATBUF_ST_RDEV                  = 0
   487  	X_STAT_VER                         = 3
   488  	X_STAT_VER_KERNEL                  = 1
   489  	X_STAT_VER_LINUX                   = 3
   490  	X_STAT_VER_LINUX_OLD               = 1
   491  	X_STAT_VER_SVR4                    = 2
   492  	X_SYS_TIME_H                       = 1
   493  	X_TIME_H                           = 1
   494  	X_UNISTD_H                         = 1
   495  	X_XARCH_H_                         = 0
   496  	X_XBS5_ILP32_OFF32                 = 1
   497  	X_XBS5_ILP32_OFFBIG                = 1
   498  	X_XOPEN_ENH_I18N                   = 1
   499  	X_XOPEN_LEGACY                     = 1
   500  	X_XOPEN_REALTIME                   = 1
   501  	X_XOPEN_REALTIME_THREADS           = 1
   502  	X_XOPEN_SHM                        = 1
   503  	X_XOPEN_UNIX                       = 1
   504  	X_XOPEN_VERSION                    = 700
   505  	X_XOPEN_XCU_VERSION                = 4
   506  	X_XOPEN_XPG2                       = 1
   507  	X_XOPEN_XPG3                       = 1
   508  	X_XOPEN_XPG4                       = 1
   509  	X_XOS_H_                           = 0
   510  	ACCESSPERMS                        = 511
   511  	ALLPERMS                           = 4095
   512  	DEFFILEMODE                        = 438
   513  	E2BIG                              = 7
   514  	EACCES                             = 13
   515  	EADDRINUSE                         = 98
   516  	EADDRNOTAVAIL                      = 99
   517  	EADV                               = 68
   518  	EAFNOSUPPORT                       = 97
   519  	EAGAIN                             = 11
   520  	EALREADY                           = 114
   521  	EBADE                              = 52
   522  	EBADF                              = 9
   523  	EBADFD                             = 77
   524  	EBADMSG                            = 74
   525  	EBADR                              = 53
   526  	EBADRQC                            = 56
   527  	EBADSLT                            = 57
   528  	EBFONT                             = 59
   529  	EBUSY                              = 16
   530  	ECANCELED                          = 125
   531  	ECHILD                             = 10
   532  	ECHRNG                             = 44
   533  	ECOMM                              = 70
   534  	ECONNABORTED                       = 103
   535  	ECONNREFUSED                       = 111
   536  	ECONNRESET                         = 104
   537  	EDEADLK                            = 35
   538  	EDEADLOCK                          = 35
   539  	EDESTADDRREQ                       = 89
   540  	EDOM                               = 33
   541  	EDOTDOT                            = 73
   542  	EDQUOT                             = 122
   543  	EEXIST                             = 17
   544  	EFAULT                             = 14
   545  	EFBIG                              = 27
   546  	EHOSTDOWN                          = 112
   547  	EHOSTUNREACH                       = 113
   548  	EHWPOISON                          = 133
   549  	EIDRM                              = 43
   550  	EILSEQ                             = 84
   551  	EINPROGRESS                        = 115
   552  	EINTR                              = 4
   553  	EINVAL                             = 22
   554  	EIO                                = 5
   555  	EISCONN                            = 106
   556  	EISDIR                             = 21
   557  	EISNAM                             = 120
   558  	EKEYEXPIRED                        = 127
   559  	EKEYREJECTED                       = 129
   560  	EKEYREVOKED                        = 128
   561  	EL2HLT                             = 51
   562  	EL2NSYNC                           = 45
   563  	EL3HLT                             = 46
   564  	EL3RST                             = 47
   565  	ELIBACC                            = 79
   566  	ELIBBAD                            = 80
   567  	ELIBEXEC                           = 83
   568  	ELIBMAX                            = 82
   569  	ELIBSCN                            = 81
   570  	ELNRNG                             = 48
   571  	ELOOP                              = 40
   572  	EMEDIUMTYPE                        = 124
   573  	EMFILE                             = 24
   574  	EMLINK                             = 31
   575  	EMSGSIZE                           = 90
   576  	EMULTIHOP                          = 72
   577  	ENAMETOOLONG                       = 36
   578  	ENAVAIL                            = 119
   579  	ENETDOWN                           = 100
   580  	ENETRESET                          = 102
   581  	ENETUNREACH                        = 101
   582  	ENFILE                             = 23
   583  	ENOANO                             = 55
   584  	ENOBUFS                            = 105
   585  	ENOCSI                             = 50
   586  	ENODATA                            = 61
   587  	ENODEV                             = 19
   588  	ENOENT                             = 2
   589  	ENOEXEC                            = 8
   590  	ENOKEY                             = 126
   591  	ENOLCK                             = 37
   592  	ENOLINK                            = 67
   593  	ENOMEDIUM                          = 123
   594  	ENOMEM                             = 12
   595  	ENOMSG                             = 42
   596  	ENONET                             = 64
   597  	ENOPKG                             = 65
   598  	ENOPROTOOPT                        = 92
   599  	ENOSPC                             = 28
   600  	ENOSR                              = 63
   601  	ENOSTR                             = 60
   602  	ENOSYS                             = 38
   603  	ENOTBLK                            = 15
   604  	ENOTCONN                           = 107
   605  	ENOTDIR                            = 20
   606  	ENOTEMPTY                          = 39
   607  	ENOTNAM                            = 118
   608  	ENOTRECOVERABLE                    = 131
   609  	ENOTSOCK                           = 88
   610  	ENOTSUP                            = 95
   611  	ENOTTY                             = 25
   612  	ENOTUNIQ                           = 76
   613  	ENXIO                              = 6
   614  	EOPNOTSUPP                         = 95
   615  	EOVERFLOW                          = 75
   616  	EOWNERDEAD                         = 130
   617  	EPERM                              = 1
   618  	EPFNOSUPPORT                       = 96
   619  	EPIPE                              = 32
   620  	EPROTO                             = 71
   621  	EPROTONOSUPPORT                    = 93
   622  	EPROTOTYPE                         = 91
   623  	ERANGE                             = 34
   624  	EREMCHG                            = 78
   625  	EREMOTE                            = 66
   626  	EREMOTEIO                          = 121
   627  	ERESTART                           = 85
   628  	ERFKILL                            = 132
   629  	EROFS                              = 30
   630  	ESHUTDOWN                          = 108
   631  	ESOCKTNOSUPPORT                    = 94
   632  	ESPIPE                             = 29
   633  	ESRCH                              = 3
   634  	ESRMNT                             = 69
   635  	ESTALE                             = 116
   636  	ESTRPIPE                           = 86
   637  	ETIME                              = 62
   638  	ETIMEDOUT                          = 110
   639  	ETOOMANYREFS                       = 109
   640  	ETXTBSY                            = 26
   641  	EUCLEAN                            = 117
   642  	EUNATCH                            = 49
   643  	EUSERS                             = 87
   644  	EWOULDBLOCK                        = 11
   645  	EXDEV                              = 18
   646  	EXFULL                             = 54
   647  	STATX_ALL                          = 0x00000fff
   648  	STATX_ATIME                        = 0x00000020
   649  	STATX_ATTR_APPEND                  = 0x00000020
   650  	STATX_ATTR_AUTOMOUNT               = 0x00001000
   651  	STATX_ATTR_COMPRESSED              = 0x00000004
   652  	STATX_ATTR_DAX                     = 0x00200000
   653  	STATX_ATTR_ENCRYPTED               = 0x00000800
   654  	STATX_ATTR_IMMUTABLE               = 0x00000010
   655  	STATX_ATTR_MOUNT_ROOT              = 0x00002000
   656  	STATX_ATTR_NODUMP                  = 0x00000040
   657  	STATX_ATTR_VERITY                  = 0x00100000
   658  	STATX_BASIC_STATS                  = 0x000007ff
   659  	STATX_BLOCKS                       = 0x00000400
   660  	STATX_BTIME                        = 0x00000800
   661  	STATX_CTIME                        = 0x00000080
   662  	STATX_GID                          = 0x00000010
   663  	STATX_INO                          = 0x00000100
   664  	STATX_MNT_ID                       = 0x00001000
   665  	STATX_MODE                         = 0x00000002
   666  	STATX_MTIME                        = 0x00000040
   667  	STATX_NLINK                        = 0x00000004
   668  	STATX_SIZE                         = 0x00000200
   669  	STATX_TYPE                         = 0x00000001
   670  	STATX_UID                          = 0x00000008
   671  	STATX__RESERVED                    = 0x80000000
   672  	S_BLKSIZE                          = 512
   673  	S_IEXEC                            = 64
   674  	S_IREAD                            = 256
   675  	S_IWRITE                           = 128
   676  	X_ASM_GENERIC_ERRNO_BASE_H         = 0
   677  	X_ASM_GENERIC_ERRNO_H              = 0
   678  	X_ASM_GENERIC_INT_LL64_H           = 0
   679  	X_ASM_GENERIC_TYPES_H              = 0
   680  	X_ASM_X86_POSIX_TYPES_32_H         = 0
   681  	X_BITS_ERRNO_H                     = 1
   682  	X_ERRNO_H                          = 1
   683  	X_LINUX_POSIX_TYPES_H              = 0
   684  	X_LINUX_STAT_H                     = 0
   685  	X_LINUX_TYPES_H                    = 0
   686  	X_SYS_STAT_H                       = 1
   687  )
   688  
   689  // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
   690  //    the `_SC_*' symbols for the NAME argument to `sysconf';
   691  //    and the `_CS_*' symbols for the NAME argument to `confstr'.
   692  // `sysconf', `pathconf', and `confstr' NAME values.  Generic version.
   693  //    Copyright (C) 1993-2020 Free Software Foundation, Inc.
   694  //    This file is part of the GNU C Library.
   695  //
   696  //    The GNU C Library is free software; you can redistribute it and/or
   697  //    modify it under the terms of the GNU Lesser General Public
   698  //    License as published by the Free Software Foundation; either
   699  //    version 2.1 of the License, or (at your option) any later version.
   700  //
   701  //    The GNU C Library is distributed in the hope that it will be useful,
   702  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   703  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   704  //    Lesser General Public License for more details.
   705  //
   706  //    You should have received a copy of the GNU Lesser General Public
   707  //    License along with the GNU C Library; if not, see
   708  //    <https://www.gnu.org/licenses/>.
   709  
   710  // Values for the NAME argument to `pathconf' and `fpathconf'.
   711  const ( /* confname.h:24:1: */
   712  	X_PC_LINK_MAX           = 0
   713  	X_PC_MAX_CANON          = 1
   714  	X_PC_MAX_INPUT          = 2
   715  	X_PC_NAME_MAX           = 3
   716  	X_PC_PATH_MAX           = 4
   717  	X_PC_PIPE_BUF           = 5
   718  	X_PC_CHOWN_RESTRICTED   = 6
   719  	X_PC_NO_TRUNC           = 7
   720  	X_PC_VDISABLE           = 8
   721  	X_PC_SYNC_IO            = 9
   722  	X_PC_ASYNC_IO           = 10
   723  	X_PC_PRIO_IO            = 11
   724  	X_PC_SOCK_MAXBUF        = 12
   725  	X_PC_FILESIZEBITS       = 13
   726  	X_PC_REC_INCR_XFER_SIZE = 14
   727  	X_PC_REC_MAX_XFER_SIZE  = 15
   728  	X_PC_REC_MIN_XFER_SIZE  = 16
   729  	X_PC_REC_XFER_ALIGN     = 17
   730  	X_PC_ALLOC_SIZE_MIN     = 18
   731  	X_PC_SYMLINK_MAX        = 19
   732  	X_PC_2_SYMLINKS         = 20
   733  )
   734  
   735  // Values for the NAME argument to `confstr'.
   736  const ( /* confname.h:533:1: */
   737  	X_CS_PATH = 0 // The default search path.
   738  
   739  	X_CS_V6_WIDTH_RESTRICTED_ENVS = 1
   740  
   741  	X_CS_GNU_LIBC_VERSION       = 2
   742  	X_CS_GNU_LIBPTHREAD_VERSION = 3
   743  
   744  	X_CS_V5_WIDTH_RESTRICTED_ENVS = 4
   745  
   746  	X_CS_V7_WIDTH_RESTRICTED_ENVS = 5
   747  
   748  	X_CS_LFS_CFLAGS      = 1000
   749  	X_CS_LFS_LDFLAGS     = 1001
   750  	X_CS_LFS_LIBS        = 1002
   751  	X_CS_LFS_LINTFLAGS   = 1003
   752  	X_CS_LFS64_CFLAGS    = 1004
   753  	X_CS_LFS64_LDFLAGS   = 1005
   754  	X_CS_LFS64_LIBS      = 1006
   755  	X_CS_LFS64_LINTFLAGS = 1007
   756  
   757  	X_CS_XBS5_ILP32_OFF32_CFLAGS     = 1100
   758  	X_CS_XBS5_ILP32_OFF32_LDFLAGS    = 1101
   759  	X_CS_XBS5_ILP32_OFF32_LIBS       = 1102
   760  	X_CS_XBS5_ILP32_OFF32_LINTFLAGS  = 1103
   761  	X_CS_XBS5_ILP32_OFFBIG_CFLAGS    = 1104
   762  	X_CS_XBS5_ILP32_OFFBIG_LDFLAGS   = 1105
   763  	X_CS_XBS5_ILP32_OFFBIG_LIBS      = 1106
   764  	X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107
   765  	X_CS_XBS5_LP64_OFF64_CFLAGS      = 1108
   766  	X_CS_XBS5_LP64_OFF64_LDFLAGS     = 1109
   767  	X_CS_XBS5_LP64_OFF64_LIBS        = 1110
   768  	X_CS_XBS5_LP64_OFF64_LINTFLAGS   = 1111
   769  	X_CS_XBS5_LPBIG_OFFBIG_CFLAGS    = 1112
   770  	X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS   = 1113
   771  	X_CS_XBS5_LPBIG_OFFBIG_LIBS      = 1114
   772  	X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115
   773  
   774  	X_CS_POSIX_V6_ILP32_OFF32_CFLAGS     = 1116
   775  	X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS    = 1117
   776  	X_CS_POSIX_V6_ILP32_OFF32_LIBS       = 1118
   777  	X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS  = 1119
   778  	X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    = 1120
   779  	X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS   = 1121
   780  	X_CS_POSIX_V6_ILP32_OFFBIG_LIBS      = 1122
   781  	X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
   782  	X_CS_POSIX_V6_LP64_OFF64_CFLAGS      = 1124
   783  	X_CS_POSIX_V6_LP64_OFF64_LDFLAGS     = 1125
   784  	X_CS_POSIX_V6_LP64_OFF64_LIBS        = 1126
   785  	X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS   = 1127
   786  	X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    = 1128
   787  	X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS   = 1129
   788  	X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS      = 1130
   789  	X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
   790  
   791  	X_CS_POSIX_V7_ILP32_OFF32_CFLAGS     = 1132
   792  	X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS    = 1133
   793  	X_CS_POSIX_V7_ILP32_OFF32_LIBS       = 1134
   794  	X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS  = 1135
   795  	X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS    = 1136
   796  	X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS   = 1137
   797  	X_CS_POSIX_V7_ILP32_OFFBIG_LIBS      = 1138
   798  	X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
   799  	X_CS_POSIX_V7_LP64_OFF64_CFLAGS      = 1140
   800  	X_CS_POSIX_V7_LP64_OFF64_LDFLAGS     = 1141
   801  	X_CS_POSIX_V7_LP64_OFF64_LIBS        = 1142
   802  	X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS   = 1143
   803  	X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS    = 1144
   804  	X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS   = 1145
   805  	X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS      = 1146
   806  	X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
   807  
   808  	X_CS_V6_ENV = 1148
   809  	X_CS_V7_ENV = 1149
   810  )
   811  
   812  // Values for the argument to `sysconf'.
   813  const ( /* confname.h:71:1: */
   814  	X_SC_ARG_MAX               = 0
   815  	X_SC_CHILD_MAX             = 1
   816  	X_SC_CLK_TCK               = 2
   817  	X_SC_NGROUPS_MAX           = 3
   818  	X_SC_OPEN_MAX              = 4
   819  	X_SC_STREAM_MAX            = 5
   820  	X_SC_TZNAME_MAX            = 6
   821  	X_SC_JOB_CONTROL           = 7
   822  	X_SC_SAVED_IDS             = 8
   823  	X_SC_REALTIME_SIGNALS      = 9
   824  	X_SC_PRIORITY_SCHEDULING   = 10
   825  	X_SC_TIMERS                = 11
   826  	X_SC_ASYNCHRONOUS_IO       = 12
   827  	X_SC_PRIORITIZED_IO        = 13
   828  	X_SC_SYNCHRONIZED_IO       = 14
   829  	X_SC_FSYNC                 = 15
   830  	X_SC_MAPPED_FILES          = 16
   831  	X_SC_MEMLOCK               = 17
   832  	X_SC_MEMLOCK_RANGE         = 18
   833  	X_SC_MEMORY_PROTECTION     = 19
   834  	X_SC_MESSAGE_PASSING       = 20
   835  	X_SC_SEMAPHORES            = 21
   836  	X_SC_SHARED_MEMORY_OBJECTS = 22
   837  	X_SC_AIO_LISTIO_MAX        = 23
   838  	X_SC_AIO_MAX               = 24
   839  	X_SC_AIO_PRIO_DELTA_MAX    = 25
   840  	X_SC_DELAYTIMER_MAX        = 26
   841  	X_SC_MQ_OPEN_MAX           = 27
   842  	X_SC_MQ_PRIO_MAX           = 28
   843  	X_SC_VERSION               = 29
   844  	X_SC_PAGESIZE              = 30
   845  	X_SC_RTSIG_MAX             = 31
   846  	X_SC_SEM_NSEMS_MAX         = 32
   847  	X_SC_SEM_VALUE_MAX         = 33
   848  	X_SC_SIGQUEUE_MAX          = 34
   849  	X_SC_TIMER_MAX             = 35
   850  
   851  	// Values for the argument to `sysconf'
   852  	//        corresponding to _POSIX2_* symbols.
   853  	X_SC_BC_BASE_MAX        = 36
   854  	X_SC_BC_DIM_MAX         = 37
   855  	X_SC_BC_SCALE_MAX       = 38
   856  	X_SC_BC_STRING_MAX      = 39
   857  	X_SC_COLL_WEIGHTS_MAX   = 40
   858  	X_SC_EQUIV_CLASS_MAX    = 41
   859  	X_SC_EXPR_NEST_MAX      = 42
   860  	X_SC_LINE_MAX           = 43
   861  	X_SC_RE_DUP_MAX         = 44
   862  	X_SC_CHARCLASS_NAME_MAX = 45
   863  
   864  	X_SC_2_VERSION   = 46
   865  	X_SC_2_C_BIND    = 47
   866  	X_SC_2_C_DEV     = 48
   867  	X_SC_2_FORT_DEV  = 49
   868  	X_SC_2_FORT_RUN  = 50
   869  	X_SC_2_SW_DEV    = 51
   870  	X_SC_2_LOCALEDEF = 52
   871  
   872  	X_SC_PII                 = 53
   873  	X_SC_PII_XTI             = 54
   874  	X_SC_PII_SOCKET          = 55
   875  	X_SC_PII_INTERNET        = 56
   876  	X_SC_PII_OSI             = 57
   877  	X_SC_POLL                = 58
   878  	X_SC_SELECT              = 59
   879  	X_SC_UIO_MAXIOV          = 60
   880  	X_SC_IOV_MAX             = 60
   881  	X_SC_PII_INTERNET_STREAM = 61
   882  	X_SC_PII_INTERNET_DGRAM  = 62
   883  	X_SC_PII_OSI_COTS        = 63
   884  	X_SC_PII_OSI_CLTS        = 64
   885  	X_SC_PII_OSI_M           = 65
   886  	X_SC_T_IOV_MAX           = 66
   887  
   888  	// Values according to POSIX 1003.1c (POSIX threads).
   889  	X_SC_THREADS                      = 67
   890  	X_SC_THREAD_SAFE_FUNCTIONS        = 68
   891  	X_SC_GETGR_R_SIZE_MAX             = 69
   892  	X_SC_GETPW_R_SIZE_MAX             = 70
   893  	X_SC_LOGIN_NAME_MAX               = 71
   894  	X_SC_TTY_NAME_MAX                 = 72
   895  	X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73
   896  	X_SC_THREAD_KEYS_MAX              = 74
   897  	X_SC_THREAD_STACK_MIN             = 75
   898  	X_SC_THREAD_THREADS_MAX           = 76
   899  	X_SC_THREAD_ATTR_STACKADDR        = 77
   900  	X_SC_THREAD_ATTR_STACKSIZE        = 78
   901  	X_SC_THREAD_PRIORITY_SCHEDULING   = 79
   902  	X_SC_THREAD_PRIO_INHERIT          = 80
   903  	X_SC_THREAD_PRIO_PROTECT          = 81
   904  	X_SC_THREAD_PROCESS_SHARED        = 82
   905  
   906  	X_SC_NPROCESSORS_CONF = 83
   907  	X_SC_NPROCESSORS_ONLN = 84
   908  	X_SC_PHYS_PAGES       = 85
   909  	X_SC_AVPHYS_PAGES     = 86
   910  	X_SC_ATEXIT_MAX       = 87
   911  	X_SC_PASS_MAX         = 88
   912  
   913  	X_SC_XOPEN_VERSION     = 89
   914  	X_SC_XOPEN_XCU_VERSION = 90
   915  	X_SC_XOPEN_UNIX        = 91
   916  	X_SC_XOPEN_CRYPT       = 92
   917  	X_SC_XOPEN_ENH_I18N    = 93
   918  	X_SC_XOPEN_SHM         = 94
   919  
   920  	X_SC_2_CHAR_TERM = 95
   921  	X_SC_2_C_VERSION = 96
   922  	X_SC_2_UPE       = 97
   923  
   924  	X_SC_XOPEN_XPG2 = 98
   925  	X_SC_XOPEN_XPG3 = 99
   926  	X_SC_XOPEN_XPG4 = 100
   927  
   928  	X_SC_CHAR_BIT   = 101
   929  	X_SC_CHAR_MAX   = 102
   930  	X_SC_CHAR_MIN   = 103
   931  	X_SC_INT_MAX    = 104
   932  	X_SC_INT_MIN    = 105
   933  	X_SC_LONG_BIT   = 106
   934  	X_SC_WORD_BIT   = 107
   935  	X_SC_MB_LEN_MAX = 108
   936  	X_SC_NZERO      = 109
   937  	X_SC_SSIZE_MAX  = 110
   938  	X_SC_SCHAR_MAX  = 111
   939  	X_SC_SCHAR_MIN  = 112
   940  	X_SC_SHRT_MAX   = 113
   941  	X_SC_SHRT_MIN   = 114
   942  	X_SC_UCHAR_MAX  = 115
   943  	X_SC_UINT_MAX   = 116
   944  	X_SC_ULONG_MAX  = 117
   945  	X_SC_USHRT_MAX  = 118
   946  
   947  	X_SC_NL_ARGMAX  = 119
   948  	X_SC_NL_LANGMAX = 120
   949  	X_SC_NL_MSGMAX  = 121
   950  	X_SC_NL_NMAX    = 122
   951  	X_SC_NL_SETMAX  = 123
   952  	X_SC_NL_TEXTMAX = 124
   953  
   954  	X_SC_XBS5_ILP32_OFF32  = 125
   955  	X_SC_XBS5_ILP32_OFFBIG = 126
   956  	X_SC_XBS5_LP64_OFF64   = 127
   957  	X_SC_XBS5_LPBIG_OFFBIG = 128
   958  
   959  	X_SC_XOPEN_LEGACY           = 129
   960  	X_SC_XOPEN_REALTIME         = 130
   961  	X_SC_XOPEN_REALTIME_THREADS = 131
   962  
   963  	X_SC_ADVISORY_INFO          = 132
   964  	X_SC_BARRIERS               = 133
   965  	X_SC_BASE                   = 134
   966  	X_SC_C_LANG_SUPPORT         = 135
   967  	X_SC_C_LANG_SUPPORT_R       = 136
   968  	X_SC_CLOCK_SELECTION        = 137
   969  	X_SC_CPUTIME                = 138
   970  	X_SC_THREAD_CPUTIME         = 139
   971  	X_SC_DEVICE_IO              = 140
   972  	X_SC_DEVICE_SPECIFIC        = 141
   973  	X_SC_DEVICE_SPECIFIC_R      = 142
   974  	X_SC_FD_MGMT                = 143
   975  	X_SC_FIFO                   = 144
   976  	X_SC_PIPE                   = 145
   977  	X_SC_FILE_ATTRIBUTES        = 146
   978  	X_SC_FILE_LOCKING           = 147
   979  	X_SC_FILE_SYSTEM            = 148
   980  	X_SC_MONOTONIC_CLOCK        = 149
   981  	X_SC_MULTI_PROCESS          = 150
   982  	X_SC_SINGLE_PROCESS         = 151
   983  	X_SC_NETWORKING             = 152
   984  	X_SC_READER_WRITER_LOCKS    = 153
   985  	X_SC_SPIN_LOCKS             = 154
   986  	X_SC_REGEXP                 = 155
   987  	X_SC_REGEX_VERSION          = 156
   988  	X_SC_SHELL                  = 157
   989  	X_SC_SIGNALS                = 158
   990  	X_SC_SPAWN                  = 159
   991  	X_SC_SPORADIC_SERVER        = 160
   992  	X_SC_THREAD_SPORADIC_SERVER = 161
   993  	X_SC_SYSTEM_DATABASE        = 162
   994  	X_SC_SYSTEM_DATABASE_R      = 163
   995  	X_SC_TIMEOUTS               = 164
   996  	X_SC_TYPED_MEMORY_OBJECTS   = 165
   997  	X_SC_USER_GROUPS            = 166
   998  	X_SC_USER_GROUPS_R          = 167
   999  	X_SC_2_PBS                  = 168
  1000  	X_SC_2_PBS_ACCOUNTING       = 169
  1001  	X_SC_2_PBS_LOCATE           = 170
  1002  	X_SC_2_PBS_MESSAGE          = 171
  1003  	X_SC_2_PBS_TRACK            = 172
  1004  	X_SC_SYMLOOP_MAX            = 173
  1005  	X_SC_STREAMS                = 174
  1006  	X_SC_2_PBS_CHECKPOINT       = 175
  1007  
  1008  	X_SC_V6_ILP32_OFF32  = 176
  1009  	X_SC_V6_ILP32_OFFBIG = 177
  1010  	X_SC_V6_LP64_OFF64   = 178
  1011  	X_SC_V6_LPBIG_OFFBIG = 179
  1012  
  1013  	X_SC_HOST_NAME_MAX      = 180
  1014  	X_SC_TRACE              = 181
  1015  	X_SC_TRACE_EVENT_FILTER = 182
  1016  	X_SC_TRACE_INHERIT      = 183
  1017  	X_SC_TRACE_LOG          = 184
  1018  
  1019  	X_SC_LEVEL1_ICACHE_SIZE     = 185
  1020  	X_SC_LEVEL1_ICACHE_ASSOC    = 186
  1021  	X_SC_LEVEL1_ICACHE_LINESIZE = 187
  1022  	X_SC_LEVEL1_DCACHE_SIZE     = 188
  1023  	X_SC_LEVEL1_DCACHE_ASSOC    = 189
  1024  	X_SC_LEVEL1_DCACHE_LINESIZE = 190
  1025  	X_SC_LEVEL2_CACHE_SIZE      = 191
  1026  	X_SC_LEVEL2_CACHE_ASSOC     = 192
  1027  	X_SC_LEVEL2_CACHE_LINESIZE  = 193
  1028  	X_SC_LEVEL3_CACHE_SIZE      = 194
  1029  	X_SC_LEVEL3_CACHE_ASSOC     = 195
  1030  	X_SC_LEVEL3_CACHE_LINESIZE  = 196
  1031  	X_SC_LEVEL4_CACHE_SIZE      = 197
  1032  	X_SC_LEVEL4_CACHE_ASSOC     = 198
  1033  	X_SC_LEVEL4_CACHE_LINESIZE  = 199
  1034  	// Leave room here, maybe we need a few more cache levels some day.
  1035  
  1036  	X_SC_IPV6        = 235
  1037  	X_SC_RAW_SOCKETS = 236
  1038  
  1039  	X_SC_V7_ILP32_OFF32  = 237
  1040  	X_SC_V7_ILP32_OFFBIG = 238
  1041  	X_SC_V7_LP64_OFF64   = 239
  1042  	X_SC_V7_LPBIG_OFFBIG = 240
  1043  
  1044  	X_SC_SS_REPL_MAX = 241
  1045  
  1046  	X_SC_TRACE_EVENT_NAME_MAX = 242
  1047  	X_SC_TRACE_NAME_MAX       = 243
  1048  	X_SC_TRACE_SYS_MAX        = 244
  1049  	X_SC_TRACE_USER_EVENT_MAX = 245
  1050  
  1051  	X_SC_XOPEN_STREAMS = 246
  1052  
  1053  	X_SC_THREAD_ROBUST_PRIO_INHERIT = 247
  1054  	X_SC_THREAD_ROBUST_PRIO_PROTECT = 248
  1055  )
  1056  
  1057  // open/fcntl.
  1058  
  1059  // open file description locks.
  1060  //
  1061  //    Usually record locks held by a process are released on *any* close and are
  1062  //    not inherited across a fork.
  1063  //
  1064  //    These cmd values will set locks that conflict with process-associated record
  1065  //    locks, but are "owned" by the opened file description, not the process.
  1066  //    This means that they are inherited across fork or clone with CLONE_FILES
  1067  //    like BSD (flock) locks, and they are only released automatically when the
  1068  //    last reference to the the file description against which they were acquired
  1069  //    is put.
  1070  
  1071  // For now, Linux has no separate synchronicity options for read
  1072  //    operations.  We define O_RSYNC therefore as the same as O_SYNC
  1073  //    since this is a superset.
  1074  
  1075  // Values for the second argument to `fcntl'.
  1076  
  1077  // Set / get write life time hints.
  1078  
  1079  // For F_[GET|SET]FD.
  1080  
  1081  // For posix fcntl() and `l_type' field of a `struct flock' for lockf().
  1082  
  1083  // For old implementation of BSD flock.
  1084  
  1085  // Operations for BSD flock, also used by the kernel implementation.
  1086  
  1087  // Types of directory notifications that may be requested with F_NOTIFY.
  1088  
  1089  // Owner types.
  1090  const ( /* fcntl-linux.h:265:1: */
  1091  	F_OWNER_TID  = 0 // Kernel thread.
  1092  	F_OWNER_PID  = 1 // Process.
  1093  	F_OWNER_PGRP = 2 // Process group.
  1094  	F_OWNER_GID  = 2
  1095  )
  1096  
  1097  // A null pointer constant.
  1098  
  1099  // XPG requires a few symbols from <sys/wait.h> being defined.
  1100  // Definitions of flag bits for `waitpid' et al.
  1101  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  1102  //    This file is part of the GNU C Library.
  1103  //
  1104  //    The GNU C Library is free software; you can redistribute it and/or
  1105  //    modify it under the terms of the GNU Lesser General Public
  1106  //    License as published by the Free Software Foundation; either
  1107  //    version 2.1 of the License, or (at your option) any later version.
  1108  //
  1109  //    The GNU C Library is distributed in the hope that it will be useful,
  1110  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1111  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1112  //    Lesser General Public License for more details.
  1113  //
  1114  //    You should have received a copy of the GNU Lesser General Public
  1115  //    License along with the GNU C Library; if not, see
  1116  //    <https://www.gnu.org/licenses/>.
  1117  
  1118  // Bits in the third argument to `waitpid'.
  1119  
  1120  // Bits in the fourth argument to `waitid'.
  1121  
  1122  // The following values are used by the `waitid' function.
  1123  
  1124  // The Linux kernel defines these bare, rather than an enum,
  1125  //    which causes a conflict if the include order is reversed.
  1126  
  1127  const ( /* waitflags.h:52:1: */
  1128  	P_ALL  = 0 // Wait for any child.
  1129  	P_PID  = 1 // Wait for specified process.
  1130  	P_PGID = 2
  1131  )
  1132  
  1133  // Values for the first argument to `getitimer' and `setitimer'.
  1134  const ( /* time.h:89:1: */
  1135  	// Timers run in real time.
  1136  	ITIMER_REAL = 0
  1137  	// Timers run only when the process is executing.
  1138  	ITIMER_VIRTUAL = 1
  1139  	// Timers run when the process is executing and when
  1140  	//        the system is executing on behalf of the process.
  1141  	ITIMER_PROF = 2
  1142  )
  1143  
  1144  type Ptrdiff_t = int32 /* <builtin>:3:26 */
  1145  
  1146  type Size_t = uint32 /* <builtin>:9:23 */
  1147  
  1148  type Wchar_t = int32 /* <builtin>:15:24 */
  1149  
  1150  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  1151  type X__float128 = float64        /* <builtin>:47:21 */
  1152  
  1153  //
  1154  //
  1155  // Copyright 1988, 1998  The Open Group
  1156  //
  1157  // Permission to use, copy, modify, distribute, and sell this software and its
  1158  // documentation for any purpose is hereby granted without fee, provided that
  1159  // the above copyright notice appear in all copies and that both that
  1160  // copyright notice and this permission notice appear in supporting
  1161  // documentation.
  1162  //
  1163  // The above copyright notice and this permission notice shall be included in
  1164  // all copies or substantial portions of the Software.
  1165  //
  1166  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1167  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1168  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  1169  // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  1170  // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  1171  // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  1172  //
  1173  // Except as contained in this notice, the name of The Open Group shall not be
  1174  // used in advertising or otherwise to promote the sale, use or other dealings
  1175  // in this Software without prior written authorization from The Open Group.
  1176  //
  1177  
  1178  // config.h.  Generated from config.h.in by configure.
  1179  // config.h.in.  Generated from configure.ac by autoheader.
  1180  
  1181  // Define to 1 if you have the <dlfcn.h> header file.
  1182  
  1183  // Define to 1 if you have the <inttypes.h> header file.
  1184  
  1185  // Define to 1 if you have the <memory.h> header file.
  1186  
  1187  // Define to 1 if you have the `pathconf' function.
  1188  
  1189  // Define to 1 if you have the <stdint.h> header file.
  1190  
  1191  // Define to 1 if you have the <stdlib.h> header file.
  1192  
  1193  // Define to 1 if you have the <strings.h> header file.
  1194  
  1195  // Define to 1 if you have the <string.h> header file.
  1196  
  1197  // Define to 1 if you have the <sys/stat.h> header file.
  1198  
  1199  // Define to 1 if you have the <sys/types.h> header file.
  1200  
  1201  // Define to 1 if you have the <unistd.h> header file.
  1202  
  1203  // Define to the sub-directory where libtool stores uninstalled libraries.
  1204  
  1205  // Name of package
  1206  
  1207  // Define to the address where bug reports for this package should be sent.
  1208  
  1209  // Define to the full name of this package.
  1210  
  1211  // Define to the full name and version of this package.
  1212  
  1213  // Define to the one symbol short name of this package.
  1214  
  1215  // Define to the home page for this package.
  1216  
  1217  // Define to the version of this package.
  1218  
  1219  // Major version of this package
  1220  
  1221  // Minor version of this package
  1222  
  1223  // Patch version of this package
  1224  
  1225  // Define to 1 if you have the ANSI C header files.
  1226  
  1227  // Enable extensions on AIX 3, Interix.
  1228  // Enable GNU extensions on systems that have them.
  1229  // Enable threading extensions on Solaris.
  1230  // Enable extensions on HP NonStop.
  1231  // Enable general extensions on Solaris.
  1232  
  1233  // Version number of package
  1234  
  1235  // Whether libXau is compiled with thread support
  1236  // #undef XTHREADS
  1237  
  1238  // Whether libXau needs to use MT safe API's
  1239  // #undef XUSE_MTSAFE_API
  1240  
  1241  // Define to 1 if on MINIX.
  1242  // #undef _MINIX
  1243  
  1244  // Define to 2 if the system does not provide POSIX.1 features except with
  1245  //    this defined.
  1246  // #undef _POSIX_1_SOURCE
  1247  
  1248  // Define to 1 if you need to in order for `stat' and other things to work.
  1249  // #undef _POSIX_SOURCE
  1250  //
  1251  //
  1252  // Copyright 1988, 1998  The Open Group
  1253  //
  1254  // Permission to use, copy, modify, distribute, and sell this software and its
  1255  // documentation for any purpose is hereby granted without fee, provided that
  1256  // the above copyright notice appear in all copies and that both that
  1257  // copyright notice and this permission notice appear in supporting
  1258  // documentation.
  1259  //
  1260  // The above copyright notice and this permission notice shall be included in
  1261  // all copies or substantial portions of the Software.
  1262  //
  1263  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1264  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1265  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  1266  // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  1267  // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  1268  // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  1269  //
  1270  // Except as contained in this notice, the name of The Open Group shall not be
  1271  // used in advertising or otherwise to promote the sale, use or other dealings
  1272  // in this Software without prior written authorization from The Open Group.
  1273  //
  1274  
  1275  // struct xauth is full of implicit padding to properly align the pointers
  1276  //    after the length fields.   We can't clean that up without breaking ABI,
  1277  //    so tell clang not to bother complaining about it.
  1278  
  1279  type Xauth1 = struct {
  1280  	Ffamily         uint16
  1281  	Faddress_length uint16
  1282  	Faddress        uintptr
  1283  	Fnumber_length  uint16
  1284  	F__ccgo_pad1    [2]byte
  1285  	Fnumber         uintptr
  1286  	Fname_length    uint16
  1287  	F__ccgo_pad2    [2]byte
  1288  	Fname           uintptr
  1289  	Fdata_length    uint16
  1290  	F__ccgo_pad3    [2]byte
  1291  	Fdata           uintptr
  1292  } /* Xauth.h:38:9 */
  1293  
  1294  //
  1295  //
  1296  // Copyright 1988, 1998  The Open Group
  1297  //
  1298  // Permission to use, copy, modify, distribute, and sell this software and its
  1299  // documentation for any purpose is hereby granted without fee, provided that
  1300  // the above copyright notice appear in all copies and that both that
  1301  // copyright notice and this permission notice appear in supporting
  1302  // documentation.
  1303  //
  1304  // The above copyright notice and this permission notice shall be included in
  1305  // all copies or substantial portions of the Software.
  1306  //
  1307  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1308  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1309  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  1310  // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  1311  // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  1312  // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  1313  //
  1314  // Except as contained in this notice, the name of The Open Group shall not be
  1315  // used in advertising or otherwise to promote the sale, use or other dealings
  1316  // in this Software without prior written authorization from The Open Group.
  1317  //
  1318  
  1319  // config.h.  Generated from config.h.in by configure.
  1320  // config.h.in.  Generated from configure.ac by autoheader.
  1321  
  1322  // Define to 1 if you have the <dlfcn.h> header file.
  1323  
  1324  // Define to 1 if you have the <inttypes.h> header file.
  1325  
  1326  // Define to 1 if you have the <memory.h> header file.
  1327  
  1328  // Define to 1 if you have the `pathconf' function.
  1329  
  1330  // Define to 1 if you have the <stdint.h> header file.
  1331  
  1332  // Define to 1 if you have the <stdlib.h> header file.
  1333  
  1334  // Define to 1 if you have the <strings.h> header file.
  1335  
  1336  // Define to 1 if you have the <string.h> header file.
  1337  
  1338  // Define to 1 if you have the <sys/stat.h> header file.
  1339  
  1340  // Define to 1 if you have the <sys/types.h> header file.
  1341  
  1342  // Define to 1 if you have the <unistd.h> header file.
  1343  
  1344  // Define to the sub-directory where libtool stores uninstalled libraries.
  1345  
  1346  // Name of package
  1347  
  1348  // Define to the address where bug reports for this package should be sent.
  1349  
  1350  // Define to the full name of this package.
  1351  
  1352  // Define to the full name and version of this package.
  1353  
  1354  // Define to the one symbol short name of this package.
  1355  
  1356  // Define to the home page for this package.
  1357  
  1358  // Define to the version of this package.
  1359  
  1360  // Major version of this package
  1361  
  1362  // Minor version of this package
  1363  
  1364  // Patch version of this package
  1365  
  1366  // Define to 1 if you have the ANSI C header files.
  1367  
  1368  // Enable extensions on AIX 3, Interix.
  1369  // Enable GNU extensions on systems that have them.
  1370  // Enable threading extensions on Solaris.
  1371  // Enable extensions on HP NonStop.
  1372  // Enable general extensions on Solaris.
  1373  
  1374  // Version number of package
  1375  
  1376  // Whether libXau is compiled with thread support
  1377  // #undef XTHREADS
  1378  
  1379  // Whether libXau needs to use MT safe API's
  1380  // #undef XUSE_MTSAFE_API
  1381  
  1382  // Define to 1 if on MINIX.
  1383  // #undef _MINIX
  1384  
  1385  // Define to 2 if the system does not provide POSIX.1 features except with
  1386  //    this defined.
  1387  // #undef _POSIX_1_SOURCE
  1388  
  1389  // Define to 1 if you need to in order for `stat' and other things to work.
  1390  // #undef _POSIX_SOURCE
  1391  //
  1392  //
  1393  // Copyright 1988, 1998  The Open Group
  1394  //
  1395  // Permission to use, copy, modify, distribute, and sell this software and its
  1396  // documentation for any purpose is hereby granted without fee, provided that
  1397  // the above copyright notice appear in all copies and that both that
  1398  // copyright notice and this permission notice appear in supporting
  1399  // documentation.
  1400  //
  1401  // The above copyright notice and this permission notice shall be included in
  1402  // all copies or substantial portions of the Software.
  1403  //
  1404  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1405  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1406  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  1407  // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  1408  // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  1409  // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  1410  //
  1411  // Except as contained in this notice, the name of The Open Group shall not be
  1412  // used in advertising or otherwise to promote the sale, use or other dealings
  1413  // in this Software without prior written authorization from The Open Group.
  1414  //
  1415  
  1416  // struct xauth is full of implicit padding to properly align the pointers
  1417  //    after the length fields.   We can't clean that up without breaking ABI,
  1418  //    so tell clang not to bother complaining about it.
  1419  
  1420  type Xauth = Xauth1 /* Xauth.h:48:3 */
  1421  
  1422  // POSIX.1-2008 extended locale interface (see locale.h).
  1423  // Definition of locale_t.
  1424  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  1425  //    This file is part of the GNU C Library.
  1426  //
  1427  //    The GNU C Library is free software; you can redistribute it and/or
  1428  //    modify it under the terms of the GNU Lesser General Public
  1429  //    License as published by the Free Software Foundation; either
  1430  //    version 2.1 of the License, or (at your option) any later version.
  1431  //
  1432  //    The GNU C Library is distributed in the hope that it will be useful,
  1433  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1434  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1435  //    Lesser General Public License for more details.
  1436  //
  1437  //    You should have received a copy of the GNU Lesser General Public
  1438  //    License along with the GNU C Library; if not, see
  1439  //    <https://www.gnu.org/licenses/>.
  1440  
  1441  // Definition of struct __locale_struct and __locale_t.
  1442  //    Copyright (C) 1997-2020 Free Software Foundation, Inc.
  1443  //    This file is part of the GNU C Library.
  1444  //    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  1445  //
  1446  //    The GNU C Library is free software; you can redistribute it and/or
  1447  //    modify it under the terms of the GNU Lesser General Public
  1448  //    License as published by the Free Software Foundation; either
  1449  //    version 2.1 of the License, or (at your option) any later version.
  1450  //
  1451  //    The GNU C Library is distributed in the hope that it will be useful,
  1452  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1453  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1454  //    Lesser General Public License for more details.
  1455  //
  1456  //    You should have received a copy of the GNU Lesser General Public
  1457  //    License along with the GNU C Library; if not, see
  1458  //    <https://www.gnu.org/licenses/>.
  1459  
  1460  // POSIX.1-2008: the locale_t type, representing a locale context
  1461  //    (implementation-namespace version).  This type should be treated
  1462  //    as opaque by applications; some details are exposed for the sake of
  1463  //    efficiency in e.g. ctype functions.
  1464  
  1465  type X__locale_struct = struct {
  1466  	F__locales       [13]uintptr
  1467  	F__ctype_b       uintptr
  1468  	F__ctype_tolower uintptr
  1469  	F__ctype_toupper uintptr
  1470  	F__names         [13]uintptr
  1471  } /* __locale_t.h:28:1 */
  1472  
  1473  type X__locale_t = uintptr /* __locale_t.h:42:32 */
  1474  
  1475  type Locale_t = X__locale_t /* locale_t.h:24:20 */
  1476  
  1477  // the new Xfuncs.h
  1478  
  1479  // the ANSI C way
  1480  
  1481  // Define ISO C stdio on top of C++ iostreams.
  1482  //    Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1483  //    This file is part of the GNU C Library.
  1484  //
  1485  //    The GNU C Library is free software; you can redistribute it and/or
  1486  //    modify it under the terms of the GNU Lesser General Public
  1487  //    License as published by the Free Software Foundation; either
  1488  //    version 2.1 of the License, or (at your option) any later version.
  1489  //
  1490  //    The GNU C Library is distributed in the hope that it will be useful,
  1491  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1492  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1493  //    Lesser General Public License for more details.
  1494  //
  1495  //    You should have received a copy of the GNU Lesser General Public
  1496  //    License along with the GNU C Library; if not, see
  1497  //    <https://www.gnu.org/licenses/>.
  1498  
  1499  //	ISO C99 Standard: 7.19 Input/output	<stdio.h>
  1500  
  1501  // Handle feature test macros at the start of a header.
  1502  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  1503  //    This file is part of the GNU C Library.
  1504  //
  1505  //    The GNU C Library is free software; you can redistribute it and/or
  1506  //    modify it under the terms of the GNU Lesser General Public
  1507  //    License as published by the Free Software Foundation; either
  1508  //    version 2.1 of the License, or (at your option) any later version.
  1509  //
  1510  //    The GNU C Library is distributed in the hope that it will be useful,
  1511  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1512  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1513  //    Lesser General Public License for more details.
  1514  //
  1515  //    You should have received a copy of the GNU Lesser General Public
  1516  //    License along with the GNU C Library; if not, see
  1517  //    <https://www.gnu.org/licenses/>.
  1518  
  1519  // This header is internal to glibc and should not be included outside
  1520  //    of glibc headers.  Headers including it must define
  1521  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
  1522  //    cannot have multiple include guards because ISO C feature test
  1523  //    macros depend on the definition of the macro when an affected
  1524  //    header is included, not when the first system header is
  1525  //    included.
  1526  
  1527  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1528  //    This file is part of the GNU C Library.
  1529  //
  1530  //    The GNU C Library is free software; you can redistribute it and/or
  1531  //    modify it under the terms of the GNU Lesser General Public
  1532  //    License as published by the Free Software Foundation; either
  1533  //    version 2.1 of the License, or (at your option) any later version.
  1534  //
  1535  //    The GNU C Library is distributed in the hope that it will be useful,
  1536  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1537  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1538  //    Lesser General Public License for more details.
  1539  //
  1540  //    You should have received a copy of the GNU Lesser General Public
  1541  //    License along with the GNU C Library; if not, see
  1542  //    <https://www.gnu.org/licenses/>.
  1543  
  1544  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
  1545  //    macro.
  1546  
  1547  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
  1548  //    macro.  Most but not all symbols enabled by that macro in TS
  1549  //    18661-1 are enabled unconditionally in C2X; the symbols in Annex F
  1550  //    still require that macro in C2X.
  1551  
  1552  // ISO/IEC TS 18661-4:2015 defines the
  1553  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.  Other than the reduction
  1554  //    functions, the symbols from this TS are enabled unconditionally in
  1555  //    C2X.
  1556  
  1557  // ISO/IEC TS 18661-3:2015 defines the
  1558  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
  1559  
  1560  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  1561  //
  1562  // This file is part of GCC.
  1563  //
  1564  // GCC is free software; you can redistribute it and/or modify
  1565  // it under the terms of the GNU General Public License as published by
  1566  // the Free Software Foundation; either version 3, or (at your option)
  1567  // any later version.
  1568  //
  1569  // GCC is distributed in the hope that it will be useful,
  1570  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1571  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1572  // GNU General Public License for more details.
  1573  //
  1574  // Under Section 7 of GPL version 3, you are granted additional
  1575  // permissions described in the GCC Runtime Library Exception, version
  1576  // 3.1, as published by the Free Software Foundation.
  1577  //
  1578  // You should have received a copy of the GNU General Public License and
  1579  // a copy of the GCC Runtime Library Exception along with this program;
  1580  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1581  // <http://www.gnu.org/licenses/>.
  1582  
  1583  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  1584  
  1585  // Any one of these symbols __need_* means that GNU libc
  1586  //    wants us just to define one data type.  So don't define
  1587  //    the symbols that indicate this file's entire job has been done.
  1588  
  1589  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1590  //    There's no way to win with the other order!  Sun lossage.
  1591  
  1592  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1593  //    Just ignore it.
  1594  
  1595  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1596  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  1597  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1598  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  1599  //    If we find that the macros are still defined at this point, we must
  1600  //    invoke them so that the type is defined as expected.
  1601  
  1602  // In case nobody has defined these types, but we aren't running under
  1603  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1604  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  1605  //    parts of GCC is compiled by an older compiler, that actually
  1606  //    include gstddef.h, such as collect2.
  1607  
  1608  // Signed type of difference of two pointers.
  1609  
  1610  // Define this type if we are doing the whole job,
  1611  //    or if we want this type in particular.
  1612  
  1613  // Unsigned type of `sizeof' something.
  1614  
  1615  // Define this type if we are doing the whole job,
  1616  //    or if we want this type in particular.
  1617  
  1618  // Wide character type.
  1619  //    Locale-writers should change this as necessary to
  1620  //    be big enough to hold unique values not between 0 and 127,
  1621  //    and not (wchar_t) -1, for each defined multibyte character.
  1622  
  1623  // Define this type if we are doing the whole job,
  1624  //    or if we want this type in particular.
  1625  
  1626  // A null pointer constant.
  1627  
  1628  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  1629  //
  1630  // This file is part of GCC.
  1631  //
  1632  // GCC is free software; you can redistribute it and/or modify
  1633  // it under the terms of the GNU General Public License as published by
  1634  // the Free Software Foundation; either version 3, or (at your option)
  1635  // any later version.
  1636  //
  1637  // GCC is distributed in the hope that it will be useful,
  1638  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1639  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1640  // GNU General Public License for more details.
  1641  //
  1642  // Under Section 7 of GPL version 3, you are granted additional
  1643  // permissions described in the GCC Runtime Library Exception, version
  1644  // 3.1, as published by the Free Software Foundation.
  1645  //
  1646  // You should have received a copy of the GNU General Public License and
  1647  // a copy of the GCC Runtime Library Exception along with this program;
  1648  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1649  // <http://www.gnu.org/licenses/>.
  1650  
  1651  // ISO C Standard:  7.15  Variable arguments  <stdarg.h>
  1652  
  1653  // Define __gnuc_va_list.
  1654  
  1655  type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
  1656  
  1657  // Define the standard macros for the user,
  1658  //    if this invocation was from the user program.
  1659  
  1660  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1661  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1662  //    This file is part of the GNU C Library.
  1663  //
  1664  //    The GNU C Library is free software; you can redistribute it and/or
  1665  //    modify it under the terms of the GNU Lesser General Public
  1666  //    License as published by the Free Software Foundation; either
  1667  //    version 2.1 of the License, or (at your option) any later version.
  1668  //
  1669  //    The GNU C Library is distributed in the hope that it will be useful,
  1670  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1671  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1672  //    Lesser General Public License for more details.
  1673  //
  1674  //    You should have received a copy of the GNU Lesser General Public
  1675  //    License along with the GNU C Library; if not, see
  1676  //    <https://www.gnu.org/licenses/>.
  1677  
  1678  // Never include this file directly; use <sys/types.h> instead.
  1679  
  1680  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  1681  //    This file is part of the GNU C Library.
  1682  //
  1683  //    The GNU C Library is free software; you can redistribute it and/or
  1684  //    modify it under the terms of the GNU Lesser General Public
  1685  //    License as published by the Free Software Foundation; either
  1686  //    version 2.1 of the License, or (at your option) any later version.
  1687  //
  1688  //    The GNU C Library is distributed in the hope that it will be useful,
  1689  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1690  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1691  //    Lesser General Public License for more details.
  1692  //
  1693  //    You should have received a copy of the GNU Lesser General Public
  1694  //    License along with the GNU C Library; if not, see
  1695  //    <https://www.gnu.org/licenses/>.
  1696  
  1697  // Determine the wordsize from the preprocessor defines.
  1698  
  1699  // Bit size of the time_t type at glibc build time, x86-64 and x32 case.
  1700  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  1701  //    This file is part of the GNU C Library.
  1702  //
  1703  //    The GNU C Library is free software; you can redistribute it and/or
  1704  //    modify it under the terms of the GNU Lesser General Public
  1705  //    License as published by the Free Software Foundation; either
  1706  //    version 2.1 of the License, or (at your option) any later version.
  1707  //
  1708  //    The GNU C Library is distributed in the hope that it will be useful,
  1709  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1710  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1711  //    Lesser General Public License for more details.
  1712  //
  1713  //    You should have received a copy of the GNU Lesser General Public
  1714  //    License along with the GNU C Library; if not, see
  1715  //    <https://www.gnu.org/licenses/>.
  1716  
  1717  // For others, time size is word size.
  1718  
  1719  // Convenience types.
  1720  type X__u_char = uint8   /* types.h:31:23 */
  1721  type X__u_short = uint16 /* types.h:32:28 */
  1722  type X__u_int = uint32   /* types.h:33:22 */
  1723  type X__u_long = uint32  /* types.h:34:27 */
  1724  
  1725  // Fixed-size types, underlying types depend on word size and compiler.
  1726  type X__int8_t = int8     /* types.h:37:21 */
  1727  type X__uint8_t = uint8   /* types.h:38:23 */
  1728  type X__int16_t = int16   /* types.h:39:26 */
  1729  type X__uint16_t = uint16 /* types.h:40:28 */
  1730  type X__int32_t = int32   /* types.h:41:20 */
  1731  type X__uint32_t = uint32 /* types.h:42:22 */
  1732  type X__int64_t = int64   /* types.h:47:44 */
  1733  type X__uint64_t = uint64 /* types.h:48:46 */
  1734  
  1735  // Smallest types with at least a given width.
  1736  type X__int_least8_t = X__int8_t     /* types.h:52:18 */
  1737  type X__uint_least8_t = X__uint8_t   /* types.h:53:19 */
  1738  type X__int_least16_t = X__int16_t   /* types.h:54:19 */
  1739  type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
  1740  type X__int_least32_t = X__int32_t   /* types.h:56:19 */
  1741  type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
  1742  type X__int_least64_t = X__int64_t   /* types.h:58:19 */
  1743  type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
  1744  
  1745  // quad_t is also 64 bits.
  1746  type X__quad_t = int64    /* types.h:66:37 */
  1747  type X__u_quad_t = uint64 /* types.h:67:46 */
  1748  
  1749  // Largest integral types.
  1750  type X__intmax_t = int64   /* types.h:75:37 */
  1751  type X__uintmax_t = uint64 /* types.h:76:46 */
  1752  
  1753  // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  1754  //    macros for each of the OS types we define below.  The definitions
  1755  //    of those macros must use the following macros for underlying types.
  1756  //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  1757  //    variants of each of the following integer types on this machine.
  1758  //
  1759  // 	16		-- "natural" 16-bit type (always short)
  1760  // 	32		-- "natural" 32-bit type (always int)
  1761  // 	64		-- "natural" 64-bit type (long or long long)
  1762  // 	LONG32		-- 32-bit type, traditionally long
  1763  // 	QUAD		-- 64-bit type, traditionally long long
  1764  // 	WORD		-- natural type of __WORDSIZE bits (int or long)
  1765  // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
  1766  //
  1767  //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  1768  //    conventional uses of `long' or `long long' type modifiers match the
  1769  //    types we define, even when a less-adorned type would be the same size.
  1770  //    This matters for (somewhat) portably writing printf/scanf formats for
  1771  //    these types, where using the appropriate l or ll format modifiers can
  1772  //    make the typedefs and the formats match up across all GNU platforms.  If
  1773  //    we used `long' when it's 64 bits where `long long' is expected, then the
  1774  //    compiler would warn about the formats not matching the argument types,
  1775  //    and the programmer changing them to shut up the compiler would break the
  1776  //    program's portability.
  1777  //
  1778  //    Here we assume what is presently the case in all the GCC configurations
  1779  //    we support: long long is always 64 bits, long is always word/address size,
  1780  //    and int is always 32 bits.
  1781  
  1782  // We want __extension__ before typedef's that use nonstandard base types
  1783  //    such as `long long' in C89 mode.
  1784  // bits/typesizes.h -- underlying types for *_t.  Linux/x86-64 version.
  1785  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
  1786  //    This file is part of the GNU C Library.
  1787  //
  1788  //    The GNU C Library is free software; you can redistribute it and/or
  1789  //    modify it under the terms of the GNU Lesser General Public
  1790  //    License as published by the Free Software Foundation; either
  1791  //    version 2.1 of the License, or (at your option) any later version.
  1792  //
  1793  //    The GNU C Library is distributed in the hope that it will be useful,
  1794  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1795  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1796  //    Lesser General Public License for more details.
  1797  //
  1798  //    You should have received a copy of the GNU Lesser General Public
  1799  //    License along with the GNU C Library; if not, see
  1800  //    <https://www.gnu.org/licenses/>.
  1801  
  1802  // See <bits/types.h> for the meaning of these macros.  This file exists so
  1803  //    that <bits/types.h> need not vary across different GNU platforms.
  1804  
  1805  // X32 kernel interface is 64-bit.
  1806  
  1807  // Number of descriptors that can fit in an `fd_set'.
  1808  
  1809  // bits/time64.h -- underlying types for __time64_t.  Generic version.
  1810  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  1811  //    This file is part of the GNU C Library.
  1812  //
  1813  //    The GNU C Library is free software; you can redistribute it and/or
  1814  //    modify it under the terms of the GNU Lesser General Public
  1815  //    License as published by the Free Software Foundation; either
  1816  //    version 2.1 of the License, or (at your option) any later version.
  1817  //
  1818  //    The GNU C Library is distributed in the hope that it will be useful,
  1819  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1820  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1821  //    Lesser General Public License for more details.
  1822  //
  1823  //    You should have received a copy of the GNU Lesser General Public
  1824  //    License along with the GNU C Library; if not, see
  1825  //    <https://www.gnu.org/licenses/>.
  1826  
  1827  // Define __TIME64_T_TYPE so that it is always a 64-bit type.
  1828  
  1829  // Define a 64-bit time type alongsize the 32-bit one.
  1830  
  1831  type X__dev_t = X__uint64_t                /* types.h:145:25 */ // Type of device numbers.
  1832  type X__uid_t = uint32                     /* types.h:146:25 */ // Type of user identifications.
  1833  type X__gid_t = uint32                     /* types.h:147:25 */ // Type of group identifications.
  1834  type X__ino_t = uint32                     /* types.h:148:25 */ // Type of file serial numbers.
  1835  type X__ino64_t = X__uint64_t              /* types.h:149:27 */ // Type of file serial numbers (LFS).
  1836  type X__mode_t = uint32                    /* types.h:150:26 */ // Type of file attribute bitmasks.
  1837  type X__nlink_t = uint32                   /* types.h:151:27 */ // Type of file link counts.
  1838  type X__off_t = int32                      /* types.h:152:25 */ // Type of file sizes and offsets.
  1839  type X__off64_t = X__int64_t               /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
  1840  type X__pid_t = int32                      /* types.h:154:25 */ // Type of process identifications.
  1841  type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
  1842  type X__clock_t = int32                    /* types.h:156:27 */ // Type of CPU usage counts.
  1843  type X__rlim_t = uint32                    /* types.h:157:26 */ // Type for resource measurement.
  1844  type X__rlim64_t = X__uint64_t             /* types.h:158:28 */ // Type for resource measurement (LFS).
  1845  type X__id_t = uint32                      /* types.h:159:24 */ // General type for IDs.
  1846  type X__time_t = int32                     /* types.h:160:26 */ // Seconds since the Epoch.
  1847  type X__useconds_t = uint32                /* types.h:161:30 */ // Count of microseconds.
  1848  type X__suseconds_t = int32                /* types.h:162:31 */ // Signed count of microseconds.
  1849  
  1850  type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
  1851  type X__key_t = int32   /* types.h:165:25 */ // Type of an IPC key.
  1852  
  1853  // Clock ID used in clock and timer functions.
  1854  type X__clockid_t = int32 /* types.h:168:29 */
  1855  
  1856  // Timer ID returned by `timer_create'.
  1857  type X__timer_t = uintptr /* types.h:171:12 */
  1858  
  1859  // Type to represent block size.
  1860  type X__blksize_t = int32 /* types.h:174:29 */
  1861  
  1862  // Types from the Large File Support interface.
  1863  
  1864  // Type to count number of disk blocks.
  1865  type X__blkcnt_t = int32        /* types.h:179:28 */
  1866  type X__blkcnt64_t = X__int64_t /* types.h:180:30 */
  1867  
  1868  // Type to count file system blocks.
  1869  type X__fsblkcnt_t = uint32        /* types.h:183:30 */
  1870  type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */
  1871  
  1872  // Type to count file system nodes.
  1873  type X__fsfilcnt_t = uint32        /* types.h:187:30 */
  1874  type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
  1875  
  1876  // Type of miscellaneous file system fields.
  1877  type X__fsword_t = int32 /* types.h:191:28 */
  1878  
  1879  type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error.
  1880  
  1881  // Signed long type used in system calls.
  1882  type X__syscall_slong_t = int32 /* types.h:196:33 */
  1883  // Unsigned long type used in system calls.
  1884  type X__syscall_ulong_t = uint32 /* types.h:198:33 */
  1885  
  1886  // These few don't really vary by system, they always correspond
  1887  //    to one of the other defined types.
  1888  type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
  1889  type X__caddr_t = uintptr   /* types.h:203:14 */
  1890  
  1891  // Duplicates info from stdint.h but this is used in unistd.h.
  1892  type X__intptr_t = int32 /* types.h:206:25 */
  1893  
  1894  // Duplicate info from sys/socket.h.
  1895  type X__socklen_t = uint32 /* types.h:209:23 */
  1896  
  1897  // C99: An integer type that can be accessed as an atomic entity,
  1898  //    even in the presence of asynchronous interrupts.
  1899  //    It is not currently necessary for this to be machine-specific.
  1900  type X__sig_atomic_t = int32 /* types.h:214:13 */
  1901  
  1902  // Seconds since the Epoch, visible to user code when time_t is too
  1903  //    narrow only for consistency with the old way of widening too-narrow
  1904  //    types.  User code should never use __time64_t.
  1905  type X__time64_t = X__int64_t /* types.h:222:28 */
  1906  
  1907  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1908  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1909  //    This file is part of the GNU C Library.
  1910  //
  1911  //    The GNU C Library is free software; you can redistribute it and/or
  1912  //    modify it under the terms of the GNU Lesser General Public
  1913  //    License as published by the Free Software Foundation; either
  1914  //    version 2.1 of the License, or (at your option) any later version.
  1915  //
  1916  //    The GNU C Library is distributed in the hope that it will be useful,
  1917  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1918  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1919  //    Lesser General Public License for more details.
  1920  //
  1921  //    You should have received a copy of the GNU Lesser General Public
  1922  //    License along with the GNU C Library; if not, see
  1923  //    <https://www.gnu.org/licenses/>.
  1924  
  1925  // Never include this file directly; use <sys/types.h> instead.
  1926  
  1927  // Integral type unchanged by default argument promotions that can
  1928  //    hold any value corresponding to members of the extended character
  1929  //    set, as well as at least one value that does not correspond to any
  1930  //    member of the extended character set.
  1931  
  1932  // Conversion state information.
  1933  type X__mbstate_t = struct {
  1934  	F__count int32
  1935  	F__value struct{ F__wch uint32 }
  1936  } /* __mbstate_t.h:21:3 */
  1937  
  1938  // The tag name of this struct is _G_fpos_t to preserve historic
  1939  //    C++ mangled names for functions taking fpos_t arguments.
  1940  //    That name should not be used in new code.
  1941  type X_G_fpos_t = struct {
  1942  	F__pos   X__off_t
  1943  	F__state X__mbstate_t
  1944  } /* __fpos_t.h:10:9 */
  1945  
  1946  // The tag name of this struct is _G_fpos_t to preserve historic
  1947  //    C++ mangled names for functions taking fpos_t arguments.
  1948  //    That name should not be used in new code.
  1949  type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */
  1950  
  1951  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1952  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1953  //    This file is part of the GNU C Library.
  1954  //
  1955  //    The GNU C Library is free software; you can redistribute it and/or
  1956  //    modify it under the terms of the GNU Lesser General Public
  1957  //    License as published by the Free Software Foundation; either
  1958  //    version 2.1 of the License, or (at your option) any later version.
  1959  //
  1960  //    The GNU C Library is distributed in the hope that it will be useful,
  1961  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1962  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1963  //    Lesser General Public License for more details.
  1964  //
  1965  //    You should have received a copy of the GNU Lesser General Public
  1966  //    License along with the GNU C Library; if not, see
  1967  //    <https://www.gnu.org/licenses/>.
  1968  
  1969  // Never include this file directly; use <sys/types.h> instead.
  1970  
  1971  // The tag name of this struct is _G_fpos64_t to preserve historic
  1972  //    C++ mangled names for functions taking fpos_t and/or fpos64_t
  1973  //    arguments.  That name should not be used in new code.
  1974  type X_G_fpos64_t = struct {
  1975  	F__pos   X__off64_t
  1976  	F__state X__mbstate_t
  1977  } /* __fpos64_t.h:10:9 */
  1978  
  1979  // bits/types.h -- definitions of __*_t types underlying *_t types.
  1980  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  1981  //    This file is part of the GNU C Library.
  1982  //
  1983  //    The GNU C Library is free software; you can redistribute it and/or
  1984  //    modify it under the terms of the GNU Lesser General Public
  1985  //    License as published by the Free Software Foundation; either
  1986  //    version 2.1 of the License, or (at your option) any later version.
  1987  //
  1988  //    The GNU C Library is distributed in the hope that it will be useful,
  1989  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1990  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1991  //    Lesser General Public License for more details.
  1992  //
  1993  //    You should have received a copy of the GNU Lesser General Public
  1994  //    License along with the GNU C Library; if not, see
  1995  //    <https://www.gnu.org/licenses/>.
  1996  
  1997  // Never include this file directly; use <sys/types.h> instead.
  1998  
  1999  // The tag name of this struct is _G_fpos64_t to preserve historic
  2000  //    C++ mangled names for functions taking fpos_t and/or fpos64_t
  2001  //    arguments.  That name should not be used in new code.
  2002  type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */
  2003  
  2004  type X_IO_FILE = struct {
  2005  	F_flags          int32
  2006  	F_IO_read_ptr    uintptr
  2007  	F_IO_read_end    uintptr
  2008  	F_IO_read_base   uintptr
  2009  	F_IO_write_base  uintptr
  2010  	F_IO_write_ptr   uintptr
  2011  	F_IO_write_end   uintptr
  2012  	F_IO_buf_base    uintptr
  2013  	F_IO_buf_end     uintptr
  2014  	F_IO_save_base   uintptr
  2015  	F_IO_backup_base uintptr
  2016  	F_IO_save_end    uintptr
  2017  	F_markers        uintptr
  2018  	F_chain          uintptr
  2019  	F_fileno         int32
  2020  	F_flags2         int32
  2021  	F_old_offset     X__off_t
  2022  	F_cur_column     uint16
  2023  	F_vtable_offset  int8
  2024  	F_shortbuf       [1]int8
  2025  	F_lock           uintptr
  2026  	F_offset         X__off64_t
  2027  	F_codecvt        uintptr
  2028  	F_wide_data      uintptr
  2029  	F_freeres_list   uintptr
  2030  	F_freeres_buf    uintptr
  2031  	F__pad5          Size_t
  2032  	F_mode           int32
  2033  	F_unused2        [40]int8
  2034  } /* __FILE.h:4:1 */
  2035  
  2036  type X__FILE = X_IO_FILE /* __FILE.h:5:25 */
  2037  
  2038  // The opaque type of streams.  This is the definition used elsewhere.
  2039  type FILE = X_IO_FILE /* FILE.h:7:25 */
  2040  
  2041  // The structure with the cookie function pointers.
  2042  //    The tag name of this struct is _IO_cookie_io_functions_t to
  2043  //    preserve historic C++ mangled names for functions taking
  2044  //    cookie_io_functions_t arguments.  That name should not be used in
  2045  //    new code.
  2046  type X_IO_cookie_io_functions_t = struct {
  2047  	Fread  uintptr
  2048  	Fwrite uintptr
  2049  	Fseek  uintptr
  2050  	Fclose uintptr
  2051  } /* cookie_io_functions_t.h:55:9 */
  2052  
  2053  // The structure with the cookie function pointers.
  2054  //    The tag name of this struct is _IO_cookie_io_functions_t to
  2055  //    preserve historic C++ mangled names for functions taking
  2056  //    cookie_io_functions_t arguments.  That name should not be used in
  2057  //    new code.
  2058  type Cookie_io_functions_t = X_IO_cookie_io_functions_t /* cookie_io_functions_t.h:61:3 */
  2059  
  2060  type Va_list = X__gnuc_va_list /* stdio.h:52:24 */
  2061  
  2062  type Off_t = X__off64_t   /* stdio.h:65:19 */
  2063  type Off64_t = X__off64_t /* stdio.h:70:19 */
  2064  
  2065  type Ssize_t = X__ssize_t /* stdio.h:77:19 */
  2066  
  2067  // The type of the second argument to `fgetpos' and `fsetpos'.
  2068  type Fpos_t = X__fpos64_t   /* stdio.h:86:20 */
  2069  type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */
  2070  
  2071  // A null pointer constant.
  2072  
  2073  // XPG requires a few symbols from <sys/wait.h> being defined.
  2074  // Definitions of flag bits for `waitpid' et al.
  2075  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  2076  //    This file is part of the GNU C Library.
  2077  //
  2078  //    The GNU C Library is free software; you can redistribute it and/or
  2079  //    modify it under the terms of the GNU Lesser General Public
  2080  //    License as published by the Free Software Foundation; either
  2081  //    version 2.1 of the License, or (at your option) any later version.
  2082  //
  2083  //    The GNU C Library is distributed in the hope that it will be useful,
  2084  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2085  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2086  //    Lesser General Public License for more details.
  2087  //
  2088  //    You should have received a copy of the GNU Lesser General Public
  2089  //    License along with the GNU C Library; if not, see
  2090  //    <https://www.gnu.org/licenses/>.
  2091  
  2092  // Bits in the third argument to `waitpid'.
  2093  
  2094  // Bits in the fourth argument to `waitid'.
  2095  
  2096  // The following values are used by the `waitid' function.
  2097  
  2098  // The Linux kernel defines these bare, rather than an enum,
  2099  //    which causes a conflict if the include order is reversed.
  2100  
  2101  type Idtype_t = uint32 /* waitflags.h:57:3 */
  2102  // Definitions of status bits for `wait' et al.
  2103  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  2104  //    This file is part of the GNU C Library.
  2105  //
  2106  //    The GNU C Library is free software; you can redistribute it and/or
  2107  //    modify it under the terms of the GNU Lesser General Public
  2108  //    License as published by the Free Software Foundation; either
  2109  //    version 2.1 of the License, or (at your option) any later version.
  2110  //
  2111  //    The GNU C Library is distributed in the hope that it will be useful,
  2112  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2113  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2114  //    Lesser General Public License for more details.
  2115  //
  2116  //    You should have received a copy of the GNU Lesser General Public
  2117  //    License along with the GNU C Library; if not, see
  2118  //    <https://www.gnu.org/licenses/>.
  2119  
  2120  // Everything extant so far uses these same bits.
  2121  
  2122  // If WIFEXITED(STATUS), the low-order 8 bits of the status.
  2123  
  2124  // If WIFSIGNALED(STATUS), the terminating signal.
  2125  
  2126  // If WIFSTOPPED(STATUS), the signal that stopped the child.
  2127  
  2128  // Nonzero if STATUS indicates normal termination.
  2129  
  2130  // Nonzero if STATUS indicates termination by a signal.
  2131  
  2132  // Nonzero if STATUS indicates the child is stopped.
  2133  
  2134  // Nonzero if STATUS indicates the child continued after a stop.  We only
  2135  //    define this if <bits/waitflags.h> provides the WCONTINUED flag bit.
  2136  
  2137  // Nonzero if STATUS indicates the child dumped core.
  2138  
  2139  // Macros for constructing status values.
  2140  
  2141  // Define the macros <sys/wait.h> also would define this way.
  2142  
  2143  // _FloatN API tests for enablement.
  2144  // Macros to control TS 18661-3 glibc features on x86.
  2145  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2146  //    This file is part of the GNU C Library.
  2147  //
  2148  //    The GNU C Library is free software; you can redistribute it and/or
  2149  //    modify it under the terms of the GNU Lesser General Public
  2150  //    License as published by the Free Software Foundation; either
  2151  //    version 2.1 of the License, or (at your option) any later version.
  2152  //
  2153  //    The GNU C Library is distributed in the hope that it will be useful,
  2154  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2155  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2156  //    Lesser General Public License for more details.
  2157  //
  2158  //    You should have received a copy of the GNU Lesser General Public
  2159  //    License along with the GNU C Library; if not, see
  2160  //    <https://www.gnu.org/licenses/>.
  2161  
  2162  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2163  //    This file is part of the GNU C Library.
  2164  //
  2165  //    The GNU C Library is free software; you can redistribute it and/or
  2166  //    modify it under the terms of the GNU Lesser General Public
  2167  //    License as published by the Free Software Foundation; either
  2168  //    version 2.1 of the License, or (at your option) any later version.
  2169  //
  2170  //    The GNU C Library is distributed in the hope that it will be useful,
  2171  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2172  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2173  //    Lesser General Public License for more details.
  2174  //
  2175  //    You should have received a copy of the GNU Lesser General Public
  2176  //    License along with the GNU C Library; if not, see
  2177  //    <https://www.gnu.org/licenses/>.
  2178  
  2179  // Defined to 1 if the current compiler invocation provides a
  2180  //    floating-point type with the IEEE 754 binary128 format, and this
  2181  //    glibc includes corresponding *f128 interfaces for it.  The required
  2182  //    libgcc support was added some time after the basic compiler
  2183  //    support, for x86_64 and x86.
  2184  
  2185  // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
  2186  //    from the default float, double and long double types in this glibc.
  2187  
  2188  // Defined to 1 if the current compiler invocation provides a
  2189  //    floating-point type with the right format for _Float64x, and this
  2190  //    glibc includes corresponding *f64x interfaces for it.
  2191  
  2192  // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
  2193  //    of long double.  Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
  2194  //    the format of _Float128, which must be different from that of long
  2195  //    double.
  2196  
  2197  // Defined to concatenate the literal suffix to be used with _Float128
  2198  //    types, if __HAVE_FLOAT128 is 1.
  2199  
  2200  // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
  2201  
  2202  // The remaining of this file provides support for older compilers.
  2203  
  2204  // The type _Float128 exists only since GCC 7.0.
  2205  
  2206  // __builtin_huge_valf128 doesn't exist before GCC 7.0.
  2207  
  2208  // Older GCC has only a subset of built-in functions for _Float128 on
  2209  //    x86, and __builtin_infq is not usable in static initializers.
  2210  //    Converting a narrower sNaN to _Float128 produces a quiet NaN, so
  2211  //    attempts to use _Float128 sNaNs will not work properly with older
  2212  //    compilers.
  2213  
  2214  // In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
  2215  //    e.g.: __builtin_signbitf128, before GCC 6.  However, there has never
  2216  //    been a __builtin_signbitf128 in GCC and the type-generic builtin is
  2217  //    only available since GCC 6.
  2218  
  2219  // Macros to control TS 18661-3 glibc features where the same
  2220  //    definitions are appropriate for all platforms.
  2221  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2222  //    This file is part of the GNU C Library.
  2223  //
  2224  //    The GNU C Library is free software; you can redistribute it and/or
  2225  //    modify it under the terms of the GNU Lesser General Public
  2226  //    License as published by the Free Software Foundation; either
  2227  //    version 2.1 of the License, or (at your option) any later version.
  2228  //
  2229  //    The GNU C Library is distributed in the hope that it will be useful,
  2230  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2231  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2232  //    Lesser General Public License for more details.
  2233  //
  2234  //    You should have received a copy of the GNU Lesser General Public
  2235  //    License along with the GNU C Library; if not, see
  2236  //    <https://www.gnu.org/licenses/>.
  2237  
  2238  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2239  //    This file is part of the GNU C Library.
  2240  //
  2241  //    The GNU C Library is free software; you can redistribute it and/or
  2242  //    modify it under the terms of the GNU Lesser General Public
  2243  //    License as published by the Free Software Foundation; either
  2244  //    version 2.1 of the License, or (at your option) any later version.
  2245  //
  2246  //    The GNU C Library is distributed in the hope that it will be useful,
  2247  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2248  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2249  //    Lesser General Public License for more details.
  2250  //
  2251  //    You should have received a copy of the GNU Lesser General Public
  2252  //    License along with the GNU C Library; if not, see
  2253  //    <https://www.gnu.org/licenses/>.
  2254  
  2255  // Properties of long double type.  ldbl-96 version.
  2256  //    Copyright (C) 2016-2020 Free Software Foundation, Inc.
  2257  //    This file is part of the GNU C Library.
  2258  //
  2259  //    The GNU C Library is free software; you can redistribute it and/or
  2260  //    modify it under the terms of the GNU Lesser General Public
  2261  //    License  published by the Free Software Foundation; either
  2262  //    version 2.1 of the License, or (at your option) any later version.
  2263  //
  2264  //    The GNU C Library is distributed in the hope that it will be useful,
  2265  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2266  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2267  //    Lesser General Public License for more details.
  2268  //
  2269  //    You should have received a copy of the GNU Lesser General Public
  2270  //    License along with the GNU C Library; if not, see
  2271  //    <https://www.gnu.org/licenses/>.
  2272  
  2273  // long double is distinct from double, so there is nothing to
  2274  //    define here.
  2275  
  2276  // This header should be included at the bottom of each bits/floatn.h.
  2277  //    It defines the following macros for each _FloatN and _FloatNx type,
  2278  //    where the same definitions, or definitions based only on the macros
  2279  //    in bits/floatn.h, are appropriate for all glibc configurations.
  2280  
  2281  // Defined to 1 if the current compiler invocation provides a
  2282  //    floating-point type with the right format for this type, and this
  2283  //    glibc includes corresponding *fN or *fNx interfaces for it.
  2284  
  2285  // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
  2286  //    type is the first with its format in the sequence of (the default
  2287  //    choices for) float, double, long double, _Float16, _Float32,
  2288  //    _Float64, _Float128, _Float32x, _Float64x, _Float128x for this
  2289  //    glibc; that is, if functions present once per floating-point format
  2290  //    rather than once per type are present for this type.
  2291  //
  2292  //    All configurations supported by glibc have _Float32 the same format
  2293  //    as float, _Float64 and _Float32x the same format as double, the
  2294  //    _Float64x the same format as either long double or _Float128.  No
  2295  //    configurations support _Float128x or, as of GCC 7, have compiler
  2296  //    support for a type meeting the requirements for _Float128x.
  2297  
  2298  // Defined to 1 if the corresponding _FloatN type is not binary compatible
  2299  //    with the corresponding ISO C type in the current compilation unit as
  2300  //    opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built
  2301  //    in glibc.
  2302  
  2303  // Defined to 1 if any _FloatN or _FloatNx types that are not
  2304  //    ABI-distinct are however distinct types at the C language level (so
  2305  //    for the purposes of __builtin_types_compatible_p and _Generic).
  2306  
  2307  // Defined to concatenate the literal suffix to be used with _FloatN
  2308  //    or _FloatNx types, if __HAVE_<type> is 1.  The corresponding
  2309  //    literal suffixes exist since GCC 7, for C only.
  2310  
  2311  // Defined to a complex type if __HAVE_<type> is 1.
  2312  
  2313  // The remaining of this file provides support for older compilers.
  2314  
  2315  // If double, long double and _Float64 all have the same set of
  2316  //    values, TS 18661-3 requires the usual arithmetic conversions on
  2317  //    long double and _Float64 to produce _Float64.  For this to be the
  2318  //    case when building with a compiler without a distinct _Float64
  2319  //    type, _Float64 must be a typedef for long double, not for
  2320  //    double.
  2321  
  2322  // Returned by `div'.
  2323  type Div_t = struct {
  2324  	Fquot int32
  2325  	Frem  int32
  2326  } /* stdlib.h:62:5 */
  2327  
  2328  // Returned by `ldiv'.
  2329  type Ldiv_t = struct {
  2330  	Fquot int32
  2331  	Frem  int32
  2332  } /* stdlib.h:70:5 */
  2333  
  2334  // Returned by `lldiv'.
  2335  type Lldiv_t = struct {
  2336  	Fquot int64
  2337  	Frem  int64
  2338  } /* stdlib.h:80:5 */
  2339  
  2340  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2341  //    This file is part of the GNU C Library.
  2342  //
  2343  //    The GNU C Library is free software; you can redistribute it and/or
  2344  //    modify it under the terms of the GNU Lesser General Public
  2345  //    License as published by the Free Software Foundation; either
  2346  //    version 2.1 of the License, or (at your option) any later version.
  2347  //
  2348  //    The GNU C Library is distributed in the hope that it will be useful,
  2349  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2350  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2351  //    Lesser General Public License for more details.
  2352  //
  2353  //    You should have received a copy of the GNU Lesser General Public
  2354  //    License along with the GNU C Library; if not, see
  2355  //    <https://www.gnu.org/licenses/>.
  2356  
  2357  //	POSIX Standard: 2.6 Primitive System Data Types	<sys/types.h>
  2358  
  2359  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2360  //    This file is part of the GNU C Library.
  2361  //
  2362  //    The GNU C Library is free software; you can redistribute it and/or
  2363  //    modify it under the terms of the GNU Lesser General Public
  2364  //    License as published by the Free Software Foundation; either
  2365  //    version 2.1 of the License, or (at your option) any later version.
  2366  //
  2367  //    The GNU C Library is distributed in the hope that it will be useful,
  2368  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2369  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2370  //    Lesser General Public License for more details.
  2371  //
  2372  //    You should have received a copy of the GNU Lesser General Public
  2373  //    License along with the GNU C Library; if not, see
  2374  //    <https://www.gnu.org/licenses/>.
  2375  
  2376  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2377  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2378  //    This file is part of the GNU C Library.
  2379  //
  2380  //    The GNU C Library is free software; you can redistribute it and/or
  2381  //    modify it under the terms of the GNU Lesser General Public
  2382  //    License as published by the Free Software Foundation; either
  2383  //    version 2.1 of the License, or (at your option) any later version.
  2384  //
  2385  //    The GNU C Library is distributed in the hope that it will be useful,
  2386  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2387  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2388  //    Lesser General Public License for more details.
  2389  //
  2390  //    You should have received a copy of the GNU Lesser General Public
  2391  //    License along with the GNU C Library; if not, see
  2392  //    <https://www.gnu.org/licenses/>.
  2393  
  2394  // Never include this file directly; use <sys/types.h> instead.
  2395  
  2396  type U_char = X__u_char     /* types.h:33:18 */
  2397  type U_short = X__u_short   /* types.h:34:19 */
  2398  type U_int = X__u_int       /* types.h:35:17 */
  2399  type U_long = X__u_long     /* types.h:36:18 */
  2400  type Quad_t = X__quad_t     /* types.h:37:18 */
  2401  type U_quad_t = X__u_quad_t /* types.h:38:20 */
  2402  type Fsid_t = X__fsid_t     /* types.h:39:18 */
  2403  type Loff_t = X__loff_t     /* types.h:42:18 */
  2404  
  2405  type Ino_t = X__ino64_t   /* types.h:49:19 */
  2406  type Ino64_t = X__ino64_t /* types.h:54:19 */
  2407  
  2408  type Dev_t = X__dev_t /* types.h:59:17 */
  2409  
  2410  type Gid_t = X__gid_t /* types.h:64:17 */
  2411  
  2412  type Mode_t = X__mode_t /* types.h:69:18 */
  2413  
  2414  type Nlink_t = X__nlink_t /* types.h:74:19 */
  2415  
  2416  type Uid_t = X__uid_t /* types.h:79:17 */
  2417  
  2418  type Pid_t = X__pid_t /* types.h:97:17 */
  2419  
  2420  type Id_t = X__id_t /* types.h:103:16 */
  2421  
  2422  type Daddr_t = X__daddr_t /* types.h:114:19 */
  2423  type Caddr_t = X__caddr_t /* types.h:115:19 */
  2424  
  2425  type Key_t = X__key_t /* types.h:121:17 */
  2426  
  2427  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2428  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2429  //    This file is part of the GNU C Library.
  2430  //
  2431  //    The GNU C Library is free software; you can redistribute it and/or
  2432  //    modify it under the terms of the GNU Lesser General Public
  2433  //    License as published by the Free Software Foundation; either
  2434  //    version 2.1 of the License, or (at your option) any later version.
  2435  //
  2436  //    The GNU C Library is distributed in the hope that it will be useful,
  2437  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2438  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2439  //    Lesser General Public License for more details.
  2440  //
  2441  //    You should have received a copy of the GNU Lesser General Public
  2442  //    License along with the GNU C Library; if not, see
  2443  //    <https://www.gnu.org/licenses/>.
  2444  
  2445  // Never include this file directly; use <sys/types.h> instead.
  2446  
  2447  // Returned by `clock'.
  2448  type Clock_t = X__clock_t /* clock_t.h:7:19 */
  2449  
  2450  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2451  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2452  //    This file is part of the GNU C Library.
  2453  //
  2454  //    The GNU C Library is free software; you can redistribute it and/or
  2455  //    modify it under the terms of the GNU Lesser General Public
  2456  //    License as published by the Free Software Foundation; either
  2457  //    version 2.1 of the License, or (at your option) any later version.
  2458  //
  2459  //    The GNU C Library is distributed in the hope that it will be useful,
  2460  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2461  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2462  //    Lesser General Public License for more details.
  2463  //
  2464  //    You should have received a copy of the GNU Lesser General Public
  2465  //    License along with the GNU C Library; if not, see
  2466  //    <https://www.gnu.org/licenses/>.
  2467  
  2468  // Never include this file directly; use <sys/types.h> instead.
  2469  
  2470  // Clock ID used in clock and timer functions.
  2471  type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
  2472  
  2473  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2474  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2475  //    This file is part of the GNU C Library.
  2476  //
  2477  //    The GNU C Library is free software; you can redistribute it and/or
  2478  //    modify it under the terms of the GNU Lesser General Public
  2479  //    License as published by the Free Software Foundation; either
  2480  //    version 2.1 of the License, or (at your option) any later version.
  2481  //
  2482  //    The GNU C Library is distributed in the hope that it will be useful,
  2483  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2484  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2485  //    Lesser General Public License for more details.
  2486  //
  2487  //    You should have received a copy of the GNU Lesser General Public
  2488  //    License along with the GNU C Library; if not, see
  2489  //    <https://www.gnu.org/licenses/>.
  2490  
  2491  // Never include this file directly; use <sys/types.h> instead.
  2492  
  2493  // Returned by `time'.
  2494  type Time_t = X__time_t /* time_t.h:7:18 */
  2495  
  2496  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2497  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2498  //    This file is part of the GNU C Library.
  2499  //
  2500  //    The GNU C Library is free software; you can redistribute it and/or
  2501  //    modify it under the terms of the GNU Lesser General Public
  2502  //    License as published by the Free Software Foundation; either
  2503  //    version 2.1 of the License, or (at your option) any later version.
  2504  //
  2505  //    The GNU C Library is distributed in the hope that it will be useful,
  2506  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2507  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2508  //    Lesser General Public License for more details.
  2509  //
  2510  //    You should have received a copy of the GNU Lesser General Public
  2511  //    License along with the GNU C Library; if not, see
  2512  //    <https://www.gnu.org/licenses/>.
  2513  
  2514  // Never include this file directly; use <sys/types.h> instead.
  2515  
  2516  // Timer ID returned by `timer_create'.
  2517  type Timer_t = X__timer_t /* timer_t.h:7:19 */
  2518  
  2519  type Useconds_t = X__useconds_t   /* types.h:134:22 */
  2520  type Suseconds_t = X__suseconds_t /* types.h:138:23 */
  2521  
  2522  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  2523  //
  2524  // This file is part of GCC.
  2525  //
  2526  // GCC is free software; you can redistribute it and/or modify
  2527  // it under the terms of the GNU General Public License as published by
  2528  // the Free Software Foundation; either version 3, or (at your option)
  2529  // any later version.
  2530  //
  2531  // GCC is distributed in the hope that it will be useful,
  2532  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2533  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2534  // GNU General Public License for more details.
  2535  //
  2536  // Under Section 7 of GPL version 3, you are granted additional
  2537  // permissions described in the GCC Runtime Library Exception, version
  2538  // 3.1, as published by the Free Software Foundation.
  2539  //
  2540  // You should have received a copy of the GNU General Public License and
  2541  // a copy of the GCC Runtime Library Exception along with this program;
  2542  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  2543  // <http://www.gnu.org/licenses/>.
  2544  
  2545  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  2546  
  2547  // Any one of these symbols __need_* means that GNU libc
  2548  //    wants us just to define one data type.  So don't define
  2549  //    the symbols that indicate this file's entire job has been done.
  2550  
  2551  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  2552  //    There's no way to win with the other order!  Sun lossage.
  2553  
  2554  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  2555  //    Just ignore it.
  2556  
  2557  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  2558  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  2559  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  2560  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  2561  //    If we find that the macros are still defined at this point, we must
  2562  //    invoke them so that the type is defined as expected.
  2563  
  2564  // In case nobody has defined these types, but we aren't running under
  2565  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  2566  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  2567  //    parts of GCC is compiled by an older compiler, that actually
  2568  //    include gstddef.h, such as collect2.
  2569  
  2570  // Signed type of difference of two pointers.
  2571  
  2572  // Define this type if we are doing the whole job,
  2573  //    or if we want this type in particular.
  2574  
  2575  // Unsigned type of `sizeof' something.
  2576  
  2577  // Define this type if we are doing the whole job,
  2578  //    or if we want this type in particular.
  2579  
  2580  // Wide character type.
  2581  //    Locale-writers should change this as necessary to
  2582  //    be big enough to hold unique values not between 0 and 127,
  2583  //    and not (wchar_t) -1, for each defined multibyte character.
  2584  
  2585  // Define this type if we are doing the whole job,
  2586  //    or if we want this type in particular.
  2587  
  2588  // A null pointer constant.
  2589  
  2590  // Old compatibility names for C types.
  2591  type Ulong = uint32  /* types.h:148:27 */
  2592  type Ushort = uint16 /* types.h:149:28 */
  2593  type Uint = uint32   /* types.h:150:22 */
  2594  
  2595  // These size-specific names are used by some of the inet code.
  2596  
  2597  // Define intN_t types.
  2598  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2599  //    This file is part of the GNU C Library.
  2600  //
  2601  //    The GNU C Library is free software; you can redistribute it and/or
  2602  //    modify it under the terms of the GNU Lesser General Public
  2603  //    License as published by the Free Software Foundation; either
  2604  //    version 2.1 of the License, or (at your option) any later version.
  2605  //
  2606  //    The GNU C Library is distributed in the hope that it will be useful,
  2607  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2608  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2609  //    Lesser General Public License for more details.
  2610  //
  2611  //    You should have received a copy of the GNU Lesser General Public
  2612  //    License along with the GNU C Library; if not, see
  2613  //    <https://www.gnu.org/licenses/>.
  2614  
  2615  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2616  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2617  //    This file is part of the GNU C Library.
  2618  //
  2619  //    The GNU C Library is free software; you can redistribute it and/or
  2620  //    modify it under the terms of the GNU Lesser General Public
  2621  //    License as published by the Free Software Foundation; either
  2622  //    version 2.1 of the License, or (at your option) any later version.
  2623  //
  2624  //    The GNU C Library is distributed in the hope that it will be useful,
  2625  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2626  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2627  //    Lesser General Public License for more details.
  2628  //
  2629  //    You should have received a copy of the GNU Lesser General Public
  2630  //    License along with the GNU C Library; if not, see
  2631  //    <https://www.gnu.org/licenses/>.
  2632  
  2633  // Never include this file directly; use <sys/types.h> instead.
  2634  
  2635  type Int8_t = X__int8_t   /* stdint-intn.h:24:18 */
  2636  type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
  2637  type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
  2638  type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
  2639  
  2640  // These were defined by ISO C without the first `_'.
  2641  type U_int8_t = X__uint8_t   /* types.h:158:19 */
  2642  type U_int16_t = X__uint16_t /* types.h:159:20 */
  2643  type U_int32_t = X__uint32_t /* types.h:160:20 */
  2644  type U_int64_t = X__uint64_t /* types.h:161:20 */
  2645  
  2646  type Register_t = int32 /* types.h:164:13 */
  2647  
  2648  // It also defines `fd_set' and the FD_* macros for `select'.
  2649  // `fd_set' type and related macros, and `select'/`pselect' declarations.
  2650  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  2651  //    This file is part of the GNU C Library.
  2652  //
  2653  //    The GNU C Library is free software; you can redistribute it and/or
  2654  //    modify it under the terms of the GNU Lesser General Public
  2655  //    License as published by the Free Software Foundation; either
  2656  //    version 2.1 of the License, or (at your option) any later version.
  2657  //
  2658  //    The GNU C Library is distributed in the hope that it will be useful,
  2659  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2660  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2661  //    Lesser General Public License for more details.
  2662  //
  2663  //    You should have received a copy of the GNU Lesser General Public
  2664  //    License along with the GNU C Library; if not, see
  2665  //    <https://www.gnu.org/licenses/>.
  2666  
  2667  //	POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  2668  
  2669  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  2670  //    This file is part of the GNU C Library.
  2671  //
  2672  //    The GNU C Library is free software; you can redistribute it and/or
  2673  //    modify it under the terms of the GNU Lesser General Public
  2674  //    License as published by the Free Software Foundation; either
  2675  //    version 2.1 of the License, or (at your option) any later version.
  2676  //
  2677  //    The GNU C Library is distributed in the hope that it will be useful,
  2678  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2679  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2680  //    Lesser General Public License for more details.
  2681  //
  2682  //    You should have received a copy of the GNU Lesser General Public
  2683  //    License along with the GNU C Library; if not, see
  2684  //    <https://www.gnu.org/licenses/>.
  2685  
  2686  // Get definition of needed basic types.
  2687  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2688  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2689  //    This file is part of the GNU C Library.
  2690  //
  2691  //    The GNU C Library is free software; you can redistribute it and/or
  2692  //    modify it under the terms of the GNU Lesser General Public
  2693  //    License as published by the Free Software Foundation; either
  2694  //    version 2.1 of the License, or (at your option) any later version.
  2695  //
  2696  //    The GNU C Library is distributed in the hope that it will be useful,
  2697  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2698  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2699  //    Lesser General Public License for more details.
  2700  //
  2701  //    You should have received a copy of the GNU Lesser General Public
  2702  //    License along with the GNU C Library; if not, see
  2703  //    <https://www.gnu.org/licenses/>.
  2704  
  2705  // Never include this file directly; use <sys/types.h> instead.
  2706  
  2707  // Get __FD_* definitions.
  2708  // Copyright (C) 1997-2020 Free Software Foundation, Inc.
  2709  //    This file is part of the GNU C Library.
  2710  //
  2711  //    The GNU C Library is free software; you can redistribute it and/or
  2712  //    modify it under the terms of the GNU Lesser General Public
  2713  //    License as published by the Free Software Foundation; either
  2714  //    version 2.1 of the License, or (at your option) any later version.
  2715  //
  2716  //    The GNU C Library is distributed in the hope that it will be useful,
  2717  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2718  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2719  //    Lesser General Public License for more details.
  2720  //
  2721  //    You should have received a copy of the GNU Lesser General Public
  2722  //    License along with the GNU C Library; if not, see
  2723  //    <https://www.gnu.org/licenses/>.
  2724  
  2725  // Determine the wordsize from the preprocessor defines.
  2726  
  2727  // Get sigset_t.
  2728  
  2729  type X__sigset_t = struct{ F__val [32]uint32 } /* __sigset_t.h:8:3 */
  2730  
  2731  // A set of signals to be blocked, unblocked, or waited for.
  2732  type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  2733  
  2734  // Get definition of timer specification structures.
  2735  
  2736  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2737  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2738  //    This file is part of the GNU C Library.
  2739  //
  2740  //    The GNU C Library is free software; you can redistribute it and/or
  2741  //    modify it under the terms of the GNU Lesser General Public
  2742  //    License as published by the Free Software Foundation; either
  2743  //    version 2.1 of the License, or (at your option) any later version.
  2744  //
  2745  //    The GNU C Library is distributed in the hope that it will be useful,
  2746  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2747  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2748  //    Lesser General Public License for more details.
  2749  //
  2750  //    You should have received a copy of the GNU Lesser General Public
  2751  //    License along with the GNU C Library; if not, see
  2752  //    <https://www.gnu.org/licenses/>.
  2753  
  2754  // Never include this file directly; use <sys/types.h> instead.
  2755  
  2756  // A time value that is accurate to the nearest
  2757  //    microsecond but also has a range of years.
  2758  type Timeval = struct {
  2759  	Ftv_sec  X__time_t
  2760  	Ftv_usec X__suseconds_t
  2761  } /* struct_timeval.h:8:1 */
  2762  
  2763  // NB: Include guard matches what <linux/time.h> uses.
  2764  
  2765  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2766  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2767  //    This file is part of the GNU C Library.
  2768  //
  2769  //    The GNU C Library is free software; you can redistribute it and/or
  2770  //    modify it under the terms of the GNU Lesser General Public
  2771  //    License as published by the Free Software Foundation; either
  2772  //    version 2.1 of the License, or (at your option) any later version.
  2773  //
  2774  //    The GNU C Library is distributed in the hope that it will be useful,
  2775  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2776  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2777  //    Lesser General Public License for more details.
  2778  //
  2779  //    You should have received a copy of the GNU Lesser General Public
  2780  //    License along with the GNU C Library; if not, see
  2781  //    <https://www.gnu.org/licenses/>.
  2782  
  2783  // Never include this file directly; use <sys/types.h> instead.
  2784  
  2785  // Endian macros for string.h functions
  2786  //    Copyright (C) 1992-2020 Free Software Foundation, Inc.
  2787  //    This file is part of the GNU C Library.
  2788  //
  2789  //    The GNU C Library is free software; you can redistribute it and/or
  2790  //    modify it under the terms of the GNU Lesser General Public
  2791  //    License as published by the Free Software Foundation; either
  2792  //    version 2.1 of the License, or (at your option) any later version.
  2793  //
  2794  //    The GNU C Library is distributed in the hope that it will be useful,
  2795  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2796  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2797  //    Lesser General Public License for more details.
  2798  //
  2799  //    You should have received a copy of the GNU Lesser General Public
  2800  //    License along with the GNU C Library; if not, see
  2801  //    <http://www.gnu.org/licenses/>.
  2802  
  2803  // POSIX.1b structure for a time value.  This is like a `struct timeval' but
  2804  //    has nanoseconds instead of microseconds.
  2805  type Timespec = struct {
  2806  	Ftv_sec  X__time_t
  2807  	Ftv_nsec X__syscall_slong_t
  2808  } /* struct_timespec.h:10:1 */
  2809  
  2810  // The fd_set member is required to be an array of longs.
  2811  type X__fd_mask = int32 /* select.h:49:18 */
  2812  
  2813  // Some versions of <linux/posix_types.h> define this macros.
  2814  // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  2815  
  2816  // fd_set for select and pselect.
  2817  type Fd_set = struct{ Ffds_bits [32]X__fd_mask } /* select.h:70:5 */
  2818  
  2819  // Maximum number of file descriptors in `fd_set'.
  2820  
  2821  // Sometimes the fd_set member is assumed to have this type.
  2822  type Fd_mask = X__fd_mask /* select.h:77:19 */
  2823  
  2824  // Define some inlines helping to catch common problems.
  2825  
  2826  type Blksize_t = X__blksize_t /* types.h:185:21 */
  2827  
  2828  // Types from the Large File Support interface.
  2829  type Blkcnt_t = X__blkcnt64_t     /* types.h:205:22 */ // Type to count number of disk blocks.
  2830  type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
  2831  type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
  2832  
  2833  type Blkcnt64_t = X__blkcnt64_t     /* types.h:219:22 */ // Type to count number of disk blocks.
  2834  type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks.
  2835  type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes.
  2836  
  2837  // Now add the thread types.
  2838  // Declaration of common pthread types for all architectures.
  2839  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2840  //    This file is part of the GNU C Library.
  2841  //
  2842  //    The GNU C Library is free software; you can redistribute it and/or
  2843  //    modify it under the terms of the GNU Lesser General Public
  2844  //    License as published by the Free Software Foundation; either
  2845  //    version 2.1 of the License, or (at your option) any later version.
  2846  //
  2847  //    The GNU C Library is distributed in the hope that it will be useful,
  2848  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2849  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2850  //    Lesser General Public License for more details.
  2851  //
  2852  //    You should have received a copy of the GNU Lesser General Public
  2853  //    License along with the GNU C Library; if not, see
  2854  //    <https://www.gnu.org/licenses/>.
  2855  
  2856  // For internal mutex and condition variable definitions.
  2857  // Common threading primitives definitions for both POSIX and C11.
  2858  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2859  //    This file is part of the GNU C Library.
  2860  //
  2861  //    The GNU C Library is free software; you can redistribute it and/or
  2862  //    modify it under the terms of the GNU Lesser General Public
  2863  //    License as published by the Free Software Foundation; either
  2864  //    version 2.1 of the License, or (at your option) any later version.
  2865  //
  2866  //    The GNU C Library is distributed in the hope that it will be useful,
  2867  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2868  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2869  //    Lesser General Public License for more details.
  2870  //
  2871  //    You should have received a copy of the GNU Lesser General Public
  2872  //    License along with the GNU C Library; if not, see
  2873  //    <https://www.gnu.org/licenses/>.
  2874  
  2875  // Arch-specific definitions.  Each architecture must define the following
  2876  //    macros to define the expected sizes of pthread data types:
  2877  //
  2878  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  2879  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  2880  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  2881  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  2882  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  2883  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  2884  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  2885  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  2886  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2887  //
  2888  //    The additional macro defines any constraint for the lock alignment
  2889  //    inside the thread structures:
  2890  //
  2891  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  2892  //
  2893  //    Same idea but for the once locking primitive:
  2894  //
  2895  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2896  
  2897  // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2898  //    This file is part of the GNU C Library.
  2899  //
  2900  //    The GNU C Library is free software; you can redistribute it and/or
  2901  //    modify it under the terms of the GNU Lesser General Public
  2902  //    License as published by the Free Software Foundation; either
  2903  //    version 2.1 of the License, or (at your option) any later version.
  2904  //
  2905  //    The GNU C Library is distributed in the hope that it will be useful,
  2906  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2907  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2908  //    Lesser General Public License for more details.
  2909  //
  2910  //    You should have received a copy of the GNU Lesser General Public
  2911  //    License along with the GNU C Library; if not, see
  2912  //    <https://www.gnu.org/licenses/>.
  2913  
  2914  // Determine the wordsize from the preprocessor defines.
  2915  
  2916  // Extra attributes for the cleanup functions.
  2917  
  2918  // Common definition of pthread_mutex_t.
  2919  
  2920  type X__pthread_internal_list = struct {
  2921  	F__prev uintptr
  2922  	F__next uintptr
  2923  } /* thread-shared-types.h:49:9 */
  2924  
  2925  // Type to count file system inodes.
  2926  
  2927  // Now add the thread types.
  2928  // Declaration of common pthread types for all architectures.
  2929  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2930  //    This file is part of the GNU C Library.
  2931  //
  2932  //    The GNU C Library is free software; you can redistribute it and/or
  2933  //    modify it under the terms of the GNU Lesser General Public
  2934  //    License as published by the Free Software Foundation; either
  2935  //    version 2.1 of the License, or (at your option) any later version.
  2936  //
  2937  //    The GNU C Library is distributed in the hope that it will be useful,
  2938  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2939  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2940  //    Lesser General Public License for more details.
  2941  //
  2942  //    You should have received a copy of the GNU Lesser General Public
  2943  //    License along with the GNU C Library; if not, see
  2944  //    <https://www.gnu.org/licenses/>.
  2945  
  2946  // For internal mutex and condition variable definitions.
  2947  // Common threading primitives definitions for both POSIX and C11.
  2948  //    Copyright (C) 2017-2020 Free Software Foundation, Inc.
  2949  //    This file is part of the GNU C Library.
  2950  //
  2951  //    The GNU C Library is free software; you can redistribute it and/or
  2952  //    modify it under the terms of the GNU Lesser General Public
  2953  //    License as published by the Free Software Foundation; either
  2954  //    version 2.1 of the License, or (at your option) any later version.
  2955  //
  2956  //    The GNU C Library is distributed in the hope that it will be useful,
  2957  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2958  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2959  //    Lesser General Public License for more details.
  2960  //
  2961  //    You should have received a copy of the GNU Lesser General Public
  2962  //    License along with the GNU C Library; if not, see
  2963  //    <https://www.gnu.org/licenses/>.
  2964  
  2965  // Arch-specific definitions.  Each architecture must define the following
  2966  //    macros to define the expected sizes of pthread data types:
  2967  //
  2968  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  2969  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  2970  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  2971  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  2972  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  2973  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  2974  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  2975  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  2976  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2977  //
  2978  //    The additional macro defines any constraint for the lock alignment
  2979  //    inside the thread structures:
  2980  //
  2981  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  2982  //
  2983  //    Same idea but for the once locking primitive:
  2984  //
  2985  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  2986  
  2987  // Copyright (C) 2002-2020 Free Software Foundation, Inc.
  2988  //    This file is part of the GNU C Library.
  2989  //
  2990  //    The GNU C Library is free software; you can redistribute it and/or
  2991  //    modify it under the terms of the GNU Lesser General Public
  2992  //    License as published by the Free Software Foundation; either
  2993  //    version 2.1 of the License, or (at your option) any later version.
  2994  //
  2995  //    The GNU C Library is distributed in the hope that it will be useful,
  2996  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2997  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2998  //    Lesser General Public License for more details.
  2999  //
  3000  //    You should have received a copy of the GNU Lesser General Public
  3001  //    License along with the GNU C Library; if not, see
  3002  //    <https://www.gnu.org/licenses/>.
  3003  
  3004  // Determine the wordsize from the preprocessor defines.
  3005  
  3006  // Extra attributes for the cleanup functions.
  3007  
  3008  // Common definition of pthread_mutex_t.
  3009  
  3010  type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
  3011  
  3012  type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
  3013  
  3014  type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
  3015  
  3016  // Arch-specific mutex definitions.  A generic implementation is provided
  3017  //    by sysdeps/nptl/bits/struct_mutex.h.  If required, an architecture
  3018  //    can override it by defining:
  3019  //
  3020  //    1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
  3021  //       definition).  It should contains at least the internal members
  3022  //       defined in the generic version.
  3023  //
  3024  //    2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
  3025  //       atomic operations.
  3026  //
  3027  //    3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
  3028  //       It should initialize the mutex internal flag.
  3029  
  3030  // x86 internal mutex struct definitions.
  3031  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  3032  //    This file is part of the GNU C Library.
  3033  //
  3034  //    The GNU C Library is free software; you can redistribute it and/or
  3035  //    modify it under the terms of the GNU Lesser General Public
  3036  //    License as published by the Free Software Foundation; either
  3037  //    version 2.1 of the License, or (at your option) any later version.
  3038  //
  3039  //    The GNU C Library is distributed in the hope that it will be useful,
  3040  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3041  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3042  //    Lesser General Public License for more details.
  3043  //
  3044  //    You should have received a copy of the GNU Lesser General Public
  3045  //    License along with the GNU C Library; if not, see
  3046  //    <http://www.gnu.org/licenses/>.
  3047  
  3048  type X__pthread_mutex_s = struct {
  3049  	F__lock   int32
  3050  	F__count  uint32
  3051  	F__owner  int32
  3052  	F__kind   int32
  3053  	F__nusers uint32
  3054  	F__20     struct {
  3055  		F__ccgo_pad1    [0]uint32
  3056  		F__elision_data struct {
  3057  			F__espins   int16
  3058  			F__eelision int16
  3059  		}
  3060  	}
  3061  } /* struct_mutex.h:22:1 */
  3062  
  3063  // Arch-sepecific read-write lock definitions.  A generic implementation is
  3064  //    provided by struct_rwlock.h.  If required, an architecture can override it
  3065  //    by defining:
  3066  //
  3067  //    1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
  3068  //       It should contain at least the internal members defined in the
  3069  //       generic version.
  3070  //
  3071  //    2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
  3072  //       It should initialize the rwlock internal type.
  3073  
  3074  // x86 internal rwlock struct definitions.
  3075  //    Copyright (C) 2019-2020 Free Software Foundation, Inc.
  3076  //
  3077  //    This file is part of the GNU C Library.
  3078  //
  3079  //    The GNU C Library is free software; you can redistribute it and/or
  3080  //    modify it under the terms of the GNU Lesser General Public
  3081  //    License as published by the Free Software Foundation; either
  3082  //    version 2.1 of the License, or (at your option) any later version.
  3083  //
  3084  //    The GNU C Library is distributed in the hope that it will be useful,
  3085  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3086  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3087  //    Lesser General Public License for more details.
  3088  //
  3089  //    You should have received a copy of the GNU Lesser General Public
  3090  //    License along with the GNU C Library; if not, see
  3091  //    <http://www.gnu.org/licenses/>.
  3092  
  3093  type X__pthread_rwlock_arch_t = struct {
  3094  	F__readers       uint32
  3095  	F__writers       uint32
  3096  	F__wrphase_futex uint32
  3097  	F__writers_futex uint32
  3098  	F__pad3          uint32
  3099  	F__pad4          uint32
  3100  	F__flags         uint8
  3101  	F__shared        uint8
  3102  	F__rwelision     int8
  3103  	F__pad2          uint8
  3104  	F__cur_writer    int32
  3105  } /* struct_rwlock.h:23:1 */
  3106  
  3107  // Common definition of pthread_cond_t.
  3108  
  3109  type X__pthread_cond_s = struct {
  3110  	F__0            struct{ F__wseq uint64 }
  3111  	F__8            struct{ F__g1_start uint64 }
  3112  	F__g_refs       [2]uint32
  3113  	F__g_size       [2]uint32
  3114  	F__g1_orig_size uint32
  3115  	F__wrefs        uint32
  3116  	F__g_signals    [2]uint32
  3117  } /* thread-shared-types.h:92:1 */
  3118  
  3119  // Thread identifiers.  The structure of the attribute type is not
  3120  //    exposed on purpose.
  3121  type Pthread_t = uint32 /* pthreadtypes.h:27:27 */
  3122  
  3123  // Data structures for mutex handling.  The structure of the attribute
  3124  //    type is not exposed on purpose.
  3125  type Pthread_mutexattr_t = struct {
  3126  	F__ccgo_pad1 [0]uint32
  3127  	F__size      [4]int8
  3128  } /* pthreadtypes.h:36:3 */
  3129  
  3130  // Data structure for condition variable handling.  The structure of
  3131  //    the attribute type is not exposed on purpose.
  3132  type Pthread_condattr_t = struct {
  3133  	F__ccgo_pad1 [0]uint32
  3134  	F__size      [4]int8
  3135  } /* pthreadtypes.h:45:3 */
  3136  
  3137  // Keys for thread-specific data
  3138  type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  3139  
  3140  // Once-only execution
  3141  type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  3142  
  3143  type Pthread_attr_t1 = struct {
  3144  	F__ccgo_pad1 [0]uint32
  3145  	F__size      [36]int8
  3146  } /* pthreadtypes.h:56:1 */
  3147  
  3148  type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  3149  
  3150  type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
  3151  
  3152  type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  3153  
  3154  // Data structure for reader-writer lock variable handling.  The
  3155  //    structure of the attribute type is deliberately not exposed.
  3156  type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  3157  
  3158  type Pthread_rwlockattr_t = struct {
  3159  	F__ccgo_pad1 [0]uint32
  3160  	F__size      [8]int8
  3161  } /* pthreadtypes.h:97:3 */
  3162  
  3163  // POSIX spinlock data type.
  3164  type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  3165  
  3166  // POSIX barriers data type.  The structure of the type is
  3167  //    deliberately not exposed.
  3168  type Pthread_barrier_t = struct {
  3169  	F__ccgo_pad1 [0]uint32
  3170  	F__size      [20]int8
  3171  } /* pthreadtypes.h:112:3 */
  3172  
  3173  type Pthread_barrierattr_t = struct {
  3174  	F__ccgo_pad1 [0]uint32
  3175  	F__size      [4]int8
  3176  } /* pthreadtypes.h:118:3 */
  3177  
  3178  // Reentrant versions of the `random' family of functions.
  3179  //    These functions all use the following data structure to contain
  3180  //    state, rather than global state variables.
  3181  
  3182  type Random_data = struct {
  3183  	Ffptr      uintptr
  3184  	Frptr      uintptr
  3185  	Fstate     uintptr
  3186  	Frand_type int32
  3187  	Frand_deg  int32
  3188  	Frand_sep  int32
  3189  	Fend_ptr   uintptr
  3190  } /* stdlib.h:423:1 */
  3191  
  3192  // Data structure for communication with thread safe versions.  This
  3193  //    type is to be regarded as opaque.  It's only exported because users
  3194  //    have to allocate objects of this type.
  3195  type Drand48_data = struct {
  3196  	F__x     [3]uint16
  3197  	F__old_x [3]uint16
  3198  	F__c     uint16
  3199  	F__init  uint16
  3200  	F__a     uint64
  3201  } /* stdlib.h:490:1 */
  3202  
  3203  // Shorthand for type of comparison functions.
  3204  type X__compar_fn_t = uintptr /* stdlib.h:808:13 */
  3205  
  3206  type Comparison_fn_t = X__compar_fn_t /* stdlib.h:811:23 */
  3207  type X__compar_d_fn_t = uintptr       /* stdlib.h:815:13 */
  3208  
  3209  // Floating-point inline functions for stdlib.h.
  3210  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
  3211  //    This file is part of the GNU C Library.
  3212  //
  3213  //    The GNU C Library is free software; you can redistribute it and/or
  3214  //    modify it under the terms of the GNU Lesser General Public
  3215  //    License as published by the Free Software Foundation; either
  3216  //    version 2.1 of the License, or (at your option) any later version.
  3217  //
  3218  //    The GNU C Library is distributed in the hope that it will be useful,
  3219  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3220  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3221  //    Lesser General Public License for more details.
  3222  //
  3223  //    You should have received a copy of the GNU Lesser General Public
  3224  //    License along with the GNU C Library; if not, see
  3225  //    <https://www.gnu.org/licenses/>.
  3226  
  3227  // Define some macros helping to catch buffer overflows.
  3228  
  3229  func XXauDisposeAuth(tls *libc.TLS, auth uintptr) { /* AuDispose.c:34:1: */
  3230  	if auth != 0 {
  3231  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(auth)).Faddress)
  3232  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(auth)).Fnumber)
  3233  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(auth)).Fname)
  3234  		if (*Xauth)(unsafe.Pointer(auth)).Fdata != 0 {
  3235  			libc.Xmemset(tls, (*Xauth)(unsafe.Pointer(auth)).Fdata, 0, uint32((*Xauth)(unsafe.Pointer(auth)).Fdata_length))
  3236  			libc.Xfree(tls, (*Xauth)(unsafe.Pointer(auth)).Fdata)
  3237  		}
  3238  		libc.Xfree(tls, auth)
  3239  	}
  3240  	return
  3241  }
  3242  
  3243  // Just about everyone needs the strings routines.  We provide both forms here,
  3244  // index/rindex and strchr/strrchr, so any systems that don't provide them all
  3245  // need to have #defines here.
  3246  //
  3247  // These macros are defined this way, rather than, e.g.:
  3248  //    #defined index(s,c) strchr(s,c)
  3249  // because someone might be using them as function pointers, and such
  3250  // a change would break compatibility for anyone who's relying on them
  3251  // being the way they currently are. So we're stuck with them this way,
  3252  // which can be really inconvenient. :-(
  3253  
  3254  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  3255  //    This file is part of the GNU C Library.
  3256  //
  3257  //    The GNU C Library is free software; you can redistribute it and/or
  3258  //    modify it under the terms of the GNU Lesser General Public
  3259  //    License as published by the Free Software Foundation; either
  3260  //    version 2.1 of the License, or (at your option) any later version.
  3261  //
  3262  //    The GNU C Library is distributed in the hope that it will be useful,
  3263  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3264  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3265  //    Lesser General Public License for more details.
  3266  //
  3267  //    You should have received a copy of the GNU Lesser General Public
  3268  //    License along with the GNU C Library; if not, see
  3269  //    <https://www.gnu.org/licenses/>.
  3270  
  3271  //	ISO C99 Standard: 7.21 String handling	<string.h>
  3272  
  3273  // Get open(2) constants
  3274  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  3275  //    This file is part of the GNU C Library.
  3276  //
  3277  //    The GNU C Library is free software; you can redistribute it and/or
  3278  //    modify it under the terms of the GNU Lesser General Public
  3279  //    License as published by the Free Software Foundation; either
  3280  //    version 2.1 of the License, or (at your option) any later version.
  3281  //
  3282  //    The GNU C Library is distributed in the hope that it will be useful,
  3283  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3284  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3285  //    Lesser General Public License for more details.
  3286  //
  3287  //    You should have received a copy of the GNU Lesser General Public
  3288  //    License along with the GNU C Library; if not, see
  3289  //    <https://www.gnu.org/licenses/>.
  3290  
  3291  //	POSIX Standard: 6.5 File Control Operations	<fcntl.h>
  3292  
  3293  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  3294  //    This file is part of the GNU C Library.
  3295  //
  3296  //    The GNU C Library is free software; you can redistribute it and/or
  3297  //    modify it under the terms of the GNU Lesser General Public
  3298  //    License as published by the Free Software Foundation; either
  3299  //    version 2.1 of the License, or (at your option) any later version.
  3300  //
  3301  //    The GNU C Library is distributed in the hope that it will be useful,
  3302  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3303  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3304  //    Lesser General Public License for more details.
  3305  //
  3306  //    You should have received a copy of the GNU Lesser General Public
  3307  //    License along with the GNU C Library; if not, see
  3308  //    <https://www.gnu.org/licenses/>.
  3309  
  3310  // This must be early so <bits/fcntl.h> can define types winningly.
  3311  
  3312  // Get __mode_t, __dev_t and __off_t  .
  3313  // bits/types.h -- definitions of __*_t types underlying *_t types.
  3314  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  3315  //    This file is part of the GNU C Library.
  3316  //
  3317  //    The GNU C Library is free software; you can redistribute it and/or
  3318  //    modify it under the terms of the GNU Lesser General Public
  3319  //    License as published by the Free Software Foundation; either
  3320  //    version 2.1 of the License, or (at your option) any later version.
  3321  //
  3322  //    The GNU C Library is distributed in the hope that it will be useful,
  3323  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3324  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3325  //    Lesser General Public License for more details.
  3326  //
  3327  //    You should have received a copy of the GNU Lesser General Public
  3328  //    License along with the GNU C Library; if not, see
  3329  //    <https://www.gnu.org/licenses/>.
  3330  
  3331  // Never include this file directly; use <sys/types.h> instead.
  3332  
  3333  // Get the definitions of O_*, F_*, FD_*: all the
  3334  //    numbers and flag bits for `open', `fcntl', et al.
  3335  // O_*, F_*, FD_* bit values for Linux/x86.
  3336  //    Copyright (C) 2001-2020 Free Software Foundation, Inc.
  3337  //    This file is part of the GNU C Library.
  3338  //
  3339  //    The GNU C Library is free software; you can redistribute it and/or
  3340  //    modify it under the terms of the GNU Lesser General Public
  3341  //    License as published by the Free Software Foundation; either
  3342  //    version 2.1 of the License, or (at your option) any later version.
  3343  //
  3344  //    The GNU C Library is distributed in the hope that it will be useful,
  3345  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3346  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3347  //    Lesser General Public License for more details.
  3348  //
  3349  //    You should have received a copy of the GNU Lesser General Public
  3350  //    License along with the GNU C Library; if not, see
  3351  //    <https://www.gnu.org/licenses/>.
  3352  
  3353  type Flock = struct {
  3354  	Fl_type   int16
  3355  	Fl_whence int16
  3356  	Fl_start  X__off64_t
  3357  	Fl_len    X__off64_t
  3358  	Fl_pid    X__pid_t
  3359  } /* fcntl.h:35:1 */
  3360  
  3361  type Flock64 = struct {
  3362  	Fl_type   int16
  3363  	Fl_whence int16
  3364  	Fl_start  X__off64_t
  3365  	Fl_len    X__off64_t
  3366  	Fl_pid    X__pid_t
  3367  } /* fcntl.h:50:1 */
  3368  
  3369  // Include generic Linux declarations.
  3370  // O_*, F_*, FD_* bit values for Linux.
  3371  //    Copyright (C) 2001-2020 Free Software Foundation, Inc.
  3372  //    This file is part of the GNU C Library.
  3373  //
  3374  //    The GNU C Library is free software; you can redistribute it and/or
  3375  //    modify it under the terms of the GNU Lesser General Public
  3376  //    License as published by the Free Software Foundation; either
  3377  //    version 2.1 of the License, or (at your option) any later version.
  3378  //
  3379  //    The GNU C Library is distributed in the hope that it will be useful,
  3380  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3381  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3382  //    Lesser General Public License for more details.
  3383  //
  3384  //    You should have received a copy of the GNU Lesser General Public
  3385  //    License along with the GNU C Library; if not, see
  3386  //    <https://www.gnu.org/licenses/>.
  3387  
  3388  // This file contains shared definitions between Linux architectures
  3389  //    and is included by <bits/fcntl.h> to declare them.  The various
  3390  //    #ifndef cases allow the architecture specific file to define those
  3391  //    values with different values.
  3392  //
  3393  //    A minimal <bits/fcntl.h> contains just:
  3394  //
  3395  //    struct flock {...}
  3396  //    #ifdef __USE_LARGEFILE64
  3397  //    struct flock64 {...}
  3398  //    #endif
  3399  //    #include <bits/fcntl-linux.h>
  3400  
  3401  // Define struct iovec.
  3402  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  3403  //    This file is part of the GNU C Library.
  3404  //
  3405  //    The GNU C Library is free software; you can redistribute it and/or
  3406  //    modify it under the terms of the GNU Lesser General Public
  3407  //    License as published by the Free Software Foundation; either
  3408  //    version 2.1 of the License, or (at your option) any later version.
  3409  //
  3410  //    The GNU C Library is distributed in the hope that it will be useful,
  3411  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3412  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3413  //    Lesser General Public License for more details.
  3414  //
  3415  //    You should have received a copy of the GNU Lesser General Public
  3416  //    License along with the GNU C Library; if not, see
  3417  //    <https://www.gnu.org/licenses/>.
  3418  
  3419  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  3420  //
  3421  // This file is part of GCC.
  3422  //
  3423  // GCC is free software; you can redistribute it and/or modify
  3424  // it under the terms of the GNU General Public License as published by
  3425  // the Free Software Foundation; either version 3, or (at your option)
  3426  // any later version.
  3427  //
  3428  // GCC is distributed in the hope that it will be useful,
  3429  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  3430  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3431  // GNU General Public License for more details.
  3432  //
  3433  // Under Section 7 of GPL version 3, you are granted additional
  3434  // permissions described in the GCC Runtime Library Exception, version
  3435  // 3.1, as published by the Free Software Foundation.
  3436  //
  3437  // You should have received a copy of the GNU General Public License and
  3438  // a copy of the GCC Runtime Library Exception along with this program;
  3439  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  3440  // <http://www.gnu.org/licenses/>.
  3441  
  3442  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  3443  
  3444  // Any one of these symbols __need_* means that GNU libc
  3445  //    wants us just to define one data type.  So don't define
  3446  //    the symbols that indicate this file's entire job has been done.
  3447  
  3448  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  3449  //    There's no way to win with the other order!  Sun lossage.
  3450  
  3451  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  3452  //    Just ignore it.
  3453  
  3454  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  3455  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  3456  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  3457  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  3458  //    If we find that the macros are still defined at this point, we must
  3459  //    invoke them so that the type is defined as expected.
  3460  
  3461  // In case nobody has defined these types, but we aren't running under
  3462  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  3463  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  3464  //    parts of GCC is compiled by an older compiler, that actually
  3465  //    include gstddef.h, such as collect2.
  3466  
  3467  // Signed type of difference of two pointers.
  3468  
  3469  // Define this type if we are doing the whole job,
  3470  //    or if we want this type in particular.
  3471  
  3472  // Unsigned type of `sizeof' something.
  3473  
  3474  // Define this type if we are doing the whole job,
  3475  //    or if we want this type in particular.
  3476  
  3477  // Wide character type.
  3478  //    Locale-writers should change this as necessary to
  3479  //    be big enough to hold unique values not between 0 and 127,
  3480  //    and not (wchar_t) -1, for each defined multibyte character.
  3481  
  3482  // Define this type if we are doing the whole job,
  3483  //    or if we want this type in particular.
  3484  
  3485  // A null pointer constant.
  3486  
  3487  // Structure for scatter/gather I/O.
  3488  type Iovec = struct {
  3489  	Fiov_base uintptr
  3490  	Fiov_len  Size_t
  3491  } /* struct_iovec.h:26:1 */
  3492  
  3493  // Structure to use with F_GETOWN_EX and F_SETOWN_EX.
  3494  type F_owner_ex = struct {
  3495  	Ftype uint32
  3496  	Fpid  X__pid_t
  3497  } /* fcntl-linux.h:274:1 */
  3498  
  3499  // Types of seals.
  3500  
  3501  // Hint values for F_{GET,SET}_RW_HINT.
  3502  
  3503  // Define some more compatibility macros to be backward compatible with
  3504  //    BSD systems which did not managed to hide these kernel macros.
  3505  
  3506  // Advise to `posix_fadvise'.
  3507  
  3508  // Flags for SYNC_FILE_RANGE.
  3509  // SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are
  3510  //    written to disk before returning.
  3511  
  3512  // Flags for SPLICE and VMSPLICE.
  3513  
  3514  // Flags for fallocate.
  3515  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  3516  
  3517  // FALLOC_FL_COLLAPSE_RANGE is used to remove a range of a file
  3518  // without leaving a hole in the file. The contents of the file beyond
  3519  // the range being removed is appended to the start offset of the range
  3520  // being removed (i.e. the hole that was punched is "collapsed"),
  3521  // resulting in a file layout that looks like the range that was
  3522  // removed never existed. As such collapsing a range of a file changes
  3523  // the size of the file, reducing it by the same length of the range
  3524  // that has been removed by the operation.
  3525  //
  3526  // Different filesystems may implement different limitations on the
  3527  // granularity of the operation. Most will limit operations to
  3528  // filesystem block size boundaries, but this boundary may be larger or
  3529  // smaller depending on the filesystem and/or the configuration of the
  3530  // filesystem or file.
  3531  //
  3532  // Attempting to collapse a range that crosses the end of the file is
  3533  // considered an illegal operation - just use ftruncate(2) if you need
  3534  // to collapse a range that crosses EOF.
  3535  
  3536  // FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably
  3537  // without issuing data IO. Blocks should be preallocated for the regions that
  3538  // span holes in the file, and the entire range is preferable converted to
  3539  // unwritten extents - even though file system may choose to zero out the
  3540  // extent or do whatever which will result in reading zeros from the range
  3541  // while the range remains allocated for the file.
  3542  //
  3543  // This can be also used to preallocate blocks past EOF in the same way as
  3544  // with fallocate. Flag FALLOC_FL_KEEP_SIZE should cause the inode
  3545  // size to remain the same.
  3546  
  3547  // FALLOC_FL_INSERT_RANGE is use to insert space within the file size without
  3548  // overwriting any existing data. The contents of the file beyond offset are
  3549  // shifted towards right by len bytes to create a hole.  As such, this
  3550  // operation will increase the size of the file by len bytes.
  3551  //
  3552  // Different filesystems may implement different limitations on the granularity
  3553  // of the operation. Most will limit operations to filesystem block size
  3554  // boundaries, but this boundary may be larger or smaller depending on
  3555  // the filesystem and/or the configuration of the filesystem or file.
  3556  //
  3557  // Attempting to insert space using this flag at OR beyond the end of
  3558  // the file is considered an illegal operation - just use ftruncate(2) or
  3559  // fallocate(2) with mode 0 for such type of operations.
  3560  
  3561  // FALLOC_FL_UNSHARE_RANGE is used to unshare shared blocks within the
  3562  // file size without overwriting any existing data. The purpose of this
  3563  // call is to preemptively reallocate any blocks that are subject to
  3564  // copy-on-write.
  3565  //
  3566  // Different filesystems may implement different limitations on the
  3567  // granularity of the operation. Most will limit operations to filesystem
  3568  // block size boundaries, but this boundary may be larger or smaller
  3569  // depending on the filesystem and/or the configuration of the filesystem
  3570  // or file.
  3571  //
  3572  // This flag can only be used with allocate-mode fallocate, which is
  3573  // to say that it cannot be used with the punch, zero, collapse, or
  3574  // insert range modes.
  3575  
  3576  // File handle structure.
  3577  type File_handle = struct {
  3578  	F__ccgo_pad1  [0]uint32
  3579  	Fhandle_bytes uint32
  3580  	Fhandle_type  int32
  3581  } /* fcntl-linux.h:357:1 */
  3582  
  3583  // Detect if open needs mode as a third argument (or for openat as a fourth
  3584  //    argument).
  3585  
  3586  // POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
  3587  //    Earlier POSIX standards permitted any type ending in `_t' to be defined
  3588  //    by any POSIX header, so we don't conditionalize the definitions here.
  3589  
  3590  // For XPG all symbols from <sys/stat.h> should also be available.
  3591  // NB: Include guard matches what <linux/time.h> uses.
  3592  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  3593  //    This file is part of the GNU C Library.
  3594  //
  3595  //    The GNU C Library is free software; you can redistribute it and/or
  3596  //    modify it under the terms of the GNU Lesser General Public
  3597  //    License as published by the Free Software Foundation; either
  3598  //    version 2.1 of the License, or (at your option) any later version.
  3599  //
  3600  //    The GNU C Library is distributed in the hope that it will be useful,
  3601  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3602  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3603  //    Lesser General Public License for more details.
  3604  //
  3605  //    You should have received a copy of the GNU Lesser General Public
  3606  //    License along with the GNU C Library; if not, see
  3607  //    <https://www.gnu.org/licenses/>.
  3608  
  3609  // Versions of the `struct stat' data structure.
  3610  
  3611  // i386 versions of the `xmknod' interface.
  3612  
  3613  type Stat = struct {
  3614  	Fst_dev      X__dev_t
  3615  	F__pad1      uint16
  3616  	F__ccgo_pad1 [2]byte
  3617  	F__st_ino    X__ino_t
  3618  	Fst_mode     X__mode_t
  3619  	Fst_nlink    X__nlink_t
  3620  	Fst_uid      X__uid_t
  3621  	Fst_gid      X__gid_t
  3622  	Fst_rdev     X__dev_t
  3623  	F__pad2      uint16
  3624  	F__ccgo_pad2 [2]byte
  3625  	Fst_size     X__off64_t
  3626  	Fst_blksize  X__blksize_t
  3627  	Fst_blocks   X__blkcnt64_t
  3628  	Fst_atim     struct {
  3629  		Ftv_sec  X__time_t
  3630  		Ftv_nsec X__syscall_slong_t
  3631  	}
  3632  	Fst_mtim struct {
  3633  		Ftv_sec  X__time_t
  3634  		Ftv_nsec X__syscall_slong_t
  3635  	}
  3636  	Fst_ctim struct {
  3637  		Ftv_sec  X__time_t
  3638  		Ftv_nsec X__syscall_slong_t
  3639  	}
  3640  	Fst_ino X__ino64_t
  3641  } /* stat.h:46:1 */
  3642  
  3643  // Note stat64 has the same shape as stat for x86-64.
  3644  type Stat64 = struct {
  3645  	Fst_dev     X__dev_t
  3646  	F__pad1     uint32
  3647  	F__st_ino   X__ino_t
  3648  	Fst_mode    X__mode_t
  3649  	Fst_nlink   X__nlink_t
  3650  	Fst_uid     X__uid_t
  3651  	Fst_gid     X__gid_t
  3652  	Fst_rdev    X__dev_t
  3653  	F__pad2     uint32
  3654  	Fst_size    X__off64_t
  3655  	Fst_blksize X__blksize_t
  3656  	Fst_blocks  X__blkcnt64_t
  3657  	Fst_atim    struct {
  3658  		Ftv_sec  X__time_t
  3659  		Ftv_nsec X__syscall_slong_t
  3660  	}
  3661  	Fst_mtim struct {
  3662  		Ftv_sec  X__time_t
  3663  		Ftv_nsec X__syscall_slong_t
  3664  	}
  3665  	Fst_ctim struct {
  3666  		Ftv_sec  X__time_t
  3667  		Ftv_nsec X__syscall_slong_t
  3668  	}
  3669  	Fst_ino X__ino64_t
  3670  } /* stat.h:119:1 */
  3671  
  3672  // Define some inlines helping to catch common problems.
  3673  
  3674  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  3675  //    This file is part of the GNU C Library.
  3676  //
  3677  //    The GNU C Library is free software; you can redistribute it and/or
  3678  //    modify it under the terms of the GNU Lesser General Public
  3679  //    License as published by the Free Software Foundation; either
  3680  //    version 2.1 of the License, or (at your option) any later version.
  3681  //
  3682  //    The GNU C Library is distributed in the hope that it will be useful,
  3683  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3684  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3685  //    Lesser General Public License for more details.
  3686  //
  3687  //    You should have received a copy of the GNU Lesser General Public
  3688  //    License along with the GNU C Library; if not, see
  3689  //    <https://www.gnu.org/licenses/>.
  3690  
  3691  //	POSIX Standard: 2.10 Symbolic Constants		<unistd.h>
  3692  
  3693  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  3694  //    This file is part of the GNU C Library.
  3695  //
  3696  //    The GNU C Library is free software; you can redistribute it and/or
  3697  //    modify it under the terms of the GNU Lesser General Public
  3698  //    License as published by the Free Software Foundation; either
  3699  //    version 2.1 of the License, or (at your option) any later version.
  3700  //
  3701  //    The GNU C Library is distributed in the hope that it will be useful,
  3702  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3703  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3704  //    Lesser General Public License for more details.
  3705  //
  3706  //    You should have received a copy of the GNU Lesser General Public
  3707  //    License along with the GNU C Library; if not, see
  3708  //    <https://www.gnu.org/licenses/>.
  3709  
  3710  // These may be used to determine what facilities are present at compile time.
  3711  //    Their values can be obtained at run time from `sysconf'.
  3712  
  3713  // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008.
  3714  
  3715  // These are not #ifdef __USE_POSIX2 because they are
  3716  //    in the theoretically application-owned namespace.
  3717  
  3718  // The utilities on GNU systems also correspond to this version.
  3719  
  3720  // The utilities on GNU systems also correspond to this version.
  3721  
  3722  // This symbol was required until the 2001 edition of POSIX.
  3723  
  3724  // If defined, the implementation supports the
  3725  //    C Language Bindings Option.
  3726  
  3727  // If defined, the implementation supports the
  3728  //    C Language Development Utilities Option.
  3729  
  3730  // If defined, the implementation supports the
  3731  //    Software Development Utilities Option.
  3732  
  3733  // If defined, the implementation supports the
  3734  //    creation of locales with the localedef utility.
  3735  
  3736  // X/Open version number to which the library conforms.  It is selectable.
  3737  
  3738  // Commands and utilities from XPG4 are available.
  3739  
  3740  // We are compatible with the old published standards as well.
  3741  
  3742  // The X/Open Unix extensions are available.
  3743  
  3744  // The enhanced internationalization capabilities according to XPG4.2
  3745  //    are present.
  3746  
  3747  // The legacy interfaces are also available.
  3748  
  3749  // Get values of POSIX options:
  3750  //
  3751  //    If these symbols are defined, the corresponding features are
  3752  //    always available.  If not, they may be available sometimes.
  3753  //    The current values can be obtained with `sysconf'.
  3754  //
  3755  //    _POSIX_JOB_CONTROL		Job control is supported.
  3756  //    _POSIX_SAVED_IDS		Processes have a saved set-user-ID
  3757  // 				and a saved set-group-ID.
  3758  //    _POSIX_REALTIME_SIGNALS	Real-time, queued signals are supported.
  3759  //    _POSIX_PRIORITY_SCHEDULING	Priority scheduling is supported.
  3760  //    _POSIX_TIMERS		POSIX.4 clocks and timers are supported.
  3761  //    _POSIX_ASYNCHRONOUS_IO	Asynchronous I/O is supported.
  3762  //    _POSIX_PRIORITIZED_IO	Prioritized asynchronous I/O is supported.
  3763  //    _POSIX_SYNCHRONIZED_IO	Synchronizing file data is supported.
  3764  //    _POSIX_FSYNC			The fsync function is present.
  3765  //    _POSIX_MAPPED_FILES		Mapping of files to memory is supported.
  3766  //    _POSIX_MEMLOCK		Locking of all memory is supported.
  3767  //    _POSIX_MEMLOCK_RANGE		Locking of ranges of memory is supported.
  3768  //    _POSIX_MEMORY_PROTECTION	Setting of memory protections is supported.
  3769  //    _POSIX_MESSAGE_PASSING	POSIX.4 message queues are supported.
  3770  //    _POSIX_SEMAPHORES		POSIX.4 counting semaphores are supported.
  3771  //    _POSIX_SHARED_MEMORY_OBJECTS	POSIX.4 shared memory objects are supported.
  3772  //    _POSIX_THREADS		POSIX.1c pthreads are supported.
  3773  //    _POSIX_THREAD_ATTR_STACKADDR	Thread stack address attribute option supported.
  3774  //    _POSIX_THREAD_ATTR_STACKSIZE	Thread stack size attribute option supported.
  3775  //    _POSIX_THREAD_SAFE_FUNCTIONS	Thread-safe functions are supported.
  3776  //    _POSIX_THREAD_PRIORITY_SCHEDULING
  3777  // 				POSIX.1c thread execution scheduling supported.
  3778  //    _POSIX_THREAD_PRIO_INHERIT	Thread priority inheritance option supported.
  3779  //    _POSIX_THREAD_PRIO_PROTECT	Thread priority protection option supported.
  3780  //    _POSIX_THREAD_PROCESS_SHARED	Process-shared synchronization supported.
  3781  //    _POSIX_PII			Protocol-independent interfaces are supported.
  3782  //    _POSIX_PII_XTI		XTI protocol-indep. interfaces are supported.
  3783  //    _POSIX_PII_SOCKET		Socket protocol-indep. interfaces are supported.
  3784  //    _POSIX_PII_INTERNET		Internet family of protocols supported.
  3785  //    _POSIX_PII_INTERNET_STREAM	Connection-mode Internet protocol supported.
  3786  //    _POSIX_PII_INTERNET_DGRAM	Connectionless Internet protocol supported.
  3787  //    _POSIX_PII_OSI		ISO/OSI family of protocols supported.
  3788  //    _POSIX_PII_OSI_COTS		Connection-mode ISO/OSI service supported.
  3789  //    _POSIX_PII_OSI_CLTS		Connectionless ISO/OSI service supported.
  3790  //    _POSIX_POLL			Implementation supports `poll' function.
  3791  //    _POSIX_SELECT		Implementation supports `select' and `pselect'.
  3792  //
  3793  //    _XOPEN_REALTIME		X/Open realtime support is available.
  3794  //    _XOPEN_REALTIME_THREADS	X/Open realtime thread support is available.
  3795  //    _XOPEN_SHM			Shared memory interface according to XPG4.2.
  3796  //
  3797  //    _XBS5_ILP32_OFF32		Implementation provides environment with 32-bit
  3798  // 				int, long, pointer, and off_t types.
  3799  //    _XBS5_ILP32_OFFBIG		Implementation provides environment with 32-bit
  3800  // 				int, long, and pointer and off_t with at least
  3801  // 				64 bits.
  3802  //    _XBS5_LP64_OFF64		Implementation provides environment with 32-bit
  3803  // 				int, and 64-bit long, pointer, and off_t types.
  3804  //    _XBS5_LPBIG_OFFBIG		Implementation provides environment with at
  3805  // 				least 32 bits int and long, pointer, and off_t
  3806  // 				with at least 64 bits.
  3807  //
  3808  //    If any of these symbols is defined as -1, the corresponding option is not
  3809  //    true for any file.  If any is defined as other than -1, the corresponding
  3810  //    option is true for all files.  If a symbol is not defined at all, the value
  3811  //    for a specific file can be obtained from `pathconf' and `fpathconf'.
  3812  //
  3813  //    _POSIX_CHOWN_RESTRICTED	Only the super user can use `chown' to change
  3814  // 				the owner of a file.  `chown' can only be used
  3815  // 				to change the group ID of a file to a group of
  3816  // 				which the calling process is a member.
  3817  //    _POSIX_NO_TRUNC		Pathname components longer than
  3818  // 				NAME_MAX generate an error.
  3819  //    _POSIX_VDISABLE		If defined, if the value of an element of the
  3820  // 				`c_cc' member of `struct termios' is
  3821  // 				_POSIX_VDISABLE, no character will have the
  3822  // 				effect associated with that element.
  3823  //    _POSIX_SYNC_IO		Synchronous I/O may be performed.
  3824  //    _POSIX_ASYNC_IO		Asynchronous I/O may be performed.
  3825  //    _POSIX_PRIO_IO		Prioritized Asynchronous I/O may be performed.
  3826  //
  3827  //    Support for the Large File Support interface is not generally available.
  3828  //    If it is available the following constants are defined to one.
  3829  //    _LFS64_LARGEFILE		Low-level I/O supports large files.
  3830  //    _LFS64_STDIO			Standard I/O supports large files.
  3831  //
  3832  
  3833  // Define POSIX options for Linux.
  3834  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  3835  //    This file is part of the GNU C Library.
  3836  //
  3837  //    The GNU C Library is free software; you can redistribute it and/or
  3838  //    modify it under the terms of the GNU Lesser General Public License as
  3839  //    published by the Free Software Foundation; either version 2.1 of the
  3840  //    License, or (at your option) any later version.
  3841  //
  3842  //    The GNU C Library is distributed in the hope that it will be useful,
  3843  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3844  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3845  //    Lesser General Public License for more details.
  3846  //
  3847  //    You should have received a copy of the GNU Lesser General Public
  3848  //    License along with the GNU C Library; see the file COPYING.LIB.  If
  3849  //    not, see <https://www.gnu.org/licenses/>.
  3850  
  3851  // Job control is supported.
  3852  
  3853  // Processes have a saved set-user-ID and a saved set-group-ID.
  3854  
  3855  // Priority scheduling is not supported with the correct semantics,
  3856  //    but GNU/Linux applications expect that the corresponding interfaces
  3857  //    are available, even though the semantics do not meet the POSIX
  3858  //    requirements.  See glibc bug 14829.
  3859  
  3860  // Synchronizing file data is supported.
  3861  
  3862  // The fsync function is present.
  3863  
  3864  // Mapping of files to memory is supported.
  3865  
  3866  // Locking of all memory is supported.
  3867  
  3868  // Locking of ranges of memory is supported.
  3869  
  3870  // Setting of memory protections is supported.
  3871  
  3872  // Some filesystems allow all users to change file ownership.
  3873  
  3874  // `c_cc' member of 'struct termios' structure can be disabled by
  3875  //    using the value _POSIX_VDISABLE.
  3876  
  3877  // Filenames are not silently truncated.
  3878  
  3879  // X/Open realtime support is available.
  3880  
  3881  // X/Open thread realtime support is available.
  3882  
  3883  // XPG4.2 shared memory is supported.
  3884  
  3885  // Tell we have POSIX threads.
  3886  
  3887  // We have the reentrant functions described in POSIX.
  3888  
  3889  // We provide priority scheduling for threads.
  3890  
  3891  // We support user-defined stack sizes.
  3892  
  3893  // We support user-defined stacks.
  3894  
  3895  // We support priority inheritence.
  3896  
  3897  // We support priority protection, though only for non-robust
  3898  //    mutexes.
  3899  
  3900  // We support priority inheritence for robust mutexes.
  3901  
  3902  // We do not support priority protection for robust mutexes.
  3903  
  3904  // We support POSIX.1b semaphores.
  3905  
  3906  // Real-time signals are supported.
  3907  
  3908  // We support asynchronous I/O.
  3909  // Alternative name for Unix98.
  3910  // Support for prioritization is also available.
  3911  
  3912  // The LFS support in asynchronous I/O is also available.
  3913  
  3914  // The rest of the LFS is also available.
  3915  
  3916  // POSIX shared memory objects are implemented.
  3917  
  3918  // CPU-time clocks support needs to be checked at runtime.
  3919  
  3920  // Clock support in threads must be also checked at runtime.
  3921  
  3922  // GNU libc provides regular expression handling.
  3923  
  3924  // Reader/Writer locks are available.
  3925  
  3926  // We have a POSIX shell.
  3927  
  3928  // We support the Timeouts option.
  3929  
  3930  // We support spinlocks.
  3931  
  3932  // The `spawn' function family is supported.
  3933  
  3934  // We have POSIX timers.
  3935  
  3936  // The barrier functions are available.
  3937  
  3938  // POSIX message queues are available.
  3939  
  3940  // Thread process-shared synchronization is supported.
  3941  
  3942  // The monotonic clock might be available.
  3943  
  3944  // The clock selection interfaces are available.
  3945  
  3946  // Advisory information interfaces are available.
  3947  
  3948  // IPv6 support is available.
  3949  
  3950  // Raw socket support is available.
  3951  
  3952  // We have at least one terminal.
  3953  
  3954  // Neither process nor thread sporadic server interfaces is available.
  3955  
  3956  // trace.h is not available.
  3957  
  3958  // Typed memory objects are not available.
  3959  
  3960  // Get the environment definitions from Unix98.
  3961  // Copyright (C) 1999-2020 Free Software Foundation, Inc.
  3962  //    This file is part of the GNU C Library.
  3963  //
  3964  //    The GNU C Library is free software; you can redistribute it and/or
  3965  //    modify it under the terms of the GNU Lesser General Public
  3966  //    License as published by the Free Software Foundation; either
  3967  //    version 2.1 of the License, or (at your option) any later version.
  3968  //
  3969  //    The GNU C Library is distributed in the hope that it will be useful,
  3970  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3971  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3972  //    Lesser General Public License for more details.
  3973  //
  3974  //    You should have received a copy of the GNU Lesser General Public
  3975  //    License along with the GNU C Library; if not, see
  3976  //    <https://www.gnu.org/licenses/>.
  3977  
  3978  // Determine the wordsize from the preprocessor defines.
  3979  
  3980  // This header should define the following symbols under the described
  3981  //    situations.  A value `1' means that the model is always supported,
  3982  //    `-1' means it is never supported.  Undefined means it cannot be
  3983  //    statically decided.
  3984  //
  3985  //    _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
  3986  //    _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
  3987  //
  3988  //    _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
  3989  //    _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
  3990  //
  3991  //    The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
  3992  //    _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
  3993  //    _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
  3994  //    used in previous versions of the Unix standard and are available
  3995  //    only for compatibility.
  3996  
  3997  // We have 32-bit wide `int', `long int' and pointers and all platforms
  3998  //    support LFS.  -mx32 has 64-bit wide `off_t'.
  3999  
  4000  // -m32 has 32-bit wide `off_t'.
  4001  
  4002  // We optionally provide an environment with the above size but an 64-bit
  4003  //    side `off_t'.  Therefore we don't define _POSIX_V7_ILP32_OFFBIG.
  4004  
  4005  // Environments with 64-bit wide pointers can be provided,
  4006  //    so these macros aren't defined:
  4007  //    # undef _POSIX_V7_LP64_OFF64
  4008  //    # undef _POSIX_V7_LPBIG_OFFBIG
  4009  //    # undef _POSIX_V6_LP64_OFF64
  4010  //    # undef _POSIX_V6_LPBIG_OFFBIG
  4011  //    # undef _XBS5_LP64_OFF64
  4012  //    # undef _XBS5_LPBIG_OFFBIG
  4013  //    and sysconf tests for it at runtime.
  4014  
  4015  // Standard file descriptors.
  4016  
  4017  // All functions that are not declared anywhere else.
  4018  
  4019  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4020  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  4021  //    This file is part of the GNU C Library.
  4022  //
  4023  //    The GNU C Library is free software; you can redistribute it and/or
  4024  //    modify it under the terms of the GNU Lesser General Public
  4025  //    License as published by the Free Software Foundation; either
  4026  //    version 2.1 of the License, or (at your option) any later version.
  4027  //
  4028  //    The GNU C Library is distributed in the hope that it will be useful,
  4029  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4030  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4031  //    Lesser General Public License for more details.
  4032  //
  4033  //    You should have received a copy of the GNU Lesser General Public
  4034  //    License along with the GNU C Library; if not, see
  4035  //    <https://www.gnu.org/licenses/>.
  4036  
  4037  // Never include this file directly; use <sys/types.h> instead.
  4038  
  4039  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  4040  //
  4041  // This file is part of GCC.
  4042  //
  4043  // GCC is free software; you can redistribute it and/or modify
  4044  // it under the terms of the GNU General Public License as published by
  4045  // the Free Software Foundation; either version 3, or (at your option)
  4046  // any later version.
  4047  //
  4048  // GCC is distributed in the hope that it will be useful,
  4049  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  4050  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4051  // GNU General Public License for more details.
  4052  //
  4053  // Under Section 7 of GPL version 3, you are granted additional
  4054  // permissions described in the GCC Runtime Library Exception, version
  4055  // 3.1, as published by the Free Software Foundation.
  4056  //
  4057  // You should have received a copy of the GNU General Public License and
  4058  // a copy of the GCC Runtime Library Exception along with this program;
  4059  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  4060  // <http://www.gnu.org/licenses/>.
  4061  
  4062  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  4063  
  4064  // Any one of these symbols __need_* means that GNU libc
  4065  //    wants us just to define one data type.  So don't define
  4066  //    the symbols that indicate this file's entire job has been done.
  4067  
  4068  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  4069  //    There's no way to win with the other order!  Sun lossage.
  4070  
  4071  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  4072  //    Just ignore it.
  4073  
  4074  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  4075  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  4076  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  4077  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  4078  //    If we find that the macros are still defined at this point, we must
  4079  //    invoke them so that the type is defined as expected.
  4080  
  4081  // In case nobody has defined these types, but we aren't running under
  4082  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  4083  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  4084  //    parts of GCC is compiled by an older compiler, that actually
  4085  //    include gstddef.h, such as collect2.
  4086  
  4087  // Signed type of difference of two pointers.
  4088  
  4089  // Define this type if we are doing the whole job,
  4090  //    or if we want this type in particular.
  4091  
  4092  // Unsigned type of `sizeof' something.
  4093  
  4094  // Define this type if we are doing the whole job,
  4095  //    or if we want this type in particular.
  4096  
  4097  // Wide character type.
  4098  //    Locale-writers should change this as necessary to
  4099  //    be big enough to hold unique values not between 0 and 127,
  4100  //    and not (wchar_t) -1, for each defined multibyte character.
  4101  
  4102  // Define this type if we are doing the whole job,
  4103  //    or if we want this type in particular.
  4104  
  4105  // A null pointer constant.
  4106  
  4107  // The Single Unix specification says that some more types are
  4108  //    available here.
  4109  
  4110  type Intptr_t = X__intptr_t /* unistd.h:267:20 */
  4111  
  4112  type Socklen_t = X__socklen_t /* unistd.h:274:21 */
  4113  
  4114  // Get struct timeval and struct tm
  4115  
  4116  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  4117  //    This file is part of the GNU C Library.
  4118  //
  4119  //    The GNU C Library is free software; you can redistribute it and/or
  4120  //    modify it under the terms of the GNU Lesser General Public
  4121  //    License as published by the Free Software Foundation; either
  4122  //    version 2.1 of the License, or (at your option) any later version.
  4123  //
  4124  //    The GNU C Library is distributed in the hope that it will be useful,
  4125  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4126  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4127  //    Lesser General Public License for more details.
  4128  //
  4129  //    You should have received a copy of the GNU Lesser General Public
  4130  //    License along with the GNU C Library; if not, see
  4131  //    <https://www.gnu.org/licenses/>.
  4132  
  4133  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  4134  //    This file is part of the GNU C Library.
  4135  //
  4136  //    The GNU C Library is free software; you can redistribute it and/or
  4137  //    modify it under the terms of the GNU Lesser General Public
  4138  //    License as published by the Free Software Foundation; either
  4139  //    version 2.1 of the License, or (at your option) any later version.
  4140  //
  4141  //    The GNU C Library is distributed in the hope that it will be useful,
  4142  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4143  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4144  //    Lesser General Public License for more details.
  4145  //
  4146  //    You should have received a copy of the GNU Lesser General Public
  4147  //    License along with the GNU C Library; if not, see
  4148  //    <https://www.gnu.org/licenses/>.
  4149  
  4150  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4151  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  4152  //    This file is part of the GNU C Library.
  4153  //
  4154  //    The GNU C Library is free software; you can redistribute it and/or
  4155  //    modify it under the terms of the GNU Lesser General Public
  4156  //    License as published by the Free Software Foundation; either
  4157  //    version 2.1 of the License, or (at your option) any later version.
  4158  //
  4159  //    The GNU C Library is distributed in the hope that it will be useful,
  4160  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4161  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4162  //    Lesser General Public License for more details.
  4163  //
  4164  //    You should have received a copy of the GNU Lesser General Public
  4165  //    License along with the GNU C Library; if not, see
  4166  //    <https://www.gnu.org/licenses/>.
  4167  
  4168  // Never include this file directly; use <sys/types.h> instead.
  4169  
  4170  // `fd_set' type and related macros, and `select'/`pselect' declarations.
  4171  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  4172  //    This file is part of the GNU C Library.
  4173  //
  4174  //    The GNU C Library is free software; you can redistribute it and/or
  4175  //    modify it under the terms of the GNU Lesser General Public
  4176  //    License as published by the Free Software Foundation; either
  4177  //    version 2.1 of the License, or (at your option) any later version.
  4178  //
  4179  //    The GNU C Library is distributed in the hope that it will be useful,
  4180  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4181  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4182  //    Lesser General Public License for more details.
  4183  //
  4184  //    You should have received a copy of the GNU Lesser General Public
  4185  //    License along with the GNU C Library; if not, see
  4186  //    <https://www.gnu.org/licenses/>.
  4187  
  4188  //	POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  4189  
  4190  // Macros for converting between `struct timeval' and `struct timespec'.
  4191  
  4192  // Structure crudely representing a timezone.
  4193  //    This is obsolete and should never be used.
  4194  type Timezone = struct {
  4195  	Ftz_minuteswest int32
  4196  	Ftz_dsttime     int32
  4197  } /* time.h:52:1 */
  4198  
  4199  // Type of the second argument to `getitimer' and
  4200  //    the second and third arguments `setitimer'.
  4201  type Itimerval = struct {
  4202  	Fit_interval struct {
  4203  		Ftv_sec  X__time_t
  4204  		Ftv_usec X__suseconds_t
  4205  	}
  4206  	Fit_value struct {
  4207  		Ftv_sec  X__time_t
  4208  		Ftv_usec X__suseconds_t
  4209  	}
  4210  } /* time.h:105:1 */
  4211  
  4212  // Use the nicer parameter type only in GNU mode and not for C++ since the
  4213  //    strict C++ rules prevent the automatic promotion.
  4214  type X__itimer_which_t = uint32 /* time.h:116:29 */
  4215  
  4216  // Convenience macros for operations on timevals.
  4217  //    NOTE: `timercmp' does not work for >= or <=.
  4218  
  4219  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  4220  //    This file is part of the GNU C Library.
  4221  //
  4222  //    The GNU C Library is free software; you can redistribute it and/or
  4223  //    modify it under the terms of the GNU Lesser General Public
  4224  //    License as published by the Free Software Foundation; either
  4225  //    version 2.1 of the License, or (at your option) any later version.
  4226  //
  4227  //    The GNU C Library is distributed in the hope that it will be useful,
  4228  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4229  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4230  //    Lesser General Public License for more details.
  4231  //
  4232  //    You should have received a copy of the GNU Lesser General Public
  4233  //    License along with the GNU C Library; if not, see
  4234  //    <https://www.gnu.org/licenses/>.
  4235  
  4236  //	ISO C99 Standard: 7.23 Date and time	<time.h>
  4237  
  4238  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  4239  //    This file is part of the GNU C Library.
  4240  //
  4241  //    The GNU C Library is free software; you can redistribute it and/or
  4242  //    modify it under the terms of the GNU Lesser General Public
  4243  //    License as published by the Free Software Foundation; either
  4244  //    version 2.1 of the License, or (at your option) any later version.
  4245  //
  4246  //    The GNU C Library is distributed in the hope that it will be useful,
  4247  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4248  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4249  //    Lesser General Public License for more details.
  4250  //
  4251  //    You should have received a copy of the GNU Lesser General Public
  4252  //    License along with the GNU C Library; if not, see
  4253  //    <https://www.gnu.org/licenses/>.
  4254  
  4255  // Copyright (C) 1989-2020 Free Software Foundation, Inc.
  4256  //
  4257  // This file is part of GCC.
  4258  //
  4259  // GCC is free software; you can redistribute it and/or modify
  4260  // it under the terms of the GNU General Public License as published by
  4261  // the Free Software Foundation; either version 3, or (at your option)
  4262  // any later version.
  4263  //
  4264  // GCC is distributed in the hope that it will be useful,
  4265  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  4266  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4267  // GNU General Public License for more details.
  4268  //
  4269  // Under Section 7 of GPL version 3, you are granted additional
  4270  // permissions described in the GCC Runtime Library Exception, version
  4271  // 3.1, as published by the Free Software Foundation.
  4272  //
  4273  // You should have received a copy of the GNU General Public License and
  4274  // a copy of the GCC Runtime Library Exception along with this program;
  4275  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  4276  // <http://www.gnu.org/licenses/>.
  4277  
  4278  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  4279  
  4280  // Any one of these symbols __need_* means that GNU libc
  4281  //    wants us just to define one data type.  So don't define
  4282  //    the symbols that indicate this file's entire job has been done.
  4283  
  4284  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  4285  //    There's no way to win with the other order!  Sun lossage.
  4286  
  4287  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  4288  //    Just ignore it.
  4289  
  4290  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  4291  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  4292  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  4293  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  4294  //    If we find that the macros are still defined at this point, we must
  4295  //    invoke them so that the type is defined as expected.
  4296  
  4297  // In case nobody has defined these types, but we aren't running under
  4298  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  4299  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  4300  //    parts of GCC is compiled by an older compiler, that actually
  4301  //    include gstddef.h, such as collect2.
  4302  
  4303  // Signed type of difference of two pointers.
  4304  
  4305  // Define this type if we are doing the whole job,
  4306  //    or if we want this type in particular.
  4307  
  4308  // Unsigned type of `sizeof' something.
  4309  
  4310  // Define this type if we are doing the whole job,
  4311  //    or if we want this type in particular.
  4312  
  4313  // Wide character type.
  4314  //    Locale-writers should change this as necessary to
  4315  //    be big enough to hold unique values not between 0 and 127,
  4316  //    and not (wchar_t) -1, for each defined multibyte character.
  4317  
  4318  // Define this type if we are doing the whole job,
  4319  //    or if we want this type in particular.
  4320  
  4321  // A null pointer constant.
  4322  
  4323  // This defines CLOCKS_PER_SEC, which is the number of processor clock
  4324  //    ticks per second, and possibly a number of other constants.
  4325  // System-dependent timing definitions.  Linux version.
  4326  //    Copyright (C) 1996-2020 Free Software Foundation, Inc.
  4327  //    This file is part of the GNU C Library.
  4328  //
  4329  //    The GNU C Library is free software; you can redistribute it and/or
  4330  //    modify it under the terms of the GNU Lesser General Public
  4331  //    License as published by the Free Software Foundation; either
  4332  //    version 2.1 of the License, or (at your option) any later version.
  4333  //
  4334  //    The GNU C Library is distributed in the hope that it will be useful,
  4335  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4336  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4337  //    Lesser General Public License for more details.
  4338  //
  4339  //    You should have received a copy of the GNU Lesser General Public
  4340  //    License along with the GNU C Library; if not, see
  4341  //    <https://www.gnu.org/licenses/>.
  4342  
  4343  // Never include this file directly; use <time.h> instead.
  4344  
  4345  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4346  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  4347  //    This file is part of the GNU C Library.
  4348  //
  4349  //    The GNU C Library is free software; you can redistribute it and/or
  4350  //    modify it under the terms of the GNU Lesser General Public
  4351  //    License as published by the Free Software Foundation; either
  4352  //    version 2.1 of the License, or (at your option) any later version.
  4353  //
  4354  //    The GNU C Library is distributed in the hope that it will be useful,
  4355  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4356  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4357  //    Lesser General Public License for more details.
  4358  //
  4359  //    You should have received a copy of the GNU Lesser General Public
  4360  //    License along with the GNU C Library; if not, see
  4361  //    <https://www.gnu.org/licenses/>.
  4362  
  4363  // Never include this file directly; use <sys/types.h> instead.
  4364  
  4365  // ISO/IEC 9899:1999 7.23.1: Components of time
  4366  //    The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
  4367  //    the number per second of the value returned by the `clock' function.
  4368  // CAE XSH, Issue 4, Version 2: <time.h>
  4369  //    The value of CLOCKS_PER_SEC is required to be 1 million on all
  4370  //    XSI-conformant systems.
  4371  
  4372  // Identifier for system-wide realtime clock.
  4373  // Monotonic system-wide clock.
  4374  // High-resolution timer from the CPU.
  4375  // Thread-specific CPU-time clock.
  4376  // Monotonic system-wide clock, not adjusted for frequency scaling.
  4377  // Identifier for system-wide realtime clock, updated only on ticks.
  4378  // Monotonic system-wide clock, updated only on ticks.
  4379  // Monotonic system-wide clock that includes time spent in suspension.
  4380  // Like CLOCK_REALTIME but also wakes suspended system.
  4381  // Like CLOCK_BOOTTIME but also wakes suspended system.
  4382  // Like CLOCK_REALTIME but in International Atomic Time.
  4383  
  4384  // Flag to indicate time is absolute.
  4385  
  4386  // Copyright (C) 1995-2020 Free Software Foundation, Inc.
  4387  //    This file is part of the GNU C Library.
  4388  //
  4389  //    The GNU C Library is free software; you can redistribute it and/or
  4390  //    modify it under the terms of the GNU Lesser General Public
  4391  //    License as published by the Free Software Foundation; either
  4392  //    version 2.1 of the License, or (at your option) any later version.
  4393  //
  4394  //    The GNU C Library is distributed in the hope that it will be useful,
  4395  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4396  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4397  //    Lesser General Public License for more details.
  4398  //
  4399  //    You should have received a copy of the GNU Lesser General Public
  4400  //    License along with the GNU C Library; if not, see
  4401  //    <https://www.gnu.org/licenses/>.
  4402  
  4403  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4404  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  4405  //    This file is part of the GNU C Library.
  4406  //
  4407  //    The GNU C Library is free software; you can redistribute it and/or
  4408  //    modify it under the terms of the GNU Lesser General Public
  4409  //    License as published by the Free Software Foundation; either
  4410  //    version 2.1 of the License, or (at your option) any later version.
  4411  //
  4412  //    The GNU C Library is distributed in the hope that it will be useful,
  4413  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4414  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4415  //    Lesser General Public License for more details.
  4416  //
  4417  //    You should have received a copy of the GNU Lesser General Public
  4418  //    License along with the GNU C Library; if not, see
  4419  //    <https://www.gnu.org/licenses/>.
  4420  
  4421  // Never include this file directly; use <sys/types.h> instead.
  4422  
  4423  // These definitions from linux/timex.h as of 3.18.
  4424  
  4425  type Timex = struct {
  4426  	Fmodes     uint32
  4427  	Foffset    X__syscall_slong_t
  4428  	Ffreq      X__syscall_slong_t
  4429  	Fmaxerror  X__syscall_slong_t
  4430  	Festerror  X__syscall_slong_t
  4431  	Fstatus    int32
  4432  	Fconstant  X__syscall_slong_t
  4433  	Fprecision X__syscall_slong_t
  4434  	Ftolerance X__syscall_slong_t
  4435  	Ftime      struct {
  4436  		Ftv_sec  X__time_t
  4437  		Ftv_usec X__suseconds_t
  4438  	}
  4439  	Ftick    X__syscall_slong_t
  4440  	Fppsfreq X__syscall_slong_t
  4441  	Fjitter  X__syscall_slong_t
  4442  	Fshift   int32
  4443  	Fstabil  X__syscall_slong_t
  4444  	Fjitcnt  X__syscall_slong_t
  4445  	Fcalcnt  X__syscall_slong_t
  4446  	Ferrcnt  X__syscall_slong_t
  4447  	Fstbcnt  X__syscall_slong_t
  4448  	Ftai     int32
  4449  	__84     uint32 /* int : 32 */
  4450  	__88     uint32 /* int : 32 */
  4451  	__92     uint32 /* int : 32 */
  4452  	__96     uint32 /* int : 32 */
  4453  	__100    uint32 /* int : 32 */
  4454  	__104    uint32 /* int : 32 */
  4455  	__108    uint32 /* int : 32 */
  4456  	__112    uint32 /* int : 32 */
  4457  	__116    uint32 /* int : 32 */
  4458  	__120    uint32 /* int : 32 */
  4459  	__124    uint32 /* int : 32 */
  4460  } /* timex.h:26:1 */
  4461  
  4462  // Many of the typedefs and structs whose official home is this header
  4463  //    may also need to be defined by other headers.
  4464  
  4465  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4466  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  4467  //    This file is part of the GNU C Library.
  4468  //
  4469  //    The GNU C Library is free software; you can redistribute it and/or
  4470  //    modify it under the terms of the GNU Lesser General Public
  4471  //    License as published by the Free Software Foundation; either
  4472  //    version 2.1 of the License, or (at your option) any later version.
  4473  //
  4474  //    The GNU C Library is distributed in the hope that it will be useful,
  4475  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4476  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4477  //    Lesser General Public License for more details.
  4478  //
  4479  //    You should have received a copy of the GNU Lesser General Public
  4480  //    License along with the GNU C Library; if not, see
  4481  //    <https://www.gnu.org/licenses/>.
  4482  
  4483  // Never include this file directly; use <sys/types.h> instead.
  4484  
  4485  // ISO C `broken-down time' structure.
  4486  type Tm = struct {
  4487  	Ftm_sec    int32
  4488  	Ftm_min    int32
  4489  	Ftm_hour   int32
  4490  	Ftm_mday   int32
  4491  	Ftm_mon    int32
  4492  	Ftm_year   int32
  4493  	Ftm_wday   int32
  4494  	Ftm_yday   int32
  4495  	Ftm_isdst  int32
  4496  	Ftm_gmtoff int32
  4497  	Ftm_zone   uintptr
  4498  } /* struct_tm.h:7:1 */
  4499  
  4500  // NB: Include guard matches what <linux/time.h> uses.
  4501  
  4502  // bits/types.h -- definitions of __*_t types underlying *_t types.
  4503  //    Copyright (C) 2002-2020 Free Software Foundation, Inc.
  4504  //    This file is part of the GNU C Library.
  4505  //
  4506  //    The GNU C Library is free software; you can redistribute it and/or
  4507  //    modify it under the terms of the GNU Lesser General Public
  4508  //    License as published by the Free Software Foundation; either
  4509  //    version 2.1 of the License, or (at your option) any later version.
  4510  //
  4511  //    The GNU C Library is distributed in the hope that it will be useful,
  4512  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4513  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4514  //    Lesser General Public License for more details.
  4515  //
  4516  //    You should have received a copy of the GNU Lesser General Public
  4517  //    License along with the GNU C Library; if not, see
  4518  //    <https://www.gnu.org/licenses/>.
  4519  
  4520  // Never include this file directly; use <sys/types.h> instead.
  4521  
  4522  // NB: Include guard matches what <linux/time.h> uses.
  4523  
  4524  // POSIX.1b structure for timer start values and intervals.
  4525  type Itimerspec = struct {
  4526  	Fit_interval struct {
  4527  		Ftv_sec  X__time_t
  4528  		Ftv_nsec X__syscall_slong_t
  4529  	}
  4530  	Fit_value struct {
  4531  		Ftv_sec  X__time_t
  4532  		Ftv_nsec X__syscall_slong_t
  4533  	}
  4534  } /* struct_itimerspec.h:8:1 */
  4535  
  4536  // Floating-point inline functions for stdlib.h.
  4537  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
  4538  //    This file is part of the GNU C Library.
  4539  //
  4540  //    The GNU C Library is free software; you can redistribute it and/or
  4541  //    modify it under the terms of the GNU Lesser General Public
  4542  //    License as published by the Free Software Foundation; either
  4543  //    version 2.1 of the License, or (at your option) any later version.
  4544  //
  4545  //    The GNU C Library is distributed in the hope that it will be useful,
  4546  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4547  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4548  //    Lesser General Public License for more details.
  4549  //
  4550  //    You should have received a copy of the GNU Lesser General Public
  4551  //    License along with the GNU C Library; if not, see
  4552  //    <https://www.gnu.org/licenses/>.
  4553  
  4554  // Define some macros helping to catch buffer overflows.
  4555  
  4556  var buf uintptr = uintptr(0) /* AuFileName.c:35:13 */
  4557  
  4558  func free_filename_buffer(tls *libc.TLS) { /* AuFileName.c:38:1: */
  4559  	libc.Xfree(tls, buf)
  4560  	buf = uintptr(0)
  4561  }
  4562  
  4563  func XXauFileName(tls *libc.TLS) uintptr { /* AuFileName.c:44:6: */
  4564  	bp := tls.Alloc(16)
  4565  	defer tls.Free(16)
  4566  
  4567  	var slashDotXauthority uintptr = ts /* "/.Xauthority" */
  4568  	var name uintptr
  4569  	var size Size_t
  4570  
  4571  	if libc.AssignUintptr(&name, libc.Xgetenv(tls, ts+13 /* "XAUTHORITY" */)) != 0 {
  4572  		return name
  4573  	}
  4574  	name = libc.Xgetenv(tls, ts+24 /* "HOME" */)
  4575  	if !(name != 0) {
  4576  		return uintptr(0)
  4577  	}
  4578  	size = ((libc.Xstrlen(tls, name) + libc.Xstrlen(tls, (slashDotXauthority+1))) + Size_t(2))
  4579  	if (size > bsize) || (buf == (uintptr(0))) {
  4580  		libc.Xfree(tls, buf)
  4581  		if size > Size_t(0) {
  4582  		} else {
  4583  			libc.X__assert_fail(tls, ts+29 /* "size > 0" */, ts+38 /* "AuFileName.c" */, uint32(72), uintptr(unsafe.Pointer(&__func__)))
  4584  		}
  4585  		buf = libc.Xmalloc(tls, size)
  4586  		if !(buf != 0) {
  4587  			bsize = Size_t(0)
  4588  			return uintptr(0)
  4589  		}
  4590  
  4591  		if !(atexit_registered != 0) {
  4592  			libc.Xatexit(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) }{free_filename_buffer})))
  4593  			atexit_registered = 1
  4594  		}
  4595  
  4596  		bsize = size
  4597  	}
  4598  	libc.Xsnprintf(tls, buf, bsize, ts+51 /* "%s%s" */, libc.VaList(bp, name,
  4599  		(slashDotXauthority+uintptr((func() int32 {
  4600  			if (int32(*(*int8)(unsafe.Pointer(name))) == '/') && (int32(*(*int8)(unsafe.Pointer(name + 1))) == 0) {
  4601  				return 1
  4602  			}
  4603  			return 0
  4604  		}())))))
  4605  	return buf
  4606  }
  4607  
  4608  var __func__ = *(*[12]int8)(unsafe.Pointer(ts + 56 /* "XauFileName" */)) /* AuFileName.c:46:1 */
  4609  var bsize Size_t                                                         /* AuFileName.c:49:19: */
  4610  var atexit_registered int32 = 0                                          /* AuFileName.c:50:16 */
  4611  
  4612  // define X_GETTIMEOFDAY macro, a portable gettimeofday()
  4613  
  4614  // use POSIX name for signal
  4615  
  4616  // Copyright 1997 Metro Link Incorporated
  4617  //
  4618  //                           All Rights Reserved
  4619  //
  4620  // Permission to use, copy, modify, distribute, and sell this software and its
  4621  // documentation for any purpose is hereby granted without fee, provided that
  4622  // the above copyright notice appear in all copies and that both that
  4623  // copyright notice and this permission notice appear in supporting
  4624  // documentation, and that the names of the above listed copyright holder(s)
  4625  // not be used in advertising or publicity pertaining to distribution of
  4626  // the software without specific, written prior permission.  The above listed
  4627  // copyright holder(s) make(s) no representations about the suitability of
  4628  // this software for any purpose.  It is provided "as is" without express or
  4629  // implied warranty.
  4630  //
  4631  // THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
  4632  // TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  4633  // AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
  4634  // LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  4635  // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  4636  // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  4637  // OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  4638  
  4639  // Determine the machine's byte order.
  4640  
  4641  // See if it is set in the imake config first
  4642  
  4643  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  4644  //    This file is part of the GNU C Library.
  4645  //
  4646  //    The GNU C Library is free software; you can redistribute it and/or
  4647  //    modify it under the terms of the GNU Lesser General Public
  4648  //    License as published by the Free Software Foundation; either
  4649  //    version 2.1 of the License, or (at your option) any later version.
  4650  //
  4651  //    The GNU C Library is distributed in the hope that it will be useful,
  4652  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4653  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4654  //    Lesser General Public License for more details.
  4655  //
  4656  //    You should have received a copy of the GNU Lesser General Public
  4657  //    License along with the GNU C Library; if not, see
  4658  //    <https://www.gnu.org/licenses/>.
  4659  
  4660  // 'endian.h' might have been included before 'Xarch.h'
  4661  
  4662  func XXauGetAuthByAddr(tls *libc.TLS, family uint16, address_length uint16, address uintptr, number_length uint16, number uintptr, name_length uint16, name uintptr) uintptr { /* AuGetAddr.c:35:7: */
  4663  	var auth_file uintptr
  4664  	var auth_name uintptr
  4665  	var entry uintptr
  4666  
  4667  	auth_name = XXauFileName(tls)
  4668  	if !(auth_name != 0) {
  4669  		return uintptr(0)
  4670  	}
  4671  	if libc.Xaccess(tls, auth_name, R_OK) != 0 { // checks REAL id
  4672  		return uintptr(0)
  4673  	}
  4674  	auth_file = libc.Xfopen(tls, auth_name, ts+68 /* "rb" */)
  4675  	if !(auth_file != 0) {
  4676  		return uintptr(0)
  4677  	}
  4678  	for {
  4679  		entry = XXauReadAuth(tls, auth_file)
  4680  		if !(entry != 0) {
  4681  			break
  4682  		}
  4683  		// Match when:
  4684  		//   either family or entry->family are FamilyWild or
  4685  		//    family and entry->family are the same and
  4686  		//     address and entry->address are the same
  4687  		//  and
  4688  		//   either number or entry->number are empty or
  4689  		//    number and entry->number are the same
  4690  		//  and
  4691  		//   either name or entry->name are empty or
  4692  		//    name and entry->name are the same
  4693  
  4694  		if ((((int32(family) == (65535)) || (int32((*Xauth)(unsafe.Pointer(entry)).Ffamily) == (65535))) || (((int32((*Xauth)(unsafe.Pointer(entry)).Ffamily) == int32(family)) && (int32(address_length) == int32((*Xauth)(unsafe.Pointer(entry)).Faddress_length))) && (libc.Xmemcmp(tls, (*Xauth)(unsafe.Pointer(entry)).Faddress, address, uint32(address_length)) == 0))) && (((int32(number_length) == 0) || (int32((*Xauth)(unsafe.Pointer(entry)).Fnumber_length) == 0)) || ((int32(number_length) == int32((*Xauth)(unsafe.Pointer(entry)).Fnumber_length)) && (libc.Xmemcmp(tls, (*Xauth)(unsafe.Pointer(entry)).Fnumber, number, uint32(number_length)) == 0)))) && (((int32(name_length) == 0) || (int32((*Xauth)(unsafe.Pointer(entry)).Fname_length) == 0)) || ((int32((*Xauth)(unsafe.Pointer(entry)).Fname_length) == int32(name_length)) && (libc.Xmemcmp(tls, (*Xauth)(unsafe.Pointer(entry)).Fname, name, uint32(name_length)) == 0))) {
  4695  			break
  4696  		}
  4697  		XXauDisposeAuth(tls, entry)
  4698  	}
  4699  	libc.Xfclose(tls, auth_file)
  4700  	return entry
  4701  }
  4702  
  4703  // define X_GETTIMEOFDAY macro, a portable gettimeofday()
  4704  
  4705  // use POSIX name for signal
  4706  
  4707  // Copyright 1997 Metro Link Incorporated
  4708  //
  4709  //                           All Rights Reserved
  4710  //
  4711  // Permission to use, copy, modify, distribute, and sell this software and its
  4712  // documentation for any purpose is hereby granted without fee, provided that
  4713  // the above copyright notice appear in all copies and that both that
  4714  // copyright notice and this permission notice appear in supporting
  4715  // documentation, and that the names of the above listed copyright holder(s)
  4716  // not be used in advertising or publicity pertaining to distribution of
  4717  // the software without specific, written prior permission.  The above listed
  4718  // copyright holder(s) make(s) no representations about the suitability of
  4719  // this software for any purpose.  It is provided "as is" without express or
  4720  // implied warranty.
  4721  //
  4722  // THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
  4723  // TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  4724  // AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
  4725  // LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  4726  // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  4727  // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  4728  // OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  4729  
  4730  // Determine the machine's byte order.
  4731  
  4732  // See if it is set in the imake config first
  4733  
  4734  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  4735  //    This file is part of the GNU C Library.
  4736  //
  4737  //    The GNU C Library is free software; you can redistribute it and/or
  4738  //    modify it under the terms of the GNU Lesser General Public
  4739  //    License as published by the Free Software Foundation; either
  4740  //    version 2.1 of the License, or (at your option) any later version.
  4741  //
  4742  //    The GNU C Library is distributed in the hope that it will be useful,
  4743  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4744  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4745  //    Lesser General Public License for more details.
  4746  //
  4747  //    You should have received a copy of the GNU Lesser General Public
  4748  //    License along with the GNU C Library; if not, see
  4749  //    <https://www.gnu.org/licenses/>.
  4750  
  4751  // 'endian.h' might have been included before 'Xarch.h'
  4752  
  4753  func XXauGetBestAuthByAddr(tls *libc.TLS, family uint16, address_length uint16, address uintptr, number_length uint16, number uintptr, types_length int32, types1 uintptr, type_lengths uintptr) uintptr { /* AuGetBest.c:43:7: */
  4754  	var auth_file uintptr
  4755  	var auth_name uintptr
  4756  	var entry uintptr
  4757  	var best uintptr
  4758  	var best_type int32
  4759  	var type1 int32
  4760  
  4761  	auth_name = XXauFileName(tls)
  4762  	if !(auth_name != 0) {
  4763  		return uintptr(0)
  4764  	}
  4765  	if libc.Xaccess(tls, auth_name, R_OK) != 0 { // checks REAL id
  4766  		return uintptr(0)
  4767  	}
  4768  	auth_file = libc.Xfopen(tls, auth_name, ts+68 /* "rb" */)
  4769  	if !(auth_file != 0) {
  4770  		return uintptr(0)
  4771  	}
  4772  
  4773  	best = uintptr(0)
  4774  	best_type = types_length
  4775  	for {
  4776  		entry = XXauReadAuth(tls, auth_file)
  4777  		if !(entry != 0) {
  4778  			break
  4779  		}
  4780  		// Match when:
  4781  		//   either family or entry->family are FamilyWild or
  4782  		//    family and entry->family are the same and
  4783  		//     address and entry->address are the same
  4784  		//  and
  4785  		//   either number or entry->number are empty or
  4786  		//    number and entry->number are the same
  4787  		//  and
  4788  		//   either name or entry->name are empty or
  4789  		//    name and entry->name are the same
  4790  
  4791  		if (((int32(family) == (65535)) || (int32((*Xauth)(unsafe.Pointer(entry)).Ffamily) == (65535))) || ((int32((*Xauth)(unsafe.Pointer(entry)).Ffamily) == int32(family)) && ((int32(address_length) == int32((*Xauth)(unsafe.Pointer(entry)).Faddress_length)) && (libc.Xmemcmp(tls, (*Xauth)(unsafe.Pointer(entry)).Faddress, address, uint32(address_length)) == 0)))) && (((int32(number_length) == 0) || (int32((*Xauth)(unsafe.Pointer(entry)).Fnumber_length) == 0)) || ((int32(number_length) == int32((*Xauth)(unsafe.Pointer(entry)).Fnumber_length)) && (libc.Xmemcmp(tls, (*Xauth)(unsafe.Pointer(entry)).Fnumber, number, uint32(number_length)) == 0))) {
  4792  			if best_type == 0 {
  4793  				best = entry
  4794  				break
  4795  			}
  4796  			for type1 = 0; type1 < best_type; type1++ {
  4797  				if (*(*int32)(unsafe.Pointer(type_lengths + uintptr(type1)*4)) == int32((*Xauth)(unsafe.Pointer(entry)).Fname_length)) && !(libc.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(types1 + uintptr(type1)*4)), (*Xauth)(unsafe.Pointer(entry)).Fname, uint32((*Xauth)(unsafe.Pointer(entry)).Fname_length)) != 0) {
  4798  					break
  4799  				}
  4800  			}
  4801  			if type1 < best_type {
  4802  				if best != 0 {
  4803  					XXauDisposeAuth(tls, best)
  4804  				}
  4805  				best = entry
  4806  				best_type = type1
  4807  				if type1 == 0 {
  4808  					break
  4809  				}
  4810  				continue
  4811  			}
  4812  		}
  4813  		XXauDisposeAuth(tls, entry)
  4814  	}
  4815  	libc.Xfclose(tls, auth_file)
  4816  	return best
  4817  }
  4818  
  4819  // statx-related definitions and declarations.  Linux version.
  4820  //    Copyright (C) 2018-2020 Free Software Foundation, Inc.
  4821  //    This file is part of the GNU C Library.
  4822  //
  4823  //    The GNU C Library is free software; you can redistribute it and/or
  4824  //    modify it under the terms of the GNU Lesser General Public
  4825  //    License as published by the Free Software Foundation; either
  4826  //    version 2.1 of the License, or (at your option) any later version.
  4827  //
  4828  //    The GNU C Library is distributed in the hope that it will be useful,
  4829  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4830  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4831  //    Lesser General Public License for more details.
  4832  //
  4833  //    You should have received a copy of the GNU Lesser General Public
  4834  //    License along with the GNU C Library; if not, see
  4835  //    <https://www.gnu.org/licenses/>.
  4836  
  4837  // This interface is based on <linux/stat.h> in Linux.
  4838  
  4839  // Use the Linux kernel header if available.
  4840  
  4841  // Use "" to work around incorrect macro expansion of the
  4842  //    __has_include argument (GCC PR 80005).
  4843  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4844  
  4845  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4846  
  4847  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4848  // int-ll64 is used everywhere now.
  4849  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4850  // asm-generic/int-ll64.h
  4851  //
  4852  // Integer declarations for architectures which use "long long"
  4853  // for 64-bit types.
  4854  
  4855  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4856  
  4857  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4858  
  4859  // There seems to be no way of detecting this automatically from user
  4860  // space, so 64 bit architectures should override this in their
  4861  // bitsperlong.h. In particular, an architecture that supports
  4862  // both 32 and 64 bit user space must not rely on CONFIG_64BIT
  4863  // to decide it, but rather check a compiler provided macro.
  4864  
  4865  // __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  4866  // header files exported to user space
  4867  
  4868  type X__s8 = int8  /* int-ll64.h:20:25 */
  4869  type X__u8 = uint8 /* int-ll64.h:21:23 */
  4870  
  4871  type X__s16 = int16  /* int-ll64.h:23:26 */
  4872  type X__u16 = uint16 /* int-ll64.h:24:24 */
  4873  
  4874  type X__s32 = int32  /* int-ll64.h:26:24 */
  4875  type X__u32 = uint32 /* int-ll64.h:27:22 */
  4876  
  4877  type X__s64 = int64  /* int-ll64.h:30:44 */
  4878  type X__u64 = uint64 /* int-ll64.h:31:42 */
  4879  
  4880  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4881  
  4882  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4883  
  4884  // This allows for 1024 file descriptors: if NR_OPEN is ever grown
  4885  // beyond that you'll have to change this too. But 1024 fd's seem to be
  4886  // enough even for such "real" unices like OSF/1, so hopefully this is
  4887  // one limit that doesn't have to be changed [again].
  4888  //
  4889  // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  4890  // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  4891  // place for them. Solved by having dummy defines in <sys/time.h>.
  4892  
  4893  // This macro may have been defined in <gnu/types.h>. But we always
  4894  // use the one here.
  4895  
  4896  type X__kernel_fd_set = struct{ Ffds_bits [32]uint32 } /* posix_types.h:27:3 */
  4897  
  4898  // Type of a signal handler.
  4899  type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
  4900  
  4901  // Type of a SYSV IPC key.
  4902  type X__kernel_key_t = int32 /* posix_types.h:33:13 */
  4903  type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
  4904  
  4905  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4906  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4907  
  4908  // This file is generally used by user-level software, so you need to
  4909  // be a little careful about namespace pollution etc.  Also, we cannot
  4910  // assume GCC is being used.
  4911  
  4912  type X__kernel_mode_t = uint16 /* posix_types_32.h:11:24 */
  4913  
  4914  type X__kernel_ipc_pid_t = uint16 /* posix_types_32.h:14:24 */
  4915  
  4916  type X__kernel_uid_t = uint16 /* posix_types_32.h:17:24 */
  4917  type X__kernel_gid_t = uint16 /* posix_types_32.h:18:24 */
  4918  
  4919  type X__kernel_old_dev_t = uint16 /* posix_types_32.h:21:24 */
  4920  
  4921  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4922  
  4923  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  4924  
  4925  // This file is generally used by user-level software, so you need to
  4926  // be a little careful about namespace pollution etc.
  4927  //
  4928  // First the types that are often defined in different ways across
  4929  // architectures, so that you can override them.
  4930  
  4931  type X__kernel_long_t = int32   /* posix_types.h:15:15 */
  4932  type X__kernel_ulong_t = uint32 /* posix_types.h:16:23 */
  4933  
  4934  type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
  4935  
  4936  type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
  4937  
  4938  type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
  4939  
  4940  type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
  4941  
  4942  type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
  4943  type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
  4944  
  4945  type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */
  4946  type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */
  4947  
  4948  // Most 32 bit architectures use "unsigned int" size_t,
  4949  // and all 64 bit architectures use "unsigned long" size_t.
  4950  type X__kernel_size_t = uint32   /* posix_types.h:68:22 */
  4951  type X__kernel_ssize_t = int32   /* posix_types.h:69:14 */
  4952  type X__kernel_ptrdiff_t = int32 /* posix_types.h:70:14 */
  4953  
  4954  type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
  4955  
  4956  // anything below here should be completely generic
  4957  type X__kernel_off_t = X__kernel_long_t      /* posix_types.h:87:25 */
  4958  type X__kernel_loff_t = int64                /* posix_types.h:88:19 */
  4959  type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
  4960  type X__kernel_time_t = X__kernel_long_t     /* posix_types.h:90:25 */
  4961  type X__kernel_time64_t = int64              /* posix_types.h:91:19 */
  4962  type X__kernel_clock_t = X__kernel_long_t    /* posix_types.h:92:25 */
  4963  type X__kernel_timer_t = int32               /* posix_types.h:93:14 */
  4964  type X__kernel_clockid_t = int32             /* posix_types.h:94:14 */
  4965  type X__kernel_caddr_t = uintptr             /* posix_types.h:95:14 */
  4966  type X__kernel_uid16_t = uint16              /* posix_types.h:96:24 */
  4967  type X__kernel_gid16_t = uint16              /* posix_types.h:97:24 */
  4968  
  4969  // Below are truly Linux-specific types that should never collide with
  4970  // any application/library that wants linux/types.h.
  4971  
  4972  type X__le16 = X__u16 /* types.h:24:25 */
  4973  type X__be16 = X__u16 /* types.h:25:25 */
  4974  type X__le32 = X__u32 /* types.h:26:25 */
  4975  type X__be32 = X__u32 /* types.h:27:25 */
  4976  type X__le64 = X__u64 /* types.h:28:25 */
  4977  type X__be64 = X__u64 /* types.h:29:25 */
  4978  
  4979  type X__sum16 = X__u16 /* types.h:31:25 */
  4980  type X__wsum = X__u32  /* types.h:32:25 */
  4981  
  4982  // aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
  4983  // common 32/64-bit compat problems.
  4984  // 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
  4985  // architectures) and to 8-byte boundaries on 64-bit architectures.  The new
  4986  // aligned_64 type enforces 8-byte alignment so that structs containing
  4987  // aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
  4988  // No conversions are necessary between 32-bit user-space and a 64-bit kernel.
  4989  
  4990  type X__poll_t = uint32 /* types.h:47:28 */
  4991  
  4992  // Timestamp structure for the timestamps in struct statx.
  4993  //
  4994  // tv_sec holds the number of seconds before (negative) or after (positive)
  4995  // 00:00:00 1st January 1970 UTC.
  4996  //
  4997  // tv_nsec holds a number of nanoseconds (0..999,999,999) after the tv_sec time.
  4998  //
  4999  // __reserved is held in case we need a yet finer resolution.
  5000  type Statx_timestamp = struct {
  5001  	Ftv_sec     X__s64
  5002  	Ftv_nsec    X__u32
  5003  	F__reserved X__s32
  5004  } /* stat.h:56:1 */
  5005  
  5006  // Structures for the extended file attribute retrieval system call
  5007  // (statx()).
  5008  //
  5009  // The caller passes a mask of what they're specifically interested in as a
  5010  // parameter to statx().  What statx() actually got will be indicated in
  5011  // st_mask upon return.
  5012  //
  5013  // For each bit in the mask argument:
  5014  //
  5015  // - if the datum is not supported:
  5016  //
  5017  //   - the bit will be cleared, and
  5018  //
  5019  //   - the datum will be set to an appropriate fabricated value if one is
  5020  //     available (eg. CIFS can take a default uid and gid), otherwise
  5021  //
  5022  //   - the field will be cleared;
  5023  //
  5024  // - otherwise, if explicitly requested:
  5025  //
  5026  //   - the datum will be synchronised to the server if AT_STATX_FORCE_SYNC is
  5027  //     set or if the datum is considered out of date, and
  5028  //
  5029  //   - the field will be filled in and the bit will be set;
  5030  //
  5031  // - otherwise, if not requested, but available in approximate form without any
  5032  //   effort, it will be filled in anyway, and the bit will be set upon return
  5033  //   (it might not be up to date, however, and no attempt will be made to
  5034  //   synchronise the internal state first);
  5035  //
  5036  // - otherwise the field and the bit will be cleared before returning.
  5037  //
  5038  // Items in STATX_BASIC_STATS may be marked unavailable on return, but they
  5039  // will have values installed for compatibility purposes so that stat() and
  5040  // co. can be emulated in userspace.
  5041  type Statx = struct {
  5042  	Fstx_mask            X__u32
  5043  	Fstx_blksize         X__u32
  5044  	Fstx_attributes      X__u64
  5045  	Fstx_nlink           X__u32
  5046  	Fstx_uid             X__u32
  5047  	Fstx_gid             X__u32
  5048  	Fstx_mode            X__u16
  5049  	F__spare0            [1]X__u16
  5050  	Fstx_ino             X__u64
  5051  	Fstx_size            X__u64
  5052  	Fstx_blocks          X__u64
  5053  	Fstx_attributes_mask X__u64
  5054  	Fstx_atime           struct {
  5055  		Ftv_sec     X__s64
  5056  		Ftv_nsec    X__u32
  5057  		F__reserved X__s32
  5058  	}
  5059  	Fstx_btime struct {
  5060  		Ftv_sec     X__s64
  5061  		Ftv_nsec    X__u32
  5062  		F__reserved X__s32
  5063  	}
  5064  	Fstx_ctime struct {
  5065  		Ftv_sec     X__s64
  5066  		Ftv_nsec    X__u32
  5067  		F__reserved X__s32
  5068  	}
  5069  	Fstx_mtime struct {
  5070  		Ftv_sec     X__s64
  5071  		Ftv_nsec    X__u32
  5072  		F__reserved X__s32
  5073  	}
  5074  	Fstx_rdev_major X__u32
  5075  	Fstx_rdev_minor X__u32
  5076  	Fstx_dev_major  X__u32
  5077  	Fstx_dev_minor  X__u32
  5078  	Fstx_mnt_id     X__u64
  5079  	F__spare2       X__u64
  5080  	F__spare3       [12]X__u64
  5081  } /* stat.h:99:1 */
  5082  
  5083  // Define error_t.
  5084  //    Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5085  //    This file is part of the GNU C Library.
  5086  //
  5087  //    The GNU C Library is free software; you can redistribute it and/or
  5088  //    modify it under the terms of the GNU Lesser General Public
  5089  //    License as published by the Free Software Foundation; either
  5090  //    version 2.1 of the License, or (at your option) any later version.
  5091  //
  5092  //    The GNU C Library is distributed in the hope that it will be useful,
  5093  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5094  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  5095  //    Lesser General Public License for more details.
  5096  //
  5097  //    You should have received a copy of the GNU Lesser General Public
  5098  //    License along with the GNU C Library; if not, see
  5099  //    <https://www.gnu.org/licenses/>.
  5100  
  5101  type Error_t = int32 /* error_t.h:22:13 */
  5102  
  5103  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5104  //    This file is part of the GNU C Library.
  5105  //
  5106  //    The GNU C Library is free software; you can redistribute it and/or
  5107  //    modify it under the terms of the GNU Lesser General Public
  5108  //    License as published by the Free Software Foundation; either
  5109  //    version 2.1 of the License, or (at your option) any later version.
  5110  //
  5111  //    The GNU C Library is distributed in the hope that it will be useful,
  5112  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5113  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  5114  //    Lesser General Public License for more details.
  5115  //
  5116  //    You should have received a copy of the GNU Lesser General Public
  5117  //    License along with the GNU C Library; if not, see
  5118  //    <https://www.gnu.org/licenses/>.
  5119  
  5120  //	ISO C99 Standard: 7.23 Date and time	<time.h>
  5121  
  5122  // Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5123  //    This file is part of the GNU C Library.
  5124  //
  5125  //    The GNU C Library is free software; you can redistribute it and/or
  5126  //    modify it under the terms of the GNU Lesser General Public
  5127  //    License as published by the Free Software Foundation; either
  5128  //    version 2.1 of the License, or (at your option) any later version.
  5129  //
  5130  //    The GNU C Library is distributed in the hope that it will be useful,
  5131  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5132  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  5133  //    Lesser General Public License for more details.
  5134  //
  5135  //    You should have received a copy of the GNU Lesser General Public
  5136  //    License along with the GNU C Library; if not, see
  5137  //    <https://www.gnu.org/licenses/>.
  5138  
  5139  //	POSIX Standard: 2.10 Symbolic Constants		<unistd.h>
  5140  
  5141  func XXauLockAuth(tls *libc.TLS, file_name uintptr, retries int32, timeout int32, dead int32) int32 { /* AuLock.c:45:1: */
  5142  	bp := tls.Alloc(2172)
  5143  	defer tls.Free(2172)
  5144  
  5145  	// var creat_name [1025]int8 at bp+24, 1025
  5146  
  5147  	// var link_name [1025]int8 at bp+1049, 1025
  5148  
  5149  	// var statb Stat at bp+2076, 96
  5150  
  5151  	var now Time_t
  5152  	var creat_fd int32 = -1
  5153  
  5154  	if libc.Xstrlen(tls, file_name) > Size_t(1022) {
  5155  		return LOCK_ERROR
  5156  	}
  5157  	libc.Xsnprintf(tls, bp+24 /* &creat_name[0] */, uint32(unsafe.Sizeof([1025]int8{})), ts+71 /* "%s-c" */, libc.VaList(bp, file_name))
  5158  	libc.Xsnprintf(tls, bp+1049 /* &link_name[0] */, uint32(unsafe.Sizeof([1025]int8{})), ts+76 /* "%s-l" */, libc.VaList(bp+8, file_name))
  5159  	if libc.Xstat(tls, bp+24 /* &creat_name[0] */, bp+2076 /* &statb */) != -1 {
  5160  		now = libc.Xtime(tls, uintptr(0))
  5161  		// NFS may cause ctime to be before now, special
  5162  		// case a 0 deadtime to force lock removal
  5163  		if (dead == 0) || ((now - (*Stat)(unsafe.Pointer(bp+2076 /* &statb */)).Fst_ctim.Ftv_sec) > dead) {
  5164  			libc.Xremove(tls, bp+24 /* &creat_name[0] */)
  5165  			libc.Xremove(tls, bp+1049 /* &link_name[0] */)
  5166  		}
  5167  	}
  5168  
  5169  	for retries > 0 {
  5170  		if creat_fd == -1 {
  5171  			creat_fd = libc.Xopen(tls, bp+24 /* &creat_name[0] */, ((O_WRONLY | O_CREAT) | O_EXCL), libc.VaList(bp+16, 0600))
  5172  			if creat_fd == -1 {
  5173  				if ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) != EACCES) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) != EEXIST) {
  5174  					return LOCK_ERROR
  5175  				}
  5176  			} else {
  5177  				libc.Xclose(tls, creat_fd)
  5178  			}
  5179  		}
  5180  		if creat_fd != -1 {
  5181  			// The file system may not support hard links, and pathconf should tell us that.
  5182  			if 1 == libc.Xpathconf(tls, bp+24 /* &creat_name[0] */, X_PC_LINK_MAX) {
  5183  				if -1 == libc.Xrename(tls, bp+24 /* &creat_name[0] */, bp+1049 /* &link_name[0] */) {
  5184  					// Is this good enough?  Perhaps we should retry.  TEST
  5185  					return LOCK_ERROR
  5186  				} else {
  5187  					return LOCK_SUCCESS
  5188  				}
  5189  			} else {
  5190  				if libc.Xlink(tls, bp+24 /* &creat_name[0] */, bp+1049 /* &link_name[0] */) != -1 {
  5191  					return LOCK_SUCCESS
  5192  				}
  5193  				if (*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == ENOENT {
  5194  					creat_fd = -1 // force re-creat next time around
  5195  					continue
  5196  				}
  5197  				if (*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) != EEXIST {
  5198  					return LOCK_ERROR
  5199  				}
  5200  			}
  5201  		}
  5202  		libc.Xsleep(tls, uint32(timeout))
  5203  		retries--
  5204  	}
  5205  	return LOCK_TIMEOUT
  5206  }
  5207  
  5208  // Floating-point inline functions for stdlib.h.
  5209  //    Copyright (C) 2012-2020 Free Software Foundation, Inc.
  5210  //    This file is part of the GNU C Library.
  5211  //
  5212  //    The GNU C Library is free software; you can redistribute it and/or
  5213  //    modify it under the terms of the GNU Lesser General Public
  5214  //    License as published by the Free Software Foundation; either
  5215  //    version 2.1 of the License, or (at your option) any later version.
  5216  //
  5217  //    The GNU C Library is distributed in the hope that it will be useful,
  5218  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5219  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  5220  //    Lesser General Public License for more details.
  5221  //
  5222  //    You should have received a copy of the GNU Lesser General Public
  5223  //    License along with the GNU C Library; if not, see
  5224  //    <https://www.gnu.org/licenses/>.
  5225  
  5226  // Define some macros helping to catch buffer overflows.
  5227  
  5228  func read_short(tls *libc.TLS, shortp uintptr, file uintptr) int32 { /* AuRead.c:34:1: */
  5229  	bp := tls.Alloc(2)
  5230  	defer tls.Free(2)
  5231  
  5232  	// var file_short [2]uint8 at bp, 2
  5233  
  5234  	if libc.Xfread(tls, bp /* file_short */, uint32(unsafe.Sizeof([2]uint8{})), uint32(1), file) != Size_t(1) {
  5235  		return 0
  5236  	}
  5237  	*(*uint16)(unsafe.Pointer(shortp)) = (uint16((int32(*(*uint8)(unsafe.Pointer(bp /* &file_short[0] */))) * 256) + int32(*(*uint8)(unsafe.Pointer(bp /* &file_short[0] */ + 1)))))
  5238  	return 1
  5239  }
  5240  
  5241  func read_counted_string(tls *libc.TLS, countp uintptr, stringp uintptr, file uintptr) int32 { /* AuRead.c:45:1: */
  5242  	bp := tls.Alloc(2)
  5243  	defer tls.Free(2)
  5244  
  5245  	// var len uint16 at bp, 2
  5246  
  5247  	var data uintptr
  5248  
  5249  	if read_short(tls, bp /* &len */, file) == 0 {
  5250  		return 0
  5251  	}
  5252  	if int32(*(*uint16)(unsafe.Pointer(bp /* len */))) == 0 {
  5253  		data = uintptr(0)
  5254  	} else {
  5255  		data = libc.Xmalloc(tls, uint32(*(*uint16)(unsafe.Pointer(bp /* len */))))
  5256  		if !(data != 0) {
  5257  			return 0
  5258  		}
  5259  		if libc.Xfread(tls, data, uint32(unsafe.Sizeof(int8(0))), uint32(*(*uint16)(unsafe.Pointer(bp /* len */))), file) != Size_t(*(*uint16)(unsafe.Pointer(bp /* len */))) {
  5260  			libc.Xmemset(tls, data, 0, uint32(*(*uint16)(unsafe.Pointer(bp /* len */))))
  5261  			libc.Xfree(tls, data)
  5262  			return 0
  5263  		}
  5264  	}
  5265  	*(*uintptr)(unsafe.Pointer(stringp)) = data
  5266  	*(*uint16)(unsafe.Pointer(countp)) = *(*uint16)(unsafe.Pointer(bp /* len */))
  5267  	return 1
  5268  }
  5269  
  5270  func XXauReadAuth(tls *libc.TLS, auth_file uintptr) uintptr { /* AuRead.c:69:7: */
  5271  	bp := tls.Alloc(32)
  5272  	defer tls.Free(32)
  5273  
  5274  	// var local Xauth at bp, 32
  5275  
  5276  	var ret uintptr
  5277  
  5278  	if read_short(tls, (bp /* &local */ /* &.family */), auth_file) == 0 {
  5279  		return uintptr(0)
  5280  	}
  5281  	if read_counted_string(tls, (bp /* &local */ +2 /* &.address_length */), (bp /* &local */ +4 /* &.address */), auth_file) == 0 {
  5282  		return uintptr(0)
  5283  	}
  5284  	if read_counted_string(tls, (bp /* &local */ +8 /* &.number_length */), (bp /* &local */ +12 /* &.number */), auth_file) == 0 {
  5285  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Faddress)
  5286  		return uintptr(0)
  5287  	}
  5288  	if read_counted_string(tls, (bp /* &local */ +16 /* &.name_length */), (bp /* &local */ +20 /* &.name */), auth_file) == 0 {
  5289  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Faddress)
  5290  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fnumber)
  5291  		return uintptr(0)
  5292  	}
  5293  	if read_counted_string(tls, (bp /* &local */ +24 /* &.data_length */), (bp /* &local */ +28 /* &.data */), auth_file) == 0 {
  5294  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Faddress)
  5295  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fnumber)
  5296  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fname)
  5297  		return uintptr(0)
  5298  	}
  5299  	ret = libc.Xmalloc(tls, uint32(unsafe.Sizeof(Xauth{})))
  5300  	if !(ret != 0) {
  5301  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Faddress)
  5302  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fnumber)
  5303  		libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fname)
  5304  		if (*Xauth)(unsafe.Pointer(bp /* &local */)).Fdata != 0 {
  5305  			libc.Xmemset(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fdata, 0, uint32((*Xauth)(unsafe.Pointer(bp /* &local */)).Fdata_length))
  5306  			libc.Xfree(tls, (*Xauth)(unsafe.Pointer(bp /* &local */)).Fdata)
  5307  		}
  5308  		return uintptr(0)
  5309  	}
  5310  	*(*Xauth)(unsafe.Pointer(ret)) = *(*Xauth)(unsafe.Pointer(bp /* local */))
  5311  	return ret
  5312  }
  5313  
  5314  // define X_GETTIMEOFDAY macro, a portable gettimeofday()
  5315  
  5316  // use POSIX name for signal
  5317  
  5318  // Copyright 1997 Metro Link Incorporated
  5319  //
  5320  //                           All Rights Reserved
  5321  //
  5322  // Permission to use, copy, modify, distribute, and sell this software and its
  5323  // documentation for any purpose is hereby granted without fee, provided that
  5324  // the above copyright notice appear in all copies and that both that
  5325  // copyright notice and this permission notice appear in supporting
  5326  // documentation, and that the names of the above listed copyright holder(s)
  5327  // not be used in advertising or publicity pertaining to distribution of
  5328  // the software without specific, written prior permission.  The above listed
  5329  // copyright holder(s) make(s) no representations about the suitability of
  5330  // this software for any purpose.  It is provided "as is" without express or
  5331  // implied warranty.
  5332  //
  5333  // THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
  5334  // TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  5335  // AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
  5336  // LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  5337  // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  5338  // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  5339  // OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  5340  
  5341  // Determine the machine's byte order.
  5342  
  5343  // See if it is set in the imake config first
  5344  
  5345  // Copyright (C) 1992-2020 Free Software Foundation, Inc.
  5346  //    This file is part of the GNU C Library.
  5347  //
  5348  //    The GNU C Library is free software; you can redistribute it and/or
  5349  //    modify it under the terms of the GNU Lesser General Public
  5350  //    License as published by the Free Software Foundation; either
  5351  //    version 2.1 of the License, or (at your option) any later version.
  5352  //
  5353  //    The GNU C Library is distributed in the hope that it will be useful,
  5354  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5355  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  5356  //    Lesser General Public License for more details.
  5357  //
  5358  //    You should have received a copy of the GNU Lesser General Public
  5359  //    License along with the GNU C Library; if not, see
  5360  //    <https://www.gnu.org/licenses/>.
  5361  
  5362  // 'endian.h' might have been included before 'Xarch.h'
  5363  
  5364  func XXauUnlockAuth(tls *libc.TLS, file_name uintptr) int32 { /* AuUnlock.c:34:1: */
  5365  	bp := tls.Alloc(2066)
  5366  	defer tls.Free(2066)
  5367  
  5368  	// var creat_name [1025]int8 at bp+16, 1025
  5369  
  5370  	// var link_name [1025]int8 at bp+1041, 1025
  5371  
  5372  	if libc.Xstrlen(tls, file_name) > Size_t(1022) {
  5373  		return 0
  5374  	}
  5375  	libc.Xsnprintf(tls, bp+16 /* &creat_name[0] */, uint32(unsafe.Sizeof([1025]int8{})), ts+71 /* "%s-c" */, libc.VaList(bp, file_name))
  5376  	libc.Xsnprintf(tls, bp+1041 /* &link_name[0] */, uint32(unsafe.Sizeof([1025]int8{})), ts+76 /* "%s-l" */, libc.VaList(bp+8, file_name))
  5377  	// I think this is the correct order
  5378  	libc.Xremove(tls, bp+16 /* &creat_name[0] */)
  5379  	libc.Xremove(tls, bp+1041 /* &link_name[0] */)
  5380  
  5381  	return 1
  5382  }
  5383  
  5384  // Return values from XauLockAuth
  5385  
  5386  func write_short(tls *libc.TLS, s uint16, file uintptr) int32 { /* AuWrite.c:33:1: */
  5387  	bp := tls.Alloc(2)
  5388  	defer tls.Free(2)
  5389  
  5390  	// var file_short [2]uint8 at bp, 2
  5391  
  5392  	*(*uint8)(unsafe.Pointer(bp /* &file_short[0] */)) = (uint8((uint32(s) & uint32(0xff00)) >> 8))
  5393  	*(*uint8)(unsafe.Pointer(bp /* &file_short[0] */ + 1)) = (uint8(int32(s) & 0xff))
  5394  	if libc.Xfwrite(tls, bp /* file_short */, uint32(unsafe.Sizeof([2]uint8{})), uint32(1), file) != Size_t(1) {
  5395  		return 0
  5396  	}
  5397  	return 1
  5398  }
  5399  
  5400  func write_counted_string(tls *libc.TLS, count uint16, string uintptr, file uintptr) int32 { /* AuWrite.c:45:1: */
  5401  	if write_short(tls, count, file) == 0 {
  5402  		return 0
  5403  	}
  5404  	if libc.Xfwrite(tls, string, uint32(unsafe.Sizeof(int8(0))), uint32(count), file) != Size_t(count) {
  5405  		return 0
  5406  	}
  5407  	return 1
  5408  }
  5409  
  5410  func XXauWriteAuth(tls *libc.TLS, auth_file uintptr, auth uintptr) int32 { /* AuWrite.c:55:1: */
  5411  	if write_short(tls, (*Xauth)(unsafe.Pointer(auth)).Ffamily, auth_file) == 0 {
  5412  		return 0
  5413  	}
  5414  	if write_counted_string(tls, (*Xauth)(unsafe.Pointer(auth)).Faddress_length, (*Xauth)(unsafe.Pointer(auth)).Faddress, auth_file) == 0 {
  5415  		return 0
  5416  	}
  5417  	if write_counted_string(tls, (*Xauth)(unsafe.Pointer(auth)).Fnumber_length, (*Xauth)(unsafe.Pointer(auth)).Fnumber, auth_file) == 0 {
  5418  		return 0
  5419  	}
  5420  	if write_counted_string(tls, (*Xauth)(unsafe.Pointer(auth)).Fname_length, (*Xauth)(unsafe.Pointer(auth)).Fname, auth_file) == 0 {
  5421  		return 0
  5422  	}
  5423  	if write_counted_string(tls, (*Xauth)(unsafe.Pointer(auth)).Fdata_length, (*Xauth)(unsafe.Pointer(auth)).Fdata, auth_file) == 0 {
  5424  		return 0
  5425  	}
  5426  	return 1
  5427  }
  5428  
  5429  var ts1 = "/.Xauthority\x00XAUTHORITY\x00HOME\x00size > 0\x00AuFileName.c\x00%s%s\x00XauFileName\x00rb\x00%s-c\x00%s-l\x00"
  5430  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data