]> git.ipfire.org Git - thirdparty/glibc.git/commit
Linux: Keep termios ioctl constants strictly internal
authorFlorian Weimer <fweimer@redhat.com>
Fri, 11 Jul 2025 14:04:07 +0000 (16:04 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 11 Jul 2025 14:04:07 +0000 (16:04 +0200)
commit3d3572f59059e2b19b8541ea648a6172136ec42e
tree59beaca069f8cb8cd1f4cc0284a3bc6209d9b02e
parent02e7ac5ee3c6d2ef20c024ea7c243d0ae8496608
Linux: Keep termios ioctl constants strictly internal

Undefine TCGETS, TCGETS2, and related ioctl constants in the installed
headers.  Extract the correct constants (using the kernel type
definitions) automatically from the UAPI headers.  The kernel
constants are available under KERNEL_* names during the glibc build,
computed using assembler constant extraction mechanism.

Alpha may have to use TCGETS instead of TCGETS2 because TCTGETS2
became available in Linux 4.20 only.  Introduce ARCH_TCGETS to make
this choice explict.

To support emulation on powerpc, glibc versions of the termios
constants are added to the emulation code in internal-ioctl.h.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
18 files changed:
NEWS
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/alpha/bits/ioctls.h [deleted file]
sysdeps/unix/sysv/linux/alpha/termios_arch.h [deleted file]
sysdeps/unix/sysv/linux/bits/ioctls.h
sysdeps/unix/sysv/linux/hppa/bits/ioctls.h [deleted file]
sysdeps/unix/sysv/linux/isatty.c
sysdeps/unix/sysv/linux/isatty_nostatus.c
sysdeps/unix/sysv/linux/mips/old_termios.h [moved from sysdeps/unix/sysv/linux/mips/termios_arch.h with 62% similarity]
sysdeps/unix/sysv/linux/powerpc/internal-ioctl.h
sysdeps/unix/sysv/linux/powerpc/termios_arch.h [deleted file]
sysdeps/unix/sysv/linux/sparc/bits/ioctls.h [deleted file]
sysdeps/unix/sysv/linux/sparc/old_termios.h [moved from sysdeps/unix/sysv/linux/sparc/termios_arch.h with 62% similarity]
sysdeps/unix/sysv/linux/tcgetattr.c
sysdeps/unix/sysv/linux/tcsetattr.c
sysdeps/unix/sysv/linux/termios-kernel-consts.sym [new file with mode: 0644]
sysdeps/unix/sysv/linux/termios_arch.h [deleted file]
sysdeps/unix/sysv/linux/termios_internals.h