# HG changeset patch # User arpi # Date 1016932148 0 # Node ID 5d7bd47b46efedc8de099cb1bd25455e2afeafc4 # Parent 16a3f1aa0070d169a800a2e1cd4b1d7b2beb2f19 OS2 support diff -r 16a3f1aa0070 -r 5d7bd47b46ef linux/getch2.c --- a/linux/getch2.c Sun Mar 24 01:05:57 2002 +0000 +++ b/linux/getch2.c Sun Mar 24 01:09:08 2002 +0000 @@ -3,7 +3,9 @@ #include "../config.h" //#define USE_TERMCAP +#ifndef __OS2__ #define USE_IOCTL +#endif #define MAX_KEYS 64 #define BUF_LEN 256 @@ -215,7 +217,7 @@ void getch2_enable(){ #ifdef HAVE_TERMIOS struct termios tio_new; -#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) +#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) tcgetattr(0,&tio_orig); #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) ioctl(0,TIOCGETA,&tio_orig);