summaryrefslogtreecommitdiff
path: root/archivers/torrentzip/patches/patch-src_platform.c
blob: 3fd417c6d19d6f14bf7bb17048a668d83c128d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-src_platform.c,v 1.1 2014/01/09 15:40:55 jperkin Exp $

cfmakeraw compatability for SunOS.

--- src/platform.c.orig	2005-04-17 08:36:15.000000000 +0000
+++ src/platform.c
@@ -45,7 +45,15 @@ getch (void)
 
   tcgetattr (1, &t);
   t2 = t;
+#ifdef __sun
+  t2.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+  t2.c_oflag &= ~OPOST;
+  t2.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+  t2.c_cflag &= ~(CSIZE|PARENB);
+  t2.c_cflag |= CS8;
+#else
   cfmakeraw (&t2);
+#endif
   tcsetattr (1, TCSANOW, &t2);
   fread (&c, 1, 1, stdin);
   tcsetattr (1, TCSANOW, &t);