[v3] linux/termio: remove <termio.h> and struct termio

Message ID 20250415224912.1685383-1-hpa@zytor.com (mailing list archive)
State Committed
Headers
Series [v3] linux/termio: remove <termio.h> and struct termio |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Test passed

Commit Message

H. Peter Anvin April 15, 2025, 10:49 p.m. UTC
  The <termio.h> interface is absolutely ancient: it was obsoleted by
<termios.h> already in the first version of POSIX (1988) and thus
predates the very first version of Linux. Unfortunately, some constant
macros are used both by <termio.h> and <termios.h>; particularly
problematic is the baud rate constants since the termio interface
*requires* that the baud rate is set via an enumeration as part of
c_cflag.

In preparation of revamping the termios interface to support the
arbitrary baud rate capability that the Linux kernel has supported
since 2008, remove <termio.h> in the hope that no one still uses this
archaic interface.

Note that there is no actual code in glibc to support termio: it is
purely an unabstracted ioctl() interface.

[ v3: rebase onto current master ceeffd970c56893885cbf8382ae34b015f177850 ]
[ v2: remove separate struct termio definitions for mips and sparc ]

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
 NEWS | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/NEWS b/NEWS
index 740225ad1294..df7268e5d0af 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,11 @@  Deprecated and removed features, and other changes affecting compatibility:
   programs that require an executable stack through dynamic loaded
   shared libraries.
 
+* On Linux, the <termio.h> header and the definition of struct termio
+  in <sys/ioctl.h> have been removed. The termio interface has been
+  obsolete since the very first version of POSIX.1 in 1988, replaced
+  with <termios.h>.
+
 Changes to build and runtime requirements:
 
 * GCC 12.1 or later is now required to build the GNU C Library.