diff -ruN -x Makefile -ruN screen-4.0.2.orig/misc.c screen-4.0.2/misc.c --- screen-4.0.2.orig/misc.c 2003-12-05 05:45:41.000000000 -0800 +++ screen-4.0.2/misc.c 2004-01-14 22:47:00.265625000 -0800 @@ -613,7 +613,7 @@ */ # endif /* NEEDSETENV */ #else /* USESETENV */ -# if defined(linux) || defined(__convex__) || (BSD >= 199103) +# if defined(linux) || defined(__convex__) || (BSD >= 199103) || defined(__CYGWIN__) setenv(var, value, 1); # else setenv(var, value); diff -ruN -x Makefile -ruN screen-4.0.2.orig/pty.c screen-4.0.2/pty.c --- screen-4.0.2.orig/pty.c 2003-09-08 07:26:18.000000000 -0700 +++ screen-4.0.2/pty.c 2004-01-14 22:52:49.812500000 -0800 @@ -34,7 +34,7 @@ #endif /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ -#ifdef HAVE_SVR4_PTYS +#if defined(HAVE_SVR4_PTYS) && !defined(__CYGWIN__) # include #endif diff -ruN -x Makefile -ruN screen-4.0.2.orig/utmp.c screen-4.0.2/utmp.c --- screen-4.0.2.orig/utmp.c 2003-09-08 07:27:17.000000000 -0700 +++ screen-4.0.2/utmp.c 2004-01-14 22:52:05.390625000 -0800 @@ -102,7 +102,7 @@ #endif -# if defined(GETUTENT) && (!defined(SVR4) || defined(__hpux)) +# if defined(GETUTENT) && (!defined(SVR4) || defined(__hpux)) && ! defined(__CYGWIN__) # if defined(hpux) /* cruel hpux release 8.0 */ # define pututline _pututline # endif /* hpux */ @@ -581,7 +581,11 @@ } #endif setutent(); +#ifndef __CYGWIN__ return pututline(u) != 0; +#else + return 1; +#endif } static void @@ -589,7 +593,7 @@ struct utmp *u; { u->ut_type = DEAD_PROCESS; -#if !defined(linux) || defined(EMPTY) +#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__) u->ut_exit.e_termination = 0; u->ut_exit.e_exit = 0; #endif