From 419c45593b5f109ae01ada73f237cbb173c67695 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 1 Apr 1987 15:37:14 +0000 Subject: [PATCH] corrected for 4.2 bsd --- include/_tail_cc/sgtty.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/_tail_cc/sgtty.h b/include/_tail_cc/sgtty.h index 7a0056a2..22275e36 100644 --- a/include/_tail_cc/sgtty.h +++ b/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