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