diff linux/getch2.c @ 1433:d2c90f272101

Win32 portability.
author atmos4
date Thu, 02 Aug 2001 07:09:41 +0000
parents b36fb1ae4b53
children 267264560623
line wrap: on
line diff
--- a/linux/getch2.c	Wed Aug 01 20:12:18 2001 +0000
+++ b/linux/getch2.c	Thu Aug 02 07:09:41 2001 +0000
@@ -201,7 +201,7 @@
 
 void getch2_enable(){
 struct termios tio_new;
-#if defined(__NetBSD__) || defined(__svr4__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
     tcgetattr(0,&tio_orig);
 #elif defined(__FreeBSD__)
     ioctl(0,TIOCGETA,&tio_orig);
@@ -212,7 +212,7 @@
     tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */
     tio_new.c_cc[VMIN] = 1;
     tio_new.c_cc[VTIME] = 0;
-#if defined(__NetBSD__) || defined(__svr4__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
     tcsetattr(0,TCSANOW,&tio_new);
 #elif defined(__FreeBSD__)
     ioctl(0,TIOCSETA,&tio_new);
@@ -222,7 +222,7 @@
 }
 
 void getch2_disable(){
-#if defined(__NetBSD__) || defined(__svr4__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
     tcsetattr(0,TCSANOW,&tio_orig);
 #elif defined(__FreeBSD__)
     ioctl(0,TIOCSETA,&tio_orig);