View | Details | Raw Unified | Return to bug 110435
Collapse All | Expand All

(-)mail/metamail/files/patch-metamail_metamail.c (+42 lines)
Lines 9-14 Link Here
9
 #include <ctype.h>
9
 #include <ctype.h>
10
 #include <sys/types.h>
10
 #include <sys/types.h>
11
 #include <sys/stat.h>
11
 #include <sys/stat.h>
12
@@ -46,8 +48,8 @@
13
 #include <signal.h>
14
 
15
 #ifndef AMIGA
16
-#ifdef SYSV
17
-#include <termio.h>
18
+#if 1
19
+#include <termios.h>
20
 #include <unistd.h>
21
 #else /* SYSV */
22
 #include <sgtty.h>
12
@@ -83,7 +85,7 @@
23
@@ -83,7 +85,7 @@
13
 #define MAX_FILE_NAME_SIZE 256
24
 #define MAX_FILE_NAME_SIZE 256
14
 #define WRITE_BINARY	"w"
25
 #define WRITE_BINARY	"w"
Lines 116-118 Link Here
116
     } else {
127
     } else {
117
         /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */
128
         /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */
118
         MkTmpFileName(TmpFile);
129
         MkTmpFileName(TmpFile);
130
@@ -2375,8 +2387,8 @@
131
 
132
 int HasSavedTtyState=0;
133
 #if !defined(AMIGA) && !defined(MSDOS)
134
-#ifdef SYSV
135
-static struct termio MyTtyStateIn, MyTtyStateOut;
136
+#if 1
137
+static struct termios MyTtyStateIn, MyTtyStateOut;
138
 #else
139
 static struct sgttyb MyTtyStateIn, MyTtyStateOut;
140
 #endif
141
@@ -2681,15 +2693,15 @@
142
 
143
 StartRawStdin() {
144
 #if !defined(AMIGA) && !defined(MSDOS)
145
-#ifdef SYSV
146
-    struct termio   orterm, fterm;
147
-    ioctl(0, TCGETA, &orterm);	/* get current (i.e. cooked) termio */
148
+#if 1
149
+    struct termios   orterm, fterm;
150
+    tcgetattr(0, &orterm);
151
     fterm = orterm;		/* get termio to modify */
152
 
153
     fterm.c_lflag &= ~ICANON;	/* clear ICANON giving raw mode */
154
     fterm.c_cc[VMIN] = 1;	/* set MIN char count to 1 */
155
     fterm.c_cc[VTIME] = 0;	/* set NO time limit */
156
-    return ioctl(0, TCSETAW, &fterm);	/* modify termio for raw mode */
157
+    return tcsetattr(0, TCSANOW, &fterm);	/* modify termio for raw mode */
158
 #else
159
     struct sgttyb ts;
160
     gtty(fileno(stdin), &ts);

Return to bug 110435