diff options
author | H. Peter Anvin <hpa@zytor.com> | 2025-04-25 07:30:59 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-04-25 07:30:59 +0200 |
commit | e04afb71771710cdc6025fe95908f5f17de7b72d (patch) | |
tree | 6d946c259f6d5a4a341a18f46c2140e75ef695e5 /sysdeps/unix/sysv | |
parent | e78caeb4ff812ae19d24d65f4d4d48508154277b (diff) | |
download | glibc-e04afb71771710cdc6025fe95908f5f17de7b72d.zip glibc-e04afb71771710cdc6025fe95908f5f17de7b72d.tar.gz glibc-e04afb71771710cdc6025fe95908f5f17de7b72d.tar.bz2 |
linux/termio: remove <termio.h> and struct termio
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.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/ioctl-types.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/termio.h | 6 |
5 files changed, 0 insertions, 46 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index dcd87b2..ebcf820 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -506,12 +506,6 @@ sysdep_headers += \ # sysdep_headers endif -ifeq ($(subdir),termios) -sysdep_headers += \ - termio.h \ - # sysdep_headers -endif - ifeq ($(subdir),posix) sysdep_headers += \ bits/initspin.h \ diff --git a/sysdeps/unix/sysv/linux/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/bits/ioctl-types.h index cc2c9d7..e8e5084 100644 --- a/sysdeps/unix/sysv/linux/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/bits/ioctl-types.h @@ -32,17 +32,6 @@ struct winsize unsigned short int ws_ypixel; }; -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - /* modem lines */ #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h index 03ebf1e..84bb6fc 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h @@ -31,18 +31,6 @@ struct winsize unsigned short int ws_ypixel; }; -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - char c_line; /* line discipline */ - /* Yes, this is really NCCS. */ - unsigned char c_cc[32 /* NCCS */]; /* control characters */ - }; - /* modem lines */ #define TIOCM_LE 0x001 /* line enable */ #define TIOCM_DTR 0x002 /* data terminal ready */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h index f2b360c..267fa09 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h @@ -32,17 +32,6 @@ struct winsize unsigned short int ws_ypixel; }; -#define NCC 10 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - /* modem lines */ #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 diff --git a/sysdeps/unix/sysv/linux/termio.h b/sysdeps/unix/sysv/linux/termio.h deleted file mode 100644 index 0e610f0..0000000 --- a/sysdeps/unix/sysv/linux/termio.h +++ /dev/null @@ -1,6 +0,0 @@ -/* Compatible <termio.h> for old `struct termio' ioctl interface. - This is obsolete; use the POSIX.1 `struct termios' interface - defined in <termios.h> instead. */ - -#include <termios.h> -#include <sys/ioctl.h> |