[PATCH v3] linux/termio: remove <termio.h> and struct termio
H. Peter Anvin
hpa@zytor.com
Tue Apr 15 22:49:11 GMT 2025
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(+)
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.
--
2.49.0
More information about the Libc-alpha
mailing list