[BACK]Return to patch-src_platform.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / archivers / torrentzip / patches

File: [cvs.NetBSD.org] / pkgsrc / archivers / torrentzip / patches / Attic / patch-src_platform.c (download)

Revision 1.1, Thu Jan 9 15:40:55 2014 UTC (6 years, 10 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1

Add cfmakeraw compatability for SunOS.

$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);