[RFC PATCH v2 8/8] hurd/termios: remove USE_OLD_TTY

H. Peter Anvin hpa@zytor.com
Sat Apr 26 02:55:38 GMT 2025


Hurd with USE_OLD_TTY was the only remaining platform with speed_t not
containing a proper baud rate. From the looks of it, that code has
long since bitrotted.

Remove the vestiges of USE_OLD_TTY.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
 sysdeps/mach/hurd/bits/ioctls.h | 32 ++------------------------------
 termios/baud.c                  |  4 ----
 termios/cfsetbaud.c             |  4 ----
 termios/sys/ttychars.h          |  4 ----
 4 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
index f01316dbc603..594b186990e0 100644
--- a/sysdeps/mach/hurd/bits/ioctls.h
+++ b/sysdeps/mach/hurd/bits/ioctls.h
@@ -324,15 +324,8 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
    From 4.4 <sys/ioctl_compat.h>.  */
 
 #ifdef __USE_MISC
-#ifdef USE_OLD_TTY
-# undef  TIOCGETD
-# define TIOCGETD	_IOR('t', 0, int)	/* get line discipline */
-# undef  TIOCSETD
-# define TIOCSETD	_IOW('t', 1, int)	/* set line discipline */
-#else
-# define OTIOCGETD	_IOR('t', 0, int)	/* get line discipline */
-# define OTIOCSETD	_IOW('t', 1, int)	/* set line discipline */
-#endif
+#define OTIOCGETD	_IOR('t', 0, int)	/* get line discipline */
+#define OTIOCSETD	_IOW('t', 1, int)	/* set line discipline */
 #define	TIOCHPCL	_IO('t', 2)		/* hang up on last close */
 #define	TIOCGETP	_IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
 #define	TIOCSETP	_IOW('t', 9,struct sgttyb)/* set parameters -- stty */
@@ -412,25 +405,4 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
 #define	NETLDISC	1
 #define	NTTYDISC	2
 
-/* From 4.4 <sys/ttydev.h>.   */
-#ifdef USE_OLD_TTY
-# define B0	0
-# define B50	1
-# define B75	2
-# define B110	3
-# define B134	4
-# define B150	5
-# define B200	6
-# define B300	7
-# define B600	8
-# define B1200	9
-# define B1800	10
-# define B2400	11
-# define B4800	12
-# define B9600	13
-# define EXTA	14
-# define EXTB	15
-#endif /* USE_OLD_TTY */
-#endif
-
 #endif /* bits/ioctls.h */
diff --git a/termios/baud.c b/termios/baud.c
index 2e14e6c3c4ff..27c06e937fdb 100644
--- a/termios/baud.c
+++ b/termios/baud.c
@@ -23,10 +23,6 @@
 #include <errno.h>
 #include <termios.h>
 
-#ifdef USE_OLD_TTY
-#error "USE_OLD_TTY is not supported - does anyone actually care?"
-#endif
-
 baud_t
 __cfgetobaud (const struct termios *termios_p)
 {
diff --git a/termios/cfsetbaud.c b/termios/cfsetbaud.c
index 0b2991409d0e..b76b51e4dd77 100644
--- a/termios/cfsetbaud.c
+++ b/termios/cfsetbaud.c
@@ -19,10 +19,6 @@
 #include <errno.h>
 #include <stddef.h>
 
-#ifdef USE_OLD_TTY
-#error "USE_OLD_TTY is not supported - does anyone actually care?"
-#endif
-
 /* Set both the input and output baud rates stored in *TERMIOS_P to BAUD.  */
 int
 __cfsetbaud (struct termios *termios_p, baud_t baud)
diff --git a/termios/sys/ttychars.h b/termios/sys/ttychars.h
index 7043f60f81d2..eb1a815b60b8 100644
--- a/termios/sys/ttychars.h
+++ b/termios/sys/ttychars.h
@@ -54,8 +54,4 @@ struct ttychars {
 	char	tc_lnextc;	/* literal next character */
 };
 
-#ifdef __USE_OLD_TTY
-#include <sys/ttydefaults.h>	/* to pick up character defaults */
-#endif
-
 #endif /* sys/ttychars.h */
-- 
2.49.0



More information about the Libc-alpha mailing list