modernc.org/xdmcp@v1.0.17/lib/xdmcp_linux_386.go (about) 1 // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/xdmcp_linux_386.go -pkgname xdmcp -trace-translation-units /tmp/go-generate-3388712527/cdb.json .libs/libXdmcp.a', DO NOT EDIT. 2 3 package xdmcp 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 11 "modernc.org/libc" 12 "modernc.org/libc/sys/types" 13 ) 14 15 var _ = math.Pi 16 var _ reflect.Kind 17 var _ atomic.Value 18 var _ unsafe.Pointer 19 var _ types.Size_t 20 21 const ( 22 ADJ_ESTERROR = 0x0008 23 ADJ_FREQUENCY = 0x0002 24 ADJ_MAXERROR = 0x0004 25 ADJ_MICRO = 0x1000 26 ADJ_NANO = 0x2000 27 ADJ_OFFSET = 0x0001 28 ADJ_OFFSET_SINGLESHOT = 0x8001 29 ADJ_OFFSET_SS_READ = 0xa001 30 ADJ_SETOFFSET = 0x0100 31 ADJ_STATUS = 0x0010 32 ADJ_TAI = 0x0080 33 ADJ_TICK = 0x4000 34 ADJ_TIMECONST = 0x0020 35 AT_EACCESS = 0x200 36 AT_EMPTY_PATH = 0x1000 37 AT_FDCWD = -100 38 AT_NO_AUTOMOUNT = 0x800 39 AT_RECURSIVE = 0x8000 40 AT_REMOVEDIR = 0x200 41 AT_STATX_DONT_SYNC = 0x4000 42 AT_STATX_FORCE_SYNC = 0x2000 43 AT_STATX_SYNC_AS_STAT = 0x0000 44 AT_STATX_SYNC_TYPE = 0x6000 45 AT_SYMLINK_FOLLOW = 0x400 46 AT_SYMLINK_NOFOLLOW = 0x100 47 Above = 0 48 AllTemporary = 0 49 AllocAll = 1 50 AllocNone = 0 51 AllowExposures = 1 52 AlreadyGrabbed = 1 53 Always = 2 54 AnyButton = 0 55 AnyKey = 0 56 AnyModifier = 32768 57 AnyPropertyType = 0 58 ArcChord = 0 59 ArcPieSlice = 1 60 AsyncBoth = 6 61 AsyncKeyboard = 3 62 AsyncPointer = 0 63 AutoRepeatModeDefault = 2 64 AutoRepeatModeOff = 0 65 AutoRepeatModeOn = 1 66 B16 = 0 67 B32 = 0 68 BIG_ENDIAN = 4321 69 BYTE_ORDER = 1234 70 BadAccess = 10 71 BadAlloc = 11 72 BadAtom = 5 73 BadColor = 12 74 BadCursor = 6 75 BadDrawable = 9 76 BadFont = 7 77 BadGC = 13 78 BadIDChoice = 14 79 BadImplementation = 17 80 BadLength = 16 81 BadMatch = 8 82 BadName = 15 83 BadPixmap = 4 84 BadRequest = 1 85 BadValue = 2 86 BadWindow = 3 87 Below = 1 88 BottomIf = 3 89 Button1 = 1 90 Button1Mask = 256 91 Button1MotionMask = 256 92 Button2 = 2 93 Button2Mask = 512 94 Button2MotionMask = 512 95 Button3 = 3 96 Button3Mask = 1024 97 Button3MotionMask = 1024 98 Button4 = 4 99 Button4Mask = 2048 100 Button4MotionMask = 2048 101 Button5 = 5 102 Button5Mask = 4096 103 Button5MotionMask = 4096 104 ButtonMotionMask = 8192 105 ButtonPress = 4 106 ButtonPressMask = 4 107 ButtonRelease = 5 108 ButtonReleaseMask = 8 109 CLOCK_BOOTTIME = 7 110 CLOCK_BOOTTIME_ALARM = 9 111 CLOCK_MONOTONIC = 1 112 CLOCK_MONOTONIC_COARSE = 6 113 CLOCK_MONOTONIC_RAW = 4 114 CLOCK_PROCESS_CPUTIME_ID = 2 115 CLOCK_REALTIME = 0 116 CLOCK_REALTIME_ALARM = 8 117 CLOCK_REALTIME_COARSE = 5 118 CLOCK_TAI = 11 119 CLOCK_THREAD_CPUTIME_ID = 3 120 CWBackPixel = 2 121 CWBackPixmap = 1 122 CWBackingPixel = 256 123 CWBackingPlanes = 128 124 CWBackingStore = 64 125 CWBitGravity = 16 126 CWBorderPixel = 8 127 CWBorderPixmap = 4 128 CWBorderWidth = 16 129 CWColormap = 8192 130 CWCursor = 16384 131 CWDontPropagate = 4096 132 CWEventMask = 2048 133 CWHeight = 8 134 CWOverrideRedirect = 512 135 CWSaveUnder = 1024 136 CWSibling = 32 137 CWStackMode = 64 138 CWWidth = 4 139 CWWinGravity = 32 140 CWX = 1 141 CWY = 2 142 CapButt = 1 143 CapNotLast = 0 144 CapProjecting = 3 145 CapRound = 2 146 CenterGravity = 5 147 CirculateNotify = 26 148 CirculateRequest = 27 149 ClientMessage = 33 150 ClipByChildren = 0 151 ColormapChangeMask = 8388608 152 ColormapInstalled = 1 153 ColormapNotify = 32 154 ColormapUninstalled = 0 155 Complex = 0 156 ConfigureNotify = 22 157 ConfigureRequest = 23 158 ControlMapIndex = 2 159 ControlMask = 4 160 Convex = 2 161 CoordModeOrigin = 0 162 CoordModePrevious = 1 163 CopyFromParent = 0 164 CreateNotify = 16 165 CurrentTime = 0 166 CursorShape = 0 167 DN_ACCESS = 0x00000001 168 DN_ATTRIB = 0x00000020 169 DN_CREATE = 0x00000004 170 DN_DELETE = 0x00000008 171 DN_MODIFY = 0x00000002 172 DN_MULTISHOT = 0x80000000 173 DN_RENAME = 0x00000010 174 DefaultBlanking = 2 175 DefaultExposures = 2 176 DestroyAll = 0 177 DestroyNotify = 17 178 DirectColor = 5 179 DisableAccess = 0 180 DisableScreenInterval = 0 181 DisableScreenSaver = 0 182 DoBlue = 4 183 DoGreen = 2 184 DoRed = 1 185 DontAllowExposures = 0 186 DontPreferBlanking = 0 187 EXIT_FAILURE = 1 188 EXIT_SUCCESS = 0 189 EastGravity = 6 190 EnableAccess = 1 191 EnterNotify = 7 192 EnterWindowMask = 16 193 EvenOddRule = 0 194 Expose = 12 195 ExposureMask = 32768 196 FALLOC_FL_COLLAPSE_RANGE = 0x08 197 FALLOC_FL_INSERT_RANGE = 0x20 198 FALLOC_FL_KEEP_SIZE = 0x01 199 FALLOC_FL_NO_HIDE_STALE = 0x04 200 FALLOC_FL_PUNCH_HOLE = 0x02 201 FALLOC_FL_UNSHARE_RANGE = 0x40 202 FALLOC_FL_ZERO_RANGE = 0x10 203 FALSE = 0 204 FAPPEND = 1024 205 FASYNC = 8192 206 FD_CLOEXEC = 1 207 FD_SETSIZE = 1024 208 FFSYNC = 1052672 209 FNDELAY = 2048 210 FNONBLOCK = 2048 211 FUNCPROTO = 15 212 F_ADD_SEALS = 1033 213 F_DUPFD = 0 214 F_DUPFD_CLOEXEC = 1030 215 F_EXLCK = 4 216 F_GETFD = 1 217 F_GETFL = 3 218 F_GETLEASE = 1025 219 F_GETLK = 12 220 F_GETLK64 = 12 221 F_GETOWN = 9 222 F_GETOWN_EX = 16 223 F_GETPIPE_SZ = 1032 224 F_GETSIG = 11 225 F_GET_FILE_RW_HINT = 1037 226 F_GET_RW_HINT = 1035 227 F_GET_SEALS = 1034 228 F_LOCK = 1 229 F_NOTIFY = 1026 230 F_OFD_GETLK = 36 231 F_OFD_SETLK = 37 232 F_OFD_SETLKW = 38 233 F_OK = 0 234 F_RDLCK = 0 235 F_SEAL_FUTURE_WRITE = 0x0010 236 F_SEAL_GROW = 0x0004 237 F_SEAL_SEAL = 0x0001 238 F_SEAL_SHRINK = 0x0002 239 F_SEAL_WRITE = 0x0008 240 F_SETFD = 2 241 F_SETFL = 4 242 F_SETLEASE = 1024 243 F_SETLK = 13 244 F_SETLK64 = 13 245 F_SETLKW = 14 246 F_SETLKW64 = 14 247 F_SETOWN = 8 248 F_SETOWN_EX = 15 249 F_SETPIPE_SZ = 1031 250 F_SETSIG = 10 251 F_SET_FILE_RW_HINT = 1038 252 F_SET_RW_HINT = 1036 253 F_SHLCK = 8 254 F_TEST = 3 255 F_TLOCK = 2 256 F_ULOCK = 0 257 F_UNLCK = 2 258 F_WRLCK = 1 259 FamilyChaos = 2 260 FamilyDECnet = 1 261 FamilyInternet = 0 262 FamilyInternet6 = 6 263 FamilyServerInterpreted = 5 264 FillOpaqueStippled = 3 265 FillSolid = 0 266 FillStippled = 2 267 FillTiled = 1 268 FirstExtensionError = 128 269 FocusChangeMask = 2097152 270 FocusIn = 9 271 FocusOut = 10 272 FontChange = 255 273 FontLeftToRight = 0 274 FontRightToLeft = 1 275 ForgetGravity = 0 276 GCArcMode = 4194304 277 GCBackground = 8 278 GCCapStyle = 64 279 GCClipMask = 524288 280 GCClipXOrigin = 131072 281 GCClipYOrigin = 262144 282 GCDashList = 2097152 283 GCDashOffset = 1048576 284 GCFillRule = 512 285 GCFillStyle = 256 286 GCFont = 16384 287 GCForeground = 4 288 GCFunction = 1 289 GCGraphicsExposures = 65536 290 GCJoinStyle = 128 291 GCLastBit = 22 292 GCLineStyle = 32 293 GCLineWidth = 16 294 GCPlaneMask = 2 295 GCStipple = 2048 296 GCSubwindowMode = 32768 297 GCTile = 1024 298 GCTileStipXOrigin = 4096 299 GCTileStipYOrigin = 8192 300 GXand = 0x1 301 GXandInverted = 0x4 302 GXandReverse = 0x2 303 GXclear = 0x0 304 GXcopy = 0x3 305 GXcopyInverted = 0xc 306 GXequiv = 0x9 307 GXinvert = 0xa 308 GXnand = 0xe 309 GXnoop = 0x5 310 GXnor = 0x8 311 GXor = 0x7 312 GXorInverted = 0xd 313 GXorReverse = 0xb 314 GXset = 0xf 315 GXxor = 0x6 316 GenericEvent = 35 317 GrabFrozen = 4 318 GrabInvalidTime = 2 319 GrabModeAsync = 1 320 GrabModeSync = 0 321 GrabNotViewable = 3 322 GrabSuccess = 0 323 GraphicsExpose = 13 324 GravityNotify = 24 325 GrayScale = 1 326 HASXDMAUTH = 1 327 HAVE_CONFIG_H = 1 328 HAVE_DLFCN_H = 1 329 HAVE_INTTYPES_H = 1 330 HAVE_LRAND48 = 1 331 HAVE_MEMORY_H = 1 332 HAVE_SRAND48 = 1 333 HAVE_STDINT_H = 1 334 HAVE_STDLIB_H = 1 335 HAVE_STRINGS_H = 1 336 HAVE_STRING_H = 1 337 HAVE_SYS_STAT_H = 1 338 HAVE_SYS_TYPES_H = 1 339 HAVE_UNISTD_H = 1 340 HostDelete = 1 341 HostInsert = 0 342 INT16_MAX = 32767 343 INT16_MIN = -32768 344 INT16_WIDTH = 16 345 INT32_MAX = 2147483647 346 INT32_MIN = -2147483648 347 INT32_WIDTH = 32 348 INT64_MAX = 9223372036854775807 349 INT64_MIN = -9223372036854775808 350 INT64_WIDTH = 64 351 INT8_MAX = 127 352 INT8_MIN = -128 353 INT8_WIDTH = 8 354 INTMAX_MAX = 9223372036854775807 355 INTMAX_MIN = -9223372036854775808 356 INTMAX_WIDTH = 64 357 INTPTR_MAX = 2147483647 358 INTPTR_MIN = -2147483648 359 INTPTR_WIDTH = 32 360 INT_FAST16_MAX = 2147483647 361 INT_FAST16_MIN = -2147483648 362 INT_FAST16_WIDTH = 32 363 INT_FAST32_MAX = 2147483647 364 INT_FAST32_MIN = -2147483648 365 INT_FAST32_WIDTH = 32 366 INT_FAST64_MAX = 9223372036854775807 367 INT_FAST64_MIN = -9223372036854775808 368 INT_FAST64_WIDTH = 64 369 INT_FAST8_MAX = 127 370 INT_FAST8_MIN = -128 371 INT_FAST8_WIDTH = 8 372 INT_LEAST16_MAX = 32767 373 INT_LEAST16_MIN = -32768 374 INT_LEAST16_WIDTH = 16 375 INT_LEAST32_MAX = 2147483647 376 INT_LEAST32_MIN = -2147483648 377 INT_LEAST32_WIDTH = 32 378 INT_LEAST64_MAX = 9223372036854775807 379 INT_LEAST64_MIN = -9223372036854775808 380 INT_LEAST64_WIDTH = 64 381 INT_LEAST8_MAX = 127 382 INT_LEAST8_MIN = -128 383 INT_LEAST8_WIDTH = 8 384 IncludeInferiors = 1 385 InputFocus = 1 386 InputOnly = 2 387 InputOutput = 1 388 IsUnmapped = 0 389 IsUnviewable = 1 390 IsViewable = 2 391 JoinBevel = 2 392 JoinMiter = 0 393 JoinRound = 1 394 KBAutoRepeatMode = 128 395 KBBellDuration = 8 396 KBBellPercent = 2 397 KBBellPitch = 4 398 KBKey = 64 399 KBKeyClickPercent = 1 400 KBLed = 16 401 KBLedMode = 32 402 KeyPress = 2 403 KeyPressMask = 1 404 KeyRelease = 3 405 KeyReleaseMask = 2 406 KeymapNotify = 11 407 KeymapStateMask = 16384 408 LASTEvent = 36 409 LITTLE_ENDIAN = 1234 410 LOCK_EX = 2 411 LOCK_MAND = 32 412 LOCK_NB = 4 413 LOCK_READ = 64 414 LOCK_RW = 192 415 LOCK_SH = 1 416 LOCK_UN = 8 417 LOCK_WRITE = 128 418 LSBFirst = 0 419 LT_OBJDIR = ".libs/" 420 L_INCR = 1 421 L_SET = 0 422 L_XTND = 2 423 LastExtensionError = 255 424 LeaveNotify = 8 425 LeaveWindowMask = 32 426 LedModeOff = 0 427 LedModeOn = 1 428 LineDoubleDash = 2 429 LineOnOffDash = 1 430 LineSolid = 0 431 LockMapIndex = 1 432 LockMask = 2 433 LowerHighest = 1 434 MAX_HANDLE_SZ = 128 435 MOD_CLKA = 32769 436 MOD_CLKB = 16384 437 MOD_ESTERROR = 8 438 MOD_FREQUENCY = 2 439 MOD_MAXERROR = 4 440 MOD_MICRO = 4096 441 MOD_NANO = 8192 442 MOD_OFFSET = 1 443 MOD_STATUS = 16 444 MOD_TAI = 128 445 MOD_TIMECONST = 32 446 MSBFirst = 1 447 MapNotify = 19 448 MapRequest = 20 449 MappingBusy = 1 450 MappingFailed = 2 451 MappingKeyboard = 1 452 MappingModifier = 0 453 MappingNotify = 34 454 MappingPointer = 2 455 MappingSuccess = 0 456 Mod1MapIndex = 3 457 Mod1Mask = 8 458 Mod2MapIndex = 4 459 Mod2Mask = 16 460 Mod3MapIndex = 5 461 Mod3Mask = 32 462 Mod4MapIndex = 6 463 Mod4Mask = 64 464 Mod5MapIndex = 7 465 Mod5Mask = 128 466 MotionNotify = 6 467 NARROWPROTO = 0 468 NeedFunctionPrototypes = 1 469 NeedNestedPrototypes = 1 470 NeedVarargsPrototypes = 1 471 NeedWidePrototypes = 0 472 NoEventMask = 0 473 NoExpose = 14 474 NoSymbol = 0 475 Nonconvex = 1 476 None = 0 477 NorthEastGravity = 3 478 NorthGravity = 2 479 NorthWestGravity = 1 480 NotUseful = 0 481 NotifyAncestor = 0 482 NotifyDetailNone = 7 483 NotifyGrab = 1 484 NotifyHint = 1 485 NotifyInferior = 2 486 NotifyNonlinear = 3 487 NotifyNonlinearVirtual = 4 488 NotifyNormal = 0 489 NotifyPointer = 5 490 NotifyPointerRoot = 6 491 NotifyUngrab = 2 492 NotifyVirtual = 1 493 NotifyWhileGrabbed = 3 494 O_ACCMODE = 0003 495 O_APPEND = 02000 496 O_ASYNC = 020000 497 O_CLOEXEC = 524288 498 O_CREAT = 0100 499 O_DIRECT = 16384 500 O_DIRECTORY = 65536 501 O_DSYNC = 4096 502 O_EXCL = 0200 503 O_FSYNC = 1052672 504 O_LARGEFILE = 32768 505 O_NDELAY = 2048 506 O_NOATIME = 262144 507 O_NOCTTY = 0400 508 O_NOFOLLOW = 131072 509 O_NONBLOCK = 04000 510 O_PATH = 2097152 511 O_RDONLY = 00 512 O_RDWR = 02 513 O_RSYNC = 1052672 514 O_SYNC = 04010000 515 O_TMPFILE = 4259840 516 O_TRUNC = 01000 517 O_WRONLY = 01 518 Opposite = 4 519 OwnerGrabButtonMask = 16777216 520 PACKAGE = "libXdmcp" 521 PACKAGE_BUGREPORT = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg" 522 PACKAGE_NAME = "libXdmcp" 523 PACKAGE_STRING = "libXdmcp 1.1.2" 524 PACKAGE_TARNAME = "libXdmcp" 525 PACKAGE_URL = "" 526 PACKAGE_VERSION = "1.1.2" 527 PACKAGE_VERSION_MAJOR = 1 528 PACKAGE_VERSION_MINOR = 1 529 PACKAGE_VERSION_PATCHLEVEL = 2 530 PDP_ENDIAN = 3412 531 POSIX_FADV_DONTNEED = 4 532 POSIX_FADV_NOREUSE = 5 533 POSIX_FADV_NORMAL = 0 534 POSIX_FADV_RANDOM = 1 535 POSIX_FADV_SEQUENTIAL = 2 536 POSIX_FADV_WILLNEED = 3 537 PTRDIFF_MAX = 2147483647 538 PTRDIFF_MIN = -2147483648 539 PTRDIFF_WIDTH = 32 540 ParentRelative = 1 541 PlaceOnBottom = 1 542 PlaceOnTop = 0 543 PointerMotionHintMask = 128 544 PointerMotionMask = 64 545 PointerRoot = 1 546 PointerWindow = 0 547 PreferBlanking = 1 548 PropModeAppend = 2 549 PropModePrepend = 1 550 PropModeReplace = 0 551 PropertyChangeMask = 4194304 552 PropertyDelete = 1 553 PropertyNewValue = 0 554 PropertyNotify = 28 555 PseudoColor = 3 556 RAND_MAX = 2147483647 557 RWF_WRITE_LIFE_NOT_SET = 0 558 RWH_WRITE_LIFE_EXTREME = 5 559 RWH_WRITE_LIFE_LONG = 4 560 RWH_WRITE_LIFE_MEDIUM = 3 561 RWH_WRITE_LIFE_NONE = 1 562 RWH_WRITE_LIFE_SHORT = 2 563 R_OK = 4 564 RaiseLowest = 0 565 ReparentNotify = 21 566 ReplayKeyboard = 5 567 ReplayPointer = 2 568 ResizeRedirectMask = 262144 569 ResizeRequest = 25 570 RetainPermanent = 1 571 RetainTemporary = 2 572 RevertToParent = 2 573 SEEK_CUR = 1 574 SEEK_DATA = 3 575 SEEK_END = 2 576 SEEK_HOLE = 4 577 SEEK_SET = 0 578 SIG_ATOMIC_MAX = 2147483647 579 SIG_ATOMIC_MIN = -2147483648 580 SIG_ATOMIC_WIDTH = 32 581 SIZE_MAX = 4294967295 582 SIZE_WIDTH = 32 583 SPLICE_F_GIFT = 8 584 SPLICE_F_MORE = 4 585 SPLICE_F_MOVE = 1 586 SPLICE_F_NONBLOCK = 2 587 STA_CLK = 0x8000 588 STA_CLOCKERR = 0x1000 589 STA_DEL = 0x0020 590 STA_FLL = 0x0008 591 STA_FREQHOLD = 0x0080 592 STA_INS = 0x0010 593 STA_MODE = 0x4000 594 STA_NANO = 0x2000 595 STA_PLL = 0x0001 596 STA_PPSERROR = 0x0800 597 STA_PPSFREQ = 0x0002 598 STA_PPSJITTER = 0x0200 599 STA_PPSSIGNAL = 0x0100 600 STA_PPSTIME = 0x0004 601 STA_PPSWANDER = 0x0400 602 STA_RONLY = 65280 603 STA_UNSYNC = 0x0040 604 STDC_HEADERS = 1 605 STDERR_FILENO = 2 606 STDIN_FILENO = 0 607 STDOUT_FILENO = 1 608 SYNC_FILE_RANGE_WAIT_AFTER = 4 609 SYNC_FILE_RANGE_WAIT_BEFORE = 1 610 SYNC_FILE_RANGE_WRITE = 2 611 SYNC_FILE_RANGE_WRITE_AND_WAIT = 7 612 S_IFBLK = 24576 613 S_IFCHR = 8192 614 S_IFDIR = 16384 615 S_IFIFO = 4096 616 S_IFLNK = 40960 617 S_IFMT = 61440 618 S_IFREG = 32768 619 S_IFSOCK = 49152 620 S_IRGRP = 32 621 S_IROTH = 4 622 S_IRUSR = 256 623 S_IRWXG = 56 624 S_IRWXO = 7 625 S_IRWXU = 448 626 S_ISGID = 1024 627 S_ISUID = 2048 628 S_ISVTX = 512 629 S_IWGRP = 16 630 S_IWOTH = 2 631 S_IWUSR = 128 632 S_IXGRP = 8 633 S_IXOTH = 1 634 S_IXUSR = 64 635 ScreenSaverActive = 1 636 ScreenSaverReset = 0 637 SelectionClear = 29 638 SelectionNotify = 31 639 SelectionRequest = 30 640 SetModeDelete = 1 641 SetModeInsert = 0 642 ShiftMapIndex = 0 643 ShiftMask = 1 644 SouthEastGravity = 9 645 SouthGravity = 8 646 SouthWestGravity = 7 647 StaticColor = 2 648 StaticGravity = 10 649 StaticGray = 0 650 StippleShape = 2 651 StructureNotifyMask = 131072 652 SubstructureNotifyMask = 524288 653 SubstructureRedirectMask = 1048576 654 Success = 0 655 SyncBoth = 7 656 SyncKeyboard = 4 657 SyncPointer = 1 658 TIMER_ABSTIME = 1 659 TIME_UTC = 1 660 TRUE = 1 661 TileShape = 1 662 TopIf = 2 663 TrueColor = 4 664 UINT16_MAX = 65535 665 UINT16_WIDTH = 16 666 UINT32_MAX = 4294967295 667 UINT32_WIDTH = 32 668 UINT64_MAX = 18446744073709551615 669 UINT64_WIDTH = 64 670 UINT8_MAX = 255 671 UINT8_WIDTH = 8 672 UINTMAX_MAX = 18446744073709551615 673 UINTMAX_WIDTH = 64 674 UINTPTR_MAX = 4294967295 675 UINTPTR_WIDTH = 32 676 UINT_FAST16_MAX = 4294967295 677 UINT_FAST16_WIDTH = 32 678 UINT_FAST32_MAX = 4294967295 679 UINT_FAST32_WIDTH = 32 680 UINT_FAST64_MAX = 18446744073709551615 681 UINT_FAST64_WIDTH = 64 682 UINT_FAST8_MAX = 255 683 UINT_FAST8_WIDTH = 8 684 UINT_LEAST16_MAX = 65535 685 UINT_LEAST16_WIDTH = 16 686 UINT_LEAST32_MAX = 4294967295 687 UINT_LEAST32_WIDTH = 32 688 UINT_LEAST64_MAX = 18446744073709551615 689 UINT_LEAST64_WIDTH = 64 690 UINT_LEAST8_MAX = 255 691 UINT_LEAST8_WIDTH = 8 692 UTIME_NOW = 1073741823 693 UTIME_OMIT = 1073741822 694 UnmapGravity = 0 695 UnmapNotify = 18 696 Unsorted = 0 697 VERSION = "1.1.2" 698 VisibilityChangeMask = 65536 699 VisibilityFullyObscured = 2 700 VisibilityNotify = 15 701 VisibilityPartiallyObscured = 1 702 VisibilityUnobscured = 0 703 WCHAR_MAX = 2147483647 704 WCHAR_MIN = -2147483648 705 WCHAR_WIDTH = 32 706 WCONTINUED = 8 707 WEXITED = 4 708 WINT_MAX = 4294967295 709 WINT_MIN = 0 710 WINT_WIDTH = 32 711 WNOHANG = 1 712 WNOWAIT = 0x01000000 713 WSTOPPED = 2 714 WUNTRACED = 2 715 W_OK = 2 716 WestGravity = 4 717 WhenMapped = 1 718 WindingRule = 1 719 XDM_DEFAULT_MCAST_ADDR6 = "ff02:0:0:0:0:0:0:12b" 720 XDM_DEF_DORMANCY = 180 721 XDM_KA_RTX_LIMIT = 4 722 XDM_MAX_DORMANCY = 86400 723 XDM_MAX_MSGLEN = 8192 724 XDM_MAX_RTX = 32 725 XDM_MIN_RTX = 2 726 XDM_PROTOCOL_VERSION = 1 727 XDM_RTX_LIMIT = 7 728 XDM_UDP_PORT = 177 729 XMD_H = 1 730 XYBitmap = 0 731 XYPixmap = 1 732 X_BIG_ENDIAN = 4321 733 X_BYTE_ORDER = 1234 734 X_H = 0 735 X_LITTLE_ENDIAN = 1234 736 X_OK = 1 737 X_PROTOCOL = 11 738 X_PROTOCOL_REVISION = 0 739 YSorted = 1 740 YXBanded = 3 741 YXSorted = 2 742 ZPixmap = 2 743 X_ALLOCA_H = 1 744 X_ALL_SOURCE = 1 745 X_ATFILE_SOURCE = 1 746 X_BITS_BYTESWAP_H = 1 747 X_BITS_ENDIANNESS_H = 1 748 X_BITS_ENDIAN_H = 1 749 X_BITS_FLOATN_COMMON_H = 0 750 X_BITS_FLOATN_H = 0 751 X_BITS_POSIX_OPT_H = 1 752 X_BITS_PTHREADTYPES_ARCH_H = 1 753 X_BITS_PTHREADTYPES_COMMON_H = 1 754 X_BITS_STAT_H = 1 755 X_BITS_STDINT_INTN_H = 1 756 X_BITS_STDINT_UINTN_H = 1 757 X_BITS_TIME64_H = 1 758 X_BITS_TIMEX_H = 1 759 X_BITS_TIME_H = 1 760 X_BITS_TYPESIZES_H = 1 761 X_BITS_TYPES_H = 1 762 X_BITS_TYPES_LOCALE_T_H = 1 763 X_BITS_TYPES___LOCALE_T_H = 1 764 X_BITS_UINTN_IDENTITY_H = 1 765 X_BITS_WCHAR_H = 1 766 X_BSD_SIZE_T_ = 0 767 X_BSD_SIZE_T_DEFINED_ = 0 768 X_DEFAULT_SOURCE = 1 769 X_ENDIAN_H = 1 770 X_FALLOC_H_ = 0 771 X_FCNTL_H = 1 772 X_FEATURES_H = 1 773 X_FILE_OFFSET_BITS = 64 774 X_GCC_SIZE_T = 0 775 X_GCC_WCHAR_T = 0 776 X_GCC_WRAP_STDINT_H = 0 777 X_GETOPT_CORE_H = 1 778 X_GETOPT_POSIX_H = 1 779 X_GNU_SOURCE = 1 780 X_ILP32 = 1 781 X_ISOC11_SOURCE = 1 782 X_ISOC2X_SOURCE = 1 783 X_ISOC95_SOURCE = 1 784 X_ISOC99_SOURCE = 1 785 X_LARGEFILE64_SOURCE = 1 786 X_LARGEFILE_SOURCE = 1 787 X_LFS64_ASYNCHRONOUS_IO = 1 788 X_LFS64_LARGEFILE = 1 789 X_LFS64_STDIO = 1 790 X_LFS_ASYNCHRONOUS_IO = 1 791 X_LFS_LARGEFILE = 1 792 X_MKNOD_VER = 1 793 X_MKNOD_VER_LINUX = 1 794 X_MKNOD_VER_SVR4 = 2 795 X_POSIX2_CHAR_TERM = 200809 796 X_POSIX2_C_BIND = 200809 797 X_POSIX2_C_DEV = 200809 798 X_POSIX2_C_VERSION = 200809 799 X_POSIX2_LOCALEDEF = 200809 800 X_POSIX2_SW_DEV = 200809 801 X_POSIX2_VERSION = 200809 802 X_POSIX_ADVISORY_INFO = 200809 803 X_POSIX_ASYNCHRONOUS_IO = 200809 804 X_POSIX_ASYNC_IO = 1 805 X_POSIX_BARRIERS = 200809 806 X_POSIX_CHOWN_RESTRICTED = 0 807 X_POSIX_CLOCK_SELECTION = 200809 808 X_POSIX_CPUTIME = 0 809 X_POSIX_C_SOURCE = 200809 810 X_POSIX_FSYNC = 200809 811 X_POSIX_IPV6 = 200809 812 X_POSIX_JOB_CONTROL = 1 813 X_POSIX_MAPPED_FILES = 200809 814 X_POSIX_MEMLOCK = 200809 815 X_POSIX_MEMLOCK_RANGE = 200809 816 X_POSIX_MEMORY_PROTECTION = 200809 817 X_POSIX_MESSAGE_PASSING = 200809 818 X_POSIX_MONOTONIC_CLOCK = 0 819 X_POSIX_NO_TRUNC = 1 820 X_POSIX_PRIORITIZED_IO = 200809 821 X_POSIX_PRIORITY_SCHEDULING = 200809 822 X_POSIX_PTHREAD_SEMANTICS = 1 823 X_POSIX_RAW_SOCKETS = 200809 824 X_POSIX_READER_WRITER_LOCKS = 200809 825 X_POSIX_REALTIME_SIGNALS = 200809 826 X_POSIX_REENTRANT_FUNCTIONS = 1 827 X_POSIX_REGEXP = 1 828 X_POSIX_SAVED_IDS = 1 829 X_POSIX_SEMAPHORES = 200809 830 X_POSIX_SHARED_MEMORY_OBJECTS = 200809 831 X_POSIX_SHELL = 1 832 X_POSIX_SOURCE = 1 833 X_POSIX_SPAWN = 200809 834 X_POSIX_SPIN_LOCKS = 200809 835 X_POSIX_SPORADIC_SERVER = -1 836 X_POSIX_SYNCHRONIZED_IO = 200809 837 X_POSIX_THREADS = 200809 838 X_POSIX_THREAD_ATTR_STACKADDR = 200809 839 X_POSIX_THREAD_ATTR_STACKSIZE = 200809 840 X_POSIX_THREAD_CPUTIME = 0 841 X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 842 X_POSIX_THREAD_PRIO_INHERIT = 200809 843 X_POSIX_THREAD_PRIO_PROTECT = 200809 844 X_POSIX_THREAD_PROCESS_SHARED = 200809 845 X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 846 X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 847 X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 848 X_POSIX_THREAD_SPORADIC_SERVER = -1 849 X_POSIX_TIMEOUTS = 200809 850 X_POSIX_TIMERS = 200809 851 X_POSIX_TRACE = -1 852 X_POSIX_TRACE_EVENT_FILTER = -1 853 X_POSIX_TRACE_INHERIT = -1 854 X_POSIX_TRACE_LOG = -1 855 X_POSIX_TYPED_MEMORY_OBJECTS = -1 856 X_POSIX_V6_ILP32_OFF32 = 1 857 X_POSIX_V6_ILP32_OFFBIG = 1 858 X_POSIX_V7_ILP32_OFF32 = 1 859 X_POSIX_V7_ILP32_OFFBIG = 1 860 X_POSIX_VDISABLE = 0 861 X_POSIX_VERSION = 200809 862 X_RWLOCK_INTERNAL_H = 0 863 X_SIZET_ = 0 864 X_SIZE_T = 0 865 X_SIZE_T_ = 0 866 X_SIZE_T_DECLARED = 0 867 X_SIZE_T_DEFINED = 0 868 X_SIZE_T_DEFINED_ = 0 869 X_STATBUF_ST_BLKSIZE = 0 870 X_STATBUF_ST_NSEC = 0 871 X_STATBUF_ST_RDEV = 0 872 X_STAT_VER = 3 873 X_STAT_VER_KERNEL = 1 874 X_STAT_VER_LINUX = 3 875 X_STAT_VER_LINUX_OLD = 1 876 X_STAT_VER_SVR4 = 2 877 X_STDC_PREDEF_H = 1 878 X_STDINT_H = 1 879 X_STDLIB_H = 1 880 X_STRINGS_H = 1 881 X_STRING_H = 1 882 X_STRUCT_TIMESPEC = 1 883 X_SYS_CDEFS_H = 1 884 X_SYS_SELECT_H = 1 885 X_SYS_SIZE_T_H = 0 886 X_SYS_TIME_H = 1 887 X_SYS_TYPES_H = 1 888 X_TANDEM_SOURCE = 1 889 X_THREAD_MUTEX_INTERNAL_H = 1 890 X_THREAD_SHARED_TYPES_H = 1 891 X_TIME_H = 1 892 X_T_SIZE = 0 893 X_T_SIZE_ = 0 894 X_T_WCHAR = 0 895 X_T_WCHAR_ = 0 896 X_UNISTD_H = 1 897 X_WCHAR_T = 0 898 X_WCHAR_T_ = 0 899 X_WCHAR_T_DECLARED = 0 900 X_WCHAR_T_DEFINED = 0 901 X_WCHAR_T_DEFINED_ = 0 902 X_WCHAR_T_H = 0 903 X_XARCH_H_ = 0 904 X_XBS5_ILP32_OFF32 = 1 905 X_XBS5_ILP32_OFFBIG = 1 906 X_XDMCP_H_ = 0 907 X_XFUNCPROTOBEGIN = 0 908 X_XFUNCPROTOEND = 0 909 X_XFUNCPROTO_H_ = 0 910 X_XOPEN_ENH_I18N = 1 911 X_XOPEN_LEGACY = 1 912 X_XOPEN_REALTIME = 1 913 X_XOPEN_REALTIME_THREADS = 1 914 X_XOPEN_SHM = 1 915 X_XOPEN_SOURCE = 700 916 X_XOPEN_SOURCE_EXTENDED = 1 917 X_XOPEN_UNIX = 1 918 X_XOPEN_VERSION = 700 919 X_XOPEN_XCU_VERSION = 4 920 X_XOPEN_XPG2 = 1 921 X_XOPEN_XPG3 = 1 922 X_XOPEN_XPG4 = 1 923 X_XOSDEFS_H_ = 0 924 X_XOS_H_ = 0 925 X_XTYPEDEF_ATOM = 0 926 X_XTYPEDEF_FONT = 0 927 X_XTYPEDEF_MASK = 0 928 X_XTYPEDEF_XID = 0 929 X_X_NOTSAN = 0 930 I386 = 1 931 Linux = 1 932 Unix = 1 933 AF_ALG = 38 934 AF_APPLETALK = 5 935 AF_ASH = 18 936 AF_ATMPVC = 8 937 AF_ATMSVC = 20 938 AF_AX25 = 3 939 AF_BLUETOOTH = 31 940 AF_BRIDGE = 7 941 AF_CAIF = 37 942 AF_CAN = 29 943 AF_DECnet = 12 944 AF_ECONET = 19 945 AF_FILE = 1 946 AF_IB = 27 947 AF_IEEE802154 = 36 948 AF_INET = 2 949 AF_INET6 = 10 950 AF_IPX = 4 951 AF_IRDA = 23 952 AF_ISDN = 34 953 AF_IUCV = 32 954 AF_KCM = 41 955 AF_KEY = 15 956 AF_LLC = 26 957 AF_LOCAL = 1 958 AF_MAX = 45 959 AF_MPLS = 28 960 AF_NETBEUI = 13 961 AF_NETLINK = 16 962 AF_NETROM = 6 963 AF_NFC = 39 964 AF_PACKET = 17 965 AF_PHONET = 35 966 AF_PPPOX = 24 967 AF_QIPCRTR = 42 968 AF_RDS = 21 969 AF_ROSE = 11 970 AF_ROUTE = 16 971 AF_RXRPC = 33 972 AF_SECURITY = 14 973 AF_SMC = 43 974 AF_SNA = 22 975 AF_TIPC = 30 976 AF_UNIX = 1 977 AF_UNSPEC = 0 978 AF_VSOCK = 40 979 AF_WANPIPE = 25 980 AF_X25 = 9 981 AF_XDP = 44 982 FIOGETOWN = 0x8903 983 FIOSETOWN = 0x8901 984 PF_ALG = 38 985 PF_APPLETALK = 5 986 PF_ASH = 18 987 PF_ATMPVC = 8 988 PF_ATMSVC = 20 989 PF_AX25 = 3 990 PF_BLUETOOTH = 31 991 PF_BRIDGE = 7 992 PF_CAIF = 37 993 PF_CAN = 29 994 PF_DECnet = 12 995 PF_ECONET = 19 996 PF_FILE = 1 997 PF_IB = 27 998 PF_IEEE802154 = 36 999 PF_INET = 2 1000 PF_INET6 = 10 1001 PF_IPX = 4 1002 PF_IRDA = 23 1003 PF_ISDN = 34 1004 PF_IUCV = 32 1005 PF_KCM = 41 1006 PF_KEY = 15 1007 PF_LLC = 26 1008 PF_LOCAL = 1 1009 PF_MAX = 45 1010 PF_MPLS = 28 1011 PF_NETBEUI = 13 1012 PF_NETLINK = 16 1013 PF_NETROM = 6 1014 PF_NFC = 39 1015 PF_PACKET = 17 1016 PF_PHONET = 35 1017 PF_PPPOX = 24 1018 PF_QIPCRTR = 42 1019 PF_RDS = 21 1020 PF_ROSE = 11 1021 PF_ROUTE = 16 1022 PF_RXRPC = 33 1023 PF_SECURITY = 14 1024 PF_SMC = 43 1025 PF_SNA = 22 1026 PF_TIPC = 30 1027 PF_UNIX = 1 1028 PF_UNSPEC = 0 1029 PF_VSOCK = 40 1030 PF_WANPIPE = 25 1031 PF_X25 = 9 1032 PF_XDP = 44 1033 SCM_TIMESTAMPING_OPT_STATS = 54 1034 SCM_TIMESTAMPING_PKTINFO = 58 1035 SCM_TXTIME = 61 1036 SCM_WIFI_STATUS = 41 1037 SIOCATMARK = 0x8905 1038 SIOCGPGRP = 0x8904 1039 SIOCGSTAMP = 0x8906 1040 SIOCGSTAMPNS = 0x8907 1041 SIOCSPGRP = 0x8902 1042 SOL_AAL = 265 1043 SOL_ALG = 279 1044 SOL_ATM = 264 1045 SOL_BLUETOOTH = 274 1046 SOL_CAIF = 278 1047 SOL_DCCP = 269 1048 SOL_DECNET = 261 1049 SOL_IRDA = 266 1050 SOL_IUCV = 277 1051 SOL_KCM = 281 1052 SOL_LLC = 268 1053 SOL_NETBEUI = 267 1054 SOL_NETLINK = 270 1055 SOL_NFC = 280 1056 SOL_PACKET = 263 1057 SOL_PNPIPE = 275 1058 SOL_PPPOL2TP = 273 1059 SOL_RAW = 255 1060 SOL_RDS = 276 1061 SOL_RXRPC = 272 1062 SOL_SOCKET = 1 1063 SOL_TIPC = 271 1064 SOL_TLS = 282 1065 SOL_X25 = 262 1066 SOL_XDP = 283 1067 SOMAXCONN = 4096 1068 SO_ACCEPTCONN = 30 1069 SO_ATTACH_BPF = 50 1070 SO_ATTACH_FILTER = 26 1071 SO_ATTACH_REUSEPORT_CBPF = 51 1072 SO_ATTACH_REUSEPORT_EBPF = 52 1073 SO_BINDTODEVICE = 25 1074 SO_BINDTOIFINDEX = 62 1075 SO_BPF_EXTENSIONS = 48 1076 SO_BROADCAST = 6 1077 SO_BSDCOMPAT = 14 1078 SO_BUSY_POLL = 46 1079 SO_CNX_ADVICE = 53 1080 SO_COOKIE = 57 1081 SO_DEBUG = 1 1082 SO_DETACH_BPF = 27 1083 SO_DETACH_FILTER = 27 1084 SO_DETACH_REUSEPORT_BPF = 68 1085 SO_DOMAIN = 39 1086 SO_DONTROUTE = 5 1087 SO_ERROR = 4 1088 SO_GET_FILTER = 26 1089 SO_INCOMING_CPU = 49 1090 SO_INCOMING_NAPI_ID = 56 1091 SO_KEEPALIVE = 9 1092 SO_LINGER = 13 1093 SO_LOCK_FILTER = 44 1094 SO_MARK = 36 1095 SO_MAX_PACING_RATE = 47 1096 SO_MEMINFO = 55 1097 SO_NOFCS = 43 1098 SO_NO_CHECK = 11 1099 SO_OOBINLINE = 10 1100 SO_PASSCRED = 16 1101 SO_PASSSEC = 34 1102 SO_PEEK_OFF = 42 1103 SO_PEERCRED = 17 1104 SO_PEERGROUPS = 59 1105 SO_PEERNAME = 28 1106 SO_PEERSEC = 31 1107 SO_PRIORITY = 12 1108 SO_PROTOCOL = 38 1109 SO_RCVBUF = 8 1110 SO_RCVBUFFORCE = 33 1111 SO_RCVLOWAT = 18 1112 SO_RCVTIMEO_NEW = 66 1113 SO_RCVTIMEO_OLD = 20 1114 SO_REUSEADDR = 2 1115 SO_REUSEPORT = 15 1116 SO_RXQ_OVFL = 40 1117 SO_SECURITY_AUTHENTICATION = 22 1118 SO_SECURITY_ENCRYPTION_NETWORK = 24 1119 SO_SECURITY_ENCRYPTION_TRANSPORT = 23 1120 SO_SELECT_ERR_QUEUE = 45 1121 SO_SNDBUF = 7 1122 SO_SNDBUFFORCE = 32 1123 SO_SNDLOWAT = 19 1124 SO_SNDTIMEO_NEW = 67 1125 SO_SNDTIMEO_OLD = 21 1126 SO_TIMESTAMPING_NEW = 65 1127 SO_TIMESTAMPING_OLD = 37 1128 SO_TIMESTAMPNS_NEW = 64 1129 SO_TIMESTAMPNS_OLD = 35 1130 SO_TIMESTAMP_NEW = 63 1131 SO_TIMESTAMP_OLD = 29 1132 SO_TXTIME = 61 1133 SO_TYPE = 3 1134 SO_WIFI_STATUS = 41 1135 SO_ZEROCOPY = 60 1136 X_ASM_X86_POSIX_TYPES_32_H = 0 1137 X_BITS_SOCKADDR_H = 1 1138 X_LINUX_POSIX_TYPES_H = 0 1139 X_SS_SIZE = 128 1140 X_SYS_SOCKET_H = 1 1141 HALF_ITERATIONS = 8 1142 ITERATIONS = 16 1143 ) 1144 1145 // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; 1146 // the `_SC_*' symbols for the NAME argument to `sysconf'; 1147 // and the `_CS_*' symbols for the NAME argument to `confstr'. 1148 // `sysconf', `pathconf', and `confstr' NAME values. Generic version. 1149 // Copyright (C) 1993-2020 Free Software Foundation, Inc. 1150 // This file is part of the GNU C Library. 1151 // 1152 // The GNU C Library is free software; you can redistribute it and/or 1153 // modify it under the terms of the GNU Lesser General Public 1154 // License as published by the Free Software Foundation; either 1155 // version 2.1 of the License, or (at your option) any later version. 1156 // 1157 // The GNU C Library is distributed in the hope that it will be useful, 1158 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1159 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1160 // Lesser General Public License for more details. 1161 // 1162 // You should have received a copy of the GNU Lesser General Public 1163 // License along with the GNU C Library; if not, see 1164 // <https://www.gnu.org/licenses/>. 1165 1166 // Values for the NAME argument to `pathconf' and `fpathconf'. 1167 const ( /* confname.h:24:1: */ 1168 X_PC_LINK_MAX = 0 1169 X_PC_MAX_CANON = 1 1170 X_PC_MAX_INPUT = 2 1171 X_PC_NAME_MAX = 3 1172 X_PC_PATH_MAX = 4 1173 X_PC_PIPE_BUF = 5 1174 X_PC_CHOWN_RESTRICTED = 6 1175 X_PC_NO_TRUNC = 7 1176 X_PC_VDISABLE = 8 1177 X_PC_SYNC_IO = 9 1178 X_PC_ASYNC_IO = 10 1179 X_PC_PRIO_IO = 11 1180 X_PC_SOCK_MAXBUF = 12 1181 X_PC_FILESIZEBITS = 13 1182 X_PC_REC_INCR_XFER_SIZE = 14 1183 X_PC_REC_MAX_XFER_SIZE = 15 1184 X_PC_REC_MIN_XFER_SIZE = 16 1185 X_PC_REC_XFER_ALIGN = 17 1186 X_PC_ALLOC_SIZE_MIN = 18 1187 X_PC_SYMLINK_MAX = 19 1188 X_PC_2_SYMLINKS = 20 1189 ) 1190 1191 // Values for the NAME argument to `confstr'. 1192 const ( /* confname.h:533:1: */ 1193 X_CS_PATH = 0 // The default search path. 1194 1195 X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 1196 1197 X_CS_GNU_LIBC_VERSION = 2 1198 X_CS_GNU_LIBPTHREAD_VERSION = 3 1199 1200 X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 1201 1202 X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 1203 1204 X_CS_LFS_CFLAGS = 1000 1205 X_CS_LFS_LDFLAGS = 1001 1206 X_CS_LFS_LIBS = 1002 1207 X_CS_LFS_LINTFLAGS = 1003 1208 X_CS_LFS64_CFLAGS = 1004 1209 X_CS_LFS64_LDFLAGS = 1005 1210 X_CS_LFS64_LIBS = 1006 1211 X_CS_LFS64_LINTFLAGS = 1007 1212 1213 X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 1214 X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 1215 X_CS_XBS5_ILP32_OFF32_LIBS = 1102 1216 X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 1217 X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 1218 X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 1219 X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 1220 X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 1221 X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 1222 X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 1223 X_CS_XBS5_LP64_OFF64_LIBS = 1110 1224 X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 1225 X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 1226 X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 1227 X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 1228 X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 1229 1230 X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 1231 X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 1232 X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 1233 X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 1234 X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 1235 X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 1236 X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 1237 X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 1238 X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 1239 X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 1240 X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 1241 X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 1242 X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 1243 X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 1244 X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 1245 X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 1246 1247 X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 1248 X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 1249 X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 1250 X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 1251 X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 1252 X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 1253 X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 1254 X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 1255 X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 1256 X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 1257 X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 1258 X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 1259 X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 1260 X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 1261 X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 1262 X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 1263 1264 X_CS_V6_ENV = 1148 1265 X_CS_V7_ENV = 1149 1266 ) 1267 1268 // Values for the argument to `sysconf'. 1269 const ( /* confname.h:71:1: */ 1270 X_SC_ARG_MAX = 0 1271 X_SC_CHILD_MAX = 1 1272 X_SC_CLK_TCK = 2 1273 X_SC_NGROUPS_MAX = 3 1274 X_SC_OPEN_MAX = 4 1275 X_SC_STREAM_MAX = 5 1276 X_SC_TZNAME_MAX = 6 1277 X_SC_JOB_CONTROL = 7 1278 X_SC_SAVED_IDS = 8 1279 X_SC_REALTIME_SIGNALS = 9 1280 X_SC_PRIORITY_SCHEDULING = 10 1281 X_SC_TIMERS = 11 1282 X_SC_ASYNCHRONOUS_IO = 12 1283 X_SC_PRIORITIZED_IO = 13 1284 X_SC_SYNCHRONIZED_IO = 14 1285 X_SC_FSYNC = 15 1286 X_SC_MAPPED_FILES = 16 1287 X_SC_MEMLOCK = 17 1288 X_SC_MEMLOCK_RANGE = 18 1289 X_SC_MEMORY_PROTECTION = 19 1290 X_SC_MESSAGE_PASSING = 20 1291 X_SC_SEMAPHORES = 21 1292 X_SC_SHARED_MEMORY_OBJECTS = 22 1293 X_SC_AIO_LISTIO_MAX = 23 1294 X_SC_AIO_MAX = 24 1295 X_SC_AIO_PRIO_DELTA_MAX = 25 1296 X_SC_DELAYTIMER_MAX = 26 1297 X_SC_MQ_OPEN_MAX = 27 1298 X_SC_MQ_PRIO_MAX = 28 1299 X_SC_VERSION = 29 1300 X_SC_PAGESIZE = 30 1301 X_SC_RTSIG_MAX = 31 1302 X_SC_SEM_NSEMS_MAX = 32 1303 X_SC_SEM_VALUE_MAX = 33 1304 X_SC_SIGQUEUE_MAX = 34 1305 X_SC_TIMER_MAX = 35 1306 1307 // Values for the argument to `sysconf' 1308 // corresponding to _POSIX2_* symbols. 1309 X_SC_BC_BASE_MAX = 36 1310 X_SC_BC_DIM_MAX = 37 1311 X_SC_BC_SCALE_MAX = 38 1312 X_SC_BC_STRING_MAX = 39 1313 X_SC_COLL_WEIGHTS_MAX = 40 1314 X_SC_EQUIV_CLASS_MAX = 41 1315 X_SC_EXPR_NEST_MAX = 42 1316 X_SC_LINE_MAX = 43 1317 X_SC_RE_DUP_MAX = 44 1318 X_SC_CHARCLASS_NAME_MAX = 45 1319 1320 X_SC_2_VERSION = 46 1321 X_SC_2_C_BIND = 47 1322 X_SC_2_C_DEV = 48 1323 X_SC_2_FORT_DEV = 49 1324 X_SC_2_FORT_RUN = 50 1325 X_SC_2_SW_DEV = 51 1326 X_SC_2_LOCALEDEF = 52 1327 1328 X_SC_PII = 53 1329 X_SC_PII_XTI = 54 1330 X_SC_PII_SOCKET = 55 1331 X_SC_PII_INTERNET = 56 1332 X_SC_PII_OSI = 57 1333 X_SC_POLL = 58 1334 X_SC_SELECT = 59 1335 X_SC_UIO_MAXIOV = 60 1336 X_SC_IOV_MAX = 60 1337 X_SC_PII_INTERNET_STREAM = 61 1338 X_SC_PII_INTERNET_DGRAM = 62 1339 X_SC_PII_OSI_COTS = 63 1340 X_SC_PII_OSI_CLTS = 64 1341 X_SC_PII_OSI_M = 65 1342 X_SC_T_IOV_MAX = 66 1343 1344 // Values according to POSIX 1003.1c (POSIX threads). 1345 X_SC_THREADS = 67 1346 X_SC_THREAD_SAFE_FUNCTIONS = 68 1347 X_SC_GETGR_R_SIZE_MAX = 69 1348 X_SC_GETPW_R_SIZE_MAX = 70 1349 X_SC_LOGIN_NAME_MAX = 71 1350 X_SC_TTY_NAME_MAX = 72 1351 X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 1352 X_SC_THREAD_KEYS_MAX = 74 1353 X_SC_THREAD_STACK_MIN = 75 1354 X_SC_THREAD_THREADS_MAX = 76 1355 X_SC_THREAD_ATTR_STACKADDR = 77 1356 X_SC_THREAD_ATTR_STACKSIZE = 78 1357 X_SC_THREAD_PRIORITY_SCHEDULING = 79 1358 X_SC_THREAD_PRIO_INHERIT = 80 1359 X_SC_THREAD_PRIO_PROTECT = 81 1360 X_SC_THREAD_PROCESS_SHARED = 82 1361 1362 X_SC_NPROCESSORS_CONF = 83 1363 X_SC_NPROCESSORS_ONLN = 84 1364 X_SC_PHYS_PAGES = 85 1365 X_SC_AVPHYS_PAGES = 86 1366 X_SC_ATEXIT_MAX = 87 1367 X_SC_PASS_MAX = 88 1368 1369 X_SC_XOPEN_VERSION = 89 1370 X_SC_XOPEN_XCU_VERSION = 90 1371 X_SC_XOPEN_UNIX = 91 1372 X_SC_XOPEN_CRYPT = 92 1373 X_SC_XOPEN_ENH_I18N = 93 1374 X_SC_XOPEN_SHM = 94 1375 1376 X_SC_2_CHAR_TERM = 95 1377 X_SC_2_C_VERSION = 96 1378 X_SC_2_UPE = 97 1379 1380 X_SC_XOPEN_XPG2 = 98 1381 X_SC_XOPEN_XPG3 = 99 1382 X_SC_XOPEN_XPG4 = 100 1383 1384 X_SC_CHAR_BIT = 101 1385 X_SC_CHAR_MAX = 102 1386 X_SC_CHAR_MIN = 103 1387 X_SC_INT_MAX = 104 1388 X_SC_INT_MIN = 105 1389 X_SC_LONG_BIT = 106 1390 X_SC_WORD_BIT = 107 1391 X_SC_MB_LEN_MAX = 108 1392 X_SC_NZERO = 109 1393 X_SC_SSIZE_MAX = 110 1394 X_SC_SCHAR_MAX = 111 1395 X_SC_SCHAR_MIN = 112 1396 X_SC_SHRT_MAX = 113 1397 X_SC_SHRT_MIN = 114 1398 X_SC_UCHAR_MAX = 115 1399 X_SC_UINT_MAX = 116 1400 X_SC_ULONG_MAX = 117 1401 X_SC_USHRT_MAX = 118 1402 1403 X_SC_NL_ARGMAX = 119 1404 X_SC_NL_LANGMAX = 120 1405 X_SC_NL_MSGMAX = 121 1406 X_SC_NL_NMAX = 122 1407 X_SC_NL_SETMAX = 123 1408 X_SC_NL_TEXTMAX = 124 1409 1410 X_SC_XBS5_ILP32_OFF32 = 125 1411 X_SC_XBS5_ILP32_OFFBIG = 126 1412 X_SC_XBS5_LP64_OFF64 = 127 1413 X_SC_XBS5_LPBIG_OFFBIG = 128 1414 1415 X_SC_XOPEN_LEGACY = 129 1416 X_SC_XOPEN_REALTIME = 130 1417 X_SC_XOPEN_REALTIME_THREADS = 131 1418 1419 X_SC_ADVISORY_INFO = 132 1420 X_SC_BARRIERS = 133 1421 X_SC_BASE = 134 1422 X_SC_C_LANG_SUPPORT = 135 1423 X_SC_C_LANG_SUPPORT_R = 136 1424 X_SC_CLOCK_SELECTION = 137 1425 X_SC_CPUTIME = 138 1426 X_SC_THREAD_CPUTIME = 139 1427 X_SC_DEVICE_IO = 140 1428 X_SC_DEVICE_SPECIFIC = 141 1429 X_SC_DEVICE_SPECIFIC_R = 142 1430 X_SC_FD_MGMT = 143 1431 X_SC_FIFO = 144 1432 X_SC_PIPE = 145 1433 X_SC_FILE_ATTRIBUTES = 146 1434 X_SC_FILE_LOCKING = 147 1435 X_SC_FILE_SYSTEM = 148 1436 X_SC_MONOTONIC_CLOCK = 149 1437 X_SC_MULTI_PROCESS = 150 1438 X_SC_SINGLE_PROCESS = 151 1439 X_SC_NETWORKING = 152 1440 X_SC_READER_WRITER_LOCKS = 153 1441 X_SC_SPIN_LOCKS = 154 1442 X_SC_REGEXP = 155 1443 X_SC_REGEX_VERSION = 156 1444 X_SC_SHELL = 157 1445 X_SC_SIGNALS = 158 1446 X_SC_SPAWN = 159 1447 X_SC_SPORADIC_SERVER = 160 1448 X_SC_THREAD_SPORADIC_SERVER = 161 1449 X_SC_SYSTEM_DATABASE = 162 1450 X_SC_SYSTEM_DATABASE_R = 163 1451 X_SC_TIMEOUTS = 164 1452 X_SC_TYPED_MEMORY_OBJECTS = 165 1453 X_SC_USER_GROUPS = 166 1454 X_SC_USER_GROUPS_R = 167 1455 X_SC_2_PBS = 168 1456 X_SC_2_PBS_ACCOUNTING = 169 1457 X_SC_2_PBS_LOCATE = 170 1458 X_SC_2_PBS_MESSAGE = 171 1459 X_SC_2_PBS_TRACK = 172 1460 X_SC_SYMLOOP_MAX = 173 1461 X_SC_STREAMS = 174 1462 X_SC_2_PBS_CHECKPOINT = 175 1463 1464 X_SC_V6_ILP32_OFF32 = 176 1465 X_SC_V6_ILP32_OFFBIG = 177 1466 X_SC_V6_LP64_OFF64 = 178 1467 X_SC_V6_LPBIG_OFFBIG = 179 1468 1469 X_SC_HOST_NAME_MAX = 180 1470 X_SC_TRACE = 181 1471 X_SC_TRACE_EVENT_FILTER = 182 1472 X_SC_TRACE_INHERIT = 183 1473 X_SC_TRACE_LOG = 184 1474 1475 X_SC_LEVEL1_ICACHE_SIZE = 185 1476 X_SC_LEVEL1_ICACHE_ASSOC = 186 1477 X_SC_LEVEL1_ICACHE_LINESIZE = 187 1478 X_SC_LEVEL1_DCACHE_SIZE = 188 1479 X_SC_LEVEL1_DCACHE_ASSOC = 189 1480 X_SC_LEVEL1_DCACHE_LINESIZE = 190 1481 X_SC_LEVEL2_CACHE_SIZE = 191 1482 X_SC_LEVEL2_CACHE_ASSOC = 192 1483 X_SC_LEVEL2_CACHE_LINESIZE = 193 1484 X_SC_LEVEL3_CACHE_SIZE = 194 1485 X_SC_LEVEL3_CACHE_ASSOC = 195 1486 X_SC_LEVEL3_CACHE_LINESIZE = 196 1487 X_SC_LEVEL4_CACHE_SIZE = 197 1488 X_SC_LEVEL4_CACHE_ASSOC = 198 1489 X_SC_LEVEL4_CACHE_LINESIZE = 199 1490 // Leave room here, maybe we need a few more cache levels some day. 1491 1492 X_SC_IPV6 = 235 1493 X_SC_RAW_SOCKETS = 236 1494 1495 X_SC_V7_ILP32_OFF32 = 237 1496 X_SC_V7_ILP32_OFFBIG = 238 1497 X_SC_V7_LP64_OFF64 = 239 1498 X_SC_V7_LPBIG_OFFBIG = 240 1499 1500 X_SC_SS_REPL_MAX = 241 1501 1502 X_SC_TRACE_EVENT_NAME_MAX = 242 1503 X_SC_TRACE_NAME_MAX = 243 1504 X_SC_TRACE_SYS_MAX = 244 1505 X_SC_TRACE_USER_EVENT_MAX = 245 1506 1507 X_SC_XOPEN_STREAMS = 246 1508 1509 X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 1510 X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 1511 ) 1512 1513 // open/fcntl. 1514 1515 // open file description locks. 1516 // 1517 // Usually record locks held by a process are released on *any* close and are 1518 // not inherited across a fork. 1519 // 1520 // These cmd values will set locks that conflict with process-associated record 1521 // locks, but are "owned" by the opened file description, not the process. 1522 // This means that they are inherited across fork or clone with CLONE_FILES 1523 // like BSD (flock) locks, and they are only released automatically when the 1524 // last reference to the the file description against which they were acquired 1525 // is put. 1526 1527 // For now, Linux has no separate synchronicity options for read 1528 // operations. We define O_RSYNC therefore as the same as O_SYNC 1529 // since this is a superset. 1530 1531 // Values for the second argument to `fcntl'. 1532 1533 // Set / get write life time hints. 1534 1535 // For F_[GET|SET]FD. 1536 1537 // For posix fcntl() and `l_type' field of a `struct flock' for lockf(). 1538 1539 // For old implementation of BSD flock. 1540 1541 // Operations for BSD flock, also used by the kernel implementation. 1542 1543 // Types of directory notifications that may be requested with F_NOTIFY. 1544 1545 // Owner types. 1546 const ( /* fcntl-linux.h:265:1: */ 1547 F_OWNER_TID = 0 // Kernel thread. 1548 F_OWNER_PID = 1 // Process. 1549 F_OWNER_PGRP = 2 // Process group. 1550 F_OWNER_GID = 2 1551 ) 1552 1553 // Bits in the FLAGS argument to `send', `recv', et al. 1554 const ( /* socket.h:200:1: */ 1555 MSG_OOB = 1 // Process out-of-band data. 1556 MSG_PEEK = 2 // Peek at incoming messages. 1557 MSG_DONTROUTE = 4 // Don't use local routing. 1558 // DECnet uses a different name. 1559 MSG_TRYHARD = 4 1560 MSG_CTRUNC = 8 // Control data lost before delivery. 1561 MSG_PROXY = 16 // Supply or ask second address. 1562 MSG_TRUNC = 32 1563 MSG_DONTWAIT = 64 // Nonblocking IO. 1564 MSG_EOR = 128 // End of record. 1565 MSG_WAITALL = 256 // Wait for a full request. 1566 MSG_FIN = 512 1567 MSG_SYN = 1024 1568 MSG_CONFIRM = 2048 // Confirm path validity. 1569 MSG_RST = 4096 1570 MSG_ERRQUEUE = 8192 // Fetch message from error queue. 1571 MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. 1572 MSG_MORE = 32768 // Sender will send more. 1573 MSG_WAITFORONE = 65536 // Wait for at least one packet to return. 1574 MSG_BATCH = 262144 // sendmmsg: more messages coming. 1575 MSG_ZEROCOPY = 67108864 // Use user data in kernel path. 1576 MSG_FASTOPEN = 536870912 // Send data in TCP SYN. 1577 1578 MSG_CMSG_CLOEXEC = 1073741824 1579 ) 1580 1581 // Socket level message types. This must match the definitions in 1582 // <linux/socket.h>. 1583 const ( /* socket.h:332:1: */ 1584 SCM_RIGHTS = 1 1585 SCM_CREDENTIALS = 2 1586 ) 1587 1588 // Declarations of socket constants, types, and functions. 1589 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1590 // This file is part of the GNU C Library. 1591 // 1592 // The GNU C Library is free software; you can redistribute it and/or 1593 // modify it under the terms of the GNU Lesser General Public 1594 // License as published by the Free Software Foundation; either 1595 // version 2.1 of the License, or (at your option) any later version. 1596 // 1597 // The GNU C Library is distributed in the hope that it will be useful, 1598 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1599 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1600 // Lesser General Public License for more details. 1601 // 1602 // You should have received a copy of the GNU Lesser General Public 1603 // License along with the GNU C Library; if not, see 1604 // <https://www.gnu.org/licenses/>. 1605 1606 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1607 // This file is part of the GNU C Library. 1608 // 1609 // The GNU C Library is free software; you can redistribute it and/or 1610 // modify it under the terms of the GNU Lesser General Public 1611 // License as published by the Free Software Foundation; either 1612 // version 2.1 of the License, or (at your option) any later version. 1613 // 1614 // The GNU C Library is distributed in the hope that it will be useful, 1615 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1616 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1617 // Lesser General Public License for more details. 1618 // 1619 // You should have received a copy of the GNU Lesser General Public 1620 // License along with the GNU C Library; if not, see 1621 // <https://www.gnu.org/licenses/>. 1622 1623 // Define struct iovec. 1624 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 1625 // This file is part of the GNU C Library. 1626 // 1627 // The GNU C Library is free software; you can redistribute it and/or 1628 // modify it under the terms of the GNU Lesser General Public 1629 // License as published by the Free Software Foundation; either 1630 // version 2.1 of the License, or (at your option) any later version. 1631 // 1632 // The GNU C Library is distributed in the hope that it will be useful, 1633 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1634 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1635 // Lesser General Public License for more details. 1636 // 1637 // You should have received a copy of the GNU Lesser General Public 1638 // License along with the GNU C Library; if not, see 1639 // <https://www.gnu.org/licenses/>. 1640 1641 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 1642 // 1643 // This file is part of GCC. 1644 // 1645 // GCC is free software; you can redistribute it and/or modify 1646 // it under the terms of the GNU General Public License as published by 1647 // the Free Software Foundation; either version 3, or (at your option) 1648 // any later version. 1649 // 1650 // GCC is distributed in the hope that it will be useful, 1651 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1652 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1653 // GNU General Public License for more details. 1654 // 1655 // Under Section 7 of GPL version 3, you are granted additional 1656 // permissions described in the GCC Runtime Library Exception, version 1657 // 3.1, as published by the Free Software Foundation. 1658 // 1659 // You should have received a copy of the GNU General Public License and 1660 // a copy of the GCC Runtime Library Exception along with this program; 1661 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1662 // <http://www.gnu.org/licenses/>. 1663 1664 // ISO C Standard: 7.17 Common definitions <stddef.h> 1665 1666 // Any one of these symbols __need_* means that GNU libc 1667 // wants us just to define one data type. So don't define 1668 // the symbols that indicate this file's entire job has been done. 1669 1670 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1671 // There's no way to win with the other order! Sun lossage. 1672 1673 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1674 // Just ignore it. 1675 1676 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1677 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1678 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1679 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1680 // If we find that the macros are still defined at this point, we must 1681 // invoke them so that the type is defined as expected. 1682 1683 // In case nobody has defined these types, but we aren't running under 1684 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1685 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1686 // parts of GCC is compiled by an older compiler, that actually 1687 // include gstddef.h, such as collect2. 1688 1689 // Signed type of difference of two pointers. 1690 1691 // Define this type if we are doing the whole job, 1692 // or if we want this type in particular. 1693 1694 // Unsigned type of `sizeof' something. 1695 1696 // Define this type if we are doing the whole job, 1697 // or if we want this type in particular. 1698 1699 // Wide character type. 1700 // Locale-writers should change this as necessary to 1701 // be big enough to hold unique values not between 0 and 127, 1702 // and not (wchar_t) -1, for each defined multibyte character. 1703 1704 // Define this type if we are doing the whole job, 1705 // or if we want this type in particular. 1706 1707 // A null pointer constant. 1708 1709 // This operating system-specific header file defines the SOCK_*, PF_*, 1710 // AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', 1711 // `struct msghdr', and `struct linger' types. 1712 // System-specific socket constants and types. Linux version. 1713 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1714 // This file is part of the GNU C Library. 1715 // 1716 // The GNU C Library is free software; you can redistribute it and/or 1717 // modify it under the terms of the GNU Lesser General Public 1718 // License as published by the Free Software Foundation; either 1719 // version 2.1 of the License, or (at your option) any later version. 1720 // 1721 // The GNU C Library is distributed in the hope that it will be useful, 1722 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1723 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1724 // Lesser General Public License for more details. 1725 // 1726 // You should have received a copy of the GNU Lesser General Public 1727 // License along with the GNU C Library; if not, see 1728 // <https://www.gnu.org/licenses/>. 1729 1730 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 1731 // 1732 // This file is part of GCC. 1733 // 1734 // GCC is free software; you can redistribute it and/or modify 1735 // it under the terms of the GNU General Public License as published by 1736 // the Free Software Foundation; either version 3, or (at your option) 1737 // any later version. 1738 // 1739 // GCC is distributed in the hope that it will be useful, 1740 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1741 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1742 // GNU General Public License for more details. 1743 // 1744 // Under Section 7 of GPL version 3, you are granted additional 1745 // permissions described in the GCC Runtime Library Exception, version 1746 // 3.1, as published by the Free Software Foundation. 1747 // 1748 // You should have received a copy of the GNU General Public License and 1749 // a copy of the GCC Runtime Library Exception along with this program; 1750 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 1751 // <http://www.gnu.org/licenses/>. 1752 1753 // ISO C Standard: 7.17 Common definitions <stddef.h> 1754 1755 // Any one of these symbols __need_* means that GNU libc 1756 // wants us just to define one data type. So don't define 1757 // the symbols that indicate this file's entire job has been done. 1758 1759 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1760 // There's no way to win with the other order! Sun lossage. 1761 1762 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1763 // Just ignore it. 1764 1765 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1766 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1767 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1768 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1769 // If we find that the macros are still defined at this point, we must 1770 // invoke them so that the type is defined as expected. 1771 1772 // In case nobody has defined these types, but we aren't running under 1773 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1774 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1775 // parts of GCC is compiled by an older compiler, that actually 1776 // include gstddef.h, such as collect2. 1777 1778 // Signed type of difference of two pointers. 1779 1780 // Define this type if we are doing the whole job, 1781 // or if we want this type in particular. 1782 1783 // Unsigned type of `sizeof' something. 1784 1785 // Define this type if we are doing the whole job, 1786 // or if we want this type in particular. 1787 1788 // Wide character type. 1789 // Locale-writers should change this as necessary to 1790 // be big enough to hold unique values not between 0 and 127, 1791 // and not (wchar_t) -1, for each defined multibyte character. 1792 1793 // Define this type if we are doing the whole job, 1794 // or if we want this type in particular. 1795 1796 // A null pointer constant. 1797 1798 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1799 // This file is part of the GNU C Library. 1800 // 1801 // The GNU C Library is free software; you can redistribute it and/or 1802 // modify it under the terms of the GNU Lesser General Public 1803 // License as published by the Free Software Foundation; either 1804 // version 2.1 of the License, or (at your option) any later version. 1805 // 1806 // The GNU C Library is distributed in the hope that it will be useful, 1807 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1808 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1809 // Lesser General Public License for more details. 1810 // 1811 // You should have received a copy of the GNU Lesser General Public 1812 // License along with the GNU C Library; if not, see 1813 // <https://www.gnu.org/licenses/>. 1814 1815 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 1816 1817 // Type for length arguments in socket calls. 1818 1819 // Get the architecture-dependent definition of enum __socket_type. 1820 // Define enum __socket_type for generic Linux. 1821 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1822 // This file is part of the GNU C Library. 1823 // 1824 // The GNU C Library is free software; you can redistribute it and/or 1825 // modify it under the terms of the GNU Lesser General Public 1826 // License as published by the Free Software Foundation; either 1827 // version 2.1 of the License, or (at your option) any later version. 1828 // 1829 // The GNU C Library is distributed in the hope that it will be useful, 1830 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1831 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1832 // Lesser General Public License for more details. 1833 // 1834 // You should have received a copy of the GNU Lesser General Public 1835 // License along with the GNU C Library; if not, see 1836 // <https://www.gnu.org/licenses/>. 1837 1838 // Types of sockets. 1839 const ( /* socket_type.h:24:1: */ 1840 SOCK_STREAM = 1 // Sequenced, reliable, connection-based 1841 // byte streams. 1842 SOCK_DGRAM = 2 // Connectionless, unreliable datagrams 1843 // of fixed maximum length. 1844 SOCK_RAW = 3 // Raw protocol interface. 1845 SOCK_RDM = 4 // Reliably-delivered messages. 1846 SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, 1847 // datagrams of fixed maximum length. 1848 SOCK_DCCP = 6 // Datagram Congestion Control Protocol. 1849 SOCK_PACKET = 10 // Linux specific way of getting packets 1850 // at the dev level. For writing rarp and 1851 // other similar things on the user level. 1852 1853 // Flags to be ORed into the type parameter of socket and socketpair and 1854 // used for the flags parameter of paccept. 1855 1856 SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the 1857 // new descriptor(s). 1858 SOCK_NONBLOCK = 2048 1859 ) 1860 1861 // A null pointer constant. 1862 1863 // XPG requires a few symbols from <sys/wait.h> being defined. 1864 // Definitions of flag bits for `waitpid' et al. 1865 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1866 // This file is part of the GNU C Library. 1867 // 1868 // The GNU C Library is free software; you can redistribute it and/or 1869 // modify it under the terms of the GNU Lesser General Public 1870 // License as published by the Free Software Foundation; either 1871 // version 2.1 of the License, or (at your option) any later version. 1872 // 1873 // The GNU C Library is distributed in the hope that it will be useful, 1874 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1875 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1876 // Lesser General Public License for more details. 1877 // 1878 // You should have received a copy of the GNU Lesser General Public 1879 // License along with the GNU C Library; if not, see 1880 // <https://www.gnu.org/licenses/>. 1881 1882 // Bits in the third argument to `waitpid'. 1883 1884 // Bits in the fourth argument to `waitid'. 1885 1886 // The following values are used by the `waitid' function. 1887 1888 // The Linux kernel defines these bare, rather than an enum, 1889 // which causes a conflict if the include order is reversed. 1890 1891 const ( /* waitflags.h:52:1: */ 1892 P_ALL = 0 // Wait for any child. 1893 P_PID = 1 // Wait for specified process. 1894 P_PGID = 2 1895 ) 1896 1897 // The following constants should be used for the second parameter of 1898 // `shutdown'. 1899 const ( /* socket.h:41:1: */ 1900 SHUT_RD = 0 // No more receptions. 1901 SHUT_WR = 1 // No more transmissions. 1902 SHUT_RDWR = 2 1903 ) 1904 1905 // Values for the first argument to `getitimer' and `setitimer'. 1906 const ( /* time.h:89:1: */ 1907 // Timers run in real time. 1908 ITIMER_REAL = 0 1909 // Timers run only when the process is executing. 1910 ITIMER_VIRTUAL = 1 1911 // Timers run when the process is executing and when 1912 // the system is executing on behalf of the process. 1913 ITIMER_PROF = 2 1914 ) 1915 1916 // was definitions for sign-extending bitfields on architectures without 1917 // native types smaller than 64-bit, now just backwards compatibility 1918 1919 // this version should leave result of type (t *), but that should only be 1920 // used when not in MUSTCOPY 1921 1922 // Copyright 1989 Network Computing Devices, Inc., Mountain View, California. 1923 // 1924 // Permission to use, copy, modify, and distribute this software and its 1925 // documentation for any purpose and without fee is hereby granted, provided 1926 // that the above copyright notice appear in all copies and that both that 1927 // copyright notice and this permission notice appear in supporting 1928 // documentation, and that the name of N.C.D. not be used in advertising or 1929 // publicity pertaining to distribution of the software without specific, 1930 // written prior permission. N.C.D. makes no representations about the 1931 // suitability of this software for any purpose. It is provided "as is" 1932 // without express or implied warranty. 1933 // 1934 1935 //********************************************************** 1936 // 1937 // Copyright 1987, 1998 The Open Group 1938 // 1939 // Permission to use, copy, modify, distribute, and sell this software and its 1940 // documentation for any purpose is hereby granted without fee, provided that 1941 // the above copyright notice appear in all copies and that both that 1942 // copyright notice and this permission notice appear in supporting 1943 // documentation. 1944 // 1945 // The above copyright notice and this permission notice shall be included in 1946 // all copies or substantial portions of the Software. 1947 // 1948 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1949 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1950 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1951 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 1952 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1953 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1954 // 1955 // Except as contained in this notice, the name of The Open Group shall not be 1956 // used in advertising or otherwise to promote the sale, use or other dealings 1957 // in this Software without prior written authorization from The Open Group. 1958 // 1959 // 1960 // Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 1961 // 1962 // All Rights Reserved 1963 // 1964 // Permission to use, copy, modify, and distribute this software and its 1965 // documentation for any purpose and without fee is hereby granted, 1966 // provided that the above copyright notice appear in all copies and that 1967 // both that copyright notice and this permission notice appear in 1968 // supporting documentation, and that the name of Digital not be 1969 // used in advertising or publicity pertaining to distribution of the 1970 // software without specific, written prior permission. 1971 // 1972 // DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 1973 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 1974 // DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 1975 // ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 1976 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 1977 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 1978 // SOFTWARE. 1979 // 1980 // ***************************************************************** 1981 1982 // 1983 // 1984 // Copyright 1989, 1991, 1998 The Open Group 1985 // 1986 // Permission to use, copy, modify, distribute, and sell this software and its 1987 // documentation for any purpose is hereby granted without fee, provided that 1988 // the above copyright notice appear in all copies and that both that 1989 // copyright notice and this permission notice appear in supporting 1990 // documentation. 1991 // 1992 // The above copyright notice and this permission notice shall be included in 1993 // all copies or substantial portions of the Software. 1994 // 1995 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1996 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1997 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1998 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 1999 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2000 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2001 // 2002 // Except as contained in this notice, the name of The Open Group shall not be 2003 // used in advertising or otherwise to promote the sale, use or other dealings 2004 // in this Software without prior written authorization from The Open Group. 2005 // * 2006 // 2007 2008 // Definitions to make function prototypes manageable 2009 2010 // Function prototype configuration (see configure for more info) 2011 2012 // http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute 2013 2014 // Added in X11R6.9, so available in any version of modular xproto 2015 2016 // Added in X11R6.9, so available in any version of modular xproto 2017 2018 // Branch prediction hints for individual conditionals 2019 // requires xproto >= 7.0.9 2020 2021 // Bulk branch prediction hints via marking error path functions as "cold" 2022 // requires xproto >= 7.0.25 2023 2024 // Added in X11R6.9, so available in any version of modular xproto 2025 2026 // requires xproto >= 7.0.30 2027 2028 // requires xproto >= 7.0.17 2029 2030 // Added in X11R6.9, so available in any version of modular xproto 2031 2032 // requires xproto >= 7.0.22 - since this uses either gcc or C99 variable 2033 // argument macros, must be only used inside #ifdef _X_NONNULL guards, as 2034 // many legacy X clients are compiled in C89 mode still. 2035 2036 // requires xproto >= 7.0.22 2037 2038 // C99 keyword "inline" or equivalent extensions in pre-C99 compilers 2039 // requires xproto >= 7.0.9 2040 // (introduced in 7.0.8 but didn't support all compilers until 7.0.9) 2041 2042 // C99 keyword "restrict" or equivalent extensions in pre-C99 compilers 2043 // requires xproto >= 7.0.21 2044 2045 // requires xproto >= 7.0.30 2046 2047 // IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned 2048 // multicast addresses for XDMCP, where X in the prefix may be replaced 2049 // by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, 2050 // 5 for Site-Local, and so on. We set the default here to the Link-Local 2051 // version to most closely match the old IPv4 subnet broadcast behavior. 2052 // Both xdm and X -query allow specifying a different address if a different 2053 // scope is defined. 2054 2055 const ( /* Xdmcp.h:46:1: */ 2056 BROADCAST_QUERY = 1 2057 QUERY = 2 2058 INDIRECT_QUERY = 3 2059 FORWARD_QUERY = 4 2060 WILLING = 5 2061 UNWILLING = 6 2062 REQUEST = 7 2063 ACCEPT = 8 2064 DECLINE = 9 2065 MANAGE = 10 2066 REFUSE = 11 2067 FAILED = 12 2068 KEEPALIVE = 13 2069 ALIVE = 14 2070 ) 2071 2072 const ( /* Xdmcp.h:52:1: */ 2073 XDM_QUERY = 0 2074 XDM_BROADCAST = 1 2075 XDM_INDIRECT = 2 2076 XDM_COLLECT_QUERY = 3 2077 XDM_COLLECT_BROADCAST_QUERY = 4 2078 XDM_COLLECT_INDIRECT_QUERY = 5 2079 XDM_START_CONNECTION = 6 2080 XDM_AWAIT_REQUEST_RESPONSE = 7 2081 XDM_AWAIT_MANAGE_RESPONSE = 8 2082 XDM_MANAGE = 9 2083 XDM_RUN_SESSION = 10 2084 XDM_OFF = 11 2085 XDM_AWAIT_USER_INPUT = 12 2086 XDM_KEEPALIVE = 13 2087 XDM_AWAIT_ALIVE_RESPONSE = 14 2088 XDM_KEEP_ME_LAST = 15 2089 ) 2090 2091 type Ptrdiff_t = int32 /* <builtin>:3:26 */ 2092 2093 type Size_t = uint32 /* <builtin>:9:23 */ 2094 2095 type Wchar_t = int32 /* <builtin>:15:24 */ 2096 2097 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 2098 type X__float128 = float64 /* <builtin>:47:21 */ 2099 2100 // 2101 // Copyright 1989, 1998 The Open Group 2102 // 2103 // Permission to use, copy, modify, distribute, and sell this software and its 2104 // documentation for any purpose is hereby granted without fee, provided that 2105 // the above copyright notice appear in all copies and that both that 2106 // copyright notice and this permission notice appear in supporting 2107 // documentation. 2108 // 2109 // The above copyright notice and this permission notice shall be included in 2110 // all copies or substantial portions of the Software. 2111 // 2112 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2113 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2114 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2115 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2116 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2117 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2118 // 2119 // Except as contained in this notice, the name of The Open Group shall not be 2120 // used in advertising or otherwise to promote the sale, use or other dealings 2121 // in this Software without prior written authorization from The Open Group. 2122 // * 2123 // * Author: Keith Packard, MIT X Consortium 2124 // 2125 2126 // config.h. Generated from config.h.in by configure. 2127 // config.h.in. Generated from configure.ac by autoheader. 2128 2129 // Has Wraphelp.c needed for XDM AUTH protocols 2130 2131 // Define to 1 if you have the `arc4random_buf' function. 2132 // #undef HAVE_ARC4RANDOM_BUF 2133 2134 // Define to 1 if you have the <dlfcn.h> header file. 2135 2136 // Define to 1 if you have the <inttypes.h> header file. 2137 2138 // Define to 1 if you have the `bsd' library (-lbsd). 2139 // #undef HAVE_LIBBSD 2140 2141 // Define to 1 if you have the `lrand48' function. 2142 2143 // Define to 1 if you have the <memory.h> header file. 2144 2145 // Define to 1 if you have the `srand48' function. 2146 2147 // Define to 1 if you have the <stdint.h> header file. 2148 2149 // Define to 1 if you have the <stdlib.h> header file. 2150 2151 // Define to 1 if you have the <strings.h> header file. 2152 2153 // Define to 1 if you have the <string.h> header file. 2154 2155 // Define to 1 if you have the <sys/stat.h> header file. 2156 2157 // Define to 1 if you have the <sys/types.h> header file. 2158 2159 // Define to 1 if you have the <unistd.h> header file. 2160 2161 // Define to the sub-directory in which libtool stores uninstalled libraries. 2162 2163 // Name of package 2164 2165 // Define to the address where bug reports for this package should be sent. 2166 2167 // Define to the full name of this package. 2168 2169 // Define to the full name and version of this package. 2170 2171 // Define to the one symbol short name of this package. 2172 2173 // Define to the home page for this package. 2174 2175 // Define to the version of this package. 2176 2177 // Major version of this package 2178 2179 // Minor version of this package 2180 2181 // Patch version of this package 2182 2183 // Define to 1 if you have the ANSI C header files. 2184 2185 // Enable extensions on AIX 3, Interix. 2186 // Enable GNU extensions on systems that have them. 2187 // Enable threading extensions on Solaris. 2188 // Enable extensions on HP NonStop. 2189 // Enable general extensions on Solaris. 2190 2191 // Version number of package 2192 2193 // Define to 1 if on MINIX. 2194 // #undef _MINIX 2195 2196 // Define to 2 if the system does not provide POSIX.1 features except with 2197 // this defined. 2198 // #undef _POSIX_1_SOURCE 2199 2200 // Define to 1 if you need to in order for `stat' and other things to work. 2201 // #undef _POSIX_SOURCE 2202 // 2203 // 2204 // Copyright 1987, 1998 The Open Group 2205 // 2206 // Permission to use, copy, modify, distribute, and sell this software and its 2207 // documentation for any purpose is hereby granted without fee, provided that 2208 // the above copyright notice appear in all copies and that both that 2209 // copyright notice and this permission notice appear in supporting 2210 // documentation. 2211 // 2212 // The above copyright notice and this permission notice shall be included in 2213 // all copies or substantial portions of the Software. 2214 // 2215 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2216 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2217 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2218 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2219 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2220 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2221 // 2222 // Except as contained in this notice, the name of The Open Group shall not be 2223 // used in advertising or otherwise to promote the sale, use or other dealings 2224 // in this Software without prior written authorization from The Open Group. 2225 // * 2226 // * The X Window System is a Trademark of The Open Group. 2227 // * 2228 // 2229 2230 // This is a collection of things to try and minimize system dependencies 2231 // in a "significant" number of source files. 2232 2233 // 2234 // O/S-dependent (mis)feature macro definitions 2235 // 2236 // Copyright 1991, 1998 The Open Group 2237 // 2238 // Permission to use, copy, modify, distribute, and sell this software and its 2239 // documentation for any purpose is hereby granted without fee, provided that 2240 // the above copyright notice appear in all copies and that both that 2241 // copyright notice and this permission notice appear in supporting 2242 // documentation. 2243 // 2244 // The above copyright notice and this permission notice shall be included in 2245 // all copies or substantial portions of the Software. 2246 // 2247 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2248 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2249 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2250 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2251 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2252 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2253 // 2254 // Except as contained in this notice, the name of The Open Group shall not be 2255 // used in advertising or otherwise to promote the sale, use or other dealings 2256 // in this Software without prior written authorization from The Open Group. 2257 // 2258 2259 // X_NOT_POSIX means does not have POSIX header files. Lack of this 2260 // symbol does NOT mean that the POSIX environment is the default. 2261 // You may still have to define _POSIX_SOURCE to get it. 2262 2263 // Get major data types (esp. caddr_t) 2264 2265 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2266 // This file is part of the GNU C Library. 2267 // 2268 // The GNU C Library is free software; you can redistribute it and/or 2269 // modify it under the terms of the GNU Lesser General Public 2270 // License as published by the Free Software Foundation; either 2271 // version 2.1 of the License, or (at your option) any later version. 2272 // 2273 // The GNU C Library is distributed in the hope that it will be useful, 2274 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2275 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2276 // Lesser General Public License for more details. 2277 // 2278 // You should have received a copy of the GNU Lesser General Public 2279 // License along with the GNU C Library; if not, see 2280 // <https://www.gnu.org/licenses/>. 2281 2282 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 2283 2284 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2285 // This file is part of the GNU C Library. 2286 // 2287 // The GNU C Library is free software; you can redistribute it and/or 2288 // modify it under the terms of the GNU Lesser General Public 2289 // License as published by the Free Software Foundation; either 2290 // version 2.1 of the License, or (at your option) any later version. 2291 // 2292 // The GNU C Library is distributed in the hope that it will be useful, 2293 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2294 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2295 // Lesser General Public License for more details. 2296 // 2297 // You should have received a copy of the GNU Lesser General Public 2298 // License along with the GNU C Library; if not, see 2299 // <https://www.gnu.org/licenses/>. 2300 2301 // These are defined by the user (or the compiler) 2302 // to specify the desired environment: 2303 // 2304 // __STRICT_ANSI__ ISO Standard C. 2305 // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. 2306 // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. 2307 // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. 2308 // __STDC_WANT_LIB_EXT2__ 2309 // Extensions to ISO C99 from TR 27431-2:2010. 2310 // __STDC_WANT_IEC_60559_BFP_EXT__ 2311 // Extensions to ISO C11 from TS 18661-1:2014. 2312 // __STDC_WANT_IEC_60559_FUNCS_EXT__ 2313 // Extensions to ISO C11 from TS 18661-4:2015. 2314 // __STDC_WANT_IEC_60559_TYPES_EXT__ 2315 // Extensions to ISO C11 from TS 18661-3:2015. 2316 // 2317 // _POSIX_SOURCE IEEE Std 1003.1. 2318 // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; 2319 // if >=199309L, add IEEE Std 1003.1b-1993; 2320 // if >=199506L, add IEEE Std 1003.1c-1995; 2321 // if >=200112L, all of IEEE 1003.1-2004 2322 // if >=200809L, all of IEEE 1003.1-2008 2323 // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if 2324 // Single Unix conformance is wanted, to 600 for the 2325 // sixth revision, to 700 for the seventh revision. 2326 // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. 2327 // _LARGEFILE_SOURCE Some more functions for correct standard I/O. 2328 // _LARGEFILE64_SOURCE Additional functionality from LFS for large files. 2329 // _FILE_OFFSET_BITS=N Select default filesystem interface. 2330 // _ATFILE_SOURCE Additional *at interfaces. 2331 // _GNU_SOURCE All of the above, plus GNU extensions. 2332 // _DEFAULT_SOURCE The default set of features (taking precedence over 2333 // __STRICT_ANSI__). 2334 // 2335 // _FORTIFY_SOURCE Add security hardening to many library functions. 2336 // Set to 1 or 2; 2 performs stricter checks than 1. 2337 // 2338 // _REENTRANT, _THREAD_SAFE 2339 // Obsolete; equivalent to _POSIX_C_SOURCE=199506L. 2340 // 2341 // The `-ansi' switch to the GNU C compiler, and standards conformance 2342 // options such as `-std=c99', define __STRICT_ANSI__. If none of 2343 // these are defined, or if _DEFAULT_SOURCE is defined, the default is 2344 // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 2345 // 200809L, as well as enabling miscellaneous functions from BSD and 2346 // SVID. If more than one of these are defined, they accumulate. For 2347 // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together 2348 // give you ISO C, 1003.1, and 1003.2, but nothing else. 2349 // 2350 // These are defined by this file and are used by the 2351 // header files to decide what to declare or define: 2352 // 2353 // __GLIBC_USE (F) Define things from feature set F. This is defined 2354 // to 1 or 0; the subsequent macros are either defined 2355 // or undefined, and those tests should be moved to 2356 // __GLIBC_USE. 2357 // __USE_ISOC11 Define ISO C11 things. 2358 // __USE_ISOC99 Define ISO C99 things. 2359 // __USE_ISOC95 Define ISO C90 AMD1 (C95) things. 2360 // __USE_ISOCXX11 Define ISO C++11 things. 2361 // __USE_POSIX Define IEEE Std 1003.1 things. 2362 // __USE_POSIX2 Define IEEE Std 1003.2 things. 2363 // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. 2364 // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. 2365 // __USE_XOPEN Define XPG things. 2366 // __USE_XOPEN_EXTENDED Define X/Open Unix things. 2367 // __USE_UNIX98 Define Single Unix V2 things. 2368 // __USE_XOPEN2K Define XPG6 things. 2369 // __USE_XOPEN2KXSI Define XPG6 XSI things. 2370 // __USE_XOPEN2K8 Define XPG7 things. 2371 // __USE_XOPEN2K8XSI Define XPG7 XSI things. 2372 // __USE_LARGEFILE Define correct standard I/O things. 2373 // __USE_LARGEFILE64 Define LFS things with separate names. 2374 // __USE_FILE_OFFSET64 Define 64bit interface as default. 2375 // __USE_MISC Define things from 4.3BSD or System V Unix. 2376 // __USE_ATFILE Define *at interfaces and AT_* constants for them. 2377 // __USE_GNU Define GNU extensions. 2378 // __USE_FORTIFY_LEVEL Additional security measures used, according to level. 2379 // 2380 // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are 2381 // defined by this file unconditionally. `__GNU_LIBRARY__' is provided 2382 // only for compatibility. All new code should use the other symbols 2383 // to test for features. 2384 // 2385 // All macros listed above as possibly being defined by this file are 2386 // explicitly undefined if they are not explicitly defined. 2387 // Feature-test macros that are not defined by the user or compiler 2388 // but are implied by the other feature-test macros defined (or by the 2389 // lack of any definitions) are defined by the file. 2390 // 2391 // ISO C feature test macros depend on the definition of the macro 2392 // when an affected header is included, not when the first system 2393 // header is included, and so they are handled in 2394 // <bits/libc-header-start.h>, which does not have a multiple include 2395 // guard. Feature test macros that can be handled from the first 2396 // system header included are handled here. 2397 2398 // Undefine everything, so we get a clean slate. 2399 2400 // Suppress kernel-name space pollution unless user expressedly asks 2401 // for it. 2402 2403 // Convenience macro to test the version of gcc. 2404 // Use like this: 2405 // #if __GNUC_PREREQ (2,8) 2406 // ... code requiring gcc 2.8 or later ... 2407 // #endif 2408 // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was 2409 // added in 2.0. 2410 2411 // Similarly for clang. Features added to GCC after version 4.2 may 2412 // or may not also be available in clang, and clang's definitions of 2413 // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such 2414 // features can be queried via __has_extension/__has_feature. 2415 2416 // Whether to use feature set F. 2417 2418 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for 2419 // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not 2420 // issue a warning; the expectation is that the source is being 2421 // transitioned to use the new macro. 2422 2423 // If _GNU_SOURCE was defined by the user, turn on all the other features. 2424 2425 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, 2426 // define _DEFAULT_SOURCE. 2427 2428 // This is to enable the ISO C2X extension. 2429 2430 // This is to enable the ISO C11 extension. 2431 2432 // This is to enable the ISO C99 extension. 2433 2434 // This is to enable the ISO C90 Amendment 1:1995 extension. 2435 2436 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE 2437 // is defined, use POSIX.1-2008 (or another version depending on 2438 // _XOPEN_SOURCE). 2439 2440 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be 2441 // defined in all multithreaded code. GNU libc has not required this 2442 // for many years. We now treat them as compatibility synonyms for 2443 // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with 2444 // comprehensive support for multithreaded code. Using them never 2445 // lowers the selected level of POSIX conformance, only raises it. 2446 2447 // The function 'gets' existed in C89, but is impossible to use 2448 // safely. It has been removed from ISO C11 and ISO C++14. Note: for 2449 // compatibility with various implementations of <cstdio>, this test 2450 // must consider only the value of __cplusplus when compiling C++. 2451 2452 // GNU formerly extended the scanf functions with modified format 2453 // specifiers %as, %aS, and %a[...] that allocate a buffer for the 2454 // input using malloc. This extension conflicts with ISO C99, which 2455 // defines %a as a standalone format specifier that reads a floating- 2456 // point number; moreover, POSIX.1-2008 provides the same feature 2457 // using the modifier letter 'm' instead (%ms, %mS, %m[...]). 2458 // 2459 // We now follow C99 unless GNU extensions are active and the compiler 2460 // is specifically in C89 or C++98 mode (strict or not). For 2461 // instance, with GCC, -std=gnu11 will have C99-compliant scanf with 2462 // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the 2463 // old extension. 2464 2465 // Get definitions of __STDC_* predefined macros, if the compiler has 2466 // not preincluded this header automatically. 2467 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2468 // This file is part of the GNU C Library. 2469 // 2470 // The GNU C Library is free software; you can redistribute it and/or 2471 // modify it under the terms of the GNU Lesser General Public 2472 // License as published by the Free Software Foundation; either 2473 // version 2.1 of the License, or (at your option) any later version. 2474 // 2475 // The GNU C Library is distributed in the hope that it will be useful, 2476 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2477 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2478 // Lesser General Public License for more details. 2479 // 2480 // You should have received a copy of the GNU Lesser General Public 2481 // License along with the GNU C Library; if not, see 2482 // <https://www.gnu.org/licenses/>. 2483 2484 // This macro indicates that the installed library is the GNU C Library. 2485 // For historic reasons the value now is 6 and this will stay from now 2486 // on. The use of this variable is deprecated. Use __GLIBC__ and 2487 // __GLIBC_MINOR__ now (see below) when you want to test for a specific 2488 // GNU C library version and use the values in <gnu/lib-names.h> to get 2489 // the sonames of the shared libraries. 2490 2491 // Major and minor version number of the GNU C library package. Use 2492 // these macros to test for features in specific releases. 2493 2494 // This is here only because every header file already includes this one. 2495 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 2496 // This file is part of the GNU C Library. 2497 // 2498 // The GNU C Library is free software; you can redistribute it and/or 2499 // modify it under the terms of the GNU Lesser General Public 2500 // License as published by the Free Software Foundation; either 2501 // version 2.1 of the License, or (at your option) any later version. 2502 // 2503 // The GNU C Library is distributed in the hope that it will be useful, 2504 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2505 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2506 // Lesser General Public License for more details. 2507 // 2508 // You should have received a copy of the GNU Lesser General Public 2509 // License along with the GNU C Library; if not, see 2510 // <https://www.gnu.org/licenses/>. 2511 2512 // We are almost always included from features.h. 2513 2514 // The GNU libc does not support any K&R compilers or the traditional mode 2515 // of ISO C compilers anymore. Check for some of the combinations not 2516 // anymore supported. 2517 2518 // Some user header file might have defined this before. 2519 2520 // All functions, except those with callbacks or those that 2521 // synchronize memory, are leaf functions. 2522 2523 // GCC can always grok prototypes. For C++ programs we add throw() 2524 // to help it optimize the function calls. But this works only with 2525 // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions 2526 // as non-throwing using a function attribute since programs can use 2527 // the -fexceptions options for C code as well. 2528 2529 // Compilers that are not clang may object to 2530 // #if defined __clang__ && __has_extension(...) 2531 // even though they do not need to evaluate the right-hand side of the &&. 2532 2533 // These two macros are not used in glibc anymore. They are kept here 2534 // only because some other projects expect the macros to be defined. 2535 2536 // For these things, GCC behaves the ANSI way normally, 2537 // and the non-ANSI way under -traditional. 2538 2539 // This is not a typedef so `const __ptr_t' does the right thing. 2540 2541 // C++ needs to know that types and declarations are C, not C++. 2542 2543 // Fortify support. 2544 2545 // Support for flexible arrays. 2546 // Headers that should use flexible arrays only if they're "real" 2547 // (e.g. only if they won't affect sizeof()) should test 2548 // #if __glibc_c99_flexarr_available. 2549 2550 // __asm__ ("xyz") is used throughout the headers to rename functions 2551 // at the assembly language level. This is wrapped by the __REDIRECT 2552 // macro, in order to support compilers that can do this some other 2553 // way. When compilers don't support asm-names at all, we have to do 2554 // preprocessor tricks instead (which don't have exactly the right 2555 // semantics, but it's the best we can do). 2556 // 2557 // Example: 2558 // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); 2559 2560 // 2561 // #elif __SOME_OTHER_COMPILER__ 2562 // 2563 // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) 2564 2565 // GCC has various useful declarations that can be made with the 2566 // `__attribute__' syntax. All of the ways we use this do fine if 2567 // they are omitted for compilers that don't understand it. 2568 2569 // At some point during the gcc 2.96 development the `malloc' attribute 2570 // for functions was introduced. We don't want to use it unconditionally 2571 // (although this would be possible) since it generates warnings. 2572 2573 // Tell the compiler which arguments to an allocation function 2574 // indicate the size of the allocation. 2575 2576 // At some point during the gcc 2.96 development the `pure' attribute 2577 // for functions was introduced. We don't want to use it unconditionally 2578 // (although this would be possible) since it generates warnings. 2579 2580 // This declaration tells the compiler that the value is constant. 2581 2582 // At some point during the gcc 3.1 development the `used' attribute 2583 // for functions was introduced. We don't want to use it unconditionally 2584 // (although this would be possible) since it generates warnings. 2585 2586 // Since version 3.2, gcc allows marking deprecated functions. 2587 2588 // Since version 4.5, gcc also allows one to specify the message printed 2589 // when a deprecated function is used. clang claims to be gcc 4.2, but 2590 // may also support this feature. 2591 2592 // At some point during the gcc 2.8 development the `format_arg' attribute 2593 // for functions was introduced. We don't want to use it unconditionally 2594 // (although this would be possible) since it generates warnings. 2595 // If several `format_arg' attributes are given for the same function, in 2596 // gcc-3.0 and older, all but the last one are ignored. In newer gccs, 2597 // all designated arguments are considered. 2598 2599 // At some point during the gcc 2.97 development the `strfmon' format 2600 // attribute for functions was introduced. We don't want to use it 2601 // unconditionally (although this would be possible) since it 2602 // generates warnings. 2603 2604 // The nonull function attribute allows to mark pointer parameters which 2605 // must not be NULL. 2606 2607 // If fortification mode, we warn about unused results of certain 2608 // function calls which can lead to problems. 2609 2610 // Forces a function to be always inlined. 2611 // The Linux kernel defines __always_inline in stddef.h (283d7573), and 2612 // it conflicts with this definition. Therefore undefine it first to 2613 // allow either header to be included first. 2614 2615 // Associate error messages with the source location of the call site rather 2616 // than with the source location inside the function. 2617 2618 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 2619 // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ 2620 // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions 2621 // older than 4.3 may define these macros and still not guarantee GNU inlining 2622 // semantics. 2623 // 2624 // clang++ identifies itself as gcc-4.2, but has support for GNU inlining 2625 // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and 2626 // __GNUC_GNU_INLINE__ macro definitions. 2627 2628 // GCC 4.3 and above allow passing all anonymous arguments of an 2629 // __extern_always_inline function to some other vararg function. 2630 2631 // It is possible to compile containing GCC extensions even if GCC is 2632 // run in pedantic mode if the uses are carefully marked using the 2633 // `__extension__' keyword. But this is not generally available before 2634 // version 2.8. 2635 2636 // __restrict is known in EGCS 1.2 and above. 2637 2638 // ISO C99 also allows to declare arrays as non-overlapping. The syntax is 2639 // array_name[restrict] 2640 // GCC 3.1 supports this. 2641 2642 // Describes a char array whose address can safely be passed as the first 2643 // argument to strncpy and strncat, as the char array is not necessarily 2644 // a NUL-terminated string. 2645 2646 // Undefine (also defined in libc-symbols.h). 2647 // Copies attributes from the declaration or type referenced by 2648 // the argument. 2649 2650 // Determine the wordsize from the preprocessor defines. 2651 2652 // Properties of long double type. ldbl-96 version. 2653 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 2654 // This file is part of the GNU C Library. 2655 // 2656 // The GNU C Library is free software; you can redistribute it and/or 2657 // modify it under the terms of the GNU Lesser General Public 2658 // License published by the Free Software Foundation; either 2659 // version 2.1 of the License, or (at your option) any later version. 2660 // 2661 // The GNU C Library is distributed in the hope that it will be useful, 2662 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2663 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2664 // Lesser General Public License for more details. 2665 // 2666 // You should have received a copy of the GNU Lesser General Public 2667 // License along with the GNU C Library; if not, see 2668 // <https://www.gnu.org/licenses/>. 2669 2670 // long double is distinct from double, so there is nothing to 2671 // define here. 2672 2673 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is 2674 // intended for use in preprocessor macros. 2675 // 2676 // Note: MESSAGE must be a _single_ string; concatenation of string 2677 // literals is not supported. 2678 2679 // Generic selection (ISO C11) is a C-only feature, available in GCC 2680 // since version 4.9. Previous versions do not provide generic 2681 // selection, even though they might set __STDC_VERSION__ to 201112L, 2682 // when in -std=c11 mode. Thus, we must check for !defined __GNUC__ 2683 // when testing __STDC_VERSION__ for generic selection support. 2684 // On the other hand, Clang also defines __GNUC__, so a clang-specific 2685 // check is required to enable the use of generic selection. 2686 2687 // If we don't have __REDIRECT, prototypes will be missing if 2688 // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. 2689 2690 // Decide whether we can define 'extern inline' functions in headers. 2691 2692 // This is here only because every header file already includes this one. 2693 // Get the definitions of all the appropriate `__stub_FUNCTION' symbols. 2694 // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub 2695 // that will always return failure (and set errno to ENOSYS). 2696 // This file is automatically generated. 2697 // This file selects the right generated file of `__stub_FUNCTION' macros 2698 // based on the architecture being compiled for. 2699 2700 // This file is automatically generated. 2701 // It defines a symbol `__stub_FUNCTION' for each function 2702 // in the C library which is a stub, meaning it will fail 2703 // every time called, usually setting errno to ENOSYS. 2704 2705 // bits/types.h -- definitions of __*_t types underlying *_t types. 2706 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2707 // This file is part of the GNU C Library. 2708 // 2709 // The GNU C Library is free software; you can redistribute it and/or 2710 // modify it under the terms of the GNU Lesser General Public 2711 // License as published by the Free Software Foundation; either 2712 // version 2.1 of the License, or (at your option) any later version. 2713 // 2714 // The GNU C Library is distributed in the hope that it will be useful, 2715 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2716 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2717 // Lesser General Public License for more details. 2718 // 2719 // You should have received a copy of the GNU Lesser General Public 2720 // License along with the GNU C Library; if not, see 2721 // <https://www.gnu.org/licenses/>. 2722 2723 // Never include this file directly; use <sys/types.h> instead. 2724 2725 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 2726 // This file is part of the GNU C Library. 2727 // 2728 // The GNU C Library is free software; you can redistribute it and/or 2729 // modify it under the terms of the GNU Lesser General Public 2730 // License as published by the Free Software Foundation; either 2731 // version 2.1 of the License, or (at your option) any later version. 2732 // 2733 // The GNU C Library is distributed in the hope that it will be useful, 2734 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2735 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2736 // Lesser General Public License for more details. 2737 // 2738 // You should have received a copy of the GNU Lesser General Public 2739 // License along with the GNU C Library; if not, see 2740 // <https://www.gnu.org/licenses/>. 2741 2742 // Determine the wordsize from the preprocessor defines. 2743 2744 // Bit size of the time_t type at glibc build time, x86-64 and x32 case. 2745 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2746 // This file is part of the GNU C Library. 2747 // 2748 // The GNU C Library is free software; you can redistribute it and/or 2749 // modify it under the terms of the GNU Lesser General Public 2750 // License as published by the Free Software Foundation; either 2751 // version 2.1 of the License, or (at your option) any later version. 2752 // 2753 // The GNU C Library is distributed in the hope that it will be useful, 2754 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2755 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2756 // Lesser General Public License for more details. 2757 // 2758 // You should have received a copy of the GNU Lesser General Public 2759 // License along with the GNU C Library; if not, see 2760 // <https://www.gnu.org/licenses/>. 2761 2762 // For others, time size is word size. 2763 2764 // Convenience types. 2765 type X__u_char = uint8 /* types.h:31:23 */ 2766 type X__u_short = uint16 /* types.h:32:28 */ 2767 type X__u_int = uint32 /* types.h:33:22 */ 2768 type X__u_long = uint32 /* types.h:34:27 */ 2769 2770 // Fixed-size types, underlying types depend on word size and compiler. 2771 type X__int8_t = int8 /* types.h:37:21 */ 2772 type X__uint8_t = uint8 /* types.h:38:23 */ 2773 type X__int16_t = int16 /* types.h:39:26 */ 2774 type X__uint16_t = uint16 /* types.h:40:28 */ 2775 type X__int32_t = int32 /* types.h:41:20 */ 2776 type X__uint32_t = uint32 /* types.h:42:22 */ 2777 type X__int64_t = int64 /* types.h:47:44 */ 2778 type X__uint64_t = uint64 /* types.h:48:46 */ 2779 2780 // Smallest types with at least a given width. 2781 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 2782 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 2783 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 2784 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 2785 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 2786 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 2787 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 2788 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 2789 2790 // quad_t is also 64 bits. 2791 type X__quad_t = int64 /* types.h:66:37 */ 2792 type X__u_quad_t = uint64 /* types.h:67:46 */ 2793 2794 // Largest integral types. 2795 type X__intmax_t = int64 /* types.h:75:37 */ 2796 type X__uintmax_t = uint64 /* types.h:76:46 */ 2797 2798 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 2799 // macros for each of the OS types we define below. The definitions 2800 // of those macros must use the following macros for underlying types. 2801 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 2802 // variants of each of the following integer types on this machine. 2803 // 2804 // 16 -- "natural" 16-bit type (always short) 2805 // 32 -- "natural" 32-bit type (always int) 2806 // 64 -- "natural" 64-bit type (long or long long) 2807 // LONG32 -- 32-bit type, traditionally long 2808 // QUAD -- 64-bit type, traditionally long long 2809 // WORD -- natural type of __WORDSIZE bits (int or long) 2810 // LONGWORD -- type of __WORDSIZE bits, traditionally long 2811 // 2812 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 2813 // conventional uses of `long' or `long long' type modifiers match the 2814 // types we define, even when a less-adorned type would be the same size. 2815 // This matters for (somewhat) portably writing printf/scanf formats for 2816 // these types, where using the appropriate l or ll format modifiers can 2817 // make the typedefs and the formats match up across all GNU platforms. If 2818 // we used `long' when it's 64 bits where `long long' is expected, then the 2819 // compiler would warn about the formats not matching the argument types, 2820 // and the programmer changing them to shut up the compiler would break the 2821 // program's portability. 2822 // 2823 // Here we assume what is presently the case in all the GCC configurations 2824 // we support: long long is always 64 bits, long is always word/address size, 2825 // and int is always 32 bits. 2826 2827 // We want __extension__ before typedef's that use nonstandard base types 2828 // such as `long long' in C89 mode. 2829 // bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. 2830 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 2831 // This file is part of the GNU C Library. 2832 // 2833 // The GNU C Library is free software; you can redistribute it and/or 2834 // modify it under the terms of the GNU Lesser General Public 2835 // License as published by the Free Software Foundation; either 2836 // version 2.1 of the License, or (at your option) any later version. 2837 // 2838 // The GNU C Library is distributed in the hope that it will be useful, 2839 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2840 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2841 // Lesser General Public License for more details. 2842 // 2843 // You should have received a copy of the GNU Lesser General Public 2844 // License along with the GNU C Library; if not, see 2845 // <https://www.gnu.org/licenses/>. 2846 2847 // See <bits/types.h> for the meaning of these macros. This file exists so 2848 // that <bits/types.h> need not vary across different GNU platforms. 2849 2850 // X32 kernel interface is 64-bit. 2851 2852 // Number of descriptors that can fit in an `fd_set'. 2853 2854 // bits/time64.h -- underlying types for __time64_t. Generic version. 2855 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 2856 // This file is part of the GNU C Library. 2857 // 2858 // The GNU C Library is free software; you can redistribute it and/or 2859 // modify it under the terms of the GNU Lesser General Public 2860 // License as published by the Free Software Foundation; either 2861 // version 2.1 of the License, or (at your option) any later version. 2862 // 2863 // The GNU C Library is distributed in the hope that it will be useful, 2864 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2865 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2866 // Lesser General Public License for more details. 2867 // 2868 // You should have received a copy of the GNU Lesser General Public 2869 // License along with the GNU C Library; if not, see 2870 // <https://www.gnu.org/licenses/>. 2871 2872 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 2873 2874 // Define a 64-bit time type alongsize the 32-bit one. 2875 2876 type X__dev_t = X__uint64_t /* types.h:145:25 */ // Type of device numbers. 2877 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 2878 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 2879 type X__ino_t = uint32 /* types.h:148:25 */ // Type of file serial numbers. 2880 type X__ino64_t = X__uint64_t /* types.h:149:27 */ // Type of file serial numbers (LFS). 2881 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 2882 type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts. 2883 type X__off_t = int32 /* types.h:152:25 */ // Type of file sizes and offsets. 2884 type X__off64_t = X__int64_t /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 2885 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 2886 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 2887 type X__clock_t = int32 /* types.h:156:27 */ // Type of CPU usage counts. 2888 type X__rlim_t = uint32 /* types.h:157:26 */ // Type for resource measurement. 2889 type X__rlim64_t = X__uint64_t /* types.h:158:28 */ // Type for resource measurement (LFS). 2890 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 2891 type X__time_t = int32 /* types.h:160:26 */ // Seconds since the Epoch. 2892 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 2893 type X__suseconds_t = int32 /* types.h:162:31 */ // Signed count of microseconds. 2894 2895 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. 2896 type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. 2897 2898 // Clock ID used in clock and timer functions. 2899 type X__clockid_t = int32 /* types.h:168:29 */ 2900 2901 // Timer ID returned by `timer_create'. 2902 type X__timer_t = uintptr /* types.h:171:12 */ 2903 2904 // Type to represent block size. 2905 type X__blksize_t = int32 /* types.h:174:29 */ 2906 2907 // Types from the Large File Support interface. 2908 2909 // Type to count number of disk blocks. 2910 type X__blkcnt_t = int32 /* types.h:179:28 */ 2911 type X__blkcnt64_t = X__int64_t /* types.h:180:30 */ 2912 2913 // Type to count file system blocks. 2914 type X__fsblkcnt_t = uint32 /* types.h:183:30 */ 2915 type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */ 2916 2917 // Type to count file system nodes. 2918 type X__fsfilcnt_t = uint32 /* types.h:187:30 */ 2919 type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */ 2920 2921 // Type of miscellaneous file system fields. 2922 type X__fsword_t = int32 /* types.h:191:28 */ 2923 2924 type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error. 2925 2926 // Signed long type used in system calls. 2927 type X__syscall_slong_t = int32 /* types.h:196:33 */ 2928 // Unsigned long type used in system calls. 2929 type X__syscall_ulong_t = uint32 /* types.h:198:33 */ 2930 2931 // These few don't really vary by system, they always correspond 2932 // to one of the other defined types. 2933 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). 2934 type X__caddr_t = uintptr /* types.h:203:14 */ 2935 2936 // Duplicates info from stdint.h but this is used in unistd.h. 2937 type X__intptr_t = int32 /* types.h:206:25 */ 2938 2939 // Duplicate info from sys/socket.h. 2940 type X__socklen_t = uint32 /* types.h:209:23 */ 2941 2942 // C99: An integer type that can be accessed as an atomic entity, 2943 // even in the presence of asynchronous interrupts. 2944 // It is not currently necessary for this to be machine-specific. 2945 type X__sig_atomic_t = int32 /* types.h:214:13 */ 2946 2947 // Seconds since the Epoch, visible to user code when time_t is too 2948 // narrow only for consistency with the old way of widening too-narrow 2949 // types. User code should never use __time64_t. 2950 type X__time64_t = X__int64_t /* types.h:222:28 */ 2951 2952 type U_char = X__u_char /* types.h:33:18 */ 2953 type U_short = X__u_short /* types.h:34:19 */ 2954 type U_int = X__u_int /* types.h:35:17 */ 2955 type U_long = X__u_long /* types.h:36:18 */ 2956 type Quad_t = X__quad_t /* types.h:37:18 */ 2957 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 2958 type Fsid_t = X__fsid_t /* types.h:39:18 */ 2959 type Loff_t = X__loff_t /* types.h:42:18 */ 2960 2961 type Ino_t = X__ino64_t /* types.h:49:19 */ 2962 type Ino64_t = X__ino64_t /* types.h:54:19 */ 2963 2964 type Dev_t = X__dev_t /* types.h:59:17 */ 2965 2966 type Gid_t = X__gid_t /* types.h:64:17 */ 2967 2968 type Mode_t = X__mode_t /* types.h:69:18 */ 2969 2970 type Nlink_t = X__nlink_t /* types.h:74:19 */ 2971 2972 type Uid_t = X__uid_t /* types.h:79:17 */ 2973 2974 type Off_t = X__off64_t /* types.h:87:19 */ 2975 type Off64_t = X__off64_t /* types.h:92:19 */ 2976 2977 type Pid_t = X__pid_t /* types.h:97:17 */ 2978 2979 type Id_t = X__id_t /* types.h:103:16 */ 2980 2981 type Ssize_t = X__ssize_t /* types.h:108:19 */ 2982 2983 type Daddr_t = X__daddr_t /* types.h:114:19 */ 2984 type Caddr_t = X__caddr_t /* types.h:115:19 */ 2985 2986 type Key_t = X__key_t /* types.h:121:17 */ 2987 2988 // bits/types.h -- definitions of __*_t types underlying *_t types. 2989 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 2990 // This file is part of the GNU C Library. 2991 // 2992 // The GNU C Library is free software; you can redistribute it and/or 2993 // modify it under the terms of the GNU Lesser General Public 2994 // License as published by the Free Software Foundation; either 2995 // version 2.1 of the License, or (at your option) any later version. 2996 // 2997 // The GNU C Library is distributed in the hope that it will be useful, 2998 // but WITHOUT ANY WARRANTY; without even the implied warranty of 2999 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3000 // Lesser General Public License for more details. 3001 // 3002 // You should have received a copy of the GNU Lesser General Public 3003 // License along with the GNU C Library; if not, see 3004 // <https://www.gnu.org/licenses/>. 3005 3006 // Never include this file directly; use <sys/types.h> instead. 3007 3008 // Returned by `clock'. 3009 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 3010 3011 // bits/types.h -- definitions of __*_t types underlying *_t types. 3012 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3013 // This file is part of the GNU C Library. 3014 // 3015 // The GNU C Library is free software; you can redistribute it and/or 3016 // modify it under the terms of the GNU Lesser General Public 3017 // License as published by the Free Software Foundation; either 3018 // version 2.1 of the License, or (at your option) any later version. 3019 // 3020 // The GNU C Library is distributed in the hope that it will be useful, 3021 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3022 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3023 // Lesser General Public License for more details. 3024 // 3025 // You should have received a copy of the GNU Lesser General Public 3026 // License along with the GNU C Library; if not, see 3027 // <https://www.gnu.org/licenses/>. 3028 3029 // Never include this file directly; use <sys/types.h> instead. 3030 3031 // Clock ID used in clock and timer functions. 3032 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 3033 3034 // bits/types.h -- definitions of __*_t types underlying *_t types. 3035 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3036 // This file is part of the GNU C Library. 3037 // 3038 // The GNU C Library is free software; you can redistribute it and/or 3039 // modify it under the terms of the GNU Lesser General Public 3040 // License as published by the Free Software Foundation; either 3041 // version 2.1 of the License, or (at your option) any later version. 3042 // 3043 // The GNU C Library is distributed in the hope that it will be useful, 3044 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3045 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3046 // Lesser General Public License for more details. 3047 // 3048 // You should have received a copy of the GNU Lesser General Public 3049 // License along with the GNU C Library; if not, see 3050 // <https://www.gnu.org/licenses/>. 3051 3052 // Never include this file directly; use <sys/types.h> instead. 3053 3054 // Returned by `time'. 3055 type Time_t = X__time_t /* time_t.h:7:18 */ 3056 3057 // bits/types.h -- definitions of __*_t types underlying *_t types. 3058 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3059 // This file is part of the GNU C Library. 3060 // 3061 // The GNU C Library is free software; you can redistribute it and/or 3062 // modify it under the terms of the GNU Lesser General Public 3063 // License as published by the Free Software Foundation; either 3064 // version 2.1 of the License, or (at your option) any later version. 3065 // 3066 // The GNU C Library is distributed in the hope that it will be useful, 3067 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3068 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3069 // Lesser General Public License for more details. 3070 // 3071 // You should have received a copy of the GNU Lesser General Public 3072 // License along with the GNU C Library; if not, see 3073 // <https://www.gnu.org/licenses/>. 3074 3075 // Never include this file directly; use <sys/types.h> instead. 3076 3077 // Timer ID returned by `timer_create'. 3078 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 3079 3080 type Useconds_t = X__useconds_t /* types.h:134:22 */ 3081 type Suseconds_t = X__suseconds_t /* types.h:138:23 */ 3082 3083 // Wide character type. 3084 // Locale-writers should change this as necessary to 3085 // be big enough to hold unique values not between 0 and 127, 3086 // and not (wchar_t) -1, for each defined multibyte character. 3087 3088 // Define this type if we are doing the whole job, 3089 // or if we want this type in particular. 3090 3091 // A null pointer constant. 3092 3093 // Old compatibility names for C types. 3094 type Ulong = uint32 /* types.h:148:27 */ 3095 type Ushort = uint16 /* types.h:149:28 */ 3096 type Uint = uint32 /* types.h:150:22 */ 3097 3098 // These size-specific names are used by some of the inet code. 3099 3100 // Define intN_t types. 3101 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3102 // This file is part of the GNU C Library. 3103 // 3104 // The GNU C Library is free software; you can redistribute it and/or 3105 // modify it under the terms of the GNU Lesser General Public 3106 // License as published by the Free Software Foundation; either 3107 // version 2.1 of the License, or (at your option) any later version. 3108 // 3109 // The GNU C Library is distributed in the hope that it will be useful, 3110 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3111 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3112 // Lesser General Public License for more details. 3113 // 3114 // You should have received a copy of the GNU Lesser General Public 3115 // License along with the GNU C Library; if not, see 3116 // <https://www.gnu.org/licenses/>. 3117 3118 // bits/types.h -- definitions of __*_t types underlying *_t types. 3119 // Copyright (C) 2002-2020 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 // <https://www.gnu.org/licenses/>. 3135 3136 // Never include this file directly; use <sys/types.h> instead. 3137 3138 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 3139 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 3140 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 3141 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 3142 3143 // These were defined by ISO C without the first `_'. 3144 type U_int8_t = X__uint8_t /* types.h:158:19 */ 3145 type U_int16_t = X__uint16_t /* types.h:159:20 */ 3146 type U_int32_t = X__uint32_t /* types.h:160:20 */ 3147 type U_int64_t = X__uint64_t /* types.h:161:20 */ 3148 3149 type Register_t = int32 /* types.h:164:13 */ 3150 3151 // It also defines `fd_set' and the FD_* macros for `select'. 3152 // `fd_set' type and related macros, and `select'/`pselect' declarations. 3153 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 3154 // This file is part of the GNU C Library. 3155 // 3156 // The GNU C Library is free software; you can redistribute it and/or 3157 // modify it under the terms of the GNU Lesser General Public 3158 // License as published by the Free Software Foundation; either 3159 // version 2.1 of the License, or (at your option) any later version. 3160 // 3161 // The GNU C Library is distributed in the hope that it will be useful, 3162 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3163 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3164 // Lesser General Public License for more details. 3165 // 3166 // You should have received a copy of the GNU Lesser General Public 3167 // License along with the GNU C Library; if not, see 3168 // <https://www.gnu.org/licenses/>. 3169 3170 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 3171 3172 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3173 // This file is part of the GNU C Library. 3174 // 3175 // The GNU C Library is free software; you can redistribute it and/or 3176 // modify it under the terms of the GNU Lesser General Public 3177 // License as published by the Free Software Foundation; either 3178 // version 2.1 of the License, or (at your option) any later version. 3179 // 3180 // The GNU C Library is distributed in the hope that it will be useful, 3181 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3182 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3183 // Lesser General Public License for more details. 3184 // 3185 // You should have received a copy of the GNU Lesser General Public 3186 // License along with the GNU C Library; if not, see 3187 // <https://www.gnu.org/licenses/>. 3188 3189 // Get definition of needed basic types. 3190 // bits/types.h -- definitions of __*_t types underlying *_t types. 3191 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3192 // This file is part of the GNU C Library. 3193 // 3194 // The GNU C Library is free software; you can redistribute it and/or 3195 // modify it under the terms of the GNU Lesser General Public 3196 // License as published by the Free Software Foundation; either 3197 // version 2.1 of the License, or (at your option) any later version. 3198 // 3199 // The GNU C Library is distributed in the hope that it will be useful, 3200 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3201 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3202 // Lesser General Public License for more details. 3203 // 3204 // You should have received a copy of the GNU Lesser General Public 3205 // License along with the GNU C Library; if not, see 3206 // <https://www.gnu.org/licenses/>. 3207 3208 // Never include this file directly; use <sys/types.h> instead. 3209 3210 // Get __FD_* definitions. 3211 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 3212 // This file is part of the GNU C Library. 3213 // 3214 // The GNU C Library is free software; you can redistribute it and/or 3215 // modify it under the terms of the GNU Lesser General Public 3216 // License as published by the Free Software Foundation; either 3217 // version 2.1 of the License, or (at your option) any later version. 3218 // 3219 // The GNU C Library is distributed in the hope that it will be useful, 3220 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3221 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3222 // Lesser General Public License for more details. 3223 // 3224 // You should have received a copy of the GNU Lesser General Public 3225 // License along with the GNU C Library; if not, see 3226 // <https://www.gnu.org/licenses/>. 3227 3228 // Determine the wordsize from the preprocessor defines. 3229 3230 // Get sigset_t. 3231 3232 type X__sigset_t = struct{ F__val [32]uint32 } /* __sigset_t.h:8:3 */ 3233 3234 // A set of signals to be blocked, unblocked, or waited for. 3235 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 3236 3237 // Get definition of timer specification structures. 3238 3239 // bits/types.h -- definitions of __*_t types underlying *_t types. 3240 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3241 // This file is part of the GNU C Library. 3242 // 3243 // The GNU C Library is free software; you can redistribute it and/or 3244 // modify it under the terms of the GNU Lesser General Public 3245 // License as published by the Free Software Foundation; either 3246 // version 2.1 of the License, or (at your option) any later version. 3247 // 3248 // The GNU C Library is distributed in the hope that it will be useful, 3249 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3250 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3251 // Lesser General Public License for more details. 3252 // 3253 // You should have received a copy of the GNU Lesser General Public 3254 // License along with the GNU C Library; if not, see 3255 // <https://www.gnu.org/licenses/>. 3256 3257 // Never include this file directly; use <sys/types.h> instead. 3258 3259 // A time value that is accurate to the nearest 3260 // microsecond but also has a range of years. 3261 type Timeval = struct { 3262 Ftv_sec X__time_t 3263 Ftv_usec X__suseconds_t 3264 } /* struct_timeval.h:8:1 */ 3265 3266 // NB: Include guard matches what <linux/time.h> uses. 3267 3268 // bits/types.h -- definitions of __*_t types underlying *_t types. 3269 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3270 // This file is part of the GNU C Library. 3271 // 3272 // The GNU C Library is free software; you can redistribute it and/or 3273 // modify it under the terms of the GNU Lesser General Public 3274 // License as published by the Free Software Foundation; either 3275 // version 2.1 of the License, or (at your option) any later version. 3276 // 3277 // The GNU C Library 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 GNU 3280 // Lesser General Public License for more details. 3281 // 3282 // You should have received a copy of the GNU Lesser General Public 3283 // License along with the GNU C Library; if not, see 3284 // <https://www.gnu.org/licenses/>. 3285 3286 // Never include this file directly; use <sys/types.h> instead. 3287 3288 // Endian macros for string.h functions 3289 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 3290 // This file is part of the GNU C Library. 3291 // 3292 // The GNU C Library is free software; you can redistribute it and/or 3293 // modify it under the terms of the GNU Lesser General Public 3294 // License as published by the Free Software Foundation; either 3295 // version 2.1 of the License, or (at your option) any later version. 3296 // 3297 // The GNU C Library is distributed in the hope that it will be useful, 3298 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3299 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3300 // Lesser General Public License for more details. 3301 // 3302 // You should have received a copy of the GNU Lesser General Public 3303 // License along with the GNU C Library; if not, see 3304 // <http://www.gnu.org/licenses/>. 3305 3306 // POSIX.1b structure for a time value. This is like a `struct timeval' but 3307 // has nanoseconds instead of microseconds. 3308 type Timespec = struct { 3309 Ftv_sec X__time_t 3310 Ftv_nsec X__syscall_slong_t 3311 } /* struct_timespec.h:10:1 */ 3312 3313 // The fd_set member is required to be an array of longs. 3314 type X__fd_mask = int32 /* select.h:49:18 */ 3315 3316 // Some versions of <linux/posix_types.h> define this macros. 3317 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 3318 3319 // fd_set for select and pselect. 3320 type Fd_set = struct{ Ffds_bits [32]X__fd_mask } /* select.h:70:5 */ 3321 3322 // Maximum number of file descriptors in `fd_set'. 3323 3324 // Sometimes the fd_set member is assumed to have this type. 3325 type Fd_mask = X__fd_mask /* select.h:77:19 */ 3326 3327 // Define some inlines helping to catch common problems. 3328 3329 type Blksize_t = X__blksize_t /* types.h:185:21 */ 3330 3331 // Types from the Large File Support interface. 3332 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 3333 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 3334 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 3335 3336 type Blkcnt64_t = X__blkcnt64_t /* types.h:219:22 */ // Type to count number of disk blocks. 3337 type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks. 3338 type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes. 3339 3340 // Now add the thread types. 3341 // Declaration of common pthread types for all architectures. 3342 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3343 // This file is part of the GNU C Library. 3344 // 3345 // The GNU C Library is free software; you can redistribute it and/or 3346 // modify it under the terms of the GNU Lesser General Public 3347 // License as published by the Free Software Foundation; either 3348 // version 2.1 of the License, or (at your option) any later version. 3349 // 3350 // The GNU C Library is distributed in the hope that it will be useful, 3351 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3352 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3353 // Lesser General Public License for more details. 3354 // 3355 // You should have received a copy of the GNU Lesser General Public 3356 // License along with the GNU C Library; if not, see 3357 // <https://www.gnu.org/licenses/>. 3358 3359 // For internal mutex and condition variable definitions. 3360 // Common threading primitives definitions for both POSIX and C11. 3361 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3362 // This file is part of the GNU C Library. 3363 // 3364 // The GNU C Library is free software; you can redistribute it and/or 3365 // modify it under the terms of the GNU Lesser General Public 3366 // License as published by the Free Software Foundation; either 3367 // version 2.1 of the License, or (at your option) any later version. 3368 // 3369 // The GNU C Library is distributed in the hope that it will be useful, 3370 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3371 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3372 // Lesser General Public License for more details. 3373 // 3374 // You should have received a copy of the GNU Lesser General Public 3375 // License along with the GNU C Library; if not, see 3376 // <https://www.gnu.org/licenses/>. 3377 3378 // Arch-specific definitions. Each architecture must define the following 3379 // macros to define the expected sizes of pthread data types: 3380 // 3381 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 3382 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 3383 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 3384 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 3385 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 3386 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 3387 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 3388 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 3389 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 3390 // 3391 // The additional macro defines any constraint for the lock alignment 3392 // inside the thread structures: 3393 // 3394 // __LOCK_ALIGNMENT - for internal lock/futex usage. 3395 // 3396 // Same idea but for the once locking primitive: 3397 // 3398 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 3399 3400 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3401 // This file is part of the GNU C Library. 3402 // 3403 // The GNU C Library is free software; you can redistribute it and/or 3404 // modify it under the terms of the GNU Lesser General Public 3405 // License as published by the Free Software Foundation; either 3406 // version 2.1 of the License, or (at your option) any later version. 3407 // 3408 // The GNU C Library is distributed in the hope that it will be useful, 3409 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3410 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3411 // Lesser General Public License for more details. 3412 // 3413 // You should have received a copy of the GNU Lesser General Public 3414 // License along with the GNU C Library; if not, see 3415 // <https://www.gnu.org/licenses/>. 3416 3417 // Determine the wordsize from the preprocessor defines. 3418 3419 // Extra attributes for the cleanup functions. 3420 3421 // Common definition of pthread_mutex_t. 3422 3423 type X__pthread_internal_list = struct { 3424 F__prev uintptr 3425 F__next uintptr 3426 } /* thread-shared-types.h:49:9 */ 3427 3428 // Type to count file system inodes. 3429 3430 // Now add the thread types. 3431 // Declaration of common pthread types for all architectures. 3432 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3433 // This file is part of the GNU C Library. 3434 // 3435 // The GNU C Library is free software; you can redistribute it and/or 3436 // modify it under the terms of the GNU Lesser General Public 3437 // License as published by the Free Software Foundation; either 3438 // version 2.1 of the License, or (at your option) any later version. 3439 // 3440 // The GNU C Library is distributed in the hope that it will be useful, 3441 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3442 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3443 // Lesser General Public License for more details. 3444 // 3445 // You should have received a copy of the GNU Lesser General Public 3446 // License along with the GNU C Library; if not, see 3447 // <https://www.gnu.org/licenses/>. 3448 3449 // For internal mutex and condition variable definitions. 3450 // Common threading primitives definitions for both POSIX and C11. 3451 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3452 // This file is part of the GNU C Library. 3453 // 3454 // The GNU C Library is free software; you can redistribute it and/or 3455 // modify it under the terms of the GNU Lesser General Public 3456 // License as published by the Free Software Foundation; either 3457 // version 2.1 of the License, or (at your option) any later version. 3458 // 3459 // The GNU C Library is distributed in the hope that it will be useful, 3460 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3461 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3462 // Lesser General Public License for more details. 3463 // 3464 // You should have received a copy of the GNU Lesser General Public 3465 // License along with the GNU C Library; if not, see 3466 // <https://www.gnu.org/licenses/>. 3467 3468 // Arch-specific definitions. Each architecture must define the following 3469 // macros to define the expected sizes of pthread data types: 3470 // 3471 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 3472 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 3473 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 3474 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 3475 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 3476 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 3477 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 3478 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 3479 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 3480 // 3481 // The additional macro defines any constraint for the lock alignment 3482 // inside the thread structures: 3483 // 3484 // __LOCK_ALIGNMENT - for internal lock/futex usage. 3485 // 3486 // Same idea but for the once locking primitive: 3487 // 3488 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 3489 3490 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3491 // This file is part of the GNU C Library. 3492 // 3493 // The GNU C Library is free software; you can redistribute it and/or 3494 // modify it under the terms of the GNU Lesser General Public 3495 // License as published by the Free Software Foundation; either 3496 // version 2.1 of the License, or (at your option) any later version. 3497 // 3498 // The GNU C Library is distributed in the hope that it will be useful, 3499 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3500 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3501 // Lesser General Public License for more details. 3502 // 3503 // You should have received a copy of the GNU Lesser General Public 3504 // License along with the GNU C Library; if not, see 3505 // <https://www.gnu.org/licenses/>. 3506 3507 // Determine the wordsize from the preprocessor defines. 3508 3509 // Extra attributes for the cleanup functions. 3510 3511 // Common definition of pthread_mutex_t. 3512 3513 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 3514 3515 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 3516 3517 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 3518 3519 // Arch-specific mutex definitions. A generic implementation is provided 3520 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 3521 // can override it by defining: 3522 // 3523 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 3524 // definition). It should contains at least the internal members 3525 // defined in the generic version. 3526 // 3527 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 3528 // atomic operations. 3529 // 3530 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 3531 // It should initialize the mutex internal flag. 3532 3533 // x86 internal mutex struct definitions. 3534 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3535 // This file is part of the GNU C Library. 3536 // 3537 // The GNU C Library is free software; you can redistribute it and/or 3538 // modify it under the terms of the GNU Lesser General Public 3539 // License as published by the Free Software Foundation; either 3540 // version 2.1 of the License, or (at your option) any later version. 3541 // 3542 // The GNU C Library is distributed in the hope that it will be useful, 3543 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3544 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3545 // Lesser General Public License for more details. 3546 // 3547 // You should have received a copy of the GNU Lesser General Public 3548 // License along with the GNU C Library; if not, see 3549 // <http://www.gnu.org/licenses/>. 3550 3551 type X__pthread_mutex_s = struct { 3552 F__lock int32 3553 F__count uint32 3554 F__owner int32 3555 F__kind int32 3556 F__nusers uint32 3557 F__20 struct { 3558 F__ccgo_pad1 [0]uint32 3559 F__elision_data struct { 3560 F__espins int16 3561 F__eelision int16 3562 } 3563 } 3564 } /* struct_mutex.h:22:1 */ 3565 3566 // Arch-sepecific read-write lock definitions. A generic implementation is 3567 // provided by struct_rwlock.h. If required, an architecture can override it 3568 // by defining: 3569 // 3570 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 3571 // It should contain at least the internal members defined in the 3572 // generic version. 3573 // 3574 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 3575 // It should initialize the rwlock internal type. 3576 3577 // x86 internal rwlock struct definitions. 3578 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 3579 // 3580 // This file is part of the GNU C Library. 3581 // 3582 // The GNU C Library is free software; you can redistribute it and/or 3583 // modify it under the terms of the GNU Lesser General Public 3584 // License as published by the Free Software Foundation; either 3585 // version 2.1 of the License, or (at your option) any later version. 3586 // 3587 // The GNU C Library is distributed in the hope that it will be useful, 3588 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3589 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3590 // Lesser General Public License for more details. 3591 // 3592 // You should have received a copy of the GNU Lesser General Public 3593 // License along with the GNU C Library; if not, see 3594 // <http://www.gnu.org/licenses/>. 3595 3596 type X__pthread_rwlock_arch_t = struct { 3597 F__readers uint32 3598 F__writers uint32 3599 F__wrphase_futex uint32 3600 F__writers_futex uint32 3601 F__pad3 uint32 3602 F__pad4 uint32 3603 F__flags uint8 3604 F__shared uint8 3605 F__rwelision int8 3606 F__pad2 uint8 3607 F__cur_writer int32 3608 } /* struct_rwlock.h:23:1 */ 3609 3610 // Common definition of pthread_cond_t. 3611 3612 type X__pthread_cond_s = struct { 3613 F__0 struct{ F__wseq uint64 } 3614 F__8 struct{ F__g1_start uint64 } 3615 F__g_refs [2]uint32 3616 F__g_size [2]uint32 3617 F__g1_orig_size uint32 3618 F__wrefs uint32 3619 F__g_signals [2]uint32 3620 } /* thread-shared-types.h:92:1 */ 3621 3622 // Thread identifiers. The structure of the attribute type is not 3623 // exposed on purpose. 3624 type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ 3625 3626 // Data structures for mutex handling. The structure of the attribute 3627 // type is not exposed on purpose. 3628 type Pthread_mutexattr_t = struct { 3629 F__ccgo_pad1 [0]uint32 3630 F__size [4]int8 3631 } /* pthreadtypes.h:36:3 */ 3632 3633 // Data structure for condition variable handling. The structure of 3634 // the attribute type is not exposed on purpose. 3635 type Pthread_condattr_t = struct { 3636 F__ccgo_pad1 [0]uint32 3637 F__size [4]int8 3638 } /* pthreadtypes.h:45:3 */ 3639 3640 // Keys for thread-specific data 3641 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 3642 3643 // Once-only execution 3644 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 3645 3646 type Pthread_attr_t1 = struct { 3647 F__ccgo_pad1 [0]uint32 3648 F__size [36]int8 3649 } /* pthreadtypes.h:56:1 */ 3650 3651 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 3652 3653 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 3654 3655 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 3656 3657 // Data structure for reader-writer lock variable handling. The 3658 // structure of the attribute type is deliberately not exposed. 3659 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 3660 3661 type Pthread_rwlockattr_t = struct { 3662 F__ccgo_pad1 [0]uint32 3663 F__size [8]int8 3664 } /* pthreadtypes.h:97:3 */ 3665 3666 // POSIX spinlock data type. 3667 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 3668 3669 // POSIX barriers data type. The structure of the type is 3670 // deliberately not exposed. 3671 type Pthread_barrier_t = struct { 3672 F__ccgo_pad1 [0]uint32 3673 F__size [20]int8 3674 } /* pthreadtypes.h:112:3 */ 3675 3676 type Pthread_barrierattr_t = struct { 3677 F__ccgo_pad1 [0]uint32 3678 F__size [4]int8 3679 } /* pthreadtypes.h:118:3 */ 3680 3681 // POSIX.1-2008 extended locale interface (see locale.h). 3682 // Definition of locale_t. 3683 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 3684 // This file is part of the GNU C Library. 3685 // 3686 // The GNU C Library is free software; you can redistribute it and/or 3687 // modify it under the terms of the GNU Lesser General Public 3688 // License as published by the Free Software Foundation; either 3689 // version 2.1 of the License, or (at your option) any later version. 3690 // 3691 // The GNU C Library is distributed in the hope that it will be useful, 3692 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3693 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3694 // Lesser General Public License for more details. 3695 // 3696 // You should have received a copy of the GNU Lesser General Public 3697 // License along with the GNU C Library; if not, see 3698 // <https://www.gnu.org/licenses/>. 3699 3700 // Definition of struct __locale_struct and __locale_t. 3701 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 3702 // This file is part of the GNU C Library. 3703 // Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. 3704 // 3705 // The GNU C Library is free software; you can redistribute it and/or 3706 // modify it under the terms of the GNU Lesser General Public 3707 // License as published by the Free Software Foundation; either 3708 // version 2.1 of the License, or (at your option) any later version. 3709 // 3710 // The GNU C Library is distributed in the hope that it will be useful, 3711 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3712 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3713 // Lesser General Public License for more details. 3714 // 3715 // You should have received a copy of the GNU Lesser General Public 3716 // License along with the GNU C Library; if not, see 3717 // <https://www.gnu.org/licenses/>. 3718 3719 // POSIX.1-2008: the locale_t type, representing a locale context 3720 // (implementation-namespace version). This type should be treated 3721 // as opaque by applications; some details are exposed for the sake of 3722 // efficiency in e.g. ctype functions. 3723 3724 type X__locale_struct = struct { 3725 F__locales [13]uintptr 3726 F__ctype_b uintptr 3727 F__ctype_tolower uintptr 3728 F__ctype_toupper uintptr 3729 F__names [13]uintptr 3730 } /* __locale_t.h:28:1 */ 3731 3732 type X__locale_t = uintptr /* __locale_t.h:42:32 */ 3733 3734 type Locale_t = X__locale_t /* locale_t.h:24:20 */ 3735 3736 // Get open(2) constants 3737 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3738 // This file is part of the GNU C Library. 3739 // 3740 // The GNU C Library is free software; you can redistribute it and/or 3741 // modify it under the terms of the GNU Lesser General Public 3742 // License as published by the Free Software Foundation; either 3743 // version 2.1 of the License, or (at your option) any later version. 3744 // 3745 // The GNU C Library is distributed in the hope that it will be useful, 3746 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3747 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3748 // Lesser General Public License for more details. 3749 // 3750 // You should have received a copy of the GNU Lesser General Public 3751 // License along with the GNU C Library; if not, see 3752 // <https://www.gnu.org/licenses/>. 3753 3754 // POSIX Standard: 6.5 File Control Operations <fcntl.h> 3755 3756 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 3757 // This file is part of the GNU C Library. 3758 // 3759 // The GNU C Library is free software; you can redistribute it and/or 3760 // modify it under the terms of the GNU Lesser General Public 3761 // License as published by the Free Software Foundation; either 3762 // version 2.1 of the License, or (at your option) any later version. 3763 // 3764 // The GNU C Library is distributed in the hope that it will be useful, 3765 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3766 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3767 // Lesser General Public License for more details. 3768 // 3769 // You should have received a copy of the GNU Lesser General Public 3770 // License along with the GNU C Library; if not, see 3771 // <https://www.gnu.org/licenses/>. 3772 3773 // This must be early so <bits/fcntl.h> can define types winningly. 3774 3775 // Get __mode_t, __dev_t and __off_t . 3776 // bits/types.h -- definitions of __*_t types underlying *_t types. 3777 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3778 // This file is part of the GNU C Library. 3779 // 3780 // The GNU C Library is free software; you can redistribute it and/or 3781 // modify it under the terms of the GNU Lesser General Public 3782 // License as published by the Free Software Foundation; either 3783 // version 2.1 of the License, or (at your option) any later version. 3784 // 3785 // The GNU C Library is distributed in the hope that it will be useful, 3786 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3787 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3788 // Lesser General Public License for more details. 3789 // 3790 // You should have received a copy of the GNU Lesser General Public 3791 // License along with the GNU C Library; if not, see 3792 // <https://www.gnu.org/licenses/>. 3793 3794 // Never include this file directly; use <sys/types.h> instead. 3795 3796 // Get the definitions of O_*, F_*, FD_*: all the 3797 // numbers and flag bits for `open', `fcntl', et al. 3798 // O_*, F_*, FD_* bit values for Linux/x86. 3799 // Copyright (C) 2001-2020 Free Software Foundation, Inc. 3800 // This file is part of the GNU C Library. 3801 // 3802 // The GNU C Library is free software; you can redistribute it and/or 3803 // modify it under the terms of the GNU Lesser General Public 3804 // License as published by the Free Software Foundation; either 3805 // version 2.1 of the License, or (at your option) any later version. 3806 // 3807 // The GNU C Library is distributed in the hope that it will be useful, 3808 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3809 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3810 // Lesser General Public License for more details. 3811 // 3812 // You should have received a copy of the GNU Lesser General Public 3813 // License along with the GNU C Library; if not, see 3814 // <https://www.gnu.org/licenses/>. 3815 3816 type Flock = struct { 3817 Fl_type int16 3818 Fl_whence int16 3819 Fl_start X__off64_t 3820 Fl_len X__off64_t 3821 Fl_pid X__pid_t 3822 } /* fcntl.h:35:1 */ 3823 3824 type Flock64 = struct { 3825 Fl_type int16 3826 Fl_whence int16 3827 Fl_start X__off64_t 3828 Fl_len X__off64_t 3829 Fl_pid X__pid_t 3830 } /* fcntl.h:50:1 */ 3831 3832 // Include generic Linux declarations. 3833 // O_*, F_*, FD_* bit values for Linux. 3834 // Copyright (C) 2001-2020 Free Software Foundation, Inc. 3835 // This file is part of the GNU C Library. 3836 // 3837 // The GNU C Library is free software; you can redistribute it and/or 3838 // modify it under the terms of the GNU Lesser General Public 3839 // License as published by the Free Software Foundation; either 3840 // version 2.1 of the License, or (at your option) any later version. 3841 // 3842 // The GNU C Library is distributed in the hope that it will be useful, 3843 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3844 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3845 // Lesser General Public License for more details. 3846 // 3847 // You should have received a copy of the GNU Lesser General Public 3848 // License along with the GNU C Library; if not, see 3849 // <https://www.gnu.org/licenses/>. 3850 3851 // This file contains shared definitions between Linux architectures 3852 // and is included by <bits/fcntl.h> to declare them. The various 3853 // #ifndef cases allow the architecture specific file to define those 3854 // values with different values. 3855 // 3856 // A minimal <bits/fcntl.h> contains just: 3857 // 3858 // struct flock {...} 3859 // #ifdef __USE_LARGEFILE64 3860 // struct flock64 {...} 3861 // #endif 3862 // #include <bits/fcntl-linux.h> 3863 3864 // Define struct iovec. 3865 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 3866 // This file is part of the GNU C Library. 3867 // 3868 // The GNU C Library is free software; you can redistribute it and/or 3869 // modify it under the terms of the GNU Lesser General Public 3870 // License as published by the Free Software Foundation; either 3871 // version 2.1 of the License, or (at your option) any later version. 3872 // 3873 // The GNU C Library is distributed in the hope that it will be useful, 3874 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3875 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 3876 // Lesser General Public License for more details. 3877 // 3878 // You should have received a copy of the GNU Lesser General Public 3879 // License along with the GNU C Library; if not, see 3880 // <https://www.gnu.org/licenses/>. 3881 3882 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 3883 // 3884 // This file is part of GCC. 3885 // 3886 // GCC is free software; you can redistribute it and/or modify 3887 // it under the terms of the GNU General Public License as published by 3888 // the Free Software Foundation; either version 3, or (at your option) 3889 // any later version. 3890 // 3891 // GCC is distributed in the hope that it will be useful, 3892 // but WITHOUT ANY WARRANTY; without even the implied warranty of 3893 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3894 // GNU General Public License for more details. 3895 // 3896 // Under Section 7 of GPL version 3, you are granted additional 3897 // permissions described in the GCC Runtime Library Exception, version 3898 // 3.1, as published by the Free Software Foundation. 3899 // 3900 // You should have received a copy of the GNU General Public License and 3901 // a copy of the GCC Runtime Library Exception along with this program; 3902 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 3903 // <http://www.gnu.org/licenses/>. 3904 3905 // ISO C Standard: 7.17 Common definitions <stddef.h> 3906 3907 // Any one of these symbols __need_* means that GNU libc 3908 // wants us just to define one data type. So don't define 3909 // the symbols that indicate this file's entire job has been done. 3910 3911 // This avoids lossage on SunOS but only if stdtypes.h comes first. 3912 // There's no way to win with the other order! Sun lossage. 3913 3914 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 3915 // Just ignore it. 3916 3917 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 3918 // _TYPE_size_t which will typedef size_t. fixincludes patched the 3919 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 3920 // not defined, and so that defining this macro defines _GCC_SIZE_T. 3921 // If we find that the macros are still defined at this point, we must 3922 // invoke them so that the type is defined as expected. 3923 3924 // In case nobody has defined these types, but we aren't running under 3925 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 3926 // __WCHAR_TYPE__ have reasonable values. This can happen if the 3927 // parts of GCC is compiled by an older compiler, that actually 3928 // include gstddef.h, such as collect2. 3929 3930 // Signed type of difference of two pointers. 3931 3932 // Define this type if we are doing the whole job, 3933 // or if we want this type in particular. 3934 3935 // Unsigned type of `sizeof' something. 3936 3937 // Define this type if we are doing the whole job, 3938 // or if we want this type in particular. 3939 3940 // Wide character type. 3941 // Locale-writers should change this as necessary to 3942 // be big enough to hold unique values not between 0 and 127, 3943 // and not (wchar_t) -1, for each defined multibyte character. 3944 3945 // Define this type if we are doing the whole job, 3946 // or if we want this type in particular. 3947 3948 // A null pointer constant. 3949 3950 // Structure for scatter/gather I/O. 3951 type Iovec = struct { 3952 Fiov_base uintptr 3953 Fiov_len Size_t 3954 } /* struct_iovec.h:26:1 */ 3955 3956 // Structure to use with F_GETOWN_EX and F_SETOWN_EX. 3957 type F_owner_ex = struct { 3958 Ftype uint32 3959 Fpid X__pid_t 3960 } /* fcntl-linux.h:274:1 */ 3961 3962 // Types of seals. 3963 3964 // Hint values for F_{GET,SET}_RW_HINT. 3965 3966 // Define some more compatibility macros to be backward compatible with 3967 // BSD systems which did not managed to hide these kernel macros. 3968 3969 // Advise to `posix_fadvise'. 3970 3971 // Flags for SYNC_FILE_RANGE. 3972 // SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are 3973 // written to disk before returning. 3974 3975 // Flags for SPLICE and VMSPLICE. 3976 3977 // Flags for fallocate. 3978 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 3979 3980 // FALLOC_FL_COLLAPSE_RANGE is used to remove a range of a file 3981 // without leaving a hole in the file. The contents of the file beyond 3982 // the range being removed is appended to the start offset of the range 3983 // being removed (i.e. the hole that was punched is "collapsed"), 3984 // resulting in a file layout that looks like the range that was 3985 // removed never existed. As such collapsing a range of a file changes 3986 // the size of the file, reducing it by the same length of the range 3987 // that has been removed by the operation. 3988 // 3989 // Different filesystems may implement different limitations on the 3990 // granularity of the operation. Most will limit operations to 3991 // filesystem block size boundaries, but this boundary may be larger or 3992 // smaller depending on the filesystem and/or the configuration of the 3993 // filesystem or file. 3994 // 3995 // Attempting to collapse a range that crosses the end of the file is 3996 // considered an illegal operation - just use ftruncate(2) if you need 3997 // to collapse a range that crosses EOF. 3998 3999 // FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably 4000 // without issuing data IO. Blocks should be preallocated for the regions that 4001 // span holes in the file, and the entire range is preferable converted to 4002 // unwritten extents - even though file system may choose to zero out the 4003 // extent or do whatever which will result in reading zeros from the range 4004 // while the range remains allocated for the file. 4005 // 4006 // This can be also used to preallocate blocks past EOF in the same way as 4007 // with fallocate. Flag FALLOC_FL_KEEP_SIZE should cause the inode 4008 // size to remain the same. 4009 4010 // FALLOC_FL_INSERT_RANGE is use to insert space within the file size without 4011 // overwriting any existing data. The contents of the file beyond offset are 4012 // shifted towards right by len bytes to create a hole. As such, this 4013 // operation will increase the size of the file by len bytes. 4014 // 4015 // Different filesystems may implement different limitations on the granularity 4016 // of the operation. Most will limit operations to filesystem block size 4017 // boundaries, but this boundary may be larger or smaller depending on 4018 // the filesystem and/or the configuration of the filesystem or file. 4019 // 4020 // Attempting to insert space using this flag at OR beyond the end of 4021 // the file is considered an illegal operation - just use ftruncate(2) or 4022 // fallocate(2) with mode 0 for such type of operations. 4023 4024 // FALLOC_FL_UNSHARE_RANGE is used to unshare shared blocks within the 4025 // file size without overwriting any existing data. The purpose of this 4026 // call is to preemptively reallocate any blocks that are subject to 4027 // copy-on-write. 4028 // 4029 // Different filesystems may implement different limitations on the 4030 // granularity of the operation. Most will limit operations to filesystem 4031 // block size boundaries, but this boundary may be larger or smaller 4032 // depending on the filesystem and/or the configuration of the filesystem 4033 // or file. 4034 // 4035 // This flag can only be used with allocate-mode fallocate, which is 4036 // to say that it cannot be used with the punch, zero, collapse, or 4037 // insert range modes. 4038 4039 // File handle structure. 4040 type File_handle = struct { 4041 F__ccgo_pad1 [0]uint32 4042 Fhandle_bytes uint32 4043 Fhandle_type int32 4044 } /* fcntl-linux.h:357:1 */ 4045 4046 // Detect if open needs mode as a third argument (or for openat as a fourth 4047 // argument). 4048 4049 // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. 4050 // Earlier POSIX standards permitted any type ending in `_t' to be defined 4051 // by any POSIX header, so we don't conditionalize the definitions here. 4052 4053 // For XPG all symbols from <sys/stat.h> should also be available. 4054 // NB: Include guard matches what <linux/time.h> uses. 4055 // Copyright (C) 1999-2020 Free Software Foundation, Inc. 4056 // This file is part of the GNU C Library. 4057 // 4058 // The GNU C Library is free software; you can redistribute it and/or 4059 // modify it under the terms of the GNU Lesser General Public 4060 // License as published by the Free Software Foundation; either 4061 // version 2.1 of the License, or (at your option) any later version. 4062 // 4063 // The GNU C Library is distributed in the hope that it will be useful, 4064 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4065 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4066 // Lesser General Public License for more details. 4067 // 4068 // You should have received a copy of the GNU Lesser General Public 4069 // License along with the GNU C Library; if not, see 4070 // <https://www.gnu.org/licenses/>. 4071 4072 // Versions of the `struct stat' data structure. 4073 4074 // i386 versions of the `xmknod' interface. 4075 4076 type Stat = struct { 4077 Fst_dev X__dev_t 4078 F__pad1 uint16 4079 F__ccgo_pad1 [2]byte 4080 F__st_ino X__ino_t 4081 Fst_mode X__mode_t 4082 Fst_nlink X__nlink_t 4083 Fst_uid X__uid_t 4084 Fst_gid X__gid_t 4085 Fst_rdev X__dev_t 4086 F__pad2 uint16 4087 F__ccgo_pad2 [2]byte 4088 Fst_size X__off64_t 4089 Fst_blksize X__blksize_t 4090 Fst_blocks X__blkcnt64_t 4091 Fst_atim struct { 4092 Ftv_sec X__time_t 4093 Ftv_nsec X__syscall_slong_t 4094 } 4095 Fst_mtim struct { 4096 Ftv_sec X__time_t 4097 Ftv_nsec X__syscall_slong_t 4098 } 4099 Fst_ctim struct { 4100 Ftv_sec X__time_t 4101 Ftv_nsec X__syscall_slong_t 4102 } 4103 Fst_ino X__ino64_t 4104 } /* stat.h:46:1 */ 4105 4106 // Note stat64 has the same shape as stat for x86-64. 4107 type Stat64 = struct { 4108 Fst_dev X__dev_t 4109 F__pad1 uint32 4110 F__st_ino X__ino_t 4111 Fst_mode X__mode_t 4112 Fst_nlink X__nlink_t 4113 Fst_uid X__uid_t 4114 Fst_gid X__gid_t 4115 Fst_rdev X__dev_t 4116 F__pad2 uint32 4117 Fst_size X__off64_t 4118 Fst_blksize X__blksize_t 4119 Fst_blocks X__blkcnt64_t 4120 Fst_atim struct { 4121 Ftv_sec X__time_t 4122 Ftv_nsec X__syscall_slong_t 4123 } 4124 Fst_mtim struct { 4125 Ftv_sec X__time_t 4126 Ftv_nsec X__syscall_slong_t 4127 } 4128 Fst_ctim struct { 4129 Ftv_sec X__time_t 4130 Ftv_nsec X__syscall_slong_t 4131 } 4132 Fst_ino X__ino64_t 4133 } /* stat.h:119:1 */ 4134 4135 // Define some inlines helping to catch common problems. 4136 4137 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4138 // This file is part of the GNU C Library. 4139 // 4140 // The GNU C Library is free software; you can redistribute it and/or 4141 // modify it under the terms of the GNU Lesser General Public 4142 // License as published by the Free Software Foundation; either 4143 // version 2.1 of the License, or (at your option) any later version. 4144 // 4145 // The GNU C Library is distributed in the hope that it will be useful, 4146 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4147 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4148 // Lesser General Public License for more details. 4149 // 4150 // You should have received a copy of the GNU Lesser General Public 4151 // License along with the GNU C Library; if not, see 4152 // <https://www.gnu.org/licenses/>. 4153 4154 // POSIX Standard: 2.10 Symbolic Constants <unistd.h> 4155 4156 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4157 // This file is part of the GNU C Library. 4158 // 4159 // The GNU C Library is free software; you can redistribute it and/or 4160 // modify it under the terms of the GNU Lesser General Public 4161 // License as published by the Free Software Foundation; either 4162 // version 2.1 of the License, or (at your option) any later version. 4163 // 4164 // The GNU C Library is distributed in the hope that it will be useful, 4165 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4166 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4167 // Lesser General Public License for more details. 4168 // 4169 // You should have received a copy of the GNU Lesser General Public 4170 // License along with the GNU C Library; if not, see 4171 // <https://www.gnu.org/licenses/>. 4172 4173 // These may be used to determine what facilities are present at compile time. 4174 // Their values can be obtained at run time from `sysconf'. 4175 4176 // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. 4177 4178 // These are not #ifdef __USE_POSIX2 because they are 4179 // in the theoretically application-owned namespace. 4180 4181 // The utilities on GNU systems also correspond to this version. 4182 4183 // The utilities on GNU systems also correspond to this version. 4184 4185 // This symbol was required until the 2001 edition of POSIX. 4186 4187 // If defined, the implementation supports the 4188 // C Language Bindings Option. 4189 4190 // If defined, the implementation supports the 4191 // C Language Development Utilities Option. 4192 4193 // If defined, the implementation supports the 4194 // Software Development Utilities Option. 4195 4196 // If defined, the implementation supports the 4197 // creation of locales with the localedef utility. 4198 4199 // X/Open version number to which the library conforms. It is selectable. 4200 4201 // Commands and utilities from XPG4 are available. 4202 4203 // We are compatible with the old published standards as well. 4204 4205 // The X/Open Unix extensions are available. 4206 4207 // The enhanced internationalization capabilities according to XPG4.2 4208 // are present. 4209 4210 // The legacy interfaces are also available. 4211 4212 // Get values of POSIX options: 4213 // 4214 // If these symbols are defined, the corresponding features are 4215 // always available. If not, they may be available sometimes. 4216 // The current values can be obtained with `sysconf'. 4217 // 4218 // _POSIX_JOB_CONTROL Job control is supported. 4219 // _POSIX_SAVED_IDS Processes have a saved set-user-ID 4220 // and a saved set-group-ID. 4221 // _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. 4222 // _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. 4223 // _POSIX_TIMERS POSIX.4 clocks and timers are supported. 4224 // _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. 4225 // _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. 4226 // _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. 4227 // _POSIX_FSYNC The fsync function is present. 4228 // _POSIX_MAPPED_FILES Mapping of files to memory is supported. 4229 // _POSIX_MEMLOCK Locking of all memory is supported. 4230 // _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. 4231 // _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. 4232 // _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. 4233 // _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. 4234 // _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. 4235 // _POSIX_THREADS POSIX.1c pthreads are supported. 4236 // _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. 4237 // _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. 4238 // _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. 4239 // _POSIX_THREAD_PRIORITY_SCHEDULING 4240 // POSIX.1c thread execution scheduling supported. 4241 // _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. 4242 // _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. 4243 // _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. 4244 // _POSIX_PII Protocol-independent interfaces are supported. 4245 // _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. 4246 // _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. 4247 // _POSIX_PII_INTERNET Internet family of protocols supported. 4248 // _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. 4249 // _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. 4250 // _POSIX_PII_OSI ISO/OSI family of protocols supported. 4251 // _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. 4252 // _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. 4253 // _POSIX_POLL Implementation supports `poll' function. 4254 // _POSIX_SELECT Implementation supports `select' and `pselect'. 4255 // 4256 // _XOPEN_REALTIME X/Open realtime support is available. 4257 // _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. 4258 // _XOPEN_SHM Shared memory interface according to XPG4.2. 4259 // 4260 // _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit 4261 // int, long, pointer, and off_t types. 4262 // _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit 4263 // int, long, and pointer and off_t with at least 4264 // 64 bits. 4265 // _XBS5_LP64_OFF64 Implementation provides environment with 32-bit 4266 // int, and 64-bit long, pointer, and off_t types. 4267 // _XBS5_LPBIG_OFFBIG Implementation provides environment with at 4268 // least 32 bits int and long, pointer, and off_t 4269 // with at least 64 bits. 4270 // 4271 // If any of these symbols is defined as -1, the corresponding option is not 4272 // true for any file. If any is defined as other than -1, the corresponding 4273 // option is true for all files. If a symbol is not defined at all, the value 4274 // for a specific file can be obtained from `pathconf' and `fpathconf'. 4275 // 4276 // _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change 4277 // the owner of a file. `chown' can only be used 4278 // to change the group ID of a file to a group of 4279 // which the calling process is a member. 4280 // _POSIX_NO_TRUNC Pathname components longer than 4281 // NAME_MAX generate an error. 4282 // _POSIX_VDISABLE If defined, if the value of an element of the 4283 // `c_cc' member of `struct termios' is 4284 // _POSIX_VDISABLE, no character will have the 4285 // effect associated with that element. 4286 // _POSIX_SYNC_IO Synchronous I/O may be performed. 4287 // _POSIX_ASYNC_IO Asynchronous I/O may be performed. 4288 // _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. 4289 // 4290 // Support for the Large File Support interface is not generally available. 4291 // If it is available the following constants are defined to one. 4292 // _LFS64_LARGEFILE Low-level I/O supports large files. 4293 // _LFS64_STDIO Standard I/O supports large files. 4294 // 4295 4296 // Define POSIX options for Linux. 4297 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 4298 // This file is part of the GNU C Library. 4299 // 4300 // The GNU C Library is free software; you can redistribute it and/or 4301 // modify it under the terms of the GNU Lesser General Public License as 4302 // published by the Free Software Foundation; either version 2.1 of the 4303 // License, or (at your option) any later version. 4304 // 4305 // The GNU C Library is distributed in the hope that it will be useful, 4306 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4307 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4308 // Lesser General Public License for more details. 4309 // 4310 // You should have received a copy of the GNU Lesser General Public 4311 // License along with the GNU C Library; see the file COPYING.LIB. If 4312 // not, see <https://www.gnu.org/licenses/>. 4313 4314 // Job control is supported. 4315 4316 // Processes have a saved set-user-ID and a saved set-group-ID. 4317 4318 // Priority scheduling is not supported with the correct semantics, 4319 // but GNU/Linux applications expect that the corresponding interfaces 4320 // are available, even though the semantics do not meet the POSIX 4321 // requirements. See glibc bug 14829. 4322 4323 // Synchronizing file data is supported. 4324 4325 // The fsync function is present. 4326 4327 // Mapping of files to memory is supported. 4328 4329 // Locking of all memory is supported. 4330 4331 // Locking of ranges of memory is supported. 4332 4333 // Setting of memory protections is supported. 4334 4335 // Some filesystems allow all users to change file ownership. 4336 4337 // `c_cc' member of 'struct termios' structure can be disabled by 4338 // using the value _POSIX_VDISABLE. 4339 4340 // Filenames are not silently truncated. 4341 4342 // X/Open realtime support is available. 4343 4344 // X/Open thread realtime support is available. 4345 4346 // XPG4.2 shared memory is supported. 4347 4348 // Tell we have POSIX threads. 4349 4350 // We have the reentrant functions described in POSIX. 4351 4352 // We provide priority scheduling for threads. 4353 4354 // We support user-defined stack sizes. 4355 4356 // We support user-defined stacks. 4357 4358 // We support priority inheritence. 4359 4360 // We support priority protection, though only for non-robust 4361 // mutexes. 4362 4363 // We support priority inheritence for robust mutexes. 4364 4365 // We do not support priority protection for robust mutexes. 4366 4367 // We support POSIX.1b semaphores. 4368 4369 // Real-time signals are supported. 4370 4371 // We support asynchronous I/O. 4372 // Alternative name for Unix98. 4373 // Support for prioritization is also available. 4374 4375 // The LFS support in asynchronous I/O is also available. 4376 4377 // The rest of the LFS is also available. 4378 4379 // POSIX shared memory objects are implemented. 4380 4381 // CPU-time clocks support needs to be checked at runtime. 4382 4383 // Clock support in threads must be also checked at runtime. 4384 4385 // GNU libc provides regular expression handling. 4386 4387 // Reader/Writer locks are available. 4388 4389 // We have a POSIX shell. 4390 4391 // We support the Timeouts option. 4392 4393 // We support spinlocks. 4394 4395 // The `spawn' function family is supported. 4396 4397 // We have POSIX timers. 4398 4399 // The barrier functions are available. 4400 4401 // POSIX message queues are available. 4402 4403 // Thread process-shared synchronization is supported. 4404 4405 // The monotonic clock might be available. 4406 4407 // The clock selection interfaces are available. 4408 4409 // Advisory information interfaces are available. 4410 4411 // IPv6 support is available. 4412 4413 // Raw socket support is available. 4414 4415 // We have at least one terminal. 4416 4417 // Neither process nor thread sporadic server interfaces is available. 4418 4419 // trace.h is not available. 4420 4421 // Typed memory objects are not available. 4422 4423 // Get the environment definitions from Unix98. 4424 // Copyright (C) 1999-2020 Free Software Foundation, Inc. 4425 // This file is part of the GNU C Library. 4426 // 4427 // The GNU C Library is free software; you can redistribute it and/or 4428 // modify it under the terms of the GNU Lesser General Public 4429 // License as published by the Free Software Foundation; either 4430 // version 2.1 of the License, or (at your option) any later version. 4431 // 4432 // The GNU C Library is distributed in the hope that it will be useful, 4433 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4434 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4435 // Lesser General Public License for more details. 4436 // 4437 // You should have received a copy of the GNU Lesser General Public 4438 // License along with the GNU C Library; if not, see 4439 // <https://www.gnu.org/licenses/>. 4440 4441 // Determine the wordsize from the preprocessor defines. 4442 4443 // This header should define the following symbols under the described 4444 // situations. A value `1' means that the model is always supported, 4445 // `-1' means it is never supported. Undefined means it cannot be 4446 // statically decided. 4447 // 4448 // _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type 4449 // _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type 4450 // 4451 // _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type 4452 // _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type 4453 // 4454 // The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, 4455 // _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, 4456 // _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were 4457 // used in previous versions of the Unix standard and are available 4458 // only for compatibility. 4459 4460 // We have 32-bit wide `int', `long int' and pointers and all platforms 4461 // support LFS. -mx32 has 64-bit wide `off_t'. 4462 4463 // -m32 has 32-bit wide `off_t'. 4464 4465 // We optionally provide an environment with the above size but an 64-bit 4466 // side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. 4467 4468 // Environments with 64-bit wide pointers can be provided, 4469 // so these macros aren't defined: 4470 // # undef _POSIX_V7_LP64_OFF64 4471 // # undef _POSIX_V7_LPBIG_OFFBIG 4472 // # undef _POSIX_V6_LP64_OFF64 4473 // # undef _POSIX_V6_LPBIG_OFFBIG 4474 // # undef _XBS5_LP64_OFF64 4475 // # undef _XBS5_LPBIG_OFFBIG 4476 // and sysconf tests for it at runtime. 4477 4478 // Standard file descriptors. 4479 4480 // All functions that are not declared anywhere else. 4481 4482 // bits/types.h -- definitions of __*_t types underlying *_t types. 4483 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 4484 // This file is part of the GNU C Library. 4485 // 4486 // The GNU C Library is free software; you can redistribute it and/or 4487 // modify it under the terms of the GNU Lesser General Public 4488 // License as published by the Free Software Foundation; either 4489 // version 2.1 of the License, or (at your option) any later version. 4490 // 4491 // The GNU C Library is distributed in the hope that it will be useful, 4492 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4493 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4494 // Lesser General Public License for more details. 4495 // 4496 // You should have received a copy of the GNU Lesser General Public 4497 // License along with the GNU C Library; if not, see 4498 // <https://www.gnu.org/licenses/>. 4499 4500 // Never include this file directly; use <sys/types.h> instead. 4501 4502 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 4503 // 4504 // This file is part of GCC. 4505 // 4506 // GCC is free software; you can redistribute it and/or modify 4507 // it under the terms of the GNU General Public License as published by 4508 // the Free Software Foundation; either version 3, or (at your option) 4509 // any later version. 4510 // 4511 // GCC is distributed in the hope that it will be useful, 4512 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4513 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4514 // GNU General Public License for more details. 4515 // 4516 // Under Section 7 of GPL version 3, you are granted additional 4517 // permissions described in the GCC Runtime Library Exception, version 4518 // 3.1, as published by the Free Software Foundation. 4519 // 4520 // You should have received a copy of the GNU General Public License and 4521 // a copy of the GCC Runtime Library Exception along with this program; 4522 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 4523 // <http://www.gnu.org/licenses/>. 4524 4525 // ISO C Standard: 7.17 Common definitions <stddef.h> 4526 4527 // Any one of these symbols __need_* means that GNU libc 4528 // wants us just to define one data type. So don't define 4529 // the symbols that indicate this file's entire job has been done. 4530 4531 // This avoids lossage on SunOS but only if stdtypes.h comes first. 4532 // There's no way to win with the other order! Sun lossage. 4533 4534 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 4535 // Just ignore it. 4536 4537 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 4538 // _TYPE_size_t which will typedef size_t. fixincludes patched the 4539 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 4540 // not defined, and so that defining this macro defines _GCC_SIZE_T. 4541 // If we find that the macros are still defined at this point, we must 4542 // invoke them so that the type is defined as expected. 4543 4544 // In case nobody has defined these types, but we aren't running under 4545 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 4546 // __WCHAR_TYPE__ have reasonable values. This can happen if the 4547 // parts of GCC is compiled by an older compiler, that actually 4548 // include gstddef.h, such as collect2. 4549 4550 // Signed type of difference of two pointers. 4551 4552 // Define this type if we are doing the whole job, 4553 // or if we want this type in particular. 4554 4555 // Unsigned type of `sizeof' something. 4556 4557 // Define this type if we are doing the whole job, 4558 // or if we want this type in particular. 4559 4560 // Wide character type. 4561 // Locale-writers should change this as necessary to 4562 // be big enough to hold unique values not between 0 and 127, 4563 // and not (wchar_t) -1, for each defined multibyte character. 4564 4565 // Define this type if we are doing the whole job, 4566 // or if we want this type in particular. 4567 4568 // A null pointer constant. 4569 4570 // The Single Unix specification says that some more types are 4571 // available here. 4572 4573 type Intptr_t = X__intptr_t /* unistd.h:267:20 */ 4574 4575 type Socklen_t = X__socklen_t /* unistd.h:274:21 */ 4576 4577 // Get struct timeval and struct tm 4578 4579 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4580 // This file is part of the GNU C Library. 4581 // 4582 // The GNU C Library is free software; you can redistribute it and/or 4583 // modify it under the terms of the GNU Lesser General Public 4584 // License as published by the Free Software Foundation; either 4585 // version 2.1 of the License, or (at your option) any later version. 4586 // 4587 // The GNU C Library is distributed in the hope that it will be useful, 4588 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4589 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4590 // Lesser General Public License for more details. 4591 // 4592 // You should have received a copy of the GNU Lesser General Public 4593 // License along with the GNU C Library; if not, see 4594 // <https://www.gnu.org/licenses/>. 4595 4596 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4597 // This file is part of the GNU C Library. 4598 // 4599 // The GNU C Library is free software; you can redistribute it and/or 4600 // modify it under the terms of the GNU Lesser General Public 4601 // License as published by the Free Software Foundation; either 4602 // version 2.1 of the License, or (at your option) any later version. 4603 // 4604 // The GNU C Library is distributed in the hope that it will be useful, 4605 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4606 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4607 // Lesser General Public License for more details. 4608 // 4609 // You should have received a copy of the GNU Lesser General Public 4610 // License along with the GNU C Library; if not, see 4611 // <https://www.gnu.org/licenses/>. 4612 4613 // bits/types.h -- definitions of __*_t types underlying *_t types. 4614 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 4615 // This file is part of the GNU C Library. 4616 // 4617 // The GNU C Library is free software; you can redistribute it and/or 4618 // modify it under the terms of the GNU Lesser General Public 4619 // License as published by the Free Software Foundation; either 4620 // version 2.1 of the License, or (at your option) any later version. 4621 // 4622 // The GNU C Library is distributed in the hope that it will be useful, 4623 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4624 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4625 // Lesser General Public License for more details. 4626 // 4627 // You should have received a copy of the GNU Lesser General Public 4628 // License along with the GNU C Library; if not, see 4629 // <https://www.gnu.org/licenses/>. 4630 4631 // Never include this file directly; use <sys/types.h> instead. 4632 4633 // `fd_set' type and related macros, and `select'/`pselect' declarations. 4634 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 4635 // This file is part of the GNU C Library. 4636 // 4637 // The GNU C Library is free software; you can redistribute it and/or 4638 // modify it under the terms of the GNU Lesser General Public 4639 // License as published by the Free Software Foundation; either 4640 // version 2.1 of the License, or (at your option) any later version. 4641 // 4642 // The GNU C Library is distributed in the hope that it will be useful, 4643 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4644 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4645 // Lesser General Public License for more details. 4646 // 4647 // You should have received a copy of the GNU Lesser General Public 4648 // License along with the GNU C Library; if not, see 4649 // <https://www.gnu.org/licenses/>. 4650 4651 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 4652 4653 // Macros for converting between `struct timeval' and `struct timespec'. 4654 4655 // Structure crudely representing a timezone. 4656 // This is obsolete and should never be used. 4657 type Timezone = struct { 4658 Ftz_minuteswest int32 4659 Ftz_dsttime int32 4660 } /* time.h:52:1 */ 4661 4662 // Type of the second argument to `getitimer' and 4663 // the second and third arguments `setitimer'. 4664 type Itimerval = struct { 4665 Fit_interval struct { 4666 Ftv_sec X__time_t 4667 Ftv_usec X__suseconds_t 4668 } 4669 Fit_value struct { 4670 Ftv_sec X__time_t 4671 Ftv_usec X__suseconds_t 4672 } 4673 } /* time.h:105:1 */ 4674 4675 // Use the nicer parameter type only in GNU mode and not for C++ since the 4676 // strict C++ rules prevent the automatic promotion. 4677 type X__itimer_which_t = uint32 /* time.h:116:29 */ 4678 4679 // Convenience macros for operations on timevals. 4680 // NOTE: `timercmp' does not work for >= or <=. 4681 4682 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4683 // This file is part of the GNU C Library. 4684 // 4685 // The GNU C Library is free software; you can redistribute it and/or 4686 // modify it under the terms of the GNU Lesser General Public 4687 // License as published by the Free Software Foundation; either 4688 // version 2.1 of the License, or (at your option) any later version. 4689 // 4690 // The GNU C Library is distributed in the hope that it will be useful, 4691 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4692 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4693 // Lesser General Public License for more details. 4694 // 4695 // You should have received a copy of the GNU Lesser General Public 4696 // License along with the GNU C Library; if not, see 4697 // <https://www.gnu.org/licenses/>. 4698 4699 // ISO C99 Standard: 7.23 Date and time <time.h> 4700 4701 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 4702 // This file is part of the GNU C Library. 4703 // 4704 // The GNU C Library is free software; you can redistribute it and/or 4705 // modify it under the terms of the GNU Lesser General Public 4706 // License as published by the Free Software Foundation; either 4707 // version 2.1 of the License, or (at your option) any later version. 4708 // 4709 // The GNU C Library is distributed in the hope that it will be useful, 4710 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4711 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4712 // Lesser General Public License for more details. 4713 // 4714 // You should have received a copy of the GNU Lesser General Public 4715 // License along with the GNU C Library; if not, see 4716 // <https://www.gnu.org/licenses/>. 4717 4718 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 4719 // 4720 // This file is part of GCC. 4721 // 4722 // GCC is free software; you can redistribute it and/or modify 4723 // it under the terms of the GNU General Public License as published by 4724 // the Free Software Foundation; either version 3, or (at your option) 4725 // any later version. 4726 // 4727 // GCC 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 4730 // GNU General Public License for more details. 4731 // 4732 // Under Section 7 of GPL version 3, you are granted additional 4733 // permissions described in the GCC Runtime Library Exception, version 4734 // 3.1, as published by the Free Software Foundation. 4735 // 4736 // You should have received a copy of the GNU General Public License and 4737 // a copy of the GCC Runtime Library Exception along with this program; 4738 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 4739 // <http://www.gnu.org/licenses/>. 4740 4741 // ISO C Standard: 7.17 Common definitions <stddef.h> 4742 4743 // Any one of these symbols __need_* means that GNU libc 4744 // wants us just to define one data type. So don't define 4745 // the symbols that indicate this file's entire job has been done. 4746 4747 // This avoids lossage on SunOS but only if stdtypes.h comes first. 4748 // There's no way to win with the other order! Sun lossage. 4749 4750 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 4751 // Just ignore it. 4752 4753 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 4754 // _TYPE_size_t which will typedef size_t. fixincludes patched the 4755 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 4756 // not defined, and so that defining this macro defines _GCC_SIZE_T. 4757 // If we find that the macros are still defined at this point, we must 4758 // invoke them so that the type is defined as expected. 4759 4760 // In case nobody has defined these types, but we aren't running under 4761 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 4762 // __WCHAR_TYPE__ have reasonable values. This can happen if the 4763 // parts of GCC is compiled by an older compiler, that actually 4764 // include gstddef.h, such as collect2. 4765 4766 // Signed type of difference of two pointers. 4767 4768 // Define this type if we are doing the whole job, 4769 // or if we want this type in particular. 4770 4771 // Unsigned type of `sizeof' something. 4772 4773 // Define this type if we are doing the whole job, 4774 // or if we want this type in particular. 4775 4776 // Wide character type. 4777 // Locale-writers should change this as necessary to 4778 // be big enough to hold unique values not between 0 and 127, 4779 // and not (wchar_t) -1, for each defined multibyte character. 4780 4781 // Define this type if we are doing the whole job, 4782 // or if we want this type in particular. 4783 4784 // A null pointer constant. 4785 4786 // This defines CLOCKS_PER_SEC, which is the number of processor clock 4787 // ticks per second, and possibly a number of other constants. 4788 // System-dependent timing definitions. Linux version. 4789 // Copyright (C) 1996-2020 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 // <https://www.gnu.org/licenses/>. 4805 4806 // Never include this file directly; use <time.h> instead. 4807 4808 // bits/types.h -- definitions of __*_t types underlying *_t types. 4809 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 4810 // This file is part of the GNU C Library. 4811 // 4812 // The GNU C Library is free software; you can redistribute it and/or 4813 // modify it under the terms of the GNU Lesser General Public 4814 // License as published by the Free Software Foundation; either 4815 // version 2.1 of the License, or (at your option) any later version. 4816 // 4817 // The GNU C Library is distributed in the hope that it will be useful, 4818 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4819 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4820 // Lesser General Public License for more details. 4821 // 4822 // You should have received a copy of the GNU Lesser General Public 4823 // License along with the GNU C Library; if not, see 4824 // <https://www.gnu.org/licenses/>. 4825 4826 // Never include this file directly; use <sys/types.h> instead. 4827 4828 // ISO/IEC 9899:1999 7.23.1: Components of time 4829 // The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is 4830 // the number per second of the value returned by the `clock' function. 4831 // CAE XSH, Issue 4, Version 2: <time.h> 4832 // The value of CLOCKS_PER_SEC is required to be 1 million on all 4833 // XSI-conformant systems. 4834 4835 // Identifier for system-wide realtime clock. 4836 // Monotonic system-wide clock. 4837 // High-resolution timer from the CPU. 4838 // Thread-specific CPU-time clock. 4839 // Monotonic system-wide clock, not adjusted for frequency scaling. 4840 // Identifier for system-wide realtime clock, updated only on ticks. 4841 // Monotonic system-wide clock, updated only on ticks. 4842 // Monotonic system-wide clock that includes time spent in suspension. 4843 // Like CLOCK_REALTIME but also wakes suspended system. 4844 // Like CLOCK_BOOTTIME but also wakes suspended system. 4845 // Like CLOCK_REALTIME but in International Atomic Time. 4846 4847 // Flag to indicate time is absolute. 4848 4849 // Copyright (C) 1995-2020 Free Software Foundation, Inc. 4850 // This file is part of the GNU C Library. 4851 // 4852 // The GNU C Library is free software; you can redistribute it and/or 4853 // modify it under the terms of the GNU Lesser General Public 4854 // License as published by the Free Software Foundation; either 4855 // version 2.1 of the License, or (at your option) any later version. 4856 // 4857 // The GNU C Library is distributed in the hope that it will be useful, 4858 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4859 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4860 // Lesser General Public License for more details. 4861 // 4862 // You should have received a copy of the GNU Lesser General Public 4863 // License along with the GNU C Library; if not, see 4864 // <https://www.gnu.org/licenses/>. 4865 4866 // bits/types.h -- definitions of __*_t types underlying *_t types. 4867 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 4868 // This file is part of the GNU C Library. 4869 // 4870 // The GNU C Library is free software; you can redistribute it and/or 4871 // modify it under the terms of the GNU Lesser General Public 4872 // License as published by the Free Software Foundation; either 4873 // version 2.1 of the License, or (at your option) any later version. 4874 // 4875 // The GNU C Library is distributed in the hope that it will be useful, 4876 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4877 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4878 // Lesser General Public License for more details. 4879 // 4880 // You should have received a copy of the GNU Lesser General Public 4881 // License along with the GNU C Library; if not, see 4882 // <https://www.gnu.org/licenses/>. 4883 4884 // Never include this file directly; use <sys/types.h> instead. 4885 4886 // These definitions from linux/timex.h as of 3.18. 4887 4888 type Timex = struct { 4889 Fmodes uint32 4890 Foffset X__syscall_slong_t 4891 Ffreq X__syscall_slong_t 4892 Fmaxerror X__syscall_slong_t 4893 Festerror X__syscall_slong_t 4894 Fstatus int32 4895 Fconstant X__syscall_slong_t 4896 Fprecision X__syscall_slong_t 4897 Ftolerance X__syscall_slong_t 4898 Ftime struct { 4899 Ftv_sec X__time_t 4900 Ftv_usec X__suseconds_t 4901 } 4902 Ftick X__syscall_slong_t 4903 Fppsfreq X__syscall_slong_t 4904 Fjitter X__syscall_slong_t 4905 Fshift int32 4906 Fstabil X__syscall_slong_t 4907 Fjitcnt X__syscall_slong_t 4908 Fcalcnt X__syscall_slong_t 4909 Ferrcnt X__syscall_slong_t 4910 Fstbcnt X__syscall_slong_t 4911 Ftai int32 4912 __84 uint32 /* int : 32 */ 4913 __88 uint32 /* int : 32 */ 4914 __92 uint32 /* int : 32 */ 4915 __96 uint32 /* int : 32 */ 4916 __100 uint32 /* int : 32 */ 4917 __104 uint32 /* int : 32 */ 4918 __108 uint32 /* int : 32 */ 4919 __112 uint32 /* int : 32 */ 4920 __116 uint32 /* int : 32 */ 4921 __120 uint32 /* int : 32 */ 4922 __124 uint32 /* int : 32 */ 4923 } /* timex.h:26:1 */ 4924 4925 // Many of the typedefs and structs whose official home is this header 4926 // may also need to be defined by other headers. 4927 4928 // bits/types.h -- definitions of __*_t types underlying *_t types. 4929 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 4930 // This file is part of the GNU C Library. 4931 // 4932 // The GNU C Library is free software; you can redistribute it and/or 4933 // modify it under the terms of the GNU Lesser General Public 4934 // License as published by the Free Software Foundation; either 4935 // version 2.1 of the License, or (at your option) any later version. 4936 // 4937 // The GNU C Library is distributed in the hope that it will be useful, 4938 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4939 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4940 // Lesser General Public License for more details. 4941 // 4942 // You should have received a copy of the GNU Lesser General Public 4943 // License along with the GNU C Library; if not, see 4944 // <https://www.gnu.org/licenses/>. 4945 4946 // Never include this file directly; use <sys/types.h> instead. 4947 4948 // ISO C `broken-down time' structure. 4949 type Tm = struct { 4950 Ftm_sec int32 4951 Ftm_min int32 4952 Ftm_hour int32 4953 Ftm_mday int32 4954 Ftm_mon int32 4955 Ftm_year int32 4956 Ftm_wday int32 4957 Ftm_yday int32 4958 Ftm_isdst int32 4959 Ftm_gmtoff int32 4960 Ftm_zone uintptr 4961 } /* struct_tm.h:7:1 */ 4962 4963 // NB: Include guard matches what <linux/time.h> uses. 4964 4965 // bits/types.h -- definitions of __*_t types underlying *_t types. 4966 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 4967 // This file is part of the GNU C Library. 4968 // 4969 // The GNU C Library is free software; you can redistribute it and/or 4970 // modify it under the terms of the GNU Lesser General Public 4971 // License as published by the Free Software Foundation; either 4972 // version 2.1 of the License, or (at your option) any later version. 4973 // 4974 // The GNU C Library is distributed in the hope that it will be useful, 4975 // but WITHOUT ANY WARRANTY; without even the implied warranty of 4976 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4977 // Lesser General Public License for more details. 4978 // 4979 // You should have received a copy of the GNU Lesser General Public 4980 // License along with the GNU C Library; if not, see 4981 // <https://www.gnu.org/licenses/>. 4982 4983 // Never include this file directly; use <sys/types.h> instead. 4984 4985 // NB: Include guard matches what <linux/time.h> uses. 4986 4987 // POSIX.1b structure for timer start values and intervals. 4988 type Itimerspec = struct { 4989 Fit_interval struct { 4990 Ftv_sec X__time_t 4991 Ftv_nsec X__syscall_slong_t 4992 } 4993 Fit_value struct { 4994 Ftv_sec X__time_t 4995 Ftv_nsec X__syscall_slong_t 4996 } 4997 } /* struct_itimerspec.h:8:1 */ 4998 4999 // define X_GETTIMEOFDAY macro, a portable gettimeofday() 5000 5001 // use POSIX name for signal 5002 5003 // Copyright 1997 Metro Link Incorporated 5004 // 5005 // All Rights Reserved 5006 // 5007 // Permission to use, copy, modify, distribute, and sell this software and its 5008 // documentation for any purpose is hereby granted without fee, provided that 5009 // the above copyright notice appear in all copies and that both that 5010 // copyright notice and this permission notice appear in supporting 5011 // documentation, and that the names of the above listed copyright holder(s) 5012 // not be used in advertising or publicity pertaining to distribution of 5013 // the software without specific, written prior permission. The above listed 5014 // copyright holder(s) make(s) no representations about the suitability of 5015 // this software for any purpose. It is provided "as is" without express or 5016 // implied warranty. 5017 // 5018 // THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD 5019 // TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 5020 // AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 5021 // LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 5022 // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 5023 // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 5024 // OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 5025 5026 // Determine the machine's byte order. 5027 5028 // See if it is set in the imake config first 5029 5030 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 5031 // This file is part of the GNU C Library. 5032 // 5033 // The GNU C Library is free software; you can redistribute it and/or 5034 // modify it under the terms of the GNU Lesser General Public 5035 // License as published by the Free Software Foundation; either 5036 // version 2.1 of the License, or (at your option) any later version. 5037 // 5038 // The GNU C Library is distributed in the hope that it will be useful, 5039 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5040 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5041 // Lesser General Public License for more details. 5042 // 5043 // You should have received a copy of the GNU Lesser General Public 5044 // License along with the GNU C Library; if not, see 5045 // <https://www.gnu.org/licenses/>. 5046 5047 // 'endian.h' might have been included before 'Xarch.h' 5048 5049 // Definitions for the X window system likely to be used by applications 5050 5051 //********************************************************** 5052 // 5053 // Copyright 1987, 1998 The Open Group 5054 // 5055 // Permission to use, copy, modify, distribute, and sell this software and its 5056 // documentation for any purpose is hereby granted without fee, provided that 5057 // the above copyright notice appear in all copies and that both that 5058 // copyright notice and this permission notice appear in supporting 5059 // documentation. 5060 // 5061 // The above copyright notice and this permission notice shall be included in 5062 // all copies or substantial portions of the Software. 5063 // 5064 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 5065 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 5066 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 5067 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 5068 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 5069 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5070 // 5071 // Except as contained in this notice, the name of The Open Group shall not be 5072 // used in advertising or otherwise to promote the sale, use or other dealings 5073 // in this Software without prior written authorization from The Open Group. 5074 // 5075 // 5076 // Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 5077 // 5078 // All Rights Reserved 5079 // 5080 // Permission to use, copy, modify, and distribute this software and its 5081 // documentation for any purpose and without fee is hereby granted, 5082 // provided that the above copyright notice appear in all copies and that 5083 // both that copyright notice and this permission notice appear in 5084 // supporting documentation, and that the name of Digital not be 5085 // used in advertising or publicity pertaining to distribution of the 5086 // software without specific, written prior permission. 5087 // 5088 // DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 5089 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 5090 // DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 5091 // ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 5092 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 5093 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 5094 // SOFTWARE. 5095 // 5096 // ***************************************************************** 5097 5098 // Resources 5099 5100 // _XSERVER64 must ONLY be defined when compiling X server sources on 5101 // systems where unsigned long is not 32 bits, must NOT be used in 5102 // client or library code. 5103 type XID = uint32 /* X.h:66:23 */ 5104 type Mask = uint32 /* X.h:70:23 */ 5105 type Atom = uint32 /* X.h:74:23 */ // Also in Xdefs.h 5106 type VisualID = uint32 /* X.h:76:23 */ 5107 type Time = uint32 /* X.h:77:23 */ 5108 5109 type Window = XID /* X.h:96:13 */ 5110 type Drawable = XID /* X.h:97:13 */ 5111 type Font = XID /* X.h:100:13 */ 5112 type Pixmap = XID /* X.h:102:13 */ 5113 type Cursor = XID /* X.h:103:13 */ 5114 type Colormap = XID /* X.h:104:13 */ 5115 type GContext = XID /* X.h:105:13 */ 5116 type KeySym = XID /* X.h:106:13 */ 5117 5118 type KeyCode = uint8 /* X.h:108:23 */ 5119 5120 // **************************************************************** 5121 // 5122 // RESERVED RESOURCE AND CONSTANT DEFINITIONS 5123 // 5124 5125 // **************************************************************** 5126 // 5127 // EVENT DEFINITIONS 5128 // 5129 5130 // Input Event Masks. Used as event-mask window attribute and as arguments 5131 // to Grab requests. Not to be confused with event names. 5132 5133 // Event names. Used in "type" field in XEvent structures. Not to be 5134 // confused with event masks above. They start from 2 because 0 and 1 5135 // are reserved in the protocol for errors and replies. 5136 5137 // Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, 5138 // state in various key-, mouse-, and button-related events. 5139 5140 // modifier names. Used to build a SetModifierMapping request or 5141 // to read a GetModifierMapping request. These correspond to the 5142 // masks defined above. 5143 5144 // button masks. Used in same manner as Key masks above. Not to be confused 5145 // with button names below. 5146 5147 // button names. Used as arguments to GrabButton and as detail in ButtonPress 5148 // and ButtonRelease events. Not to be confused with button masks above. 5149 // Note that 0 is already defined above as "AnyButton". 5150 5151 // Notify modes 5152 5153 // Notify detail 5154 5155 // Visibility notify 5156 5157 // Circulation request 5158 5159 // protocol families 5160 5161 // authentication families not tied to a specific protocol 5162 5163 // Property notification 5164 5165 // Color Map notification 5166 5167 // GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes 5168 5169 // GrabPointer, GrabKeyboard reply status 5170 5171 // AllowEvents modes 5172 5173 // Used in SetInputFocus, GetInputFocus 5174 5175 // **************************************************************** 5176 // 5177 // ERROR CODES 5178 // 5179 5180 // **************************************************************** 5181 // 5182 // WINDOW DEFINITIONS 5183 // 5184 5185 // Window classes used by CreateWindow 5186 // Note that CopyFromParent is already defined as 0 above 5187 5188 // Window attributes for CreateWindow and ChangeWindowAttributes 5189 5190 // ConfigureWindow structure 5191 5192 // Bit Gravity 5193 5194 // Window gravity + bit gravity above 5195 5196 // Used in CreateWindow for backing-store hint 5197 5198 // Used in GetWindowAttributes reply 5199 5200 // Used in ChangeSaveSet 5201 5202 // Used in ChangeCloseDownMode 5203 5204 // Window stacking method (in configureWindow) 5205 5206 // Circulation direction 5207 5208 // Property modes 5209 5210 // **************************************************************** 5211 // 5212 // GRAPHICS DEFINITIONS 5213 // 5214 5215 // graphics functions, as in GC.alu 5216 5217 // LineStyle 5218 5219 // capStyle 5220 5221 // joinStyle 5222 5223 // fillStyle 5224 5225 // fillRule 5226 5227 // subwindow mode 5228 5229 // SetClipRectangles ordering 5230 5231 // CoordinateMode for drawing routines 5232 5233 // Polygon shapes 5234 5235 // Arc modes for PolyFillArc 5236 5237 // GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into 5238 // GC.stateChanges 5239 5240 // **************************************************************** 5241 // 5242 // FONTS 5243 // 5244 5245 // used in QueryFont -- draw direction 5246 5247 // **************************************************************** 5248 // 5249 // IMAGING 5250 // 5251 5252 // ImageFormat -- PutImage, GetImage 5253 5254 // **************************************************************** 5255 // 5256 // COLOR MAP STUFF 5257 // 5258 5259 // For CreateColormap 5260 5261 // Flags used in StoreNamedColor, StoreColors 5262 5263 // **************************************************************** 5264 // 5265 // CURSOR STUFF 5266 // 5267 5268 // QueryBestSize Class 5269 5270 // **************************************************************** 5271 // 5272 // KEYBOARD/POINTER STUFF 5273 // 5274 5275 // masks for ChangeKeyboardControl 5276 5277 // **************************************************************** 5278 // 5279 // SCREEN SAVER STUFF 5280 // 5281 5282 // for ForceScreenSaver 5283 5284 // **************************************************************** 5285 // 5286 // HOSTS AND CONNECTIONS 5287 // 5288 5289 // for ChangeHosts 5290 5291 // for ChangeAccessControl 5292 5293 // Display classes used in opening the connection 5294 // Note that the statically allocated ones are even numbered and the 5295 // dynamically changeable ones are odd numbered 5296 5297 // Byte order used in imageByteOrder and bitmapBitOrder 5298 5299 //********************************************************** 5300 // 5301 // Copyright 1987, 1998 The Open Group 5302 // 5303 // Permission to use, copy, modify, distribute, and sell this software and its 5304 // documentation for any purpose is hereby granted without fee, provided that 5305 // the above copyright notice appear in all copies and that both that 5306 // copyright notice and this permission notice appear in supporting 5307 // documentation. 5308 // 5309 // The above copyright notice and this permission notice shall be included in 5310 // all copies or substantial portions of the Software. 5311 // 5312 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 5313 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 5314 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 5315 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 5316 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 5317 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5318 // 5319 // Except as contained in this notice, the name of The Open Group shall not be 5320 // used in advertising or otherwise to promote the sale, use or other dealings 5321 // in this Software without prior written authorization from The Open Group. 5322 // 5323 // 5324 // Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 5325 // 5326 // All Rights Reserved 5327 // 5328 // Permission to use, copy, modify, and distribute this software and its 5329 // documentation for any purpose and without fee is hereby granted, 5330 // provided that the above copyright notice appear in all copies and that 5331 // both that copyright notice and this permission notice appear in 5332 // supporting documentation, and that the name of Digital not be 5333 // used in advertising or publicity pertaining to distribution of the 5334 // software without specific, written prior permission. 5335 // 5336 // DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 5337 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 5338 // DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 5339 // ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 5340 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 5341 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 5342 // SOFTWARE. 5343 // 5344 // ***************************************************************** 5345 // Xmd.h: MACHINE DEPENDENT DECLARATIONS. 5346 5347 // Special per-machine configuration flags. 5348 5349 // Definition of macro used to set constants for size of network structures; 5350 // machines with preprocessors that can't handle all of the sz_ symbols 5351 // can define this macro to be sizeof(x) if and only if their compiler doesn't 5352 // pad out structures (esp. the xTextElt structure which contains only two 5353 // one-byte fields). Network structures should always define sz_symbols. 5354 // 5355 // The sz_ prefix is used instead of something more descriptive so that the 5356 // symbols are no more than 32 characters long (which causes problems for some 5357 // compilers and preprocessors). 5358 // 5359 // The extra indirection is to get macro arguments to expand correctly before 5360 // the concatenation, rather than afterward. 5361 5362 // Bitfield suffixes for the protocol structure elements, if you 5363 // need them. Note that bitfields are not guaranteed to be signed 5364 // (or even unsigned) according to ANSI C. 5365 type INT32 = int32 /* Xmd.h:100:14 */ 5366 type INT16 = int16 /* Xmd.h:102:15 */ 5367 5368 type INT8 = int8 /* Xmd.h:104:24 */ 5369 5370 type CARD64 = uint64 /* Xmd.h:110:28 */ 5371 type CARD32 = uint32 /* Xmd.h:111:23 */ 5372 type CARD16 = uint16 /* Xmd.h:113:24 */ 5373 type CARD8 = uint8 /* Xmd.h:114:24 */ 5374 5375 type BITS32 = CARD32 /* Xmd.h:116:17 */ 5376 type BITS16 = CARD16 /* Xmd.h:117:17 */ 5377 5378 type BYTE = CARD8 /* Xmd.h:119:16 */ 5379 type BOOL = CARD8 /* Xmd.h:120:16 */ 5380 5381 // was definitions for sign-extending bitfields on architectures without 5382 // native types smaller than 64-bit, now just backwards compatibility 5383 5384 // this version should leave result of type (t *), but that should only be 5385 // used when not in MUSTCOPY 5386 5387 // Copyright 1989 Network Computing Devices, Inc., Mountain View, California. 5388 // 5389 // Permission to use, copy, modify, and distribute this software and its 5390 // documentation for any purpose and without fee is hereby granted, provided 5391 // that the above copyright notice appear in all copies and that both that 5392 // copyright notice and this permission notice appear in supporting 5393 // documentation, and that the name of N.C.D. not be used in advertising or 5394 // publicity pertaining to distribution of the software without specific, 5395 // written prior permission. N.C.D. makes no representations about the 5396 // suitability of this software for any purpose. It is provided "as is" 5397 // without express or implied warranty. 5398 // 5399 5400 //********************************************************** 5401 // 5402 // Copyright 1987, 1998 The Open Group 5403 // 5404 // Permission to use, copy, modify, distribute, and sell this software and its 5405 // documentation for any purpose is hereby granted without fee, provided that 5406 // the above copyright notice appear in all copies and that both that 5407 // copyright notice and this permission notice appear in supporting 5408 // documentation. 5409 // 5410 // The above copyright notice and this permission notice shall be included in 5411 // all copies or substantial portions of the Software. 5412 // 5413 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 5414 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 5415 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 5416 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 5417 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 5418 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5419 // 5420 // Except as contained in this notice, the name of The Open Group shall not be 5421 // used in advertising or otherwise to promote the sale, use or other dealings 5422 // in this Software without prior written authorization from The Open Group. 5423 // 5424 // 5425 // Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. 5426 // 5427 // All Rights Reserved 5428 // 5429 // Permission to use, copy, modify, and distribute this software and its 5430 // documentation for any purpose and without fee is hereby granted, 5431 // provided that the above copyright notice appear in all copies and that 5432 // both that copyright notice and this permission notice appear in 5433 // supporting documentation, and that the name of Digital not be 5434 // used in advertising or publicity pertaining to distribution of the 5435 // software without specific, written prior permission. 5436 // 5437 // DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 5438 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 5439 // DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 5440 // ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 5441 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 5442 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 5443 // SOFTWARE. 5444 // 5445 // ***************************************************************** 5446 5447 // 5448 // 5449 // Copyright 1989, 1991, 1998 The Open Group 5450 // 5451 // Permission to use, copy, modify, distribute, and sell this software and its 5452 // documentation for any purpose is hereby granted without fee, provided that 5453 // the above copyright notice appear in all copies and that both that 5454 // copyright notice and this permission notice appear in supporting 5455 // documentation. 5456 // 5457 // The above copyright notice and this permission notice shall be included in 5458 // all copies or substantial portions of the Software. 5459 // 5460 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 5461 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 5462 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 5463 // OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 5464 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 5465 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5466 // 5467 // Except as contained in this notice, the name of The Open Group shall not be 5468 // used in advertising or otherwise to promote the sale, use or other dealings 5469 // in this Software without prior written authorization from The Open Group. 5470 // * 5471 // 5472 5473 // Definitions to make function prototypes manageable 5474 5475 // Function prototype configuration (see configure for more info) 5476 5477 // http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute 5478 5479 // Added in X11R6.9, so available in any version of modular xproto 5480 5481 // Added in X11R6.9, so available in any version of modular xproto 5482 5483 // Branch prediction hints for individual conditionals 5484 // requires xproto >= 7.0.9 5485 5486 // Bulk branch prediction hints via marking error path functions as "cold" 5487 // requires xproto >= 7.0.25 5488 5489 // Added in X11R6.9, so available in any version of modular xproto 5490 5491 // requires xproto >= 7.0.30 5492 5493 // requires xproto >= 7.0.17 5494 5495 // Added in X11R6.9, so available in any version of modular xproto 5496 5497 // requires xproto >= 7.0.22 - since this uses either gcc or C99 variable 5498 // argument macros, must be only used inside #ifdef _X_NONNULL guards, as 5499 // many legacy X clients are compiled in C89 mode still. 5500 5501 // requires xproto >= 7.0.22 5502 5503 // C99 keyword "inline" or equivalent extensions in pre-C99 compilers 5504 // requires xproto >= 7.0.9 5505 // (introduced in 7.0.8 but didn't support all compilers until 7.0.9) 5506 5507 // C99 keyword "restrict" or equivalent extensions in pre-C99 compilers 5508 // requires xproto >= 7.0.21 5509 5510 // requires xproto >= 7.0.30 5511 5512 // IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned 5513 // multicast addresses for XDMCP, where X in the prefix may be replaced 5514 // by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, 5515 // 5 for Site-Local, and so on. We set the default here to the Link-Local 5516 // version to most closely match the old IPv4 subnet broadcast behavior. 5517 // Both xdm and X -query allow specifying a different address if a different 5518 // scope is defined. 5519 5520 type XdmOpCode = uint32 /* Xdmcp.h:50:3 */ 5521 5522 type Xdmcp_states = uint32 /* Xdmcp.h:62:3 */ 5523 5524 type CARD8Ptr = uintptr /* Xdmcp.h:76:15 */ 5525 type CARD16Ptr = uintptr /* Xdmcp.h:77:16 */ 5526 type CARD32Ptr = uintptr /* Xdmcp.h:78:16 */ 5527 5528 type X_ARRAY8 = struct { 5529 Flength CARD16 5530 F__ccgo_pad1 [2]byte 5531 Fdata CARD8Ptr 5532 } /* Xdmcp.h:80:9 */ 5533 5534 type ARRAY8 = X_ARRAY8 /* Xdmcp.h:83:3 */ 5535 type ARRAY8Ptr = uintptr /* Xdmcp.h:83:11 */ 5536 5537 type X_ARRAY16 = struct { 5538 Flength CARD8 5539 F__ccgo_pad1 [3]byte 5540 Fdata CARD16Ptr 5541 } /* Xdmcp.h:85:9 */ 5542 5543 type ARRAY16 = X_ARRAY16 /* Xdmcp.h:88:3 */ 5544 type ARRAY16Ptr = uintptr /* Xdmcp.h:88:12 */ 5545 5546 type X_ARRAY32 = struct { 5547 Flength CARD8 5548 F__ccgo_pad1 [3]byte 5549 Fdata CARD32Ptr 5550 } /* Xdmcp.h:90:9 */ 5551 5552 type ARRAY32 = X_ARRAY32 /* Xdmcp.h:93:3 */ 5553 type ARRAY32Ptr = uintptr /* Xdmcp.h:93:12 */ 5554 5555 type X_ARRAYofARRAY8 = struct { 5556 Flength CARD8 5557 F__ccgo_pad1 [3]byte 5558 Fdata ARRAY8Ptr 5559 } /* Xdmcp.h:95:9 */ 5560 5561 type ARRAYofARRAY8 = X_ARRAYofARRAY8 /* Xdmcp.h:98:3 */ 5562 type ARRAYofARRAY8Ptr = uintptr /* Xdmcp.h:98:18 */ 5563 5564 type X_XdmcpHeader = struct { 5565 Fversion CARD16 5566 Fopcode CARD16 5567 Flength CARD16 5568 } /* Xdmcp.h:100:9 */ 5569 5570 type XdmcpHeader = X_XdmcpHeader /* Xdmcp.h:102:3 */ 5571 type XdmcpHeaderPtr = uintptr /* Xdmcp.h:102:16 */ 5572 5573 type X_XdmcpBuffer = struct { 5574 Fdata uintptr 5575 Fsize int32 5576 Fpointer int32 5577 Fcount int32 5578 } /* Xdmcp.h:104:9 */ 5579 5580 type XdmcpBuffer = X_XdmcpBuffer /* Xdmcp.h:109:3 */ 5581 type XdmcpBufferPtr = uintptr /* Xdmcp.h:109:16 */ 5582 5583 type X_XdmAuthKey = struct{ Fdata [8]BYTE } /* Xdmcp.h:111:9 */ 5584 5585 type XdmAuthKeyRec = X_XdmAuthKey /* Xdmcp.h:113:3 */ 5586 type XdmAuthKeyPtr = uintptr /* Xdmcp.h:113:18 */ 5587 5588 // implementation-independent network address structure. 5589 // Equiv to sockaddr* for sockets. 5590 5591 type XdmcpNetaddr = uintptr /* Xdmcp.h:119:14 */ 5592 5593 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 5594 // This file is part of the GNU C Library. 5595 // 5596 // The GNU C Library is free software; you can redistribute it and/or 5597 // modify it under the terms of the GNU Lesser General Public 5598 // License as published by the Free Software Foundation; either 5599 // version 2.1 of the License, or (at your option) any later version. 5600 // 5601 // The GNU C Library is distributed in the hope that it will be useful, 5602 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5603 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5604 // Lesser General Public License for more details. 5605 // 5606 // You should have received a copy of the GNU Lesser General Public 5607 // License along with the GNU C Library; if not, see 5608 // <https://www.gnu.org/licenses/>. 5609 5610 // ISO C99: 7.18 Integer types <stdint.h> 5611 5612 // Handle feature test macros at the start of a header. 5613 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 5614 // This file is part of the GNU C Library. 5615 // 5616 // The GNU C Library is free software; you can redistribute it and/or 5617 // modify it under the terms of the GNU Lesser General Public 5618 // License as published by the Free Software Foundation; either 5619 // version 2.1 of the License, or (at your option) any later version. 5620 // 5621 // The GNU C Library is distributed in the hope that it will be useful, 5622 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5623 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5624 // Lesser General Public License for more details. 5625 // 5626 // You should have received a copy of the GNU Lesser General Public 5627 // License along with the GNU C Library; if not, see 5628 // <https://www.gnu.org/licenses/>. 5629 5630 // This header is internal to glibc and should not be included outside 5631 // of glibc headers. Headers including it must define 5632 // __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header 5633 // cannot have multiple include guards because ISO C feature test 5634 // macros depend on the definition of the macro when an affected 5635 // header is included, not when the first system header is 5636 // included. 5637 5638 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 5639 // This file is part of the GNU C Library. 5640 // 5641 // The GNU C Library is free software; you can redistribute it and/or 5642 // modify it under the terms of the GNU Lesser General Public 5643 // License as published by the Free Software Foundation; either 5644 // version 2.1 of the License, or (at your option) any later version. 5645 // 5646 // The GNU C Library is distributed in the hope that it will be useful, 5647 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5648 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5649 // Lesser General Public License for more details. 5650 // 5651 // You should have received a copy of the GNU Lesser General Public 5652 // License along with the GNU C Library; if not, see 5653 // <https://www.gnu.org/licenses/>. 5654 5655 // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ 5656 // macro. 5657 5658 // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ 5659 // macro. Most but not all symbols enabled by that macro in TS 5660 // 18661-1 are enabled unconditionally in C2X; the symbols in Annex F 5661 // still require that macro in C2X. 5662 5663 // ISO/IEC TS 18661-4:2015 defines the 5664 // __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction 5665 // functions, the symbols from this TS are enabled unconditionally in 5666 // C2X. 5667 5668 // ISO/IEC TS 18661-3:2015 defines the 5669 // __STDC_WANT_IEC_60559_TYPES_EXT__ macro. 5670 // bits/types.h -- definitions of __*_t types underlying *_t types. 5671 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 5672 // This file is part of the GNU C Library. 5673 // 5674 // The GNU C Library is free software; you can redistribute it and/or 5675 // modify it under the terms of the GNU Lesser General Public 5676 // License as published by the Free Software Foundation; either 5677 // version 2.1 of the License, or (at your option) any later version. 5678 // 5679 // The GNU C Library is distributed in the hope that it will be useful, 5680 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5681 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5682 // Lesser General Public License for more details. 5683 // 5684 // You should have received a copy of the GNU Lesser General Public 5685 // License along with the GNU C Library; if not, see 5686 // <https://www.gnu.org/licenses/>. 5687 5688 // Never include this file directly; use <sys/types.h> instead. 5689 5690 // wchar_t type related definitions. 5691 // Copyright (C) 2000-2020 Free Software Foundation, Inc. 5692 // This file is part of the GNU C Library. 5693 // 5694 // The GNU C Library is free software; you can redistribute it and/or 5695 // modify it under the terms of the GNU Lesser General Public 5696 // License as published by the Free Software Foundation; either 5697 // version 2.1 of the License, or (at your option) any later version. 5698 // 5699 // The GNU C Library is distributed in the hope that it will be useful, 5700 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5701 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5702 // Lesser General Public License for more details. 5703 // 5704 // You should have received a copy of the GNU Lesser General Public 5705 // License along with the GNU C Library; if not, see 5706 // <https://www.gnu.org/licenses/>. 5707 5708 // The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__ 5709 // are not defined, give the right value and type as long as both int 5710 // and wchar_t are 32-bit types. Adding L'\0' to a constant value 5711 // ensures that the type is correct; it is necessary to use (L'\0' + 5712 // 0) rather than just L'\0' so that the type in C++ is the promoted 5713 // version of wchar_t rather than the distinct wchar_t type itself. 5714 // Because wchar_t in preprocessor #if expressions is treated as 5715 // intmax_t or uintmax_t, the expression (L'\0' - 1) would have the 5716 // wrong value for WCHAR_MAX in such expressions and so cannot be used 5717 // to define __WCHAR_MAX in the unsigned case. 5718 5719 // Determine the wordsize from the preprocessor defines. 5720 5721 // Exact integral types. 5722 5723 // Signed. 5724 // Define intN_t types. 5725 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 5726 // This file is part of the GNU C Library. 5727 // 5728 // The GNU C Library is free software; you can redistribute it and/or 5729 // modify it under the terms of the GNU Lesser General Public 5730 // License as published by the Free Software Foundation; either 5731 // version 2.1 of the License, or (at your option) any later version. 5732 // 5733 // The GNU C Library is distributed in the hope that it will be useful, 5734 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5735 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5736 // Lesser General Public License for more details. 5737 // 5738 // You should have received a copy of the GNU Lesser General Public 5739 // License along with the GNU C Library; if not, see 5740 // <https://www.gnu.org/licenses/>. 5741 5742 // Unsigned. 5743 // Define uintN_t types. 5744 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 5745 // This file is part of the GNU C Library. 5746 // 5747 // The GNU C Library is free software; you can redistribute it and/or 5748 // modify it under the terms of the GNU Lesser General Public 5749 // License as published by the Free Software Foundation; either 5750 // version 2.1 of the License, or (at your option) any later version. 5751 // 5752 // The GNU C Library is distributed in the hope that it will be useful, 5753 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5754 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5755 // Lesser General Public License for more details. 5756 // 5757 // You should have received a copy of the GNU Lesser General Public 5758 // License along with the GNU C Library; if not, see 5759 // <https://www.gnu.org/licenses/>. 5760 5761 // bits/types.h -- definitions of __*_t types underlying *_t types. 5762 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 5763 // This file is part of the GNU C Library. 5764 // 5765 // The GNU C Library is free software; you can redistribute it and/or 5766 // modify it under the terms of the GNU Lesser General Public 5767 // License as published by the Free Software Foundation; either 5768 // version 2.1 of the License, or (at your option) any later version. 5769 // 5770 // The GNU C Library is distributed in the hope that it will be useful, 5771 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5772 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5773 // Lesser General Public License for more details. 5774 // 5775 // You should have received a copy of the GNU Lesser General Public 5776 // License along with the GNU C Library; if not, see 5777 // <https://www.gnu.org/licenses/>. 5778 5779 // Never include this file directly; use <sys/types.h> instead. 5780 5781 type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ 5782 type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */ 5783 type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */ 5784 type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */ 5785 5786 // Small types. 5787 5788 // Signed. 5789 type Int_least8_t = X__int_least8_t /* stdint.h:43:24 */ 5790 type Int_least16_t = X__int_least16_t /* stdint.h:44:25 */ 5791 type Int_least32_t = X__int_least32_t /* stdint.h:45:25 */ 5792 type Int_least64_t = X__int_least64_t /* stdint.h:46:25 */ 5793 5794 // Unsigned. 5795 type Uint_least8_t = X__uint_least8_t /* stdint.h:49:25 */ 5796 type Uint_least16_t = X__uint_least16_t /* stdint.h:50:26 */ 5797 type Uint_least32_t = X__uint_least32_t /* stdint.h:51:26 */ 5798 type Uint_least64_t = X__uint_least64_t /* stdint.h:52:26 */ 5799 5800 // Fast types. 5801 5802 // Signed. 5803 type Int_fast8_t = int8 /* stdint.h:58:22 */ 5804 type Int_fast16_t = int32 /* stdint.h:64:15 */ 5805 type Int_fast32_t = int32 /* stdint.h:65:15 */ 5806 5807 type Int_fast64_t = int64 /* stdint.h:67:24 */ 5808 5809 // Unsigned. 5810 type Uint_fast8_t = uint8 /* stdint.h:71:24 */ 5811 type Uint_fast16_t = uint32 /* stdint.h:77:23 */ 5812 type Uint_fast32_t = uint32 /* stdint.h:78:23 */ 5813 5814 type Uint_fast64_t = uint64 /* stdint.h:80:32 */ 5815 5816 // Types for `void *' pointers. 5817 type Uintptr_t = uint32 /* stdint.h:96:23 */ 5818 5819 // Largest integral types. 5820 type Intmax_t = X__intmax_t /* stdint.h:101:21 */ 5821 type Uintmax_t = X__uintmax_t /* stdint.h:102:22 */ 5822 5823 // A null pointer constant. 5824 5825 // XPG requires a few symbols from <sys/wait.h> being defined. 5826 // Definitions of flag bits for `waitpid' et al. 5827 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 5828 // This file is part of the GNU C Library. 5829 // 5830 // The GNU C Library is free software; you can redistribute it and/or 5831 // modify it under the terms of the GNU Lesser General Public 5832 // License as published by the Free Software Foundation; either 5833 // version 2.1 of the License, or (at your option) any later version. 5834 // 5835 // The GNU C Library is distributed in the hope that it will be useful, 5836 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5837 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5838 // Lesser General Public License for more details. 5839 // 5840 // You should have received a copy of the GNU Lesser General Public 5841 // License along with the GNU C Library; if not, see 5842 // <https://www.gnu.org/licenses/>. 5843 5844 // Bits in the third argument to `waitpid'. 5845 5846 // Bits in the fourth argument to `waitid'. 5847 5848 // The following values are used by the `waitid' function. 5849 5850 // The Linux kernel defines these bare, rather than an enum, 5851 // which causes a conflict if the include order is reversed. 5852 5853 type Idtype_t = uint32 /* waitflags.h:57:3 */ 5854 // Definitions of status bits for `wait' et al. 5855 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 5856 // This file is part of the GNU C Library. 5857 // 5858 // The GNU C Library is free software; you can redistribute it and/or 5859 // modify it under the terms of the GNU Lesser General Public 5860 // License as published by the Free Software Foundation; either 5861 // version 2.1 of the License, or (at your option) any later version. 5862 // 5863 // The GNU C Library is distributed in the hope that it will be useful, 5864 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5865 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5866 // Lesser General Public License for more details. 5867 // 5868 // You should have received a copy of the GNU Lesser General Public 5869 // License along with the GNU C Library; if not, see 5870 // <https://www.gnu.org/licenses/>. 5871 5872 // Everything extant so far uses these same bits. 5873 5874 // If WIFEXITED(STATUS), the low-order 8 bits of the status. 5875 5876 // If WIFSIGNALED(STATUS), the terminating signal. 5877 5878 // If WIFSTOPPED(STATUS), the signal that stopped the child. 5879 5880 // Nonzero if STATUS indicates normal termination. 5881 5882 // Nonzero if STATUS indicates termination by a signal. 5883 5884 // Nonzero if STATUS indicates the child is stopped. 5885 5886 // Nonzero if STATUS indicates the child continued after a stop. We only 5887 // define this if <bits/waitflags.h> provides the WCONTINUED flag bit. 5888 5889 // Nonzero if STATUS indicates the child dumped core. 5890 5891 // Macros for constructing status values. 5892 5893 // Define the macros <sys/wait.h> also would define this way. 5894 5895 // _FloatN API tests for enablement. 5896 // Macros to control TS 18661-3 glibc features on x86. 5897 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 5898 // This file is part of the GNU C Library. 5899 // 5900 // The GNU C Library is free software; you can redistribute it and/or 5901 // modify it under the terms of the GNU Lesser General Public 5902 // License as published by the Free Software Foundation; either 5903 // version 2.1 of the License, or (at your option) any later version. 5904 // 5905 // The GNU C Library is distributed in the hope that it will be useful, 5906 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5907 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5908 // Lesser General Public License for more details. 5909 // 5910 // You should have received a copy of the GNU Lesser General Public 5911 // License along with the GNU C Library; if not, see 5912 // <https://www.gnu.org/licenses/>. 5913 5914 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 5915 // This file is part of the GNU C Library. 5916 // 5917 // The GNU C Library is free software; you can redistribute it and/or 5918 // modify it under the terms of the GNU Lesser General Public 5919 // License as published by the Free Software Foundation; either 5920 // version 2.1 of the License, or (at your option) any later version. 5921 // 5922 // The GNU C Library is distributed in the hope that it will be useful, 5923 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5924 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5925 // Lesser General Public License for more details. 5926 // 5927 // You should have received a copy of the GNU Lesser General Public 5928 // License along with the GNU C Library; if not, see 5929 // <https://www.gnu.org/licenses/>. 5930 5931 // Defined to 1 if the current compiler invocation provides a 5932 // floating-point type with the IEEE 754 binary128 format, and this 5933 // glibc includes corresponding *f128 interfaces for it. The required 5934 // libgcc support was added some time after the basic compiler 5935 // support, for x86_64 and x86. 5936 5937 // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct 5938 // from the default float, double and long double types in this glibc. 5939 5940 // Defined to 1 if the current compiler invocation provides a 5941 // floating-point type with the right format for _Float64x, and this 5942 // glibc includes corresponding *f64x interfaces for it. 5943 5944 // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format 5945 // of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has 5946 // the format of _Float128, which must be different from that of long 5947 // double. 5948 5949 // Defined to concatenate the literal suffix to be used with _Float128 5950 // types, if __HAVE_FLOAT128 is 1. 5951 5952 // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. 5953 5954 // The remaining of this file provides support for older compilers. 5955 5956 // The type _Float128 exists only since GCC 7.0. 5957 5958 // __builtin_huge_valf128 doesn't exist before GCC 7.0. 5959 5960 // Older GCC has only a subset of built-in functions for _Float128 on 5961 // x86, and __builtin_infq is not usable in static initializers. 5962 // Converting a narrower sNaN to _Float128 produces a quiet NaN, so 5963 // attempts to use _Float128 sNaNs will not work properly with older 5964 // compilers. 5965 5966 // In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, 5967 // e.g.: __builtin_signbitf128, before GCC 6. However, there has never 5968 // been a __builtin_signbitf128 in GCC and the type-generic builtin is 5969 // only available since GCC 6. 5970 5971 // Macros to control TS 18661-3 glibc features where the same 5972 // definitions are appropriate for all platforms. 5973 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 5974 // This file is part of the GNU C Library. 5975 // 5976 // The GNU C Library is free software; you can redistribute it and/or 5977 // modify it under the terms of the GNU Lesser General Public 5978 // License as published by the Free Software Foundation; either 5979 // version 2.1 of the License, or (at your option) any later version. 5980 // 5981 // The GNU C Library is distributed in the hope that it will be useful, 5982 // but WITHOUT ANY WARRANTY; without even the implied warranty of 5983 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5984 // Lesser General Public License for more details. 5985 // 5986 // You should have received a copy of the GNU Lesser General Public 5987 // License along with the GNU C Library; if not, see 5988 // <https://www.gnu.org/licenses/>. 5989 5990 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 5991 // This file is part of the GNU C Library. 5992 // 5993 // The GNU C Library is free software; you can redistribute it and/or 5994 // modify it under the terms of the GNU Lesser General Public 5995 // License as published by the Free Software Foundation; either 5996 // version 2.1 of the License, or (at your option) any later version. 5997 // 5998 // The GNU C Library is distributed in the hope that it will be useful, 5999 // but WITHOUT ANY WARRANTY; without even the implied warranty of 6000 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6001 // Lesser General Public License for more details. 6002 // 6003 // You should have received a copy of the GNU Lesser General Public 6004 // License along with the GNU C Library; if not, see 6005 // <https://www.gnu.org/licenses/>. 6006 6007 // Properties of long double type. ldbl-96 version. 6008 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 6009 // This file is part of the GNU C Library. 6010 // 6011 // The GNU C Library is free software; you can redistribute it and/or 6012 // modify it under the terms of the GNU Lesser General Public 6013 // License published by the Free Software Foundation; either 6014 // version 2.1 of the License, or (at your option) any later version. 6015 // 6016 // The GNU C Library is distributed in the hope that it will be useful, 6017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 6018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6019 // Lesser General Public License for more details. 6020 // 6021 // You should have received a copy of the GNU Lesser General Public 6022 // License along with the GNU C Library; if not, see 6023 // <https://www.gnu.org/licenses/>. 6024 6025 // long double is distinct from double, so there is nothing to 6026 // define here. 6027 6028 // This header should be included at the bottom of each bits/floatn.h. 6029 // It defines the following macros for each _FloatN and _FloatNx type, 6030 // where the same definitions, or definitions based only on the macros 6031 // in bits/floatn.h, are appropriate for all glibc configurations. 6032 6033 // Defined to 1 if the current compiler invocation provides a 6034 // floating-point type with the right format for this type, and this 6035 // glibc includes corresponding *fN or *fNx interfaces for it. 6036 6037 // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the 6038 // type is the first with its format in the sequence of (the default 6039 // choices for) float, double, long double, _Float16, _Float32, 6040 // _Float64, _Float128, _Float32x, _Float64x, _Float128x for this 6041 // glibc; that is, if functions present once per floating-point format 6042 // rather than once per type are present for this type. 6043 // 6044 // All configurations supported by glibc have _Float32 the same format 6045 // as float, _Float64 and _Float32x the same format as double, the 6046 // _Float64x the same format as either long double or _Float128. No 6047 // configurations support _Float128x or, as of GCC 7, have compiler 6048 // support for a type meeting the requirements for _Float128x. 6049 6050 // Defined to 1 if the corresponding _FloatN type is not binary compatible 6051 // with the corresponding ISO C type in the current compilation unit as 6052 // opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built 6053 // in glibc. 6054 6055 // Defined to 1 if any _FloatN or _FloatNx types that are not 6056 // ABI-distinct are however distinct types at the C language level (so 6057 // for the purposes of __builtin_types_compatible_p and _Generic). 6058 6059 // Defined to concatenate the literal suffix to be used with _FloatN 6060 // or _FloatNx types, if __HAVE_<type> is 1. The corresponding 6061 // literal suffixes exist since GCC 7, for C only. 6062 6063 // Defined to a complex type if __HAVE_<type> is 1. 6064 6065 // The remaining of this file provides support for older compilers. 6066 6067 // If double, long double and _Float64 all have the same set of 6068 // values, TS 18661-3 requires the usual arithmetic conversions on 6069 // long double and _Float64 to produce _Float64. For this to be the 6070 // case when building with a compiler without a distinct _Float64 6071 // type, _Float64 must be a typedef for long double, not for 6072 // double. 6073 6074 // Returned by `div'. 6075 type Div_t = struct { 6076 Fquot int32 6077 Frem int32 6078 } /* stdlib.h:62:5 */ 6079 6080 // Returned by `ldiv'. 6081 type Ldiv_t = struct { 6082 Fquot int32 6083 Frem int32 6084 } /* stdlib.h:70:5 */ 6085 6086 // Returned by `lldiv'. 6087 type Lldiv_t = struct { 6088 Fquot int64 6089 Frem int64 6090 } /* stdlib.h:80:5 */ 6091 6092 // Reentrant versions of the `random' family of functions. 6093 // These functions all use the following data structure to contain 6094 // state, rather than global state variables. 6095 6096 type Random_data = struct { 6097 Ffptr uintptr 6098 Frptr uintptr 6099 Fstate uintptr 6100 Frand_type int32 6101 Frand_deg int32 6102 Frand_sep int32 6103 Fend_ptr uintptr 6104 } /* stdlib.h:423:1 */ 6105 6106 // Data structure for communication with thread safe versions. This 6107 // type is to be regarded as opaque. It's only exported because users 6108 // have to allocate objects of this type. 6109 type Drand48_data = struct { 6110 F__x [3]uint16 6111 F__old_x [3]uint16 6112 F__c uint16 6113 F__init uint16 6114 F__a uint64 6115 } /* stdlib.h:490:1 */ 6116 6117 // Shorthand for type of comparison functions. 6118 type X__compar_fn_t = uintptr /* stdlib.h:808:13 */ 6119 6120 type Comparison_fn_t = X__compar_fn_t /* stdlib.h:811:23 */ 6121 type X__compar_d_fn_t = uintptr /* stdlib.h:815:13 */ 6122 6123 // Floating-point inline functions for stdlib.h. 6124 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 6125 // This file is part of the GNU C Library. 6126 // 6127 // The GNU C Library is free software; you can redistribute it and/or 6128 // modify it under the terms of the GNU Lesser General Public 6129 // License as published by the Free Software Foundation; either 6130 // version 2.1 of the License, or (at your option) any later version. 6131 // 6132 // The GNU C Library is distributed in the hope that it will be useful, 6133 // but WITHOUT ANY WARRANTY; without even the implied warranty of 6134 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6135 // Lesser General Public License for more details. 6136 // 6137 // You should have received a copy of the GNU Lesser General Public 6138 // License along with the GNU C Library; if not, see 6139 // <https://www.gnu.org/licenses/>. 6140 6141 // Define some macros helping to catch buffer overflows. 6142 6143 // This variant of malloc does not return NULL if zero size is passed into. 6144 func xmalloc(tls *libc.TLS, size Size_t) uintptr { /* Array.c:40:13: */ 6145 return libc.Xmalloc(tls, func() uint32 { 6146 if size != 0 { 6147 return size 6148 } 6149 return uint32(1) 6150 }()) 6151 } 6152 6153 // This variant of calloc does not return NULL if zero count is passed into. 6154 func xcalloc(tls *libc.TLS, n Size_t, size Size_t) uintptr { /* Array.c:49:13: */ 6155 return libc.Xcalloc(tls, func() uint32 { 6156 if n != 0 { 6157 return n 6158 } 6159 return uint32(1) 6160 }(), size) 6161 } 6162 6163 // This variant of realloc does not return NULL if zero size is passed into 6164 func xrealloc(tls *libc.TLS, ptr uintptr, size Size_t) uintptr { /* Array.c:58:13: */ 6165 return libc.Xrealloc(tls, ptr, func() uint32 { 6166 if size != 0 { 6167 return size 6168 } 6169 return uint32(1) 6170 }()) 6171 } 6172 6173 func XXdmcpAllocARRAY8(tls *libc.TLS, array ARRAY8Ptr, length int32) int32 { /* Array.c:65:1: */ 6174 // length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) 6175 if (length > (65535)) || (length < 0) { 6176 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6177 } else { 6178 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = xmalloc(tls, (uint32(length) * uint32(unsafe.Sizeof(CARD8(0))))) 6179 } 6180 6181 if (*X_ARRAY8)(unsafe.Pointer(array)).Fdata == (uintptr(0)) { 6182 (*X_ARRAY8)(unsafe.Pointer(array)).Flength = CARD16(0) 6183 return FALSE 6184 } 6185 (*X_ARRAY8)(unsafe.Pointer(array)).Flength = CARD16(length) 6186 return TRUE 6187 } 6188 6189 func XXdmcpAllocARRAY16(tls *libc.TLS, array ARRAY16Ptr, length int32) int32 { /* Array.c:82:1: */ 6190 // length defined in ARRAY16 struct is a CARD8 6191 if (length > (255)) || (length < 0) { 6192 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = uintptr(0) 6193 } else { 6194 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = xmalloc(tls, (uint32(length) * uint32(unsafe.Sizeof(CARD16(0))))) 6195 } 6196 6197 if (*X_ARRAY16)(unsafe.Pointer(array)).Fdata == (uintptr(0)) { 6198 (*X_ARRAY16)(unsafe.Pointer(array)).Flength = CARD8(0) 6199 return FALSE 6200 } 6201 (*X_ARRAY16)(unsafe.Pointer(array)).Flength = CARD8(length) 6202 return TRUE 6203 } 6204 6205 func XXdmcpAllocARRAY32(tls *libc.TLS, array ARRAY32Ptr, length int32) int32 { /* Array.c:99:1: */ 6206 // length defined in ARRAY32 struct is a CARD8 6207 if (length > (255)) || (length < 0) { 6208 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = uintptr(0) 6209 } else { 6210 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = xmalloc(tls, (uint32(length) * uint32(unsafe.Sizeof(CARD32(0))))) 6211 } 6212 6213 if (*X_ARRAY32)(unsafe.Pointer(array)).Fdata == (uintptr(0)) { 6214 (*X_ARRAY32)(unsafe.Pointer(array)).Flength = CARD8(0) 6215 return FALSE 6216 } 6217 (*X_ARRAY32)(unsafe.Pointer(array)).Flength = CARD8(length) 6218 return TRUE 6219 } 6220 6221 func XXdmcpAllocARRAYofARRAY8(tls *libc.TLS, array ARRAYofARRAY8Ptr, length int32) int32 { /* Array.c:116:1: */ 6222 // length defined in ARRAYofARRAY8 struct is a CARD8 6223 if (length > (255)) || (length < 0) { 6224 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6225 } else { 6226 // Use calloc to ensure the pointers are cleared out so we 6227 // don't try to free garbage if XdmcpDisposeARRAYofARRAY8() 6228 // is called before the caller sets them to valid pointers. 6229 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = xcalloc(tls, uint32(length), uint32(unsafe.Sizeof(ARRAY8{}))) 6230 } 6231 6232 if (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata == (uintptr(0)) { 6233 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = CARD8(0) 6234 return FALSE 6235 } 6236 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = CARD8(length) 6237 return TRUE 6238 } 6239 6240 func XXdmcpARRAY8Equal(tls *libc.TLS, array1 ARRAY8Ptr, array2 ARRAY8Ptr) int32 { /* Array.c:138:1: */ 6241 if int32((*X_ARRAY8)(unsafe.Pointer(array1)).Flength) != int32((*X_ARRAY8)(unsafe.Pointer(array2)).Flength) { 6242 return FALSE 6243 } 6244 if libc.Xmemcmp(tls, (*X_ARRAY8)(unsafe.Pointer(array1)).Fdata, (*X_ARRAY8)(unsafe.Pointer(array2)).Fdata, uint32((*X_ARRAY8)(unsafe.Pointer(array1)).Flength)) != 0 { 6245 return FALSE 6246 } 6247 return TRUE 6248 } 6249 6250 func XXdmcpCopyARRAY8(tls *libc.TLS, src ARRAY8Ptr, dst ARRAY8Ptr) int32 { /* Array.c:148:1: */ 6251 if !(XXdmcpAllocARRAY8(tls, dst, int32((*X_ARRAY8)(unsafe.Pointer(src)).Flength)) != 0) { 6252 return FALSE 6253 } 6254 libc.Xmemmove(tls, (*X_ARRAY8)(unsafe.Pointer(dst)).Fdata, (*X_ARRAY8)(unsafe.Pointer(src)).Fdata, (uint32((*X_ARRAY8)(unsafe.Pointer(src)).Flength) * uint32(unsafe.Sizeof(CARD8(0))))) 6255 return TRUE 6256 } 6257 6258 func XXdmcpReallocARRAY8(tls *libc.TLS, array ARRAY8Ptr, length int32) int32 { /* Array.c:157:1: */ 6259 var newData CARD8Ptr 6260 6261 // length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) 6262 if (length > (65535)) || (length < 0) { 6263 return FALSE 6264 } 6265 6266 newData = xrealloc(tls, (*X_ARRAY8)(unsafe.Pointer(array)).Fdata, (uint32(length) * uint32(unsafe.Sizeof(CARD8(0))))) 6267 if !(newData != 0) { 6268 return FALSE 6269 } 6270 (*X_ARRAY8)(unsafe.Pointer(array)).Flength = CARD16(length) 6271 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = newData 6272 return TRUE 6273 } 6274 6275 func XXdmcpReallocARRAYofARRAY8(tls *libc.TLS, array ARRAYofARRAY8Ptr, length int32) int32 { /* Array.c:174:1: */ 6276 var newData ARRAY8Ptr 6277 6278 // length defined in ARRAYofARRAY8 struct is a CARD8 6279 if (length > (255)) || (length < 0) { 6280 return FALSE 6281 } 6282 6283 newData = xrealloc(tls, (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata, (uint32(length) * uint32(unsafe.Sizeof(ARRAY8{})))) 6284 if !(newData != 0) { 6285 return FALSE 6286 } 6287 if length > int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength) { 6288 libc.Xmemset(tls, (newData + uintptr((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)*8), 0, 6289 ((uint32(length - int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength))) * uint32(unsafe.Sizeof(ARRAY8{})))) 6290 } 6291 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = CARD8(length) 6292 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = newData 6293 return TRUE 6294 } 6295 6296 func XXdmcpReallocARRAY16(tls *libc.TLS, array ARRAY16Ptr, length int32) int32 { /* Array.c:194:1: */ 6297 var newData CARD16Ptr 6298 6299 // length defined in ARRAY16 struct is a CARD8 6300 if (length > (255)) || (length < 0) { 6301 return FALSE 6302 } 6303 newData = xrealloc(tls, (*X_ARRAY16)(unsafe.Pointer(array)).Fdata, (uint32(length) * uint32(unsafe.Sizeof(CARD16(0))))) 6304 if !(newData != 0) { 6305 return FALSE 6306 } 6307 (*X_ARRAY16)(unsafe.Pointer(array)).Flength = CARD8(length) 6308 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = newData 6309 return TRUE 6310 } 6311 6312 func XXdmcpReallocARRAY32(tls *libc.TLS, array ARRAY32Ptr, length int32) int32 { /* Array.c:210:1: */ 6313 var newData CARD32Ptr 6314 6315 // length defined in ARRAY32 struct is a CARD8 6316 if (length > (255)) || (length < 0) { 6317 return FALSE 6318 } 6319 6320 newData = xrealloc(tls, (*X_ARRAY32)(unsafe.Pointer(array)).Fdata, (uint32(length) * uint32(unsafe.Sizeof(CARD32(0))))) 6321 if !(newData != 0) { 6322 return FALSE 6323 } 6324 (*X_ARRAY32)(unsafe.Pointer(array)).Flength = CARD8(length) 6325 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = newData 6326 return TRUE 6327 } 6328 6329 func XXdmcpDisposeARRAY8(tls *libc.TLS, array ARRAY8Ptr) { /* Array.c:227:1: */ 6330 libc.Xfree(tls, (*X_ARRAY8)(unsafe.Pointer(array)).Fdata) 6331 (*X_ARRAY8)(unsafe.Pointer(array)).Flength = CARD16(0) 6332 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6333 } 6334 6335 func XXdmcpDisposeARRAY16(tls *libc.TLS, array ARRAY16Ptr) { /* Array.c:235:1: */ 6336 libc.Xfree(tls, (*X_ARRAY16)(unsafe.Pointer(array)).Fdata) 6337 (*X_ARRAY16)(unsafe.Pointer(array)).Flength = CARD8(0) 6338 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = uintptr(0) 6339 } 6340 6341 func XXdmcpDisposeARRAY32(tls *libc.TLS, array ARRAY32Ptr) { /* Array.c:243:1: */ 6342 libc.Xfree(tls, (*X_ARRAY32)(unsafe.Pointer(array)).Fdata) 6343 (*X_ARRAY32)(unsafe.Pointer(array)).Flength = CARD8(0) 6344 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = uintptr(0) 6345 } 6346 6347 func XXdmcpDisposeARRAYofARRAY8(tls *libc.TLS, array ARRAYofARRAY8Ptr) { /* Array.c:251:1: */ 6348 var i int32 6349 6350 if (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata != (uintptr(0)) { 6351 for i = 0; i < int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength); i++ { 6352 XXdmcpDisposeARRAY8(tls, ((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata + uintptr(i)*8)) 6353 } 6354 libc.Xfree(tls, (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata) 6355 } 6356 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = CARD8(0) 6357 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6358 } 6359 6360 // Protocol families. 6361 6362 // Address families. 6363 6364 // Socket level values. Others are defined in the appropriate headers. 6365 // 6366 // XXX These definitions also should go into the appropriate headers as 6367 // far as they are available. 6368 6369 // Maximum queue length specifiable by listen. 6370 6371 // Get the definition of the macro to define the common sockaddr members. 6372 // Definition of struct sockaddr_* common members and sizes, generic version. 6373 // Copyright (C) 1995-2020 Free Software Foundation, Inc. 6374 // This file is part of the GNU C Library. 6375 // 6376 // The GNU C Library is free software; you can redistribute it and/or 6377 // modify it under the terms of the GNU Lesser General Public 6378 // License as published by the Free Software Foundation; either 6379 // version 2.1 of the License, or (at your option) any later version. 6380 // 6381 // The GNU C Library is distributed in the hope that it will be useful, 6382 // but WITHOUT ANY WARRANTY; without even the implied warranty of 6383 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6384 // Lesser General Public License for more details. 6385 // 6386 // You should have received a copy of the GNU Lesser General Public 6387 // License along with the GNU C Library; if not, see 6388 // <https://www.gnu.org/licenses/>. 6389 6390 // Never include this file directly; use <sys/socket.h> instead. 6391 6392 // POSIX.1g specifies this type name for the `sa_family' member. 6393 type Sa_family_t = uint16 /* sockaddr.h:28:28 */ 6394 6395 // This macro is used to declare the initial common members 6396 // of the data types used for socket addresses, `struct sockaddr', 6397 // `struct sockaddr_in', `struct sockaddr_un', etc. 6398 6399 // Size of struct sockaddr_storage. 6400 6401 // Structure describing a generic socket address. 6402 type Sockaddr = struct { 6403 Fsa_family Sa_family_t 6404 Fsa_data [14]int8 6405 } /* socket.h:178:1 */ 6406 6407 // Structure large enough to hold any socket address (with the historical 6408 // exception of AF_UNIX). 6409 6410 type Sockaddr_storage = struct { 6411 Fss_family Sa_family_t 6412 F__ss_padding [122]int8 6413 F__ss_align uint32 6414 } /* socket.h:191:1 */ 6415 6416 // Structure describing messages sent by 6417 // `sendmsg' and received by `recvmsg'. 6418 type Msghdr = struct { 6419 Fmsg_name uintptr 6420 Fmsg_namelen Socklen_t 6421 Fmsg_iov uintptr 6422 Fmsg_iovlen Size_t 6423 Fmsg_control uintptr 6424 Fmsg_controllen Size_t 6425 Fmsg_flags int32 6426 } /* socket.h:257:1 */ 6427 6428 // Structure used for storage of ancillary data object information. 6429 type Cmsghdr = struct { 6430 F__ccgo_pad1 [0]uint32 6431 Fcmsg_len Size_t 6432 Fcmsg_level int32 6433 Fcmsg_type int32 6434 } /* socket.h:275:1 */ 6435 6436 // User visible structure for SCM_CREDENTIALS message 6437 type Ucred = struct { 6438 Fpid Pid_t 6439 Fuid Uid_t 6440 Fgid Gid_t 6441 } /* socket.h:344:1 */ 6442 6443 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6444 6445 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6446 6447 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6448 6449 // This allows for 1024 file descriptors: if NR_OPEN is ever grown 6450 // beyond that you'll have to change this too. But 1024 fd's seem to be 6451 // enough even for such "real" unices like OSF/1, so hopefully this is 6452 // one limit that doesn't have to be changed [again]. 6453 // 6454 // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 6455 // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical 6456 // place for them. Solved by having dummy defines in <sys/time.h>. 6457 6458 // This macro may have been defined in <gnu/types.h>. But we always 6459 // use the one here. 6460 6461 type X__kernel_fd_set = struct{ Ffds_bits [32]uint32 } /* posix_types.h:27:3 */ 6462 6463 // Type of a signal handler. 6464 type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ 6465 6466 // Type of a SYSV IPC key. 6467 type X__kernel_key_t = int32 /* posix_types.h:33:13 */ 6468 type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ 6469 6470 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6471 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6472 6473 // This file is generally used by user-level software, so you need to 6474 // be a little careful about namespace pollution etc. Also, we cannot 6475 // assume GCC is being used. 6476 6477 type X__kernel_mode_t = uint16 /* posix_types_32.h:11:24 */ 6478 6479 type X__kernel_ipc_pid_t = uint16 /* posix_types_32.h:14:24 */ 6480 6481 type X__kernel_uid_t = uint16 /* posix_types_32.h:17:24 */ 6482 type X__kernel_gid_t = uint16 /* posix_types_32.h:18:24 */ 6483 6484 type X__kernel_old_dev_t = uint16 /* posix_types_32.h:21:24 */ 6485 6486 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6487 6488 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6489 6490 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6491 6492 // There seems to be no way of detecting this automatically from user 6493 // space, so 64 bit architectures should override this in their 6494 // bitsperlong.h. In particular, an architecture that supports 6495 // both 32 and 64 bit user space must not rely on CONFIG_64BIT 6496 // to decide it, but rather check a compiler provided macro. 6497 6498 // This file is generally used by user-level software, so you need to 6499 // be a little careful about namespace pollution etc. 6500 // 6501 // First the types that are often defined in different ways across 6502 // architectures, so that you can override them. 6503 6504 type X__kernel_long_t = int32 /* posix_types.h:15:15 */ 6505 type X__kernel_ulong_t = uint32 /* posix_types.h:16:23 */ 6506 6507 type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ 6508 6509 type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ 6510 6511 type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ 6512 6513 type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ 6514 6515 type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ 6516 type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ 6517 6518 type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ 6519 type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ 6520 6521 // Most 32 bit architectures use "unsigned int" size_t, 6522 // and all 64 bit architectures use "unsigned long" size_t. 6523 type X__kernel_size_t = uint32 /* posix_types.h:68:22 */ 6524 type X__kernel_ssize_t = int32 /* posix_types.h:69:14 */ 6525 type X__kernel_ptrdiff_t = int32 /* posix_types.h:70:14 */ 6526 6527 type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ 6528 6529 // anything below here should be completely generic 6530 type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ 6531 type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ 6532 type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ 6533 type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ 6534 type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ 6535 type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ 6536 type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ 6537 type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ 6538 type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ 6539 type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ 6540 type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ 6541 6542 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 6543 6544 // Socket-level I/O control calls. 6545 6546 // For setsockopt(2) 6547 6548 // Security levels - as per NRL IPv6 - don't actually do anything 6549 6550 // Socket filtering 6551 6552 // Instruct lower device to use last 4-bytes of skb data as FCS 6553 6554 // Structure used to manipulate the SO_LINGER option. 6555 type Linger = struct { 6556 Fl_onoff int32 6557 Fl_linger int32 6558 } /* socket.h:361:1 */ 6559 6560 // This is the 4.3 BSD `struct sockaddr' format, which is used as wire 6561 // format in the grotty old 4.3 `talk' protocol. 6562 type Osockaddr = struct { 6563 Fsa_family uint16 6564 Fsa_data [14]uint8 6565 } /* struct_osockaddr.h:6:1 */ 6566 6567 // This is the type we use for generic socket address arguments. 6568 // 6569 // With GCC 2.7 and later, the funky union causes redeclarations or 6570 // uses with any of the listed types to be allowed without complaint. 6571 // G++ 2.7 does not support transparent unions so there we want the 6572 // old-style declaration, too. 6573 // Add more `struct sockaddr_AF' types here as necessary. 6574 // These are all the ones I found on NetBSD and Linux. 6575 6576 type X__SOCKADDR_ARG = struct{ F__sockaddr__ uintptr } /* socket.h:80:10 */ 6577 type X__CONST_SOCKADDR_ARG = struct{ F__sockaddr__ uintptr } /* socket.h:84:10 */ 6578 6579 // For `recvmmsg' and `sendmmsg'. 6580 type Mmsghdr = struct { 6581 Fmsg_hdr struct { 6582 Fmsg_name uintptr 6583 Fmsg_namelen Socklen_t 6584 Fmsg_iov uintptr 6585 Fmsg_iovlen Size_t 6586 Fmsg_control uintptr 6587 Fmsg_controllen Size_t 6588 Fmsg_flags int32 6589 } 6590 Fmsg_len uint32 6591 } /* socket.h:90:1 */ 6592 6593 // Define some macros helping to catch buffer overflows. 6594 6595 func XXdmcpFill(tls *libc.TLS, fd int32, buffer XdmcpBufferPtr, from XdmcpNetaddr, fromlen uintptr) int32 { /* Fill.c:46:1: */ 6596 var newBuf uintptr 6597 6598 if (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize < XDM_MAX_MSGLEN { 6599 newBuf = libc.Xmalloc(tls, uint32(XDM_MAX_MSGLEN)) 6600 if newBuf != 0 { 6601 libc.Xfree(tls, (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata) 6602 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata = newBuf 6603 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize = XDM_MAX_MSGLEN 6604 } 6605 } 6606 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer = 0 6607 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount = libc.Xrecvfrom(tls, fd, (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata, uint32((*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize), 0, 6608 from, fromlen) 6609 if (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount < 6 { 6610 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount = 0 6611 return FALSE 6612 } 6613 return TRUE 6614 } 6615 6616 // Define some macros helping to catch buffer overflows. 6617 6618 func XXdmcpFlush(tls *libc.TLS, fd int32, buffer XdmcpBufferPtr, to XdmcpNetaddr, tolen int32) int32 { /* Flush.c:45:1: */ 6619 var result int32 6620 result = libc.Xsendto(tls, fd, (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata, uint32((*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer), 0, 6621 to, uint32(tolen)) 6622 if result != (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer { 6623 return FALSE 6624 } 6625 return TRUE 6626 } 6627 6628 func getbits(tls *libc.TLS, data int32, dst uintptr) { /* Key.c:41:1: */ 6629 *(*uint8)(unsafe.Pointer(dst)) = (uint8((data) & 0xff)) 6630 *(*uint8)(unsafe.Pointer(dst + 1)) = (uint8((data >> 8) & 0xff)) 6631 *(*uint8)(unsafe.Pointer(dst + 2)) = (uint8((data >> 16) & 0xff)) 6632 *(*uint8)(unsafe.Pointer(dst + 3)) = (uint8((data >> 24) & 0xff)) 6633 } 6634 6635 // Floating-point inline functions for stdlib.h. 6636 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 6637 // This file is part of the GNU C Library. 6638 // 6639 // The GNU C Library is free software; you can redistribute it and/or 6640 // modify it under the terms of the GNU Lesser General Public 6641 // License as published by the Free Software Foundation; either 6642 // version 2.1 of the License, or (at your option) any later version. 6643 // 6644 // The GNU C Library is distributed in the hope that it will be useful, 6645 // but WITHOUT ANY WARRANTY; without even the implied warranty of 6646 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6647 // Lesser General Public License for more details. 6648 // 6649 // You should have received a copy of the GNU Lesser General Public 6650 // License along with the GNU C Library; if not, see 6651 // <https://www.gnu.org/licenses/>. 6652 6653 // Define some macros helping to catch buffer overflows. 6654 6655 func XXdmcpGenerateKey(tls *libc.TLS, key XdmAuthKeyPtr) { /* Key.c:66:1: */ 6656 var lowbits int32 6657 var highbits int32 6658 6659 libc.Xsrand48(tls, (Time_t(libc.Xgetpid(tls)) ^ libc.Xtime(tls, uintptr(0)))) 6660 lowbits = libc.Xlrand48(tls) 6661 highbits = libc.Xlrand48(tls) 6662 getbits(tls, lowbits, key /* &.data */) 6663 getbits(tls, highbits, ((key /* &.data */) + uintptr(4))) 6664 } 6665 6666 func XXdmcpCompareKeys(tls *libc.TLS, a XdmAuthKeyPtr, b XdmAuthKeyPtr) int32 { /* Key.c:82:1: */ 6667 var i int32 6668 6669 for i = 0; i < 8; i++ { 6670 if int32(*(*BYTE)(unsafe.Pointer((a /* &.data */) + uintptr(i)))) != int32(*(*BYTE)(unsafe.Pointer((b /* &.data */) + uintptr(i)))) { 6671 return FALSE 6672 } 6673 } 6674 return TRUE 6675 } 6676 6677 func XXdmcpIncrementKey(tls *libc.TLS, key XdmAuthKeyPtr) { /* Key.c:93:1: */ 6678 var i int32 6679 6680 i = 7 6681 for int32(libc.PreIncUint8(&*(*BYTE)(unsafe.Pointer((key /* &.data */) + uintptr(i))), 1)) == 0 { 6682 if libc.PreDecInt32(&i, 1) < 0 { 6683 break 6684 } 6685 } 6686 } 6687 6688 func XXdmcpDecrementKey(tls *libc.TLS, key XdmAuthKeyPtr) { /* Key.c:104:1: */ 6689 var i int32 6690 6691 i = 7 6692 for int32(libc.PostDecUint8(&*(*BYTE)(unsafe.Pointer((key /* &.data */) + uintptr(i))), 1)) == 0 { 6693 if libc.PreDecInt32(&i, 1) < 0 { 6694 break 6695 } 6696 } 6697 } 6698 6699 // Floating-point inline functions for stdlib.h. 6700 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 6701 // This file is part of the GNU C Library. 6702 // 6703 // The GNU C Library is free software; you can redistribute it and/or 6704 // modify it under the terms of the GNU Lesser General Public 6705 // License as published by the Free Software Foundation; either 6706 // version 2.1 of the License, or (at your option) any later version. 6707 // 6708 // The GNU C Library is distributed in the hope that it will be useful, 6709 // but WITHOUT ANY WARRANTY; without even the implied warranty of 6710 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6711 // Lesser General Public License for more details. 6712 // 6713 // You should have received a copy of the GNU Lesser General Public 6714 // License along with the GNU C Library; if not, see 6715 // <https://www.gnu.org/licenses/>. 6716 6717 // Define some macros helping to catch buffer overflows. 6718 6719 func XXdmcpReadHeader(tls *libc.TLS, buffer XdmcpBufferPtr, header XdmcpHeaderPtr) int32 { /* Read.c:37:1: */ 6720 if ((XXdmcpReadCARD16(tls, buffer, (header /* &.version */)) != 0) && (XXdmcpReadCARD16(tls, buffer, (header+2 /* &.opcode */)) != 0)) && (XXdmcpReadCARD16(tls, buffer, (header+4 /* &.length */)) != 0) { 6721 return TRUE 6722 } 6723 return FALSE 6724 } 6725 6726 func XXdmcpReadRemaining(tls *libc.TLS, buffer XdmcpBufferPtr) int32 { /* Read.c:47:1: */ 6727 return ((*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount - (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer) 6728 } 6729 6730 func XXdmcpReadARRAY8(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAY8Ptr) int32 { /* Read.c:53:1: */ 6731 var i int32 6732 6733 // When returning FALSE, guarantee that array->data = 0. 6734 // This allows the user to safely call XdmcpDisposeARRAY8(array) 6735 // regardless of the return value below. 6736 // Note that XdmcpDisposeARRAY*(array) will call free(array->data), 6737 // so we must guarantee that array->data is NULL or a malloced pointer. 6738 if !(XXdmcpReadCARD16(tls, buffer, (array /* &.length */)) != 0) { 6739 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6740 return FALSE 6741 } 6742 if !(int32((*X_ARRAY8)(unsafe.Pointer(array)).Flength) != 0) { 6743 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6744 return TRUE 6745 } 6746 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, (uint32((*X_ARRAY8)(unsafe.Pointer(array)).Flength) * uint32(unsafe.Sizeof(CARD8(0))))) 6747 if !(int32((*X_ARRAY8)(unsafe.Pointer(array)).Fdata) != 0) { 6748 return FALSE 6749 } 6750 for i = 0; i < int32((*X_ARRAY8)(unsafe.Pointer(array)).Flength); i++ { 6751 if !(XXdmcpReadCARD8(tls, buffer, ((*X_ARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i))) != 0) { 6752 libc.Xfree(tls, (*X_ARRAY8)(unsafe.Pointer(array)).Fdata) 6753 (*X_ARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6754 (*X_ARRAY8)(unsafe.Pointer(array)).Flength = CARD16(0) 6755 return FALSE 6756 } 6757 } 6758 return TRUE 6759 } 6760 6761 func XXdmcpReadARRAY16(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAY16Ptr) int32 { /* Read.c:90:1: */ 6762 var i int32 6763 6764 // When returning FALSE, guarantee that array->data = 0. 6765 // This allows the user to safely call XdmcpDisposeARRAY16(array) 6766 // regardless of the return value below. 6767 // Note that XdmcpDisposeARRAY*(array) will call free(array->data), 6768 // so we must guarantee that array->data is NULL or a malloced pointer. 6769 if !(XXdmcpReadCARD8(tls, buffer, (array /* &.length */)) != 0) { 6770 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = uintptr(0) 6771 return FALSE 6772 } 6773 if !(int32((*X_ARRAY16)(unsafe.Pointer(array)).Flength) != 0) { 6774 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = uintptr(0) 6775 return TRUE 6776 } 6777 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, (uint32((*X_ARRAY16)(unsafe.Pointer(array)).Flength) * uint32(unsafe.Sizeof(CARD16(0))))) 6778 if !(int32((*X_ARRAY16)(unsafe.Pointer(array)).Fdata) != 0) { 6779 return FALSE 6780 } 6781 for i = 0; i < int32((*X_ARRAY16)(unsafe.Pointer(array)).Flength); i++ { 6782 if !(XXdmcpReadCARD16(tls, buffer, ((*X_ARRAY16)(unsafe.Pointer(array)).Fdata+uintptr(i)*2)) != 0) { 6783 libc.Xfree(tls, (*X_ARRAY16)(unsafe.Pointer(array)).Fdata) 6784 (*X_ARRAY16)(unsafe.Pointer(array)).Fdata = uintptr(0) 6785 (*X_ARRAY16)(unsafe.Pointer(array)).Flength = CARD8(0) 6786 return FALSE 6787 } 6788 } 6789 return TRUE 6790 } 6791 6792 func XXdmcpReadARRAY32(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAY32Ptr) int32 { /* Read.c:127:1: */ 6793 var i int32 6794 6795 // When returning FALSE, guarantee that array->data = 0. 6796 // This allows the user to safely call XdmcpDisposeARRAY32(array) 6797 // regardless of the return value below. 6798 // Note that XdmcpDisposeARRAY*(array) will call free(array->data), 6799 // so we must guarantee that array->data is NULL or a malloced pointer. 6800 if !(XXdmcpReadCARD8(tls, buffer, (array /* &.length */)) != 0) { 6801 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = uintptr(0) 6802 return FALSE 6803 } 6804 if !(int32((*X_ARRAY32)(unsafe.Pointer(array)).Flength) != 0) { 6805 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = uintptr(0) 6806 return TRUE 6807 } 6808 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, (uint32((*X_ARRAY32)(unsafe.Pointer(array)).Flength) * uint32(unsafe.Sizeof(CARD32(0))))) 6809 if !(int32((*X_ARRAY32)(unsafe.Pointer(array)).Fdata) != 0) { 6810 return FALSE 6811 } 6812 for i = 0; i < int32((*X_ARRAY32)(unsafe.Pointer(array)).Flength); i++ { 6813 if !(XXdmcpReadCARD32(tls, buffer, ((*X_ARRAY32)(unsafe.Pointer(array)).Fdata+uintptr(i)*4)) != 0) { 6814 libc.Xfree(tls, (*X_ARRAY32)(unsafe.Pointer(array)).Fdata) 6815 (*X_ARRAY32)(unsafe.Pointer(array)).Fdata = uintptr(0) 6816 (*X_ARRAY32)(unsafe.Pointer(array)).Flength = CARD8(0) 6817 return FALSE 6818 } 6819 } 6820 return TRUE 6821 } 6822 6823 func XXdmcpReadARRAYofARRAY8(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAYofARRAY8Ptr) int32 { /* Read.c:164:1: */ 6824 var i CARD8 6825 6826 // When returning FALSE, guarantee that array->data = 0. 6827 // This allows the user to safely call XdmcpDisposeARRAYofARRAY8(array) 6828 // regardless of the return value below. 6829 // Note that XdmcpDisposeARRAY*(array) will call free(array->data), 6830 // so we must guarantee that array->data is NULL or a malloced pointer. 6831 if !(XXdmcpReadCARD8(tls, buffer, (array /* &.length */)) != 0) { 6832 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6833 return FALSE 6834 } 6835 if !(int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength) != 0) { 6836 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = uintptr(0) 6837 return TRUE 6838 } 6839 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata = libc.Xmalloc(tls, (uint32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength) * uint32(unsafe.Sizeof(ARRAY8{})))) 6840 if !(int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata) != 0) { 6841 return FALSE 6842 } 6843 for i = CARD8(0); int32(i) < int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength); i++ { 6844 if !(XXdmcpReadARRAY8(tls, buffer, ((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i)*8)) != 0) { 6845 // We must free all of the arrays allocated thus far in the loop 6846 // and free array->data and finally set array->data = 0; 6847 // The easiest way to do this is to reset the length and call 6848 // XdmcpDisposeARRAYofARRAY8(array). 6849 (*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength = i 6850 XXdmcpDisposeARRAYofARRAY8(tls, array) 6851 return FALSE 6852 } 6853 } 6854 return TRUE 6855 } 6856 6857 func XXdmcpReadCARD8(tls *libc.TLS, buffer XdmcpBufferPtr, valuep CARD8Ptr) int32 { /* Read.c:206:1: */ 6858 if (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer >= (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fcount { 6859 return FALSE 6860 } 6861 *(*CARD8)(unsafe.Pointer(valuep)) = *(*BYTE)(unsafe.Pointer((*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata + uintptr(libc.PostIncInt32(&(*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer, 1)))) 6862 return TRUE 6863 } 6864 6865 func XXdmcpReadCARD16(tls *libc.TLS, buffer XdmcpBufferPtr, valuep CARD16Ptr) int32 { /* Read.c:215:1: */ 6866 bp := tls.Alloc(2) 6867 defer tls.Free(2) 6868 6869 // var high CARD8 at bp, 1 6870 6871 // var low CARD8 at bp+1, 1 6872 6873 if (XXdmcpReadCARD8(tls, buffer, bp /* &high */) != 0) && (XXdmcpReadCARD8(tls, buffer, bp+1 /* &low */) != 0) { 6874 *(*CARD16)(unsafe.Pointer(valuep)) = (CARD16(((int32(CARD16(*(*CARD8)(unsafe.Pointer(bp /* high */))))) << 8) | (int32(CARD16(*(*CARD8)(unsafe.Pointer(bp + 1 /* low */))))))) 6875 return TRUE 6876 } 6877 return FALSE 6878 } 6879 6880 func XXdmcpReadCARD32(tls *libc.TLS, buffer XdmcpBufferPtr, valuep CARD32Ptr) int32 { /* Read.c:229:1: */ 6881 bp := tls.Alloc(4) 6882 defer tls.Free(4) 6883 6884 // var byte0 CARD8 at bp, 1 6885 6886 // var byte1 CARD8 at bp+1, 1 6887 6888 // var byte2 CARD8 at bp+2, 1 6889 6890 // var byte3 CARD8 at bp+3, 1 6891 6892 if (((XXdmcpReadCARD8(tls, buffer, bp /* &byte0 */) != 0) && (XXdmcpReadCARD8(tls, buffer, bp+1 /* &byte1 */) != 0)) && (XXdmcpReadCARD8(tls, buffer, bp+2 /* &byte2 */) != 0)) && (XXdmcpReadCARD8(tls, buffer, bp+3 /* &byte3 */) != 0) { 6893 *(*CARD32)(unsafe.Pointer(valuep)) = (((((CARD32(*(*CARD8)(unsafe.Pointer(bp /* byte0 */)))) << 24) | ((CARD32(*(*CARD8)(unsafe.Pointer(bp + 1 /* byte1 */)))) << 16)) | ((CARD32(*(*CARD8)(unsafe.Pointer(bp + 2 /* byte2 */)))) << 8)) | (CARD32(*(*CARD8)(unsafe.Pointer(bp + 3 /* byte3 */))))) 6894 return TRUE 6895 } 6896 return FALSE 6897 } 6898 6899 // The following function exists only to demonstrate the 6900 // desired functional interface for this routine. You will 6901 // need to add the appropriate algorithm if you wish to 6902 // use XDM-AUTHENTICATION-1/XDM-AUTHORIZATION-1. 6903 // 6904 // The interface for this routine is quite simple. All three 6905 // arguments are arrays of 8 unsigned characters, the first two 6906 // are 64 bits of useful data, the last is 56 bits of useful 6907 // data packed into 8 bytes, using the low 7 bits of each 6908 // byte, filling the high bit with odd parity. 6909 // 6910 // Examine the XDMCP specification for the correct algorithm 6911 6912 // header file for compatibility with something useful 6913 6914 type Auth_cblock = [8]uint8 /* Wrap.h:5:23 */ // block size 6915 6916 type Auth_ks_struct = struct{ F_ Auth_cblock } /* Wrap.h:7:9 */ 6917 6918 // block size 6919 6920 type Auth_wrapper_schedule = [16]Auth_ks_struct /* Wrap.h:7:50 */ 6921 6922 func XXdmcpUnwrap(tls *libc.TLS, input uintptr, wrapper uintptr, output uintptr, bytes int32) { /* Unwrap.c:55:1: */ 6923 bp := tls.Alloc(160) 6924 defer tls.Free(160) 6925 6926 var i int32 6927 var j int32 6928 var k int32 6929 // var tmp [8]uint8 at bp+152, 8 6930 6931 // var blocks [2][8]uint8 at bp+136, 16 6932 6933 // var expand_wrapper [8]uint8 at bp, 8 6934 6935 // var schedule Auth_wrapper_schedule at bp+8, 128 6936 6937 X_XdmcpWrapperToOddParity(tls, wrapper, bp /* &expand_wrapper[0] */) 6938 X_XdmcpAuthSetup(tls, bp /* &expand_wrapper[0] */, bp+8 /* &schedule[0] */) 6939 6940 k = 0 6941 for j = 0; j < bytes; j = j + (8) { 6942 if (bytes - j) < 8 { 6943 return 6944 } // bad input length 6945 for i = 0; i < 8; i++ { 6946 *(*uint8)(unsafe.Pointer((bp + 136 /* &blocks[0] */ + uintptr(k)*8) + uintptr(i))) = *(*uint8)(unsafe.Pointer(input + uintptr((j + i)))) 6947 } 6948 X_XdmcpAuthDoIt(tls, (input + uintptr(j)), bp+152 /* tmp */, bp+8 /* &schedule[0] */, 0) 6949 // block chaining 6950 if k == 0 { 6951 k = 1 6952 } else { 6953 k = 0 6954 } 6955 for i = 0; i < 8; i++ { 6956 if j == 0 { 6957 *(*uint8)(unsafe.Pointer(output + uintptr((j + i)))) = *(*uint8)(unsafe.Pointer(bp + 152 /* &tmp[0] */ + uintptr(i))) 6958 } else { 6959 *(*uint8)(unsafe.Pointer(output + uintptr((j + i)))) = (uint8(int32(*(*uint8)(unsafe.Pointer(bp + 152 /* &tmp[0] */ + uintptr(i)))) ^ int32(*(*uint8)(unsafe.Pointer((bp + 136 /* &blocks[0] */ + uintptr(k)*8) + uintptr(i)))))) 6960 } 6961 } 6962 } 6963 } 6964 6965 func XXdmcpWrap(tls *libc.TLS, input uintptr, wrapper uintptr, output uintptr, bytes int32) { /* Wrap.c:49:1: */ 6966 bp := tls.Alloc(144) 6967 defer tls.Free(144) 6968 6969 var i int32 6970 var j int32 6971 var len int32 6972 // var tmp [8]uint8 at bp+136, 8 6973 6974 // var expand_wrapper [8]uint8 at bp, 8 6975 6976 // var schedule Auth_wrapper_schedule at bp+8, 128 6977 6978 X_XdmcpWrapperToOddParity(tls, wrapper, bp /* &expand_wrapper[0] */) 6979 X_XdmcpAuthSetup(tls, bp /* &expand_wrapper[0] */, bp+8 /* &schedule[0] */) 6980 for j = 0; j < bytes; j = j + (8) { 6981 len = 8 6982 if (bytes - j) < len { 6983 len = (bytes - j) 6984 } 6985 // block chaining 6986 for i = 0; i < len; i++ { 6987 if j == 0 { 6988 *(*uint8)(unsafe.Pointer(bp + 136 /* &tmp[0] */ + uintptr(i))) = *(*uint8)(unsafe.Pointer(input + uintptr(i))) 6989 } else { 6990 *(*uint8)(unsafe.Pointer(bp + 136 /* &tmp[0] */ + uintptr(i))) = (uint8(int32(*(*uint8)(unsafe.Pointer(input + uintptr((j + i))))) ^ int32(*(*uint8)(unsafe.Pointer(output + uintptr(((j - 8) + i))))))) 6991 } 6992 } 6993 for ; i < 8; i++ { 6994 if j == 0 { 6995 *(*uint8)(unsafe.Pointer(bp + 136 /* &tmp[0] */ + uintptr(i))) = uint8(0) 6996 } else { 6997 *(*uint8)(unsafe.Pointer(bp + 136 /* &tmp[0] */ + uintptr(i))) = (uint8(0 ^ int32(*(*uint8)(unsafe.Pointer(output + uintptr(((j - 8) + i))))))) 6998 } 6999 } 7000 X_XdmcpAuthDoIt(tls, bp+136 /* &tmp[0] */, (output + uintptr(j)), bp+8 /* &schedule[0] */, 1) 7001 } 7002 } 7003 7004 // Given a 56 bit wrapper in XDMCP format, create a 56 7005 // bit wrapper in 7-bits + odd parity format 7006 7007 func sOddParity(tls *libc.TLS, c uint8) int32 { /* Wrap.c:93:1: */ 7008 c = (uint8(int32(c) ^ (int32(c) >> 4))) 7009 c = (uint8(int32(c) ^ (int32(c) >> 2))) 7010 c = (uint8(int32(c) ^ (int32(c) >> 1))) 7011 return (^int32(c) & 0x1) 7012 } 7013 7014 // Spread the 56 bit wrapper among 8 bytes, using the upper 7 bits 7015 // of each byte, and storing an odd parity bit in the low bit 7016 7017 func X_XdmcpWrapperToOddParity(tls *libc.TLS, in uintptr, out uintptr) { /* Wrap.c:107:1: */ 7018 var ashift int32 7019 var bshift int32 7020 var i int32 7021 var c uint8 7022 7023 ashift = 7 7024 bshift = 1 7025 for i = 0; i < 7; i++ { 7026 c = (uint8(((int32(*(*uint8)(unsafe.Pointer(in + uintptr(i)))) << ashift) | (int32(*(*uint8)(unsafe.Pointer(in + uintptr((i + 1))))) >> bshift)) & 0x7f)) 7027 *(*uint8)(unsafe.Pointer(out + uintptr(i))) = (uint8((int32(c) << 1) | sOddParity(tls, c))) 7028 ashift-- 7029 bshift++ 7030 } 7031 c = *(*uint8)(unsafe.Pointer(in + uintptr(i))) 7032 *(*uint8)(unsafe.Pointer(out + uintptr(i))) = (uint8((int32(c) << 1) | sOddParity(tls, c))) 7033 } 7034 7035 // des routines for non-usa - eay 10/9/1991 eay@psych.psy.uq.oz.au 7036 // These routines were written for speed not size so they are bigger than 7037 // needed. I have removed some of the loop unrolling, this will reduce 7038 // code size at the expense of some speed. 7039 // 25/9/1991 eay - much faster _XdmcpAuthSetup (4 times faster). 7040 // 19/9/1991 eay - cleaned up the IP and FP code. 7041 // 10/9/1991 eay - first release. 7042 // The des routines this file has been made from can be found in 7043 // ftp.psy.uq.oz.au /pub/DES 7044 // This particular version derived from OpenBSD Revsion 1.3. 7045 7046 // 7047 // Export Requirements. 7048 // You may not export or re-export this software or any copy or 7049 // adaptation in violation of any applicable laws or regulations. 7050 // 7051 // Without limiting the generality of the foregoing, hardware, software, 7052 // technology or services provided under this license agreement may not 7053 // be exported, reexported, transferred or downloaded to or within (or to 7054 // a national resident of) countries under U.S. economic embargo 7055 // including the following countries: 7056 // 7057 // Cuba, Iran, Libya, North Korea, Sudan and Syria. This list is subject 7058 // to change. 7059 // 7060 // Hardware, software, technology or services may not be exported, 7061 // reexported, transferred or downloaded to persons or entities listed on 7062 // the U.S. Department of Commerce Denied Persons List, Entity List of 7063 // proliferation concern or on any U.S. Treasury Department Designated 7064 // Nationals exclusion list, or to parties directly or indirectly 7065 // involved in the development or production of nuclear, chemical, 7066 // biological weapons or in missile technology programs as specified in 7067 // the U.S. Export Administration Regulations (15 CFR 744). 7068 // 7069 // By accepting this license agreement you confirm that you are not 7070 // located in (or a national resident of) any country under U.S. economic 7071 // embargo, not identified on any U.S. Department of Commerce Denied 7072 // Persons List, Entity List or Treasury Department Designated Nationals 7073 // exclusion list, and not directly or indirectly involved in the 7074 // development or production of nuclear, chemical, biological weapons or 7075 // in missile technology programs as specified in the U.S. Export 7076 // Administration Regulations. 7077 // 7078 // 7079 // Local Country Import Requirements. The software you are about to 7080 // download contains cryptography technology. Some countries regulate the 7081 // import, use and/or export of certain products with cryptography. The 7082 // X.org Foundation makes no claims as to the applicability of local 7083 // country import, use and/or export regulations in relation to the 7084 // download of this product. If you are located outside the U.S. and 7085 // Canada you are advised to consult your local country regulations to 7086 // insure compliance. 7087 7088 var skb = [8][64]CARD32{ 7089 // for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 7090 {CARD32(0x00000000), CARD32(0x00000010), CARD32(0x20000000), CARD32(0x20000010), 7091 CARD32(0x00010000), CARD32(0x00010010), CARD32(0x20010000), CARD32(0x20010010), 7092 CARD32(0x00000800), CARD32(0x00000810), CARD32(0x20000800), CARD32(0x20000810), 7093 CARD32(0x00010800), CARD32(0x00010810), CARD32(0x20010800), CARD32(0x20010810), 7094 CARD32(0x00000020), CARD32(0x00000030), CARD32(0x20000020), CARD32(0x20000030), 7095 CARD32(0x00010020), CARD32(0x00010030), CARD32(0x20010020), CARD32(0x20010030), 7096 CARD32(0x00000820), CARD32(0x00000830), CARD32(0x20000820), CARD32(0x20000830), 7097 CARD32(0x00010820), CARD32(0x00010830), CARD32(0x20010820), CARD32(0x20010830), 7098 CARD32(0x00080000), CARD32(0x00080010), CARD32(0x20080000), CARD32(0x20080010), 7099 CARD32(0x00090000), CARD32(0x00090010), CARD32(0x20090000), CARD32(0x20090010), 7100 CARD32(0x00080800), CARD32(0x00080810), CARD32(0x20080800), CARD32(0x20080810), 7101 CARD32(0x00090800), CARD32(0x00090810), CARD32(0x20090800), CARD32(0x20090810), 7102 CARD32(0x00080020), CARD32(0x00080030), CARD32(0x20080020), CARD32(0x20080030), 7103 CARD32(0x00090020), CARD32(0x00090030), CARD32(0x20090020), CARD32(0x20090030), 7104 CARD32(0x00080820), CARD32(0x00080830), CARD32(0x20080820), CARD32(0x20080830), 7105 CARD32(0x00090820), CARD32(0x00090830), CARD32(0x20090820), CARD32(0x20090830)}, 7106 // for C bits (numbered as per FIPS 46) 7 8 10 11 12 13 7107 {CARD32(0x00000000), CARD32(0x02000000), CARD32(0x00002000), CARD32(0x02002000), 7108 CARD32(0x00200000), CARD32(0x02200000), CARD32(0x00202000), CARD32(0x02202000), 7109 CARD32(0x00000004), CARD32(0x02000004), CARD32(0x00002004), CARD32(0x02002004), 7110 CARD32(0x00200004), CARD32(0x02200004), CARD32(0x00202004), CARD32(0x02202004), 7111 CARD32(0x00000400), CARD32(0x02000400), CARD32(0x00002400), CARD32(0x02002400), 7112 CARD32(0x00200400), CARD32(0x02200400), CARD32(0x00202400), CARD32(0x02202400), 7113 CARD32(0x00000404), CARD32(0x02000404), CARD32(0x00002404), CARD32(0x02002404), 7114 CARD32(0x00200404), CARD32(0x02200404), CARD32(0x00202404), CARD32(0x02202404), 7115 CARD32(0x10000000), CARD32(0x12000000), CARD32(0x10002000), CARD32(0x12002000), 7116 CARD32(0x10200000), CARD32(0x12200000), CARD32(0x10202000), CARD32(0x12202000), 7117 CARD32(0x10000004), CARD32(0x12000004), CARD32(0x10002004), CARD32(0x12002004), 7118 CARD32(0x10200004), CARD32(0x12200004), CARD32(0x10202004), CARD32(0x12202004), 7119 CARD32(0x10000400), CARD32(0x12000400), CARD32(0x10002400), CARD32(0x12002400), 7120 CARD32(0x10200400), CARD32(0x12200400), CARD32(0x10202400), CARD32(0x12202400), 7121 CARD32(0x10000404), CARD32(0x12000404), CARD32(0x10002404), CARD32(0x12002404), 7122 CARD32(0x10200404), CARD32(0x12200404), CARD32(0x10202404), CARD32(0x12202404)}, 7123 // for C bits (numbered as per FIPS 46) 14 15 16 17 19 20 7124 {CARD32(0x00000000), CARD32(0x00000001), CARD32(0x00040000), CARD32(0x00040001), 7125 CARD32(0x01000000), CARD32(0x01000001), CARD32(0x01040000), CARD32(0x01040001), 7126 CARD32(0x00000002), CARD32(0x00000003), CARD32(0x00040002), CARD32(0x00040003), 7127 CARD32(0x01000002), CARD32(0x01000003), CARD32(0x01040002), CARD32(0x01040003), 7128 CARD32(0x00000200), CARD32(0x00000201), CARD32(0x00040200), CARD32(0x00040201), 7129 CARD32(0x01000200), CARD32(0x01000201), CARD32(0x01040200), CARD32(0x01040201), 7130 CARD32(0x00000202), CARD32(0x00000203), CARD32(0x00040202), CARD32(0x00040203), 7131 CARD32(0x01000202), CARD32(0x01000203), CARD32(0x01040202), CARD32(0x01040203), 7132 CARD32(0x08000000), CARD32(0x08000001), CARD32(0x08040000), CARD32(0x08040001), 7133 CARD32(0x09000000), CARD32(0x09000001), CARD32(0x09040000), CARD32(0x09040001), 7134 CARD32(0x08000002), CARD32(0x08000003), CARD32(0x08040002), CARD32(0x08040003), 7135 CARD32(0x09000002), CARD32(0x09000003), CARD32(0x09040002), CARD32(0x09040003), 7136 CARD32(0x08000200), CARD32(0x08000201), CARD32(0x08040200), CARD32(0x08040201), 7137 CARD32(0x09000200), CARD32(0x09000201), CARD32(0x09040200), CARD32(0x09040201), 7138 CARD32(0x08000202), CARD32(0x08000203), CARD32(0x08040202), CARD32(0x08040203), 7139 CARD32(0x09000202), CARD32(0x09000203), CARD32(0x09040202), CARD32(0x09040203)}, 7140 // for C bits (numbered as per FIPS 46) 21 23 24 26 27 28 7141 {CARD32(0x00000000), CARD32(0x00100000), CARD32(0x00000100), CARD32(0x00100100), 7142 CARD32(0x00000008), CARD32(0x00100008), CARD32(0x00000108), CARD32(0x00100108), 7143 CARD32(0x00001000), CARD32(0x00101000), CARD32(0x00001100), CARD32(0x00101100), 7144 CARD32(0x00001008), CARD32(0x00101008), CARD32(0x00001108), CARD32(0x00101108), 7145 CARD32(0x04000000), CARD32(0x04100000), CARD32(0x04000100), CARD32(0x04100100), 7146 CARD32(0x04000008), CARD32(0x04100008), CARD32(0x04000108), CARD32(0x04100108), 7147 CARD32(0x04001000), CARD32(0x04101000), CARD32(0x04001100), CARD32(0x04101100), 7148 CARD32(0x04001008), CARD32(0x04101008), CARD32(0x04001108), CARD32(0x04101108), 7149 CARD32(0x00020000), CARD32(0x00120000), CARD32(0x00020100), CARD32(0x00120100), 7150 CARD32(0x00020008), CARD32(0x00120008), CARD32(0x00020108), CARD32(0x00120108), 7151 CARD32(0x00021000), CARD32(0x00121000), CARD32(0x00021100), CARD32(0x00121100), 7152 CARD32(0x00021008), CARD32(0x00121008), CARD32(0x00021108), CARD32(0x00121108), 7153 CARD32(0x04020000), CARD32(0x04120000), CARD32(0x04020100), CARD32(0x04120100), 7154 CARD32(0x04020008), CARD32(0x04120008), CARD32(0x04020108), CARD32(0x04120108), 7155 CARD32(0x04021000), CARD32(0x04121000), CARD32(0x04021100), CARD32(0x04121100), 7156 CARD32(0x04021008), CARD32(0x04121008), CARD32(0x04021108), CARD32(0x04121108)}, 7157 // for D bits (numbered as per FIPS 46) 1 2 3 4 5 6 7158 {CARD32(0x00000000), CARD32(0x10000000), CARD32(0x00010000), CARD32(0x10010000), 7159 CARD32(0x00000004), CARD32(0x10000004), CARD32(0x00010004), CARD32(0x10010004), 7160 CARD32(0x20000000), CARD32(0x30000000), CARD32(0x20010000), CARD32(0x30010000), 7161 CARD32(0x20000004), CARD32(0x30000004), CARD32(0x20010004), CARD32(0x30010004), 7162 CARD32(0x00100000), CARD32(0x10100000), CARD32(0x00110000), CARD32(0x10110000), 7163 CARD32(0x00100004), CARD32(0x10100004), CARD32(0x00110004), CARD32(0x10110004), 7164 CARD32(0x20100000), CARD32(0x30100000), CARD32(0x20110000), CARD32(0x30110000), 7165 CARD32(0x20100004), CARD32(0x30100004), CARD32(0x20110004), CARD32(0x30110004), 7166 CARD32(0x00001000), CARD32(0x10001000), CARD32(0x00011000), CARD32(0x10011000), 7167 CARD32(0x00001004), CARD32(0x10001004), CARD32(0x00011004), CARD32(0x10011004), 7168 CARD32(0x20001000), CARD32(0x30001000), CARD32(0x20011000), CARD32(0x30011000), 7169 CARD32(0x20001004), CARD32(0x30001004), CARD32(0x20011004), CARD32(0x30011004), 7170 CARD32(0x00101000), CARD32(0x10101000), CARD32(0x00111000), CARD32(0x10111000), 7171 CARD32(0x00101004), CARD32(0x10101004), CARD32(0x00111004), CARD32(0x10111004), 7172 CARD32(0x20101000), CARD32(0x30101000), CARD32(0x20111000), CARD32(0x30111000), 7173 CARD32(0x20101004), CARD32(0x30101004), CARD32(0x20111004), CARD32(0x30111004)}, 7174 // for D bits (numbered as per FIPS 46) 8 9 11 12 13 14 7175 {CARD32(0x00000000), CARD32(0x08000000), CARD32(0x00000008), CARD32(0x08000008), 7176 CARD32(0x00000400), CARD32(0x08000400), CARD32(0x00000408), CARD32(0x08000408), 7177 CARD32(0x00020000), CARD32(0x08020000), CARD32(0x00020008), CARD32(0x08020008), 7178 CARD32(0x00020400), CARD32(0x08020400), CARD32(0x00020408), CARD32(0x08020408), 7179 CARD32(0x00000001), CARD32(0x08000001), CARD32(0x00000009), CARD32(0x08000009), 7180 CARD32(0x00000401), CARD32(0x08000401), CARD32(0x00000409), CARD32(0x08000409), 7181 CARD32(0x00020001), CARD32(0x08020001), CARD32(0x00020009), CARD32(0x08020009), 7182 CARD32(0x00020401), CARD32(0x08020401), CARD32(0x00020409), CARD32(0x08020409), 7183 CARD32(0x02000000), CARD32(0x0A000000), CARD32(0x02000008), CARD32(0x0A000008), 7184 CARD32(0x02000400), CARD32(0x0A000400), CARD32(0x02000408), CARD32(0x0A000408), 7185 CARD32(0x02020000), CARD32(0x0A020000), CARD32(0x02020008), CARD32(0x0A020008), 7186 CARD32(0x02020400), CARD32(0x0A020400), CARD32(0x02020408), CARD32(0x0A020408), 7187 CARD32(0x02000001), CARD32(0x0A000001), CARD32(0x02000009), CARD32(0x0A000009), 7188 CARD32(0x02000401), CARD32(0x0A000401), CARD32(0x02000409), CARD32(0x0A000409), 7189 CARD32(0x02020001), CARD32(0x0A020001), CARD32(0x02020009), CARD32(0x0A020009), 7190 CARD32(0x02020401), CARD32(0x0A020401), CARD32(0x02020409), CARD32(0x0A020409)}, 7191 // for D bits (numbered as per FIPS 46) 16 17 18 19 20 21 7192 {CARD32(0x00000000), CARD32(0x00000100), CARD32(0x00080000), CARD32(0x00080100), 7193 CARD32(0x01000000), CARD32(0x01000100), CARD32(0x01080000), CARD32(0x01080100), 7194 CARD32(0x00000010), CARD32(0x00000110), CARD32(0x00080010), CARD32(0x00080110), 7195 CARD32(0x01000010), CARD32(0x01000110), CARD32(0x01080010), CARD32(0x01080110), 7196 CARD32(0x00200000), CARD32(0x00200100), CARD32(0x00280000), CARD32(0x00280100), 7197 CARD32(0x01200000), CARD32(0x01200100), CARD32(0x01280000), CARD32(0x01280100), 7198 CARD32(0x00200010), CARD32(0x00200110), CARD32(0x00280010), CARD32(0x00280110), 7199 CARD32(0x01200010), CARD32(0x01200110), CARD32(0x01280010), CARD32(0x01280110), 7200 CARD32(0x00000200), CARD32(0x00000300), CARD32(0x00080200), CARD32(0x00080300), 7201 CARD32(0x01000200), CARD32(0x01000300), CARD32(0x01080200), CARD32(0x01080300), 7202 CARD32(0x00000210), CARD32(0x00000310), CARD32(0x00080210), CARD32(0x00080310), 7203 CARD32(0x01000210), CARD32(0x01000310), CARD32(0x01080210), CARD32(0x01080310), 7204 CARD32(0x00200200), CARD32(0x00200300), CARD32(0x00280200), CARD32(0x00280300), 7205 CARD32(0x01200200), CARD32(0x01200300), CARD32(0x01280200), CARD32(0x01280300), 7206 CARD32(0x00200210), CARD32(0x00200310), CARD32(0x00280210), CARD32(0x00280310), 7207 CARD32(0x01200210), CARD32(0x01200310), CARD32(0x01280210), CARD32(0x01280310)}, 7208 // for D bits (numbered as per FIPS 46) 22 23 24 25 27 28 7209 {CARD32(0x00000000), CARD32(0x04000000), CARD32(0x00040000), CARD32(0x04040000), 7210 CARD32(0x00000002), CARD32(0x04000002), CARD32(0x00040002), CARD32(0x04040002), 7211 CARD32(0x00002000), CARD32(0x04002000), CARD32(0x00042000), CARD32(0x04042000), 7212 CARD32(0x00002002), CARD32(0x04002002), CARD32(0x00042002), CARD32(0x04042002), 7213 CARD32(0x00000020), CARD32(0x04000020), CARD32(0x00040020), CARD32(0x04040020), 7214 CARD32(0x00000022), CARD32(0x04000022), CARD32(0x00040022), CARD32(0x04040022), 7215 CARD32(0x00002020), CARD32(0x04002020), CARD32(0x00042020), CARD32(0x04042020), 7216 CARD32(0x00002022), CARD32(0x04002022), CARD32(0x00042022), CARD32(0x04042022), 7217 CARD32(0x00000800), CARD32(0x04000800), CARD32(0x00040800), CARD32(0x04040800), 7218 CARD32(0x00000802), CARD32(0x04000802), CARD32(0x00040802), CARD32(0x04040802), 7219 CARD32(0x00002800), CARD32(0x04002800), CARD32(0x00042800), CARD32(0x04042800), 7220 CARD32(0x00002802), CARD32(0x04002802), CARD32(0x00042802), CARD32(0x04042802), 7221 CARD32(0x00000820), CARD32(0x04000820), CARD32(0x00040820), CARD32(0x04040820), 7222 CARD32(0x00000822), CARD32(0x04000822), CARD32(0x00040822), CARD32(0x04040822), 7223 CARD32(0x00002820), CARD32(0x04002820), CARD32(0x00042820), CARD32(0x04042820), 7224 CARD32(0x00002822), CARD32(0x04002822), CARD32(0x00042822), CARD32(0x04042822)}, 7225 } /* Wraphelp.c:64:21 */ 7226 7227 var sSPtrans = [8][64]CARD32{ 7228 // nibble 0 7229 {CARD32(0x00410100), CARD32(0x00010000), CARD32(0x40400000), CARD32(0x40410100), 7230 CARD32(0x00400000), CARD32(0x40010100), CARD32(0x40010000), CARD32(0x40400000), 7231 CARD32(0x40010100), CARD32(0x00410100), CARD32(0x00410000), CARD32(0x40000100), 7232 CARD32(0x40400100), CARD32(0x00400000), CARD32(0x00000000), CARD32(0x40010000), 7233 CARD32(0x00010000), CARD32(0x40000000), CARD32(0x00400100), CARD32(0x00010100), 7234 CARD32(0x40410100), CARD32(0x00410000), CARD32(0x40000100), CARD32(0x00400100), 7235 CARD32(0x40000000), CARD32(0x00000100), CARD32(0x00010100), CARD32(0x40410000), 7236 CARD32(0x00000100), CARD32(0x40400100), CARD32(0x40410000), CARD32(0x00000000), 7237 CARD32(0x00000000), CARD32(0x40410100), CARD32(0x00400100), CARD32(0x40010000), 7238 CARD32(0x00410100), CARD32(0x00010000), CARD32(0x40000100), CARD32(0x00400100), 7239 CARD32(0x40410000), CARD32(0x00000100), CARD32(0x00010100), CARD32(0x40400000), 7240 CARD32(0x40010100), CARD32(0x40000000), CARD32(0x40400000), CARD32(0x00410000), 7241 CARD32(0x40410100), CARD32(0x00010100), CARD32(0x00410000), CARD32(0x40400100), 7242 CARD32(0x00400000), CARD32(0x40000100), CARD32(0x40010000), CARD32(0x00000000), 7243 CARD32(0x00010000), CARD32(0x00400000), CARD32(0x40400100), CARD32(0x00410100), 7244 CARD32(0x40000000), CARD32(0x40410000), CARD32(0x00000100), CARD32(0x40010100)}, 7245 7246 // nibble 1 7247 {CARD32(0x08021002), CARD32(0x00000000), CARD32(0x00021000), CARD32(0x08020000), 7248 CARD32(0x08000002), CARD32(0x00001002), CARD32(0x08001000), CARD32(0x00021000), 7249 CARD32(0x00001000), CARD32(0x08020002), CARD32(0x00000002), CARD32(0x08001000), 7250 CARD32(0x00020002), CARD32(0x08021000), CARD32(0x08020000), CARD32(0x00000002), 7251 CARD32(0x00020000), CARD32(0x08001002), CARD32(0x08020002), CARD32(0x00001000), 7252 CARD32(0x00021002), CARD32(0x08000000), CARD32(0x00000000), CARD32(0x00020002), 7253 CARD32(0x08001002), CARD32(0x00021002), CARD32(0x08021000), CARD32(0x08000002), 7254 CARD32(0x08000000), CARD32(0x00020000), CARD32(0x00001002), CARD32(0x08021002), 7255 CARD32(0x00020002), CARD32(0x08021000), CARD32(0x08001000), CARD32(0x00021002), 7256 CARD32(0x08021002), CARD32(0x00020002), CARD32(0x08000002), CARD32(0x00000000), 7257 CARD32(0x08000000), CARD32(0x00001002), CARD32(0x00020000), CARD32(0x08020002), 7258 CARD32(0x00001000), CARD32(0x08000000), CARD32(0x00021002), CARD32(0x08001002), 7259 CARD32(0x08021000), CARD32(0x00001000), CARD32(0x00000000), CARD32(0x08000002), 7260 CARD32(0x00000002), CARD32(0x08021002), CARD32(0x00021000), CARD32(0x08020000), 7261 CARD32(0x08020002), CARD32(0x00020000), CARD32(0x00001002), CARD32(0x08001000), 7262 CARD32(0x08001002), CARD32(0x00000002), CARD32(0x08020000), CARD32(0x00021000)}, 7263 7264 // nibble 2 7265 {CARD32(0x20800000), CARD32(0x00808020), CARD32(0x00000020), CARD32(0x20800020), 7266 CARD32(0x20008000), CARD32(0x00800000), CARD32(0x20800020), CARD32(0x00008020), 7267 CARD32(0x00800020), CARD32(0x00008000), CARD32(0x00808000), CARD32(0x20000000), 7268 CARD32(0x20808020), CARD32(0x20000020), CARD32(0x20000000), CARD32(0x20808000), 7269 CARD32(0x00000000), CARD32(0x20008000), CARD32(0x00808020), CARD32(0x00000020), 7270 CARD32(0x20000020), CARD32(0x20808020), CARD32(0x00008000), CARD32(0x20800000), 7271 CARD32(0x20808000), CARD32(0x00800020), CARD32(0x20008020), CARD32(0x00808000), 7272 CARD32(0x00008020), CARD32(0x00000000), CARD32(0x00800000), CARD32(0x20008020), 7273 CARD32(0x00808020), CARD32(0x00000020), CARD32(0x20000000), CARD32(0x00008000), 7274 CARD32(0x20000020), CARD32(0x20008000), CARD32(0x00808000), CARD32(0x20800020), 7275 CARD32(0x00000000), CARD32(0x00808020), CARD32(0x00008020), CARD32(0x20808000), 7276 CARD32(0x20008000), CARD32(0x00800000), CARD32(0x20808020), CARD32(0x20000000), 7277 CARD32(0x20008020), CARD32(0x20800000), CARD32(0x00800000), CARD32(0x20808020), 7278 CARD32(0x00008000), CARD32(0x00800020), CARD32(0x20800020), CARD32(0x00008020), 7279 CARD32(0x00800020), CARD32(0x00000000), CARD32(0x20808000), CARD32(0x20000020), 7280 CARD32(0x20800000), CARD32(0x20008020), CARD32(0x00000020), CARD32(0x00808000)}, 7281 7282 // nibble 3 7283 {CARD32(0x00080201), CARD32(0x02000200), CARD32(0x00000001), CARD32(0x02080201), 7284 CARD32(0x00000000), CARD32(0x02080000), CARD32(0x02000201), CARD32(0x00080001), 7285 CARD32(0x02080200), CARD32(0x02000001), CARD32(0x02000000), CARD32(0x00000201), 7286 CARD32(0x02000001), CARD32(0x00080201), CARD32(0x00080000), CARD32(0x02000000), 7287 CARD32(0x02080001), CARD32(0x00080200), CARD32(0x00000200), CARD32(0x00000001), 7288 CARD32(0x00080200), CARD32(0x02000201), CARD32(0x02080000), CARD32(0x00000200), 7289 CARD32(0x00000201), CARD32(0x00000000), CARD32(0x00080001), CARD32(0x02080200), 7290 CARD32(0x02000200), CARD32(0x02080001), CARD32(0x02080201), CARD32(0x00080000), 7291 CARD32(0x02080001), CARD32(0x00000201), CARD32(0x00080000), CARD32(0x02000001), 7292 CARD32(0x00080200), CARD32(0x02000200), CARD32(0x00000001), CARD32(0x02080000), 7293 CARD32(0x02000201), CARD32(0x00000000), CARD32(0x00000200), CARD32(0x00080001), 7294 CARD32(0x00000000), CARD32(0x02080001), CARD32(0x02080200), CARD32(0x00000200), 7295 CARD32(0x02000000), CARD32(0x02080201), CARD32(0x00080201), CARD32(0x00080000), 7296 CARD32(0x02080201), CARD32(0x00000001), CARD32(0x02000200), CARD32(0x00080201), 7297 CARD32(0x00080001), CARD32(0x00080200), CARD32(0x02080000), CARD32(0x02000201), 7298 CARD32(0x00000201), CARD32(0x02000000), CARD32(0x02000001), CARD32(0x02080200)}, 7299 7300 // nibble 4 7301 {CARD32(0x01000000), CARD32(0x00002000), CARD32(0x00000080), CARD32(0x01002084), 7302 CARD32(0x01002004), CARD32(0x01000080), CARD32(0x00002084), CARD32(0x01002000), 7303 CARD32(0x00002000), CARD32(0x00000004), CARD32(0x01000004), CARD32(0x00002080), 7304 CARD32(0x01000084), CARD32(0x01002004), CARD32(0x01002080), CARD32(0x00000000), 7305 CARD32(0x00002080), CARD32(0x01000000), CARD32(0x00002004), CARD32(0x00000084), 7306 CARD32(0x01000080), CARD32(0x00002084), CARD32(0x00000000), CARD32(0x01000004), 7307 CARD32(0x00000004), CARD32(0x01000084), CARD32(0x01002084), CARD32(0x00002004), 7308 CARD32(0x01002000), CARD32(0x00000080), CARD32(0x00000084), CARD32(0x01002080), 7309 CARD32(0x01002080), CARD32(0x01000084), CARD32(0x00002004), CARD32(0x01002000), 7310 CARD32(0x00002000), CARD32(0x00000004), CARD32(0x01000004), CARD32(0x01000080), 7311 CARD32(0x01000000), CARD32(0x00002080), CARD32(0x01002084), CARD32(0x00000000), 7312 CARD32(0x00002084), CARD32(0x01000000), CARD32(0x00000080), CARD32(0x00002004), 7313 CARD32(0x01000084), CARD32(0x00000080), CARD32(0x00000000), CARD32(0x01002084), 7314 CARD32(0x01002004), CARD32(0x01002080), CARD32(0x00000084), CARD32(0x00002000), 7315 CARD32(0x00002080), CARD32(0x01002004), CARD32(0x01000080), CARD32(0x00000084), 7316 CARD32(0x00000004), CARD32(0x00002084), CARD32(0x01002000), CARD32(0x01000004)}, 7317 7318 // nibble 5 7319 {CARD32(0x10000008), CARD32(0x00040008), CARD32(0x00000000), CARD32(0x10040400), 7320 CARD32(0x00040008), CARD32(0x00000400), CARD32(0x10000408), CARD32(0x00040000), 7321 CARD32(0x00000408), CARD32(0x10040408), CARD32(0x00040400), CARD32(0x10000000), 7322 CARD32(0x10000400), CARD32(0x10000008), CARD32(0x10040000), CARD32(0x00040408), 7323 CARD32(0x00040000), CARD32(0x10000408), CARD32(0x10040008), CARD32(0x00000000), 7324 CARD32(0x00000400), CARD32(0x00000008), CARD32(0x10040400), CARD32(0x10040008), 7325 CARD32(0x10040408), CARD32(0x10040000), CARD32(0x10000000), CARD32(0x00000408), 7326 CARD32(0x00000008), CARD32(0x00040400), CARD32(0x00040408), CARD32(0x10000400), 7327 CARD32(0x00000408), CARD32(0x10000000), CARD32(0x10000400), CARD32(0x00040408), 7328 CARD32(0x10040400), CARD32(0x00040008), CARD32(0x00000000), CARD32(0x10000400), 7329 CARD32(0x10000000), CARD32(0x00000400), CARD32(0x10040008), CARD32(0x00040000), 7330 CARD32(0x00040008), CARD32(0x10040408), CARD32(0x00040400), CARD32(0x00000008), 7331 CARD32(0x10040408), CARD32(0x00040400), CARD32(0x00040000), CARD32(0x10000408), 7332 CARD32(0x10000008), CARD32(0x10040000), CARD32(0x00040408), CARD32(0x00000000), 7333 CARD32(0x00000400), CARD32(0x10000008), CARD32(0x10000408), CARD32(0x10040400), 7334 CARD32(0x10040000), CARD32(0x00000408), CARD32(0x00000008), CARD32(0x10040008)}, 7335 7336 // nibble 6 7337 {CARD32(0x00000800), CARD32(0x00000040), CARD32(0x00200040), 0x80200000, 7338 0x80200840, 0x80000800, CARD32(0x00000840), CARD32(0x00000000), 7339 CARD32(0x00200000), 0x80200040, 0x80000040, CARD32(0x00200800), 7340 0x80000000, CARD32(0x00200840), CARD32(0x00200800), 0x80000040, 7341 0x80200040, CARD32(0x00000800), 0x80000800, 0x80200840, 7342 CARD32(0x00000000), CARD32(0x00200040), 0x80200000, CARD32(0x00000840), 7343 0x80200800, 0x80000840, CARD32(0x00200840), 0x80000000, 7344 0x80000840, 0x80200800, CARD32(0x00000040), CARD32(0x00200000), 7345 0x80000840, CARD32(0x00200800), 0x80200800, 0x80000040, 7346 CARD32(0x00000800), CARD32(0x00000040), CARD32(0x00200000), 0x80200800, 7347 0x80200040, 0x80000840, CARD32(0x00000840), CARD32(0x00000000), 7348 CARD32(0x00000040), 0x80200000, 0x80000000, CARD32(0x00200040), 7349 CARD32(0x00000000), 0x80200040, CARD32(0x00200040), CARD32(0x00000840), 7350 0x80000040, CARD32(0x00000800), 0x80200840, CARD32(0x00200000), 7351 CARD32(0x00200840), 0x80000000, 0x80000800, 0x80200840, 7352 0x80200000, CARD32(0x00200840), CARD32(0x00200800), 0x80000800}, 7353 7354 // nibble 7 7355 {CARD32(0x04100010), CARD32(0x04104000), CARD32(0x00004010), CARD32(0x00000000), 7356 CARD32(0x04004000), CARD32(0x00100010), CARD32(0x04100000), CARD32(0x04104010), 7357 CARD32(0x00000010), CARD32(0x04000000), CARD32(0x00104000), CARD32(0x00004010), 7358 CARD32(0x00104010), CARD32(0x04004010), CARD32(0x04000010), CARD32(0x04100000), 7359 CARD32(0x00004000), CARD32(0x00104010), CARD32(0x00100010), CARD32(0x04004000), 7360 CARD32(0x04104010), CARD32(0x04000010), CARD32(0x00000000), CARD32(0x00104000), 7361 CARD32(0x04000000), CARD32(0x00100000), CARD32(0x04004010), CARD32(0x04100010), 7362 CARD32(0x00100000), CARD32(0x00004000), CARD32(0x04104000), CARD32(0x00000010), 7363 CARD32(0x00100000), CARD32(0x00004000), CARD32(0x04000010), CARD32(0x04104010), 7364 CARD32(0x00004010), CARD32(0x04000000), CARD32(0x00000000), CARD32(0x00104000), 7365 CARD32(0x04100010), CARD32(0x04004010), CARD32(0x04004000), CARD32(0x00100010), 7366 CARD32(0x04104000), CARD32(0x00000010), CARD32(0x00100010), CARD32(0x04004000), 7367 CARD32(0x04104010), CARD32(0x00100000), CARD32(0x04100000), CARD32(0x04000010), 7368 CARD32(0x00104000), CARD32(0x00004010), CARD32(0x04004010), CARD32(0x04100000), 7369 CARD32(0x00000010), CARD32(0x04104000), CARD32(0x00104010), CARD32(0x00000000), 7370 CARD32(0x04000000), CARD32(0x04100010), CARD32(0x00004000), CARD32(0x00104010)}, 7371 } /* Wraphelp.c:204:21 */ 7372 7373 var shifts2 = [16]int8{int8(0), int8(0), int8(1), int8(1), int8(1), int8(1), int8(1), int8(1), int8(0), int8(1), int8(1), int8(1), int8(1), int8(1), int8(1), int8(0)} /* Wraphelp.c:370:19 */ 7374 7375 func X_XdmcpAuthSetup(tls *libc.TLS, key uintptr, schedule uintptr) { /* Wraphelp.c:372:6: */ 7376 var c CARD32 7377 var d CARD32 7378 var t CARD32 7379 var s CARD32 7380 var in uintptr 7381 var k uintptr 7382 var i int32 7383 7384 k = schedule 7385 in = key 7386 7387 c = CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1)))) 7388 c = c | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 8) 7389 c = c | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 16) 7390 c = c | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 24) 7391 d = CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1)))) 7392 d = d | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 8) 7393 d = d | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 16) 7394 d = d | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 24) 7395 7396 // do PC1 in 60 simple operations 7397 (t) = ((((d) >> (4)) ^ (c)) & (CARD32(0x0f0f0f0f))) 7398 c = c ^ (t) 7399 d = d ^ ((t) << (4)) 7400 (t) = ((((c) << (16 - (-2))) ^ (c)) & (0xcccc0000)) 7401 (c) = (((c) ^ (t)) ^ (t >> (16 - (-2)))) 7402 (t) = ((((c) << (16 - (-1))) ^ (c)) & (0xaaaa0000)) 7403 (c) = (((c) ^ (t)) ^ (t >> (16 - (-1)))) 7404 (t) = ((((c) << (16 - (8))) ^ (c)) & (CARD32(0x00ff0000))) 7405 (c) = (((c) ^ (t)) ^ (t >> (16 - (8)))) 7406 (t) = ((((c) << (16 - (-1))) ^ (c)) & (0xaaaa0000)) 7407 (c) = (((c) ^ (t)) ^ (t >> (16 - (-1)))) 7408 (t) = ((((d) << (16 - (-8))) ^ (d)) & (0xff000000)) 7409 (d) = (((d) ^ (t)) ^ (t >> (16 - (-8)))) 7410 (t) = ((((d) << (16 - (8))) ^ (d)) & (CARD32(0x00ff0000))) 7411 (d) = (((d) ^ (t)) ^ (t >> (16 - (8)))) 7412 (t) = ((((d) << (16 - (2))) ^ (d)) & (CARD32(0x33330000))) 7413 (d) = (((d) ^ (t)) ^ (t >> (16 - (2)))) 7414 d = ((((d & CARD32(0x00aa00aa)) << 7) | ((d & CARD32(0x55005500)) >> 7)) | (d & 0xaa55aa55)) 7415 d = ((d >> 8) | ((c & 0xf0000000) >> 4)) 7416 c = c & (CARD32(0x0fffffff)) 7417 7418 for i = 0; i < ITERATIONS; i++ { 7419 if shifts2[i] != 0 { 7420 c = ((c >> 2) | (c << 26)) 7421 d = ((d >> 2) | (d << 26)) 7422 } else { 7423 c = ((c >> 1) | (c << 27)) 7424 d = ((d >> 1) | (d << 27)) 7425 } 7426 c = c & (CARD32(0x0fffffff)) 7427 d = d & (CARD32(0x0fffffff)) 7428 // could be a few less shifts but I am to lazy at this 7429 // point in time to investigate 7430 s = (((*(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb))) + uintptr(((c)&CARD32(0x3f)))*4)) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 1*256) + uintptr((((c>>6)&CARD32(0x03))|((c>>7)&CARD32(0x3c))))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 2*256) + uintptr((((c>>13)&CARD32(0x0f))|((c>>14)&CARD32(0x30))))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 3*256) + uintptr(((((c>>20)&CARD32(0x01))|((c>>21)&CARD32(0x06)))|((c>>22)&CARD32(0x38))))*4))) 7431 t = (((*(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 4*256) + uintptr(((d)&CARD32(0x3f)))*4)) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 5*256) + uintptr((((d>>7)&CARD32(0x03))|((d>>8)&CARD32(0x3c))))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 6*256) + uintptr(((d>>15)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&skb)) + 7*256) + uintptr((((d>>21)&CARD32(0x0f))|((d>>22)&CARD32(0x30))))*4))) 7432 7433 // table contained 0213 4657 7434 *(*CARD32)(unsafe.Pointer(libc.PostIncUintptr(&k, 4))) = ((t << 16) | (s & CARD32(0x0000ffff))) 7435 s = ((s >> 16) | (t & 0xffff0000)) 7436 7437 s = ((s << 4) | (s >> 28)) 7438 *(*CARD32)(unsafe.Pointer(libc.PostIncUintptr(&k, 4))) = s 7439 } 7440 return 7441 } 7442 7443 func X_XdmcpAuthDoIt(tls *libc.TLS, input uintptr, output uintptr, ks uintptr, encrypt int32) { /* Wraphelp.c:443:6: */ 7444 var l CARD32 7445 var r CARD32 7446 var t CARD32 7447 var u CARD32 7448 var s uintptr 7449 var in uintptr 7450 var out uintptr 7451 var i int32 7452 7453 in = input 7454 out = output 7455 l = CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1)))) 7456 l = l | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 8) 7457 l = l | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 16) 7458 l = l | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 24) 7459 r = CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1)))) 7460 r = r | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 8) 7461 r = r | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 16) 7462 r = r | ((CARD32(*(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(in), 1))))) << 24) 7463 7464 // do IP 7465 (t) = ((((r) >> (4)) ^ (l)) & (CARD32(0x0f0f0f0f))) 7466 l = l ^ (t) 7467 r = r ^ ((t) << (4)) 7468 (t) = ((((l) >> (16)) ^ (r)) & (CARD32(0x0000ffff))) 7469 r = r ^ (t) 7470 l = l ^ ((t) << (16)) 7471 (t) = ((((r) >> (2)) ^ (l)) & (CARD32(0x33333333))) 7472 l = l ^ (t) 7473 r = r ^ ((t) << (2)) 7474 (t) = ((((l) >> (8)) ^ (r)) & (CARD32(0x00ff00ff))) 7475 r = r ^ (t) 7476 l = l ^ ((t) << (8)) 7477 (t) = ((((r) >> (1)) ^ (l)) & (CARD32(0x55555555))) 7478 l = l ^ (t) 7479 r = r ^ ((t) << (1)) 7480 // r and l are reversed - remember that :-) 7481 t = l 7482 l = r 7483 r = t 7484 7485 s = ks 7486 7487 if encrypt != 0 { 7488 for i = 0; i < (ITERATIONS * 2); i = i + (4) { 7489 t = ((r << 1) | (r >> 31)) 7490 u = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr(i)*4))) 7491 t = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr((i+1))*4))) 7492 t = ((t >> 4) | (t << 28)) 7493 l = l ^ (((((((*(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 1*256) + uintptr(((t)&CARD32(0x3f)))*4)) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 3*256) + uintptr(((t>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 5*256) + uintptr(((t>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 7*256) + uintptr(((t>>24)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans))) + uintptr(((u)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 2*256) + uintptr(((u>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 4*256) + uintptr(((u>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 6*256) + uintptr(((u>>24)&CARD32(0x3f)))*4))) 7494 // 1 7495 t = ((l << 1) | (l >> 31)) 7496 u = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr((i+2))*4))) 7497 t = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr(((i+2)+1))*4))) 7498 t = ((t >> 4) | (t << 28)) 7499 r = r ^ (((((((*(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 1*256) + uintptr(((t)&CARD32(0x3f)))*4)) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 3*256) + uintptr(((t>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 5*256) + uintptr(((t>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 7*256) + uintptr(((t>>24)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans))) + uintptr(((u)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 2*256) + uintptr(((u>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 4*256) + uintptr(((u>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 6*256) + uintptr(((u>>24)&CARD32(0x3f)))*4))) 7500 // 2 7501 } 7502 } else { 7503 for i = ((ITERATIONS * 2) - 2); i >= 0; i = i - (4) { 7504 t = ((r << 1) | (r >> 31)) 7505 u = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr(i)*4))) 7506 t = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr((i+1))*4))) 7507 t = ((t >> 4) | (t << 28)) 7508 l = l ^ (((((((*(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 1*256) + uintptr(((t)&CARD32(0x3f)))*4)) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 3*256) + uintptr(((t>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 5*256) + uintptr(((t>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 7*256) + uintptr(((t>>24)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans))) + uintptr(((u)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 2*256) + uintptr(((u>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 4*256) + uintptr(((u>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 6*256) + uintptr(((u>>24)&CARD32(0x3f)))*4))) 7509 // 1 7510 t = ((l << 1) | (l >> 31)) 7511 u = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr((i-2))*4))) 7512 t = (t ^ *(*CARD32)(unsafe.Pointer(s + uintptr(((i-2)+1))*4))) 7513 t = ((t >> 4) | (t << 28)) 7514 r = r ^ (((((((*(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 1*256) + uintptr(((t)&CARD32(0x3f)))*4)) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 3*256) + uintptr(((t>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 5*256) + uintptr(((t>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 7*256) + uintptr(((t>>24)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans))) + uintptr(((u)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 2*256) + uintptr(((u>>8)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 4*256) + uintptr(((u>>16)&CARD32(0x3f)))*4))) | *(*CARD32)(unsafe.Pointer((uintptr(unsafe.Pointer(&sSPtrans)) + 6*256) + uintptr(((u>>24)&CARD32(0x3f)))*4))) 7515 // 2 7516 } 7517 } 7518 7519 // swap l and r 7520 // we will not do the swap so just remember they are 7521 // reversed for the rest of the subroutine 7522 // luckily by FP fixes this problem :-) 7523 7524 (t) = ((((r) >> (1)) ^ (l)) & (CARD32(0x55555555))) 7525 l = l ^ (t) 7526 r = r ^ ((t) << (1)) 7527 (t) = ((((l) >> (8)) ^ (r)) & (CARD32(0x00ff00ff))) 7528 r = r ^ (t) 7529 l = l ^ ((t) << (8)) 7530 (t) = ((((r) >> (2)) ^ (l)) & (CARD32(0x33333333))) 7531 l = l ^ (t) 7532 r = r ^ ((t) << (2)) 7533 (t) = ((((l) >> (16)) ^ (r)) & (CARD32(0x0000ffff))) 7534 r = r ^ (t) 7535 l = l ^ ((t) << (16)) 7536 (t) = ((((r) >> (4)) ^ (l)) & (CARD32(0x0f0f0f0f))) 7537 l = l ^ (t) 7538 r = r ^ ((t) << (4)) 7539 7540 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8((l) & CARD32(0xff))) 7541 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8(((l) >> 8) & CARD32(0xff))) 7542 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8(((l) >> 16) & CARD32(0xff))) 7543 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8(((l) >> 24) & CARD32(0xff))) 7544 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8((r) & CARD32(0xff))) 7545 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8(((r) >> 8) & CARD32(0xff))) 7546 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8(((r) >> 16) & CARD32(0xff))) 7547 *(*CARD8)(unsafe.Pointer(libc.PostIncUintptr(&(out), 1))) = (CARD8(((r) >> 24) & CARD32(0xff))) 7548 return 7549 } 7550 7551 // Floating-point inline functions for stdlib.h. 7552 // Copyright (C) 2012-2020 Free Software Foundation, Inc. 7553 // This file is part of the GNU C Library. 7554 // 7555 // The GNU C Library is free software; you can redistribute it and/or 7556 // modify it under the terms of the GNU Lesser General Public 7557 // License as published by the Free Software Foundation; either 7558 // version 2.1 of the License, or (at your option) any later version. 7559 // 7560 // The GNU C Library is distributed in the hope that it will be useful, 7561 // but WITHOUT ANY WARRANTY; without even the implied warranty of 7562 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7563 // Lesser General Public License for more details. 7564 // 7565 // You should have received a copy of the GNU Lesser General Public 7566 // License along with the GNU C Library; if not, see 7567 // <https://www.gnu.org/licenses/>. 7568 7569 // Define some macros helping to catch buffer overflows. 7570 7571 func XXdmcpWriteHeader(tls *libc.TLS, buffer XdmcpBufferPtr, header XdmcpHeaderPtr) int32 { /* Write.c:37:1: */ 7572 var newData uintptr 7573 7574 if (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize < (6 + int32((*X_XdmcpHeader)(unsafe.Pointer(header)).Flength)) { 7575 newData = libc.Xmalloc(tls, (uint32(XDM_MAX_MSGLEN) * uint32(unsafe.Sizeof(BYTE(0))))) 7576 if !(newData != 0) { 7577 return FALSE 7578 } 7579 libc.Xfree(tls, (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata) 7580 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata = newData 7581 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize = XDM_MAX_MSGLEN 7582 } 7583 (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer = 0 7584 if !(XXdmcpWriteCARD16(tls, buffer, uint32((*X_XdmcpHeader)(unsafe.Pointer(header)).Fversion)) != 0) { 7585 return FALSE 7586 } 7587 if !(XXdmcpWriteCARD16(tls, buffer, uint32((*X_XdmcpHeader)(unsafe.Pointer(header)).Fopcode)) != 0) { 7588 return FALSE 7589 } 7590 if !(XXdmcpWriteCARD16(tls, buffer, uint32((*X_XdmcpHeader)(unsafe.Pointer(header)).Flength)) != 0) { 7591 return FALSE 7592 } 7593 return TRUE 7594 } 7595 7596 func XXdmcpWriteARRAY8(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAY8Ptr) int32 { /* Write.c:63:1: */ 7597 var i int32 7598 7599 if !(XXdmcpWriteCARD16(tls, buffer, uint32((*X_ARRAY8)(unsafe.Pointer(array)).Flength)) != 0) { 7600 return FALSE 7601 } 7602 for i = 0; i < int32((*X_ARRAY8)(unsafe.Pointer(array)).Flength); i++ { 7603 if !(XXdmcpWriteCARD8(tls, buffer, uint32(*(*CARD8)(unsafe.Pointer((*X_ARRAY8)(unsafe.Pointer(array)).Fdata + uintptr(i))))) != 0) { 7604 return FALSE 7605 } 7606 } 7607 return TRUE 7608 } 7609 7610 func XXdmcpWriteARRAY16(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAY16Ptr) int32 { /* Write.c:76:1: */ 7611 var i int32 7612 7613 if !(XXdmcpWriteCARD8(tls, buffer, uint32((*X_ARRAY16)(unsafe.Pointer(array)).Flength)) != 0) { 7614 return FALSE 7615 } 7616 for i = 0; i < int32((*X_ARRAY16)(unsafe.Pointer(array)).Flength); i++ { 7617 if !(XXdmcpWriteCARD16(tls, buffer, uint32(*(*CARD16)(unsafe.Pointer((*X_ARRAY16)(unsafe.Pointer(array)).Fdata + uintptr(i)*2)))) != 0) { 7618 return FALSE 7619 } 7620 } 7621 return TRUE 7622 } 7623 7624 func XXdmcpWriteARRAY32(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAY32Ptr) int32 { /* Write.c:89:1: */ 7625 var i int32 7626 7627 if !(XXdmcpWriteCARD8(tls, buffer, uint32((*X_ARRAY32)(unsafe.Pointer(array)).Flength)) != 0) { 7628 return FALSE 7629 } 7630 for i = 0; i < int32((*X_ARRAY32)(unsafe.Pointer(array)).Flength); i++ { 7631 if !(XXdmcpWriteCARD32(tls, buffer, uint32(*(*CARD32)(unsafe.Pointer((*X_ARRAY32)(unsafe.Pointer(array)).Fdata + uintptr(i)*4)))) != 0) { 7632 return FALSE 7633 } 7634 } 7635 return TRUE 7636 } 7637 7638 func XXdmcpWriteARRAYofARRAY8(tls *libc.TLS, buffer XdmcpBufferPtr, array ARRAYofARRAY8Ptr) int32 { /* Write.c:102:1: */ 7639 var i int32 7640 7641 if !(XXdmcpWriteCARD8(tls, buffer, uint32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength)) != 0) { 7642 return FALSE 7643 } 7644 for i = 0; i < int32((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Flength); i++ { 7645 if !(XXdmcpWriteARRAY8(tls, buffer, ((*X_ARRAYofARRAY8)(unsafe.Pointer(array)).Fdata+uintptr(i)*8)) != 0) { 7646 return FALSE 7647 } 7648 } 7649 return TRUE 7650 } 7651 7652 func XXdmcpWriteCARD8(tls *libc.TLS, buffer XdmcpBufferPtr, value uint32) int32 { /* Write.c:115:1: */ 7653 if (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer >= (*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fsize { 7654 return FALSE 7655 } 7656 *(*BYTE)(unsafe.Pointer((*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata + uintptr(libc.PostIncInt32(&(*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer, 1)))) = BYTE(value) 7657 return TRUE 7658 } 7659 7660 func XXdmcpWriteCARD16(tls *libc.TLS, buffer XdmcpBufferPtr, value uint32) int32 { /* Write.c:126:1: */ 7661 if !(XXdmcpWriteCARD8(tls, buffer, (value>>8)) != 0) { 7662 return FALSE 7663 } 7664 if !(XXdmcpWriteCARD8(tls, buffer, (value&uint32(0xff))) != 0) { 7665 return FALSE 7666 } 7667 return TRUE 7668 } 7669 7670 func XXdmcpWriteCARD32(tls *libc.TLS, buffer XdmcpBufferPtr, value uint32) int32 { /* Write.c:138:1: */ 7671 if !(XXdmcpWriteCARD8(tls, buffer, (value>>24)) != 0) { 7672 return FALSE 7673 } 7674 if !(XXdmcpWriteCARD8(tls, buffer, ((value>>16)&uint32(0xff))) != 0) { 7675 return FALSE 7676 } 7677 if !(XXdmcpWriteCARD8(tls, buffer, ((value>>8)&uint32(0xff))) != 0) { 7678 return FALSE 7679 } 7680 if !(XXdmcpWriteCARD8(tls, buffer, (value&uint32(0xff))) != 0) { 7681 return FALSE 7682 } 7683 return TRUE 7684 }