Browse Source

corrected for 4.2 bsd

ceriel 37 years ago
parent
commit
419c45593b
1 changed files with 8 additions and 2 deletions
  1. 8 2
      include/_tail_cc/sgtty.h

+ 8 - 2
include/_tail_cc/sgtty.h

@@ -1,6 +1,4 @@
 #ifdef __CHANNEL__
-#define	TIOCGETP	(('t'<<8)|8)
-#define	TIOCSETN	(('t'<<8)|10)
 struct sgttyb {
 	char	sg_ispeed;
 	char	sg_ospeed;
@@ -9,6 +7,14 @@ struct sgttyb {
 	short	sg_flags;
 };
 
+#ifdef __BSD4_2
+#define	TIOCGETP	((('t'<<8)|8)|(sizeof(struct sgttyb)<<16))
+#define	TIOCSETN	((('t'<<8)|10)|(sizeof(struct sgttyb)<<16))
+#else
+#define	TIOCGETP	(('t'<<8)|8)
+#define	TIOCSETN	(('t'<<8)|10)
+#endif
+
 #define	CBREAK	02
 #define	ECHO	010
 #define	CRMOD	020