kitty/tools/tty
Marcel van der Boom 0853019e59 tty: take the TCSETS ioctl numbers from x/sys/unix
The hard-coded 0x5402/0x5403/0x5404 are the x86 (generic) values. On
powerpc TCSETS, TCSETSW and TCSETSF are 0x802c7414..6, so Tcsetattr
failed with ENOTTY and every kitten that sets terminal modes exited
at once: on ppc64le the paste confirmation (kitten ask) only flickered
and the paste was dropped. x/sys/unix defines the right value per
architecture, as already used for TCGETS in Tcgetattr and for
TIOCSETA* in tty_bsd.go. Drop the rest of the constant block too:
copied from pkg/term, unused, and also x86-only.

Verified on ppc64le: kitten ask under script(1) failed with
"inappropriate ioctl for device" (strace: ioctl 0x5402 = -ENOTTY);
with this change the TCSETS ioctl succeeds and the prompt runs.
2026-11-03 11:03:09 +01:00
..
tty.go Use SIMD base64 everywhere 2026-04-21 11:56:55 +05:30
tty_bsd.go
tty_linux.go tty: take the TCSETS ioctl numbers from x/sys/unix 2026-11-03 11:03:09 +01:00