diff -u -r ../kterm-6.2.0.orig/Imakefile ./Imakefile
--- ../kterm-6.2.0.orig/Imakefile	Fri Jul 12 14:01:04 1996
+++ ./Imakefile	Wed Jun 03 01:14:05 1998
@@ -71,7 +71,8 @@
 #endif
 #endif
 
-     TERMCAPLIB = TermcapLibrary
+XCOMM     TERMCAPLIB = TermcapLibrary
+     TERMCAPLIB = -lncurses
 
 AllTarget($(PROGRAMS))
 
diff -u -r ../kterm-6.2.0.orig/KTerm.ad ./KTerm.ad
--- ../kterm-6.2.0.orig/KTerm.ad	Sun Jun 23 17:00:22 1996
+++ ./KTerm.ad	Wed Jun 03 01:14:12 1998
@@ -122,4 +122,4 @@
 *tek4014*font2: 8x13
 *tek4014*font3: 6x13
 *tek4014*fontSmall: 6x10
-
+*VT100.translations: #override Alt <Key>Kanji:	begin-conversion()
diff -u -r ../kterm-6.2.0.orig/main.c ./main.c
--- ../kterm-6.2.0.orig/main.c	Fri Jul 12 14:01:38 1996
+++ ./main.c	Wed Jun 03 01:14:15 1998
@@ -132,7 +132,7 @@
 #define KANJI
 #endif
 
-#ifdef linux
+#if defined(linux)
 #define USE_SYSV_TERMIO
 #define USE_SYSV_PGRP
 #define USE_SYSV_UTMP
@@ -142,6 +142,17 @@
 #define WTMP
 #endif
 
+#ifdef __CYGWIN32__
+#define SYSV
+#define SVR4
+#define LASTLOG
+#define WTMP
+#define ATT
+#define USE_SYSV_TERMIO
+#define USE_SYSV_PGRP
+#define USE_SYSV_SIGNALS
+#endif
+
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 
@@ -264,7 +275,7 @@
 #define ttyslot() 1
 #endif /* apollo */
 
-#ifdef SVR4
+#if defined(SVR4) && !defined(__CYGWIN32__)
 #include <utmpx.h>
 #define setutent setutxent
 #define getutent getutxent
@@ -1148,7 +1159,9 @@
     	d_tio.c_cc[VEOF] = CEOF;
 	d_tio.c_cc[VEOL] = CNUL;
 	d_tio.c_cc[VEOL2] = CNUL;
+#ifndef __CYGWIN32__
 	d_tio.c_cc[VSWTCH] = CNUL;
+#endif
 
 #ifdef USE_TERMIOS /* { */
 	d_tio.c_cc[VSUSP] = CSUSP;
@@ -1558,7 +1571,7 @@
 #endif
 		_bufend(stderr) = old_bufend;
 #else	/* USE_SYSV_TERMIO */
-#ifndef linux
+#if !defined(linux)
 		stderr->_file = i;
 #else
 		setfileno(stderr, i);
@@ -2060,7 +2073,7 @@
 #endif	/* sun */
 	struct passwd *pw = NULL;
 #ifdef UTMP
-#ifdef SVR4
+#if defined(SVR4) && !defined(__CYGWIN32__)
 	struct utmpx utmp;
 #else
 	struct utmp utmp;
@@ -2073,7 +2086,7 @@
 	screen->uid = getuid();
 	screen->gid = getgid();
 
-#ifdef linux
+#if defined(linux)
 	bzero(termcap, sizeof termcap);
 	bzero(newtc, sizeof newtc);
 #endif
@@ -2946,7 +2959,7 @@
 
 		/* set up the new entry */
 		utmp.ut_type = USER_PROCESS;
-#ifndef linux
+#if !defined(linux)
 		utmp.ut_exit.e_exit = 2;
 #endif
 		(void) strncpy(utmp.ut_user,
@@ -2965,7 +2978,7 @@
 #ifdef HAS_UTMP_UT_HOST
 		(void) strncpy(buf, DisplayString(screen->display),
 			       sizeof(buf));
-#ifndef linux
+#if !defined(linux)
 	        {
 		    char *disfin = strrchr(buf, ':');
 		    if (disfin)
@@ -3696,6 +3709,16 @@
 #else
 #if defined(KTERM_XAW3D) && defined(FIORDCK)
     return ioctl (fd, FIORDCHK, NULL);
+#elif defined(__CYGWIN32__)
+    fd_set set;
+    struct timeval timeout = {0, 0};
+
+    FD_ZERO (&set);
+    FD_SET (fd, &set);
+    if (select (fd+1, &set, NULL, NULL, &timeout) > 0)
+      return 1;
+    else
+      return 0;
 #else /* !KTERM_XAW3D || !FIORDCK */
     struct pollfd pollfds[1];
 
diff -u -r ../kterm-6.2.0.orig/screen.c ./screen.c
--- ../kterm-6.2.0.orig/screen.c	Sun Jun 23 17:00:26 1996
+++ ./screen.c	Wed Jun 03 01:14:18 1998
@@ -34,7 +34,7 @@
 
 #include <stdio.h>
 #include <signal.h>
-#if defined(SVR4) || defined(hpux)
+#if defined(SVR4) || defined(hpux) || defined(__CYGWIN32__)
 #include <termios.h>
 #else
 #include <sys/ioctl.h>
