[PATCH 06/13] hurd/termios: remove USE_OLD_TTY

H. Peter Anvin hpa@zytor.com
Tue Jun 3 00:03:05 GMT 2025


From: "H. Peter Anvin" (Intel) <hpa@zytor.com>

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.

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
 sysdeps/mach/hurd/bits/ioctls.h | 31 ++-----------------------------
 termios/sys/ttychars.h          |  4 ----
 2 files changed, 2 insertions(+), 33 deletions(-)

diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
index f01316dbc603..faf1373dbf32 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 */
@@ -411,26 +404,6 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
 #define	OTTYDISC	0
 #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/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