diff options
author | miwi <miwi@FreeBSD.org> | 2007-04-15 19:07:22 +0000 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-04-15 19:07:22 +0000 |
commit | b1111d6ea77d81b5362ab19dd40dd6396e26bca6 (patch) | |
tree | b5452d4aa5fc855a5412954b4d5df6df363b111c /mail/metamail | |
parent | 1d48ff2e7c24d20abacbc7bb969ced7775e9a937 (diff) | |
download | FreeBSD-ports-b1111d6ea77d81b5362ab19dd40dd6396e26bca6.zip FreeBSD-ports-b1111d6ea77d81b5362ab19dd40dd6396e26bca6.tar.gz |
- USE termios.h
PR: 110435
Submitted by: Ed Schouten <ed@fxq.nl>
Approved by: maintainer
Diffstat (limited to 'mail/metamail')
-rw-r--r-- | mail/metamail/files/patch-metamail_metamail.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mail/metamail/files/patch-metamail_metamail.c b/mail/metamail/files/patch-metamail_metamail.c index 0f3c728..b03ae1b 100644 --- a/mail/metamail/files/patch-metamail_metamail.c +++ b/mail/metamail/files/patch-metamail_metamail.c @@ -9,6 +9,17 @@ #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> +@@ -46,8 +48,8 @@ + #include <signal.h> + + #ifndef AMIGA +-#ifdef SYSV +-#include <termio.h> ++#if 1 ++#include <termios.h> + #include <unistd.h> + #else /* SYSV */ + #include <sgtty.h> @@ -83,7 +85,7 @@ #define MAX_FILE_NAME_SIZE 256 #define WRITE_BINARY "w" @@ -116,3 +127,34 @@ } else { /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ MkTmpFileName(TmpFile); +@@ -2375,8 +2387,8 @@ + + int HasSavedTtyState=0; + #if !defined(AMIGA) && !defined(MSDOS) +-#ifdef SYSV +-static struct termio MyTtyStateIn, MyTtyStateOut; ++#if 1 ++static struct termios MyTtyStateIn, MyTtyStateOut; + #else + static struct sgttyb MyTtyStateIn, MyTtyStateOut; + #endif +@@ -2681,15 +2693,15 @@ + + StartRawStdin() { + #if !defined(AMIGA) && !defined(MSDOS) +-#ifdef SYSV +- struct termio orterm, fterm; +- ioctl(0, TCGETA, &orterm); /* get current (i.e. cooked) termio */ ++#if 1 ++ struct termios orterm, fterm; ++ tcgetattr(0, &orterm); + fterm = orterm; /* get termio to modify */ + + fterm.c_lflag &= ~ICANON; /* clear ICANON giving raw mode */ + fterm.c_cc[VMIN] = 1; /* set MIN char count to 1 */ + fterm.c_cc[VTIME] = 0; /* set NO time limit */ +- return ioctl(0, TCSETAW, &fterm); /* modify termio for raw mode */ ++ return tcsetattr(0, TCSANOW, &fterm); /* modify termio for raw mode */ + #else + struct sgttyb ts; + gtty(fileno(stdin), &ts); |