Fix bugs in termios library and cleanup code

This change fixes an issue with the tcflow() magic numbers that was
causing bash to freeze up on Linux. While auditing termios polyfills,
several other issues were identified with XNU/BSD compatibility.

Out of an abundance of caution this change undefines as much surface
area from libc/calls/struct/termios.h as possible, so that autoconf
scripts are less likely to detect non-POSIX teletypewriter APIs that
haven't been polyfilled by Cosmopolitan.

This is a *breaking change* for your static archives in /opt/cosmos if
you use the cosmocc toolchain. That's because this change disables the
ioctl() undiamonding trick for code outside the monorepo, specifically
because it'll lead to brittle ABI breakages like this. If you're using
the cosmocc toolchain, you'll need to rebuild libraries like ncurses,
readline, etc. Yes diamonds cause bloat. To work around that, consider
using tcgetwinsize() instead of ioctl(TIOCGWINSZ) since it'll help you
avoid pulling every single ioctl-related polyfill into the linkage.

The cosmocc script was specifying -DNDEBUG for some reason. It's fixed.
This commit is contained in:
Justine Tunney 2023-06-14 17:02:57 -07:00
parent 06b749ae03
commit 4778cd4d27
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
187 changed files with 1025 additions and 1848 deletions

View file

@ -180,10 +180,7 @@ syscon compat SIGIOT 6 6 6 6 6 6 6 6 # PDP-11 feature; same
# open() flags
#
# group name GNU/Systemd GNU/Systemd (Aarch64) XNU's Not UNIX! MacOS (Arm64) FreeBSD OpenBSD NetBSD Windoze Commentary
syscon open O_RDONLY 0 0 0 0 0 0 0 0 # consensus
syscon open O_WRONLY 1 1 1 1 1 1 1 1 # consensus
syscon open O_RDWR 2 2 2 2 2 2 2 2 # consensus
syscon open O_ACCMODE 3 3 3 3 3 3 3 3 # O_RDONLY|O_WRONLY|O_RDWR
syscon open O_APPEND 0x00000400 0x00000400 8 8 8 8 8 0x00000400 # bsd consensus & kNtFileAppendData; won't pose issues w/ mknod(S_IFIFO) [SYNC libc/calls/open-nt.c]
syscon open O_CREAT 0x00000040 0x00000040 0x00000200 0x00000200 0x00000200 0x00000200 0x00000200 0x00000040 # bsd consensus & NT faked as Linux [SYNC libc/calls/open-nt.c]
syscon open O_EXCL 0x00000080 0x00000080 0x00000800 0x00000800 0x00000800 0x00000800 0x00000800 0x00000080 # bsd consensus & NT faked as Linux [SYNC libc/calls/open-nt.c]
@ -1324,29 +1321,11 @@ syscon sched SCHED_RESET_ON_FORK 0x40000000 0x40000000 0 0 0 0 0 0
# = TIOCSETA → About 3,110 results (0.41 seconds)
#
# group name GNU/Systemd GNU/Systemd (Aarch64) XNU's Not UNIX! MacOS (Arm64) FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon termios TCGETS 0x5401 0x5401 0x40487413 0x40487413 0x402c7413 0x402c7413 0x402c7413 0 # Gets console settings; tcgetattr(tty, argp) → ioctl(tty, TCGETS, struct termios *argp); polyfilled NT
syscon compat TIOCGETA 0x5401 0x5401 0x40487413 0x40487413 0x402c7413 0x402c7413 0x402c7413 0 # Gets console settings; = tcgetattr(tty, struct termios *argp)
#syscon compat TCGETA 0x5405 0x5405 0 0 0 0 0 0 # Gets console settings; ≈ ioctl(fd, TCGETA, struct termio *argp)
syscon termios TCSANOW 0 0 0 0 0 0 0 0 # Sets console settings; tcsetattr(fd, TCSANOW, argp); polyfilled NT
syscon termios TCSETS 0x5402 0x5402 0x80487414 0x80487414 0x802c7414 0x802c7414 0x802c7414 0x5402 # Sets console settings; = ioctl(tty, TCSETS, const struct termios *argp); polyfilled NT
syscon compat TIOCSETA 0x5402 0x5402 0x80487414 0x80487414 0x802c7414 0x802c7414 0x802c7414 0x5402 # Sets console settings; = ioctl(tty, TIOCSETA, const struct termios *argp); polyfilled NT
#syscon compat TCSETA 0x5402 0x5402 0x80487414 0x80487414 0x802c7414 0x802c7414 0x802c7414 0x5402 # Sets console settings; ≈ ioctl(tty, TCSETA, const struct termio *argp); polyfilled NT
syscon termios TCSADRAIN 1 1 1 1 1 1 1 1 # Drains output & sets console settings; tcsetawttr(fd, TCSADRAIN, argp); polyfilled NT
syscon termios TCSETSW 0x5403 0x5403 0x80487415 0x80487415 0x802c7415 0x802c7415 0x802c7415 0x5403 # Drains output & sets console settings; = ioctl(tty, TCSETSW, const struct termios *argp); polyfilled NT
syscon compat TIOCSETAW 0x5403 0x5403 0x80487415 0x80487415 0x802c7415 0x802c7415 0x802c7415 0x5403 # Drains output & sets console settings; = ioctl(tty, TIOCSETAW, const struct termios *argp); polyfilled NT
#syscon compat TCSETAW 0x5403 0x5403 0x80487415 0x80487415 0x802c7415 0x802c7415 0x802c7415 0x5403 # Drains output & sets console settings; ≈ ioctl(tty, TCSETAW, const struct termio *argp); polyfilled NT
syscon termios TCSAFLUSH 2 2 2 2 2 2 2 2 # Drops input & drains output & sets console settings; tcsetafttr(fd, TCSAFLUSH, argp); polyfilled NT
syscon termios TCSETSF 0x5404 0x5404 0x80487416 0x80487416 0x802c7416 0x802c7416 0x802c7416 0x5404 # Drops input & drains output & sets console settings; = ioctl(tty, TCSETSF, const struct termios *argp); polyfilled NT
syscon compat TIOCSETAF 0x5404 0x5404 0x80487416 0x80487416 0x802c7416 0x802c7416 0x802c7416 0x5402 # Drops input & drains output & sets console settings; = ioctl(tty, TIOCSETAF, const struct termios *argp); polyfilled NT
#syscon compat TCSETAF 0x5404 0x5404 0x80487416 0x80487416 0x802c7416 0x802c7416 0x802c7416 0x5402 # Drops input & drains output & sets console settings; ≈ ioctl(tty, TCSETAF, const struct termio *argp); polyfilled NT
syscon termios TIOCGWINSZ 0x5413 0x5413 1074295912 1074295912 1074295912 1074295912 1074295912 0x5413 # ioctl(tty, TIOCGWINSZ, struct winsize *argp); polyfilled NT
syscon termios TIOCSWINSZ 0x5414 0x5414 0x80087467 0x80087467 0x80087467 0x80087467 0x80087467 0x5414 # ioctl(tty, TIOCSWINSZ, const struct winsize *argp) (faked NT)
syscon termios TIOCINQ 0x541b 0x541b 0x4004667f 0x4004667f 0x4004667f 0x4004667f 0x4004667f 0x4004667f # [Linuxism] same as FIONREAD
syscon termios TIOCOUTQ 0x5411 0x5411 0x40047473 0x40047473 0x40047473 0x40047473 0x40047473 0 # get # bytes queued in TTY's output buffer ioctl(tty, TIOCSWINSZ, const struct winsize *argp)
syscon termios TIOCGPGRP 0x540f 0x540f 0x40047477 0x40047477 0x40047477 0x40047477 0x40047477 0 # tcgetpgrp(): get pgrp of tty
syscon termios TIOCSPGRP 0x5410 0x5410 0x80047476 0x80047476 0x80047476 0x80047476 0x80047476 0 # tcsetpgrp(): set pgrp of tty
syscon termios TIOCSBRK 0x5427 0x5427 0x2000747b 0x2000747b 0x2000747b 0x2000747b 0x2000747b 0 # set break bit
syscon termios TIOCCBRK 0x5428 0x5428 0x2000747a 0x2000747a 0x2000747a 0x2000747a 0x2000747a 0 # boop
syscon termios TIOCCONS 0x541d 0x541d 0x80047462 0x80047462 0x80047462 0x80047462 0x80047462 0 # boop
syscon termios TIOCGETD 0x5424 0x5424 0x4004741a 0x4004741a 0x4004741a 0x4004741a 0x4004741a 0 # boop
syscon termios TIOCNOTTY 0x5422 0x5422 0x20007471 0x20007471 0x20007471 0x20007471 0x20007471 0 # boop
@ -1354,44 +1333,7 @@ syscon termios TIOCNXCL 0x540d 0x540d 0x2000740e 0x2000740e 0x2000740e
syscon termios TIOCSCTTY 0x540e 0x540e 0x20007461 0x20007461 0x20007461 0x20007461 0x20007461 0 # makes terminal controlling terminal of calling process (see login_tty)
syscon termios TIOCSETD 0x5423 0x5423 0x8004741b 0x8004741b 0x8004741b 0x8004741b 0x8004741b 0 # boop
syscon termios TIOCSIG 0x40045436 0x40045436 0x2000745f 0x2000745f 0x2004745f 0x8004745f 0x8004745f 0 # boop
syscon termios TIOCSTI 0x5412 0x5412 0x80017472 0x80017472 0x80017472 0 0 0 # boop
syscon termios TIOCGSID 0x5429 0x5429 0x40047463 0x40047463 0x40047463 0x40047463 0x40047463 0 # boop
syscon termios TABLDISC 0 0 0x3 0x3 0 0x3 0x3 0 # boop
syscon termios SLIPDISC 0 0 0x4 0x4 0x4 0x4 0x4 0 # boop
syscon termios PPPDISC 0 0 0x5 0x5 0x5 0x5 0x5 0 # boop
syscon termios TCSBRK 0x5409 0x5409 0x2000745e 0x2000745e 0x2000745e 0x2000745e 0x2000745e 0 # TIOCDRAIN on BSD; TIOCDRAIN on BSD
syscon termios TIOCSTAT 0 0 0x20007465 0x20007465 0x20007465 0x20007465 0x20007465 0 # boop
syscon termios TIOCSTART 0 0 0x2000746e 0x2000746e 0x2000746e 0x2000746e 0x2000746e 0 # boop
syscon termios TIOCCDTR 0 0 0x20007478 0x20007478 0x20007478 0x20007478 0x20007478 0 # clear data terminal ready
syscon termios TIOCSDTR 0 0 0x20007479 0x20007479 0x20007479 0x20007479 0x20007479 0 # boop
syscon termios TIOCEXT 0 0 0x80047460 0x80047460 0x80047460 0x80047460 0x80047460 0 # boop
syscon termios TIOCGDRAINWAIT 0 0 0x40047456 0x40047456 0x40047456 0 0 0 # boop
syscon termios TIOCTIMESTAMP 0 0 0x40107459 0x40107459 0x40107459 0 0 0 # boop
syscon termios TIOCSDRAINWAIT 0 0 0x80047457 0x80047457 0x80047457 0 0 0 # boop
syscon termios TIOCREMOTE 0 0 0x80047469 0x80047469 0 0x80047469 0x80047469 0 # boop
syscon termios TTYDISC 0 0 0 0 0 0 0 0 # boop
syscon termios TIOCFLAG_SOFTCAR 0 0 0 0 0 0x1 0x1 0 # boop
syscon termios TIOCFLAG_PPS 0 0 0 0 0 0x10 0x10 0 # boop
syscon termios TIOCFLAG_CLOCAL 0 0 0 0 0 0x2 0x2 0 # boop
syscon termios TIOCCHKVERAUTH 0 0 0 0 0 0x2000741e 0x2000741e 0 # boop
syscon termios TIOCGFLAGS 0 0 0 0 0 0x4004745d 0x4004745d 0 # boop
syscon termios TIOCGTSTAMP 0 0 0 0 0 0x4010745b 0x4010745b 0 # boop
syscon termios STRIPDISC 0 0 0 0 0 0x6 0x6 0 # boop
syscon termios NMEADISC 0 0 0 0 0 0x7 0x7 0 # boop
syscon termios TIOCUCNTL_CBRK 0 0 0 0 0 0x7a 0x7a 0 # boop
syscon termios TIOCFLAG_MDMBUF 0 0 0 0 0 0x8 0x8 0 # boop
syscon termios TIOCSETVERAUTH 0 0 0 0 0 0x8004741c 0x8004741c 0 # boop
syscon termios TIOCSFLAGS 0 0 0 0 0 0x8004745c 0x8004745c 0 # boop
syscon termios TIOCSTSTAMP 0 0 0 0 0 0x8008745a 0x8008745a 0 # boop
syscon termios ENDRUNDISC 0 0 0 0 0 0x9 0x9 0 # boop
syscon termios TIOCPTMASTER 0 0 0 0 0x2000741c 0 0 0 # boop
syscon termios TIOCPTYGRANT 0 0 0x20007454 0x20007454 0 0 0 0 # xnu grantpt()
syscon termios TIOCPTYUNLK 0 0 0x20007452 0x20007452 0 0 0 0 # xnu unlockpt()
syscon termios TIOCPTYGNAME 0 0 0x40807453 0x40807453 0 0 0 0 # xnu ptyname()
syscon termios TIOCPTSNAME 0 0 0 0 0 0 0x48087448 0 # netbsd ptyname()
syscon termios FIODGNAME 0 0 0 0 0x80106678 0 0 0 # freebsd ptsname_r()
syscon termios NETGRAPHDISC 0 0 0 0 0x6 0 0 0 # boop
syscon termios H4DISC 0 0 0 0 0x7 0 0 0 # boop
syscon termios TIOCSTI 0x5412 0x5412 0x80017472 0x80017472 0x80017472 0 0x80017472 0 # boop
# Teletypewriter Control Modes
#
@ -1406,7 +1348,9 @@ syscon termios CREAD 0b0000000010000000 0b0000000010000000 0b000000100000000
syscon termios PARENB 0b0000000100000000 0b0000000100000000 0b000001000000000000 0b000001000000000000 0b000001000000000000 0b0001000000000000 0b0001000000000000 0b0000000100000000 # termios.c_cflag
syscon termios PARODD 0b0000001000000000 0b0000001000000000 0b000010000000000000 0b000010000000000000 0b000010000000000000 0b0010000000000000 0b0010000000000000 0b0000001000000000 # termios.c_cflag
syscon termios HUPCL 0b0000010000000000 0b0000010000000000 0b000100000000000000 0b000100000000000000 0b000100000000000000 0b0100000000000000 0b0100000000000000 0b0000010000000000 # termios.c_cflag; bsd consensus
syscon termios CLOCAL 0b0000100000000000 0b0000100000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b0000100000000000 # termios.c_cflag; consensus
syscon termios CLOCAL 0b0000100000000000 0b0000100000000000 0b001000000000000000 0b001000000000000000 0b001000000000000000 0b1000000000000000 0b1000000000000000 0b0000100000000000 # termios.c_cflag; consensus
syscon termios CMSPAR 0x40000000 0x40000000 0 0 0 0 0 0 # termios.c_cflag; not in POSIX
syscon termios CRTSCTS 0x80000000 0x80000000 0x00030000 0x00030000 0x00030000 0x00010000 0x00010000 0x80000000 # termios.c_cflag
# Teletypewriter Local Modes
#
@ -1459,29 +1403,23 @@ syscon termios ONLRET 0b0000000000100000 0b0000000000100000 0b00000000000100
syscon termios OFILL 0b0000000001000000 0b0000000001000000 0b000000000010000000 0b000000000010000000 0 0 0 0b0000000001000000 # termios.c_oflag
syscon termios OFDEL 0b0000000010000000 0b0000000010000000 0b100000000000000000 0b100000000000000000 0 0 0 0b0000000010000000 # termios.c_oflag
syscon termios NLDLY 0b0000000100000000 0b0000000100000000 0b000000001100000000 0b000000001100000000 0b000000001100000000 0 0 0b0000000100000000 # (termios.c_oflag & NLDLY) ∈ {NL0,NL1,NL2,NL3}
syscon termios NL0 0b0000000000000000 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b000000000000000000 0 0b000000000000000000 0b0000000000000000 # (termios.c_oflag & NLDLY) == NL0
syscon termios NL1 0b0000000100000000 0b0000000100000000 0b000000000100000000 0b000000000100000000 0b000000000100000000 0 0b000000000100000000 0b0000000100000000 # (termios.c_oflag & NLDLY) == NL1
syscon termios NL2 0 0 0b000000001000000000 0b000000001000000000 0b000000001000000000 0 0b000000001000000000 0 # (termios.c_oflag & NLDLY) == NL2
syscon termios NL3 0 0 0b000000001100000000 0b000000001100000000 0b000000001100000000 0 0b000000001100000000 0 # (termios.c_oflag & NLDLY) == NL3
syscon termios CRDLY 0b0000011000000000 0b0000011000000000 0b000011000000000000 0b000011000000000000 0b000011000000000000 0 0 0b0000011000000000 # (termios.c_oflag & CRDLY) ∈ {CR0,CR1,CR2,CR3}
syscon termios CR0 0b0000000000000000 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b000000000000000000 0 0b000000000000000000 0b0000000000000000 # (termios.c_oflag & CRDLY) == CR0
syscon termios CR1 0b0000001000000000 0b0000001000000000 0b000001000000000000 0b000001000000000000 0b000001000000000000 0 0b000001000000000000 0b0000001000000000 # (termios.c_oflag & CRDLY) == CR1
syscon termios CR2 0b0000010000000000 0b0000010000000000 0b000010000000000000 0b000010000000000000 0b000010000000000000 0 0b000000010000000000 0b0000010000000000 # (termios.c_oflag & CRDLY) == CR2
syscon termios CR3 0b0000011000000000 0b0000011000000000 0b000011000000000000 0b000011000000000000 0b000011000000000000 0 0b000000011000000000 0b0000011000000000 # (termios.c_oflag & CRDLY) == CR3
syscon termios TABDLY 0b0001100000000000 0b0001100000000000 0b000000110000000100 0b000000110000000100 0b000000000000000100 0 0 0b0001100000000000 # (termios.c_oflag & TABDLY) ∈ {TAB0,TAB1,TAB2,TAB3,XTABS}
syscon termios TAB0 0b0000000000000000 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b000000000000000000 0 0b000000000000000000 0b0000000000000000 # (termios.c_oflag & TABDLY) == TAB0
syscon termios TAB1 0b0000100000000000 0b0000100000000000 0b000000010000000000 0b000000010000000000 0b000000010000000000 0 0b000000010000000000 0b0000100000000000 # (termios.c_oflag & TABDLY) == TAB1
syscon termios TAB2 0b0001000000000000 0b0001000000000000 0b000000100000000000 0b000000100000000000 0b000000100000000000 0 0b000000100000000000 0b0001000000000000 # (termios.c_oflag & TABDLY) == TAB2
syscon termios TAB3 0b0001100000000000 0b0001100000000000 0b000000000000000100 0b000000000000000100 0b000000000000000100 0 0b000000000000000100 0b0001100000000000 # (termios.c_oflag & TABDLY) == TAB3
syscon termios XTABS 0b0001100000000000 0b0001100000000000 0b000000110000000000 0b000000110000000000 0b000000110000000000 0 0b000000110000000000 0b0001100000000000 # (termios.c_oflag & TABDLY) == XTABS
syscon termios BSDLY 0b0010000000000000 0b0010000000000000 0b001000000000000000 0b001000000000000000 0b001000000000000000 0 0 0b0010000000000000 # termios.c_oflag
syscon termios BS0 0b0000000000000000 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b000000000000000000 0 0 0b0000000000000000 # termios.c_oflag
syscon termios BS1 0b0010000000000000 0b0010000000000000 0b001000000000000000 0b001000000000000000 0b001000000000000000 0 0 0b0010000000000000 # termios.c_oflag
syscon termios VTDLY 0b0100000000000000 0b0100000000000000 0b010000000000000000 0b010000000000000000 0b010000000000000000 0 0 0b0100000000000000 # termios.c_oflag
syscon termios VT0 0b0000000000000000 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b000000000000000000 0 0 0b0000000000000000 # termios.c_oflag
syscon termios VT1 0b0100000000000000 0b0100000000000000 0b010000000000000000 0b010000000000000000 0b010000000000000000 0 0 0b0100000000000000 # termios.c_oflag
syscon termios FFDLY 0b1000000000000000 0b1000000000000000 0b000100000000000000 0b000100000000000000 0b000100000000000000 0 0 0b1000000000000000 # termios.c_oflag
syscon termios FF0 0b0000000000000000 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b000000000000000000 0 0 0b0000000000000000 # termios.c_oflag
syscon termios FF1 0b1000000000000000 0b1000000000000000 0b000100000000000000 0b000100000000000000 0b000100000000000000 0 0 0b1000000000000000 # termios.c_oflag
# Teletypewriter Special Control Character Assignments
@ -1489,7 +1427,6 @@ syscon termios FF1 0b1000000000000000 0b1000000000000000 0b000100000000000
# group name GNU/Systemd GNU/Systemd (Aarch64) XNU's Not UNIX! MacOS (Arm64) FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon termios VMIN 6+1 6+1 16 16 16 16 16 6 # termios.c_cc[VMIN]=𝑥 in non-canonical mode can be set to 0 for non-blocking reads, 1 for single character raw mode reads, or higher to buffer
syscon termios VTIME 5+1 5+1 17 17 17 17 17 5 # termios.c_cc[VTIME]=𝑥 sets non-canonical read timeout to 𝑥×𝟷𝟶𝟶ms which is needed when entering escape sequences manually with the escape key
syscon termios NCCS 20 20 20 20 20 20 20 20 # ARRAYLEN(termios.c_cc); we schlep c_line into c_cc on linux
syscon termios VINTR 0+1 0+1 8 8 8 8 8 0 # termios.c_cc[VINTR]=𝑥
syscon termios VQUIT 1+1 1+1 9 9 9 9 9 1 # termios.c_cc[VQUIT]=𝑥
syscon termios VERASE 2+1 2+1 3 3 3 3 3 2 # termios.c_cc[VERASE]=𝑥
@ -1505,35 +1442,11 @@ syscon termios VDISCARD 13+1 13+1 15 15 15 15 15 13 # termios
syscon termios VWERASE 14+1 14+1 4 4 4 4 4 14 # termios.c_cc[VWERASE]=𝑥
syscon termios VLNEXT 15+1 15+1 14 14 14 14 14 15 # termios.c_cc[VLNEXT]=𝑥
syscon termios VEOL2 16+1 16+1 2 2 2 2 2 16 # termios.c_cc[VEOL2]=𝑥
syscon termios _POSIX_VDISABLE 0 0 255 255 255 255 255 0 # termios.c_cc tombstone value
syscon termios TIOCSERGETLSR 0x5459 0x5459 0 0 0 0 0 0 #
syscon termios TIOCSERGETMULTI 0x545a 0x545a 0 0 0 0 0 0 #
syscon termios TIOCSERSETMULTI 0x545b 0x545b 0 0 0 0 0 0 #
syscon termios TIOCSER_TEMT 1 1 0 0 0 0 0 0 #
syscon termios VERIFY 47 47 0 0 0 0 0 0
syscon termios CIBAUD 0x100f0000 0x100f0000 0 0 0 0 0 0
syscon termios CMSPAR 0x40000000 0x40000000 0 0 0 0 0 0
syscon termios BUSY 4 4 0 0 0 0 0 0
syscon termios CBAUD 0x100f 0x100f 0 0 0 0 0 0
syscon termios CBAUDEX 0x1000 0x1000 0 0 0 0 0 0
syscon termios EXTA 14 14 0x4b00 0x4b00 0x4b00 0x4b00 0x4b00 0 # bsd consensus
syscon termios EXTB 15 15 0x9600 0x9600 0x9600 0x9600 0x9600 0 # bsd consensus
syscon termios ERA 0x02002c 0x02002c 45 45 45 0 0 0
syscon termios EMPTY 0 0 0 0 0 0 0 0 # consensus
syscon termios TCFLSH 0x540b 0x540b 0x80047410 0x80047410 0x80047410 0x80047410 0x80047410 0 # see tcflush; TIOCFLUSH on BSD
syscon termios TIOCFLUSH 0x540b 0x540b 0x80047410 0x80047410 0x80047410 0x80047410 0x80047410 0 # see tcflush; TCFLSH on Linux
syscon termios TCIFLUSH 0 0 1 1 1 1 1 0 # see tcflush; bsd consensus; faked nt
syscon termios TCOFLUSH 1 1 2 2 2 2 2 1 # see tcflush; bsd consensus; faked nt
syscon termios TCIOFLUSH 2 2 3 3 3 3 3 2 # see tcflush; bsd consensus; faked nt
syscon termios TCXONC 0x540A 0x540A 0 0 0 0 0 0 # see tcflow
syscon termios TIOCSTOP 0x540A 0x540A 0x2000746f 0x2000746f 0x2000746f 0x2000746f 0x2000746f 0 # see tcflow
syscon termios TIOCSTART 0x540A 0x540A 0x2000746e 0x2000746e 0x2000746e 0x2000746e 0x2000746e 0 # see tcflow
syscon termios TCOOFF 0 0 1 1 1 1 1 0 # see tcflow; bsd consensus
syscon termios TCOON 1 1 2 2 2 2 2 1 # see tcflow; bsd consensus
syscon termios TCIOFF 2 2 3 3 3 3 3 2 # see tcflow; bsd consensus
syscon termios TCION 3 3 4 4 4 4 4 3 # see tcflow; bsd consensus
syscon termios TCIFLUSH 0 0 1 1 1 1 1 0 # see tcflush; FREAD on BSD; faked nt
syscon termios TCOFLUSH 1 1 2 2 2 2 2 1 # see tcflush; FWRITE on BSD; faked nt
syscon termios TCIOFLUSH 2 2 3 3 3 3 3 2 # see tcflush; FREAD|FWRITE on BSD; faked nt
syscon termios CSTART 17 17 17 17 17 17 17 0 # unix consensus
syscon termios CSTOP 19 19 19 19 19 19 19 0 # unix consensus
@ -1552,7 +1465,6 @@ syscon pty TIOCPKT_START 8 8 8 8 8 8 8 8 # unix consensus
syscon pty TIOCPKT_NOSTOP 16 16 16 16 16 16 16 16 # unix consensus
syscon pty TIOCPKT_DOSTOP 32 32 32 32 32 32 32 32 # unix consensus
syscon pty TIOCPKT_IOCTL 64 64 64 64 64 64 64 64 # unix consensus
syscon pty PTMGET 0 0 0 0 0 0x40287401 0x40287401 -1 # for /dev/ptm
# Modem Control
#

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,BS0,0b0000000000000000,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b000000000000000000,0,0,0b0000000000000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,BUSY,4,4,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,CBAUD,0x100f,0x100f,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,CBAUDEX,0x1000,0x1000,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,CIBAUD,0x100f0000,0x100f0000,0,0,0,0,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,CLOCAL,0b0000100000000000,0b0000100000000000,0b1000000000000000,0b1000000000000000,0b1000000000000000,0b1000000000000000,0b1000000000000000,0b0000100000000000
.syscon termios,CLOCAL,0b0000100000000000,0b0000100000000000,0b001000000000000000,0b001000000000000000,0b001000000000000000,0b1000000000000000,0b1000000000000000,0b0000100000000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,CR0,0b0000000000000000,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b000000000000000000,0,0b000000000000000000,0b0000000000000000

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,CRTSCTS,0x80000000,0x80000000,0x00030000,0x00030000,0x00030000,0x00010000,0x00010000,0x80000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,EMPTY,0,0,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,ENDRUNDISC,0,0,0,0,0,0x9,0x9,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,ERA,0x02002c,0x02002c,45,45,45,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,EXTA,14,14,0x4b00,0x4b00,0x4b00,0x4b00,0x4b00,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,EXTB,15,15,0x9600,0x9600,0x9600,0x9600,0x9600,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,FF0,0b0000000000000000,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b000000000000000000,0,0,0b0000000000000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,FIODGNAME,0,0,0,0,0x80106678,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,H4DISC,0,0,0,0,0x7,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,NCCS,20,20,20,20,20,20,20,20

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,NETGRAPHDISC,0,0,0,0,0x6,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,NL0,0b0000000000000000,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b000000000000000000,0,0b000000000000000000,0b0000000000000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,NMEADISC,0,0,0,0,0,0x7,0x7,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon open,O_ACCMODE,3,3,3,3,3,3,3,3

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon open,O_RDONLY,0,0,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon open,O_WRONLY,1,1,1,1,1,1,1,1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,PPPDISC,0,0,0x5,0x5,0x5,0x5,0x5,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon pty,PTMGET,0,0,0,0,0,0x40287401,0x40287401,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,SLIPDISC,0,0,0x4,0x4,0x4,0x4,0x4,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,STRIPDISC,0,0,0,0,0,0x6,0x6,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TAB0,0b0000000000000000,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b000000000000000000,0,0b000000000000000000,0b0000000000000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TABLDISC,0,0,0x3,0x3,0,0x3,0x3,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCFLSH,0x540b,0x540b,0x80047410,0x80047410,0x80047410,0x80047410,0x80047410,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCGETS,0x5401,0x5401,0x40487413,0x40487413,0x402c7413,0x402c7413,0x402c7413,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCIOFF,2,2,3,3,3,3,3,2

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCION,3,3,4,4,4,4,4,3

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCOOFF,0,0,1,1,1,1,1,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCOON,1,1,2,2,2,2,2,1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSADRAIN,1,1,1,1,1,1,1,1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSAFLUSH,2,2,2,2,2,2,2,2

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSANOW,0,0,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSBRK,0x5409,0x5409,0x2000745e,0x2000745e,0x2000745e,0x2000745e,0x2000745e,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSETS,0x5402,0x5402,0x80487414,0x80487414,0x802c7414,0x802c7414,0x802c7414,0x5402

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSETSF,0x5404,0x5404,0x80487416,0x80487416,0x802c7416,0x802c7416,0x802c7416,0x5404

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCSETSW,0x5403,0x5403,0x80487415,0x80487415,0x802c7415,0x802c7415,0x802c7415,0x5403

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TCXONC,0x540A,0x540A,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCCBRK,0x5428,0x5428,0x2000747a,0x2000747a,0x2000747a,0x2000747a,0x2000747a,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCCDTR,0,0,0x20007478,0x20007478,0x20007478,0x20007478,0x20007478,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCCHKVERAUTH,0,0,0,0,0,0x2000741e,0x2000741e,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCEXT,0,0,0x80047460,0x80047460,0x80047460,0x80047460,0x80047460,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCFLAG_CLOCAL,0,0,0,0,0,0x2,0x2,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCFLAG_MDMBUF,0,0,0,0,0,0x8,0x8,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCFLAG_PPS,0,0,0,0,0,0x10,0x10,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCFLAG_SOFTCAR,0,0,0,0,0,0x1,0x1,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCFLUSH,0x540b,0x540b,0x80047410,0x80047410,0x80047410,0x80047410,0x80047410,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCGDRAINWAIT,0,0,0x40047456,0x40047456,0x40047456,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,TIOCGETA,0x5401,0x5401,0x40487413,0x40487413,0x402c7413,0x402c7413,0x402c7413,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCGFLAGS,0,0,0,0,0,0x4004745d,0x4004745d,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCGPGRP,0x540f,0x540f,0x40047477,0x40047477,0x40047477,0x40047477,0x40047477,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCGSID,0x5429,0x5429,0x40047463,0x40047463,0x40047463,0x40047463,0x40047463,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCGTSTAMP,0,0,0,0,0,0x4010745b,0x4010745b,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCPTMASTER,0,0,0,0,0x2000741c,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCPTSNAME,0,0,0,0,0,0,0x48087448,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCPTYGNAME,0,0,0x40807453,0x40807453,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCPTYGRANT,0,0,0x20007454,0x20007454,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCPTYUNLK,0,0,0x20007452,0x20007452,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCREMOTE,0,0,0x80047469,0x80047469,0,0x80047469,0x80047469,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSBRK,0x5427,0x5427,0x2000747b,0x2000747b,0x2000747b,0x2000747b,0x2000747b,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSDRAINWAIT,0,0,0x80047457,0x80047457,0x80047457,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSDTR,0,0,0x20007479,0x20007479,0x20007479,0x20007479,0x20007479,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSERGETLSR,0x5459,0x5459,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSERGETMULTI,0x545a,0x545a,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSERSETMULTI,0x545b,0x545b,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSER_TEMT,1,1,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,TIOCSETA,0x5402,0x5402,0x80487414,0x80487414,0x802c7414,0x802c7414,0x802c7414,0x5402

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,TIOCSETAF,0x5404,0x5404,0x80487416,0x80487416,0x802c7416,0x802c7416,0x802c7416,0x5402

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon compat,TIOCSETAW,0x5403,0x5403,0x80487415,0x80487415,0x802c7415,0x802c7415,0x802c7415,0x5403

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSETVERAUTH,0,0,0,0,0,0x8004741c,0x8004741c,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSFLAGS,0,0,0,0,0,0x8004745c,0x8004745c,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSTART,0x540A,0x540A,0x2000746e,0x2000746e,0x2000746e,0x2000746e,0x2000746e,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSTAT,0,0,0x20007465,0x20007465,0x20007465,0x20007465,0x20007465,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSTI,0x5412,0x5412,0x80017472,0x80017472,0x80017472,0,0,0
.syscon termios,TIOCSTI,0x5412,0x5412,0x80017472,0x80017472,0x80017472,0,0x80017472,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSTOP,0x540A,0x540A,0x2000746f,0x2000746f,0x2000746f,0x2000746f,0x2000746f,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCSTSTAMP,0,0,0,0,0,0x8008745a,0x8008745a,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCTIMESTAMP,0,0,0x40107459,0x40107459,0x40107459,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TIOCUCNTL_CBRK,0,0,0,0,0,0x7a,0x7a,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,TTYDISC,0,0,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,VERIFY,47,47,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,VT0,0b0000000000000000,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b000000000000000000,0,0,0b0000000000000000

View file

@ -0,0 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon termios,_POSIX_VDISABLE,0,0,255,255,255,255,255,0

View file

@ -1,9 +1,14 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_O_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_O_H_
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
#define O_ACCMODE 3
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const unsigned O_ACCMODE;
extern const unsigned O_APPEND;
extern const unsigned O_ASYNC;
extern const unsigned O_CLOEXEC;
@ -25,8 +30,6 @@ extern const unsigned O_NOFOLLOW_ANY;
extern const unsigned O_NONBLOCK;
extern const unsigned O_PATH;
extern const unsigned O_RANDOM;
extern const unsigned O_RDONLY;
extern const unsigned O_RDWR;
extern const unsigned O_RSYNC;
extern const unsigned O_SEARCH;
extern const unsigned O_SEQUENTIAL;
@ -37,15 +40,6 @@ extern const unsigned O_TMPFILE;
extern const unsigned O_TRUNC;
extern const unsigned O_TTY_INIT;
extern const unsigned O_VERIFY;
extern const unsigned O_WRONLY;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
#define O_ACCMODE 3
#define O_APPEND O_APPEND
#define O_ASYNC O_ASYNC
@ -89,4 +83,6 @@ COSMOPOLITAN_C_END_
#define __tmpcosmo_O_SYNC -282123817
#define __tmpcosmo_O_TRUNC 924355570
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_O_H_ */

View file

@ -13,7 +13,6 @@ extern const int TIOCPKT_NOSTOP;
extern const int TIOCPKT_START;
extern const int TIOCPKT_STOP;
extern const int TIOCSPTLCK;
extern const int PTMGET;
#define TIOCPKT_DATA 0x00
#define TIOCPKT_DOSTOP 0x01
@ -26,11 +25,9 @@ extern const int PTMGET;
#define TIOCPKT TIOCPKT
#define TIOCSPTLCK TIOCSPTLCK
#define PTMGET PTMGET
#define __tmpcosmo_TIOCPKT -1036987649
#define __tmpcosmo_TIOCSPTLCK 372918192
#define __tmpcosmo_PTMGET -2064878958
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

View file

@ -3,18 +3,16 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#define EXTA B19200
#define EXTB B38400
extern const int _POSIX_VDISABLE;
extern const uint32_t BRKINT;
extern const uint32_t BS0;
extern const uint32_t BS1;
extern const uint32_t BS2;
extern const uint32_t BSDLY;
extern const long BUSY;
extern const uint32_t CBAUD;
extern const uint32_t CBAUDEX;
extern const uint32_t CIBAUD;
extern const uint32_t CLOCAL;
extern const uint32_t CMSPAR;
extern const uint32_t CR0;
extern const uint32_t CR1;
extern const uint32_t CR2;
extern const uint32_t CR3;
@ -26,23 +24,17 @@ extern const uint32_t CS7;
extern const uint32_t CS8;
extern const uint32_t CSIZE;
extern const uint32_t CSTOPB;
extern const uint32_t ECHO;
extern const uint32_t ECHOCTL;
extern const uint32_t ECHOE;
extern const uint32_t ECHOK;
extern const uint32_t ECHOKE;
extern const uint32_t ECHONL;
extern const uint32_t ECHOPRT;
extern const long ENDRUNDISC;
extern const long EXTA;
extern const long EXTB;
extern const long EXTPROC;
extern const uint32_t FF0;
extern const uint32_t FF1;
extern const uint32_t FF2;
extern const uint32_t FFDLY;
extern const uint32_t FLUSHO;
extern const long H4DISC;
extern const uint32_t HUPCL;
extern const uint32_t ICANON;
extern const uint32_t ICRNL;
@ -60,13 +52,10 @@ extern const uint32_t IUTF8;
extern const uint32_t IXANY;
extern const uint32_t IXOFF;
extern const uint32_t IXON;
extern const long NETGRAPHDISC;
extern const uint32_t NL0;
extern const uint32_t NL1;
extern const uint32_t NL2;
extern const uint32_t NL3;
extern const uint32_t NLDLY;
extern const long NMEADISC;
extern const uint32_t NOFLSH;
extern const uint32_t OCRNL;
extern const uint32_t OFDEL;
@ -80,84 +69,35 @@ extern const uint32_t PARENB;
extern const uint32_t PARMRK;
extern const uint32_t PARODD;
extern const uint32_t PENDIN;
extern const long PPPDISC;
extern const long SLIPDISC;
extern const long STRIPDISC;
extern const uint32_t TAB0;
extern const uint32_t TAB1;
extern const uint32_t TAB2;
extern const uint32_t TAB3;
extern const uint32_t TABDLY;
extern const long TABLDISC;
extern const uint64_t TCFLSH;
extern const uint64_t TCGETS;
extern const int TCIFLUSH;
extern const int TCIOFF;
extern const int TCIOFLUSH;
extern const int TCION;
extern const int TCOFLUSH;
extern const int TCOOFF;
extern const int TCOON;
extern const int TCSADRAIN;
extern const int TCSAFLUSH;
extern const int TCSANOW;
extern const uint64_t TCSBRK;
extern const uint64_t TCSETS;
extern const uint64_t TCSETSF;
extern const uint64_t TCSETSW;
extern const uint64_t TCXONC;
extern const uint64_t TIOCCBRK;
extern const uint64_t TIOCCDTR;
extern const uint64_t TIOCCHKVERAUTH;
extern const uint64_t TIOCCONS;
extern const uint64_t TIOCEXT;
extern const uint64_t TIOCFLAG_CLOCAL;
extern const uint64_t TIOCFLAG_MDMBUF;
extern const uint64_t TIOCFLAG_PPS;
extern const uint64_t TIOCFLAG_SOFTCAR;
extern const uint64_t TIOCFLUSH;
extern const uint64_t TIOCGDRAINWAIT;
extern const uint64_t TIOCGETD;
extern const uint64_t TIOCGFLAGS;
extern const uint64_t TIOCGPGRP;
extern const uint64_t TIOCGPTN;
extern const uint64_t TIOCGSID;
extern const uint64_t TIOCGTSTAMP;
extern const uint64_t TIOCGWINSZ;
extern const uint64_t TIOCNOTTY;
extern const uint64_t TIOCNXCL;
extern const uint64_t TIOCOUTQ;
extern const uint64_t TIOCPTMASTER;
extern const uint64_t TIOCREMOTE;
extern const uint64_t TIOCSBRK;
extern const uint64_t TIOCSCTTY;
extern const uint64_t TIOCSDRAINWAIT;
extern const uint64_t TIOCSDTR;
extern const uint64_t TIOCSERGETLSR;
extern const uint64_t TIOCSERGETMULTI;
extern const uint64_t TIOCSERSETMULTI;
extern const uint64_t TIOCSER_TEMT;
extern const uint64_t TIOCSETD;
extern const uint64_t TIOCSETVERAUTH;
extern const uint64_t TIOCSFLAGS;
extern const uint64_t TIOCSIG;
extern const uint64_t TIOCSPGRP;
extern const uint64_t TIOCSTART;
extern const uint64_t TIOCSTAT;
extern const uint64_t TIOCSTI;
extern const uint64_t TIOCSTOP;
extern const uint64_t TIOCSTSTAMP;
extern const uint64_t TIOCSWINSZ;
extern const uint64_t TIOCTIMESTAMP;
extern const uint64_t TIOCUCNTL_CBRK;
extern const long TOSTOP;
extern const long TTYDISC;
extern const uint8_t VDISCARD;
extern const uint8_t VEOF;
extern const uint8_t VEOL2;
extern const uint8_t VEOL;
extern const uint8_t VERASE;
extern const long VERIFY;
extern const uint8_t VINTR;
extern const uint8_t VKILL;
extern const uint8_t VLNEXT;
@ -168,7 +108,6 @@ extern const uint8_t VSTART;
extern const uint8_t VSTOP;
extern const uint8_t VSUSP;
extern const uint8_t VSWTC;
extern const uint32_t VT0;
extern const uint32_t VT1;
extern const uint32_t VT2;
extern const uint32_t VTDLY;
@ -176,339 +115,230 @@ extern const uint8_t VTIME;
extern const uint8_t VWERASE;
extern const uint32_t XCASE;
extern const uint32_t XTABS;
extern const uint32_t CRTSCTS;
#define TCOOFF 0
#define TCOON 1
#define TCIOFF 2
#define TCION 3
#define BRKINT 0x02
#define ICRNL 0x0100
#define IGNBRK 0x01
#define IGNCR 0x80
#define IGNPAR 0x04
#define IMAXBEL 0x2000
#define INLCR 0x40
#define INPCK 0x10
#define ISTRIP 0x20
#define IXANY 0x0800
#define OPOST 0x01
#define PARMRK 0x08
#define _POSIX_VDISABLE _POSIX_VDISABLE
#define NLDLY NLDLY
#define NL0 0
#define NL1 NL1
#define NL2 NL2
#define NL3 NL3
#define CRDLY CRDLY
#define CR0 0
#define CR1 CR1
#define CR2 CR2
#define CR3 CR3
#define TABDLY TABDLY
#define TAB0 0
#define TAB1 TAB1
#define TAB2 TAB2
#define TAB3 TAB3
#define XTABS XTABS
#define CRTSCTS CRTSCTS
#define BSDLY BSDLY
#define BS0 0
#define BS1 BS1
#define BS2 BS2
#define VTDLY VTDLY
#define VT0 0
#define VT1 VT1
#define VT2 VT2
#define FFDLY FFDLY
#define FF0 0
#define FF1 FF1
#define FF2 FF2
#define CLOCAL CLOCAL
#define CREAD CREAD
#define CS5 CS5
#define CS6 CS6
#define CS7 CS7
#define CS8 CS8
#define CSIZE CSIZE
#define CSTOPB CSTOPB
#define ECHO 8
#define ECHOCTL ECHOCTL
#define ECHOE ECHOE
#define ECHOK ECHOK
#define ECHOKE ECHOKE
#define ECHONL ECHONL
#define ECHOPRT ECHOPRT
#define EXTPROC EXTPROC
#define FLUSHO FLUSHO
#define HUPCL HUPCL
#define ICANON ICANON
#define IEXTEN IEXTEN
#define ISIG ISIG
#define IUCLC IUCLC
#define IUTF8 IUTF8
#define IXOFF IXOFF
#define IXON IXON
#define NOFLSH NOFLSH
#define OCRNL OCRNL
#define OFDEL OFDEL
#define OFILL OFILL
#define OLCUC OLCUC
#define ONLCR ONLCR
#define ONLRET ONLRET
#define ONOCR ONOCR
#define PARENB PARENB
#define PARODD PARODD
#define PENDIN PENDIN
#define TCIFLUSH TCIFLUSH
#define TCIOFLUSH TCIOFLUSH
#define TCOFLUSH TCOFLUSH
#define TCSADRAIN 1
#define TCSAFLUSH 2
#define TCSANOW 0
#define TIOCCONS TIOCCONS
#define TIOCGETD TIOCGETD
#define TIOCGPTN TIOCGPTN
#define TIOCGWINSZ TIOCGWINSZ
#define TIOCNOTTY TIOCNOTTY
#define TIOCNXCL TIOCNXCL
#define TIOCOUTQ TIOCOUTQ
#define TIOCSCTTY TIOCSCTTY
#define TIOCSETD TIOCSETD
#define TIOCSIG TIOCSIG
#define TIOCSPGRP TIOCSPGRP
#define TIOCSTI TIOCSTI
#define TIOCSWINSZ TIOCSWINSZ
#define TOSTOP TOSTOP
#define VDISCARD VDISCARD
#define VEOF VEOF
#define VEOL VEOL
#define VEOL2 VEOL2
#define VERASE VERASE
#define VINTR VINTR
#define VKILL VKILL
#define VLNEXT VLNEXT
#define VMIN VMIN
#define VQUIT VQUIT
#define VREPRINT VREPRINT
#define VSTART VSTART
#define VSTOP VSTOP
#define VSUSP VSUSP
#define VSWTC VSWTC
#define VTIME VTIME
#define VWERASE VWERASE
#define XCASE XCASE
#define __tmpcosmo__POSIX_VDISABLE 169854768
#define __tmpcosmo_NLDLY 1319994273
#define __tmpcosmo_NL1 -70287396
#define __tmpcosmo_NL2 652191906
#define __tmpcosmo_NL3 1513394829
#define __tmpcosmo_CRDLY 2044628767
#define __tmpcosmo_CR1 1115673592
#define __tmpcosmo_CR2 1871515224
#define __tmpcosmo_CR3 -1010651809
#define __tmpcosmo_TABDLY -886090656
#define __tmpcosmo_TAB1 778986470
#define __tmpcosmo_TAB2 -382588940
#define __tmpcosmo_TAB3 -238740052
#define __tmpcosmo_XTABS 3851498
#define __tmpcosmo_CRTSCTS -1928718178
#define __tmpcosmo_BSDLY 1798324922
#define __tmpcosmo_BS1 -2123797836
#define __tmpcosmo_BS2 -354341079
#define __tmpcosmo_VTDLY -1916199946
#define __tmpcosmo_VT1 159615710
#define __tmpcosmo_VT2 -2135726260
#define __tmpcosmo_FFDLY 1018442558
#define __tmpcosmo_FF1 366192762
#define __tmpcosmo_FF2 1064173224
#define __tmpcosmo_CLOCAL 819516838
#define __tmpcosmo_CREAD -1620802775
#define __tmpcosmo_CS5 -909937503
#define __tmpcosmo_CS6 1486108550
#define __tmpcosmo_CS7 2070161332
#define __tmpcosmo_CS8 -894417336
#define __tmpcosmo_CSIZE -2142503038
#define __tmpcosmo_CSTOPB -1893740371
#define __tmpcosmo_ECHOCTL 1839844219
#define __tmpcosmo_ECHOE -462490559
#define __tmpcosmo_ECHOK 2582183
#define __tmpcosmo_ECHOKE 1807548346
#define __tmpcosmo_ECHONL -1627629800
#define __tmpcosmo_ECHOPRT 789779244
#define __tmpcosmo_EXTPROC 1954282515
#define __tmpcosmo_FLUSHO -1439777831
#define __tmpcosmo_HUPCL -1762956935
#define __tmpcosmo_ICANON 1391597225
#define __tmpcosmo_IEXTEN -2017256995
#define __tmpcosmo_ISIG 1460108174
#define __tmpcosmo_IUCLC 1013808696
#define __tmpcosmo_IUTF8 1988433768
#define __tmpcosmo_IXOFF -206825490
#define __tmpcosmo_IXON -1157774462
#define __tmpcosmo_NOFLSH -1818319598
#define __tmpcosmo_OCRNL -1553778506
#define __tmpcosmo_OFDEL 424931285
#define __tmpcosmo_OFILL -414167674
#define __tmpcosmo_OLCUC 2114383293
#define __tmpcosmo_ONLCR -1154324374
#define __tmpcosmo_ONLRET -639724866
#define __tmpcosmo_ONOCR -490882729
#define __tmpcosmo_PARENB -1774689151
#define __tmpcosmo_PARODD -404286749
#define __tmpcosmo_PENDIN -619915085
#define __tmpcosmo_TCIFLUSH 1056759293
#define __tmpcosmo_TCIOFLUSH -342999896
#define __tmpcosmo_TCOFLUSH 659539281
#define __tmpcosmo_TIOCCONS 1455144588
#define __tmpcosmo_TIOCGETD 470897144
#define __tmpcosmo_TIOCGPTN 67701595
#define __tmpcosmo_TIOCGWINSZ 965491756
#define __tmpcosmo_TIOCNOTTY 1073131930
#define __tmpcosmo_TIOCNXCL 1210582499
#define __tmpcosmo_TIOCOUTQ 1063967309
#define __tmpcosmo_TIOCSCTTY -1994241678
#define __tmpcosmo_TIOCSETD -860412918
#define __tmpcosmo_TIOCSIG 975589334
#define __tmpcosmo_TIOCSPGRP -1362234385
#define __tmpcosmo_TIOCSTI 1704247727
#define __tmpcosmo_TIOCSWINSZ -273178782
#define __tmpcosmo_TOSTOP 1907739786
#define __tmpcosmo_VDISCARD 1773966586
#define __tmpcosmo_VEOF 1992016613
#define __tmpcosmo_VEOL 1926565027
#define __tmpcosmo_VEOL2 -1297272191
#define __tmpcosmo_VERASE 864859287
#define __tmpcosmo_VINTR -973181253
#define __tmpcosmo_VKILL 1764217477
#define __tmpcosmo_VLNEXT -1045308606
#define __tmpcosmo_VMIN 1479455781
#define __tmpcosmo_VQUIT 853995221
#define __tmpcosmo_VREPRINT 868062415
#define __tmpcosmo_VSTART -245321985
#define __tmpcosmo_VSTOP -1379951528
#define __tmpcosmo_VSUSP -1054959499
#define __tmpcosmo_VSWTC 1631975394
#define __tmpcosmo_VTIME -942478376
#define __tmpcosmo_VWERASE -908507167
#define __tmpcosmo_XCASE -34176757
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#define BRKINT 0x02
#define ICRNL 0x0100
#define IGNBRK 0x01
#define IGNCR 0x80
#define IGNPAR 0x04
#define IMAXBEL 0x2000
#define INLCR 0x40
#define INPCK 0x10
#define ISTRIP 0x20
#define IXANY 0x0800
#define OPOST 0x01
#define PARMRK 0x08
#define TIOCSTOP TIOCSTOP
#define NLDLY NLDLY
#define NL0 0
#define NL1 NL1
#define NL2 NL2
#define NL3 NL3
#define CRDLY CRDLY
#define CR0 0
#define CR1 CR1
#define CR2 CR2
#define CR3 CR3
#define TABDLY TABDLY
#define TAB0 0
#define TAB1 TAB1
#define TAB2 TAB2
#define TAB3 TAB3
#define XTABS XTABS
#define BSDLY BSDLY
#define BS0 0
#define BS1 BS1
#define BS2 BS2
#define VTDLY VTDLY
#define VT0 0
#define VT1 VT1
#define VT2 VT2
#define FFDLY FFDLY
#define FF0 0
#define FF1 FF1
#define FF2 FF2
#define BUSY BUSY
#define CBAUD CBAUD
#define CBAUDEX CBAUDEX
#define CIBAUD CIBAUD
#define CLOCAL CLOCAL
#define CMSPAR CMSPAR
#define CREAD CREAD
#define CS5 CS5
#define CS6 CS6
#define CS7 CS7
#define CS8 CS8
#define CSIZE CSIZE
#define CSTOPB CSTOPB
#define ECHO 8
#define ECHOCTL ECHOCTL
#define ECHOE ECHOE
#define ECHOK ECHOK
#define ECHOKE ECHOKE
#define ECHONL ECHONL
#define ECHOPRT ECHOPRT
#define ENDRUNDISC ENDRUNDISC
#define EXTA EXTA
#define EXTB EXTB
#define EXTPROC EXTPROC
#define FLUSHO FLUSHO
#define H4DISC H4DISC
#define HUPCL HUPCL
#define ICANON ICANON
#define IEXTEN IEXTEN
#define ISIG ISIG
#define IUCLC IUCLC
#define IUTF8 IUTF8
#define IXOFF IXOFF
#define IXON IXON
#define NCCS 20
#define NETGRAPHDISC NETGRAPHDISC
#define NMEADISC NMEADISC
#define NOFLSH NOFLSH
#define OCRNL OCRNL
#define OFDEL OFDEL
#define OFILL OFILL
#define OLCUC OLCUC
#define ONLCR ONLCR
#define ONLRET ONLRET
#define ONOCR ONOCR
#define PARENB PARENB
#define PARODD PARODD
#define PENDIN PENDIN
#define PPPDISC PPPDISC
#define SLIPDISC SLIPDISC
#define STRIPDISC STRIPDISC
#define TABLDISC TABLDISC
#define TCFLSH TCFLSH
#define TCGETS TCGETS
#define TCIFLUSH TCIFLUSH
#define TCIOFF TCIOFF
#define TCIOFLUSH TCIOFLUSH
#define TCION TCION
#define TCOFLUSH TCOFLUSH
#define TCOOFF TCOOFF
#define TCOON TCOON
#define TCSADRAIN 1
#define TCSAFLUSH 2
#define TCSANOW 0
#define TCSBRK TCSBRK
#define TCSETS TCSETS
#define TCSETSF TCSETSF
#define TCSETSW TCSETSW
#define TCXONC TCXONC
#define TIOCCBRK TIOCCBRK
#define TIOCCDTR TIOCCDTR
#define TIOCCHKVERAUTH TIOCCHKVERAUTH
#define TIOCCONS TIOCCONS
#define TIOCEXT TIOCEXT
#define TIOCFLAG_CLOCAL TIOCFLAG_CLOCAL
#define TIOCFLAG_MDMBUF TIOCFLAG_MDMBUF
#define TIOCFLAG_PPS TIOCFLAG_PPS
#define TIOCFLAG_SOFTCAR TIOCFLAG_SOFTCAR
#define TIOCFLUSH TIOCFLUSH
#define TIOCGDRAINWAIT TIOCGDRAINWAIT
#define TIOCGETD TIOCGETD
#define TIOCGFLAGS TIOCGFLAGS
#define TIOCGPGRP TIOCGPGRP
#define TIOCGPTN TIOCGPTN
#define TIOCGSID TIOCGSID
#define TIOCGTSTAMP TIOCGTSTAMP
#define TIOCGWINSZ TIOCGWINSZ
#define TIOCNOTTY TIOCNOTTY
#define TIOCNXCL TIOCNXCL
#define TIOCOUTQ TIOCOUTQ
#define TIOCPTMASTER TIOCPTMASTER
#define TIOCREMOTE TIOCREMOTE
#define TIOCSBRK TIOCSBRK
#define TIOCSCTTY TIOCSCTTY
#define TIOCSDRAINWAIT TIOCSDRAINWAIT
#define TIOCSDTR TIOCSDTR
#define TIOCSERGETLSR TIOCSERGETLSR
#define TIOCSERGETMULTI TIOCSERGETMULTI
#define TIOCSERSETMULTI TIOCSERSETMULTI
#define TIOCSER_TEMT TIOCSER_TEMT
#define TIOCSETD TIOCSETD
#define TIOCSETVERAUTH TIOCSETVERAUTH
#define TIOCSFLAGS TIOCSFLAGS
#define TIOCSIG TIOCSIG
#define TIOCSPGRP TIOCSPGRP
#define TIOCSTART TIOCSTART
#define TIOCSTAT TIOCSTAT
#define TIOCSTI TIOCSTI
#define TIOCSTSTAMP TIOCSTSTAMP
#define TIOCSWINSZ TIOCSWINSZ
#define TIOCTIMESTAMP TIOCTIMESTAMP
#define TIOCUCNTL_CBRK TIOCUCNTL_CBRK
#define TOSTOP TOSTOP
#define TTYDISC TTYDISC
#define VDISCARD VDISCARD
#define VEOF VEOF
#define VEOL VEOL
#define VEOL2 VEOL2
#define VERASE VERASE
#define VERIFY VERIFY
#define VINTR VINTR
#define VKILL VKILL
#define VLNEXT VLNEXT
#define VMIN VMIN
#define VQUIT VQUIT
#define VREPRINT VREPRINT
#define VSTART VSTART
#define VSTOP VSTOP
#define VSUSP VSUSP
#define VSWTC VSWTC
#define VTIME VTIME
#define VWERASE VWERASE
#define XCASE XCASE
#define __tmpcosmo_TIOCSTOP -1017191481
#define __tmpcosmo_NLDLY 1319994273
#define __tmpcosmo_NL1 -70287396
#define __tmpcosmo_NL2 652191906
#define __tmpcosmo_NL3 1513394829
#define __tmpcosmo_CRDLY 2044628767
#define __tmpcosmo_CR1 1115673592
#define __tmpcosmo_CR2 1871515224
#define __tmpcosmo_CR3 -1010651809
#define __tmpcosmo_TABDLY -886090656
#define __tmpcosmo_TAB1 778986470
#define __tmpcosmo_TAB2 -382588940
#define __tmpcosmo_TAB3 -238740052
#define __tmpcosmo_XTABS 3851498
#define __tmpcosmo_BSDLY 1798324922
#define __tmpcosmo_BS1 -2123797836
#define __tmpcosmo_BS2 -354341079
#define __tmpcosmo_VTDLY -1916199946
#define __tmpcosmo_VT1 159615710
#define __tmpcosmo_VT2 -2135726260
#define __tmpcosmo_FFDLY 1018442558
#define __tmpcosmo_FF1 366192762
#define __tmpcosmo_FF2 1064173224
#define __tmpcosmo_BUSY 1091122196
#define __tmpcosmo_CBAUD 621840898
#define __tmpcosmo_CBAUDEX 1684865431
#define __tmpcosmo_CIBAUD 232332978
#define __tmpcosmo_CLOCAL 819516838
#define __tmpcosmo_CMSPAR -1110572378
#define __tmpcosmo_CREAD -1620802775
#define __tmpcosmo_CS5 -909937503
#define __tmpcosmo_CS6 1486108550
#define __tmpcosmo_CS7 2070161332
#define __tmpcosmo_CS8 -894417336
#define __tmpcosmo_CSIZE -2142503038
#define __tmpcosmo_CSTOPB -1893740371
#define __tmpcosmo_ECHOCTL 1839844219
#define __tmpcosmo_ECHOE -462490559
#define __tmpcosmo_ECHOK 2582183
#define __tmpcosmo_ECHOKE 1807548346
#define __tmpcosmo_ECHONL -1627629800
#define __tmpcosmo_ECHOPRT 789779244
#define __tmpcosmo_ENDRUNDISC 890493373
#define __tmpcosmo_EXTA -1952310979
#define __tmpcosmo_EXTB -1924899818
#define __tmpcosmo_EXTPROC 1954282515
#define __tmpcosmo_FLUSHO -1439777831
#define __tmpcosmo_H4DISC -383446731
#define __tmpcosmo_HUPCL -1762956935
#define __tmpcosmo_ICANON 1391597225
#define __tmpcosmo_IEXTEN -2017256995
#define __tmpcosmo_ISIG 1460108174
#define __tmpcosmo_IUCLC 1013808696
#define __tmpcosmo_IUTF8 1988433768
#define __tmpcosmo_IXOFF -206825490
#define __tmpcosmo_IXON -1157774462
#define __tmpcosmo_NETGRAPHDISC -99256515
#define __tmpcosmo_NMEADISC -74984305
#define __tmpcosmo_NOFLSH -1818319598
#define __tmpcosmo_OCRNL -1553778506
#define __tmpcosmo_OFDEL 424931285
#define __tmpcosmo_OFILL -414167674
#define __tmpcosmo_OLCUC 2114383293
#define __tmpcosmo_ONLCR -1154324374
#define __tmpcosmo_ONLRET -639724866
#define __tmpcosmo_ONOCR -490882729
#define __tmpcosmo_PARENB -1774689151
#define __tmpcosmo_PARODD -404286749
#define __tmpcosmo_PENDIN -619915085
#define __tmpcosmo_PPPDISC -1392399884
#define __tmpcosmo_SLIPDISC -183947027
#define __tmpcosmo_STRIPDISC 2025122243
#define __tmpcosmo_TABLDISC -1858378918
#define __tmpcosmo_TCFLSH -243453721
#define __tmpcosmo_TCGETS -916893397
#define __tmpcosmo_TCIFLUSH 1056759293
#define __tmpcosmo_TCIOFF -737116690
#define __tmpcosmo_TCIOFLUSH -342999896
#define __tmpcosmo_TCION 520326151
#define __tmpcosmo_TCOFLUSH 659539281
#define __tmpcosmo_TCOOFF 478400994
#define __tmpcosmo_TCOON 1521058272
#define __tmpcosmo_TCSBRK 1276777613
#define __tmpcosmo_TCSETS 535983615
#define __tmpcosmo_TCSETSF 659034961
#define __tmpcosmo_TCSETSW 1654950622
#define __tmpcosmo_TCXONC -647714748
#define __tmpcosmo_TIOCCBRK 1839061556
#define __tmpcosmo_TIOCCDTR -752068369
#define __tmpcosmo_TIOCCHKVERAUTH -1183922440
#define __tmpcosmo_TIOCCONS 1455144588
#define __tmpcosmo_TIOCEXT 186515040
#define __tmpcosmo_TIOCFLAG_CLOCAL 698005770
#define __tmpcosmo_TIOCFLAG_MDMBUF 1422045049
#define __tmpcosmo_TIOCFLAG_PPS -620931778
#define __tmpcosmo_TIOCFLAG_SOFTCAR -140438205
#define __tmpcosmo_TIOCFLUSH 516222339
#define __tmpcosmo_TIOCGDRAINWAIT -842950172
#define __tmpcosmo_TIOCGETD 470897144
#define __tmpcosmo_TIOCGFLAGS 713359628
#define __tmpcosmo_TIOCGPGRP 1020495911
#define __tmpcosmo_TIOCGPTN 67701595
#define __tmpcosmo_TIOCGSID -1924582947
#define __tmpcosmo_TIOCGTSTAMP 1116108087
#define __tmpcosmo_TIOCGWINSZ 965491756
#define __tmpcosmo_TIOCNOTTY 1073131930
#define __tmpcosmo_TIOCNXCL 1210582499
#define __tmpcosmo_TIOCOUTQ 1063967309
#define __tmpcosmo_TIOCPTMASTER -1722245149
#define __tmpcosmo_TIOCREMOTE -478898903
#define __tmpcosmo_TIOCSBRK -1827728950
#define __tmpcosmo_TIOCSCTTY -1994241678
#define __tmpcosmo_TIOCSDRAINWAIT 2088849044
#define __tmpcosmo_TIOCSDTR -1218831027
#define __tmpcosmo_TIOCSERGETLSR -196763909
#define __tmpcosmo_TIOCSERGETMULTI -1904826952
#define __tmpcosmo_TIOCSERSETMULTI -2096909859
#define __tmpcosmo_TIOCSER_TEMT 762771473
#define __tmpcosmo_TIOCSETD -860412918
#define __tmpcosmo_TIOCSETVERAUTH -1550886356
#define __tmpcosmo_TIOCSFLAGS 1899558086
#define __tmpcosmo_TIOCSIG 975589334
#define __tmpcosmo_TIOCSPGRP -1362234385
#define __tmpcosmo_TIOCSTART -1106632595
#define __tmpcosmo_TIOCSTAT -1240783913
#define __tmpcosmo_TIOCSTI 1704247727
#define __tmpcosmo_TIOCSTSTAMP 290377566
#define __tmpcosmo_TIOCSWINSZ -273178782
#define __tmpcosmo_TIOCTIMESTAMP -167408548
#define __tmpcosmo_TIOCUCNTL_CBRK -1260429107
#define __tmpcosmo_TOSTOP 1907739786
#define __tmpcosmo_TTYDISC -1450700552
#define __tmpcosmo_VDISCARD 1773966586
#define __tmpcosmo_VEOF 1992016613
#define __tmpcosmo_VEOL 1926565027
#define __tmpcosmo_VEOL2 -1297272191
#define __tmpcosmo_VERASE 864859287
#define __tmpcosmo_VERIFY 1512705907
#define __tmpcosmo_VINTR -973181253
#define __tmpcosmo_VKILL 1764217477
#define __tmpcosmo_VLNEXT -1045308606
#define __tmpcosmo_VMIN 1479455781
#define __tmpcosmo_VQUIT 853995221
#define __tmpcosmo_VREPRINT 868062415
#define __tmpcosmo_VSTART -245321985
#define __tmpcosmo_VSTOP -1379951528
#define __tmpcosmo_VSUSP -1054959499
#define __tmpcosmo_VSWTC 1631975394
#define __tmpcosmo_VTIME -942478376
#define __tmpcosmo_VWERASE -908507167
#define __tmpcosmo_XCASE -34176757
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_TERMIOS_H_ */