This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: screen


On Wed, Apr 20, 2005 at 05:18:09PM -0400, Schulman.Andrew@epamail.epa.gov wrote:
>I'm going to try to build and package screen for Cygwin.  It's such a 
>useful program, I just have to try.
>
>screen 4.0.2 won't compile OOTB in Cygwin:
>
>gcc -c -I. -I.    -g -O2 misc.c
>misc.c: In function `xsetenv':
>misc.c:619: error: too few arguments to function `setenv'
>make: *** [misc.o] Error 1
>
>I haven't looked into trying to fix this yet, it may be quite simple.
>
>There are many references to a binary of screen 4.0.2 compiled for 
>Cygwin, and a corresponding patch, available at 
>http://www.fredlwm.hpg.ig.com.br/cygwin/screen/.  But that page has gone 
>dark, and I can't find a cached copy of it anywhere.  If someone has the 
>patch that was provided there, I'd appreciate it if you'd pass it along.
>
>If anyone else has tried and failed to build or package screen for 
>Cygwin, or if you know anything else about the feasibility of this 
>little project, I'd appreciate hearing from you.

Try the below patches.  They make a workable screen on my system.

I even get a screen that I can attach and detach if I comment out
the '#define NAMEDPIPE 1' in config.h before building.

This is necessary because, unfortunately, cygwin's implementation of
fifos is not yet complete although screen thinks it is.  So the
semi-working fifo seems to confuse detach/attach.

I'm not sure how you'd proceduralize the building of screen such that
configure would avoid using fifos.  I guess the only way to do it is
to patch the configure script to avoid using fifos under cygwin.  Or
always edit config.h after configure...

I really do have to fix fifos soon.  Screen will be a good test case for
them, I guess.

HTH,
cgf

--- misc.c.orig	2003-12-05 07:45:41.000000000 -0500
+++ misc.c	2005-04-20 23:29:19.000000000 -0400
@@ -613,7 +613,7 @@ char *value;
    */
 # 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);
--- pty.c.orig	2003-09-08 10:26:18.000000000 -0400
+++ pty.c	2005-04-20 23:30:58.000000000 -0400
@@ -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 <sys/stropts.h>
 #endif
 
--- utmp.c.orig	2003-09-08 10:27:17.000000000 -0400
+++ utmp.c	2005-04-20 23:30:20.000000000 -0400
@@ -589,7 +589,7 @@ makedead(u)
 struct utmp *u;
 {
   u->ut_type = DEAD_PROCESS;
-#if !defined(linux) || defined(EMPTY)
+#if (!defined(linux) && !defined(__CYGWIN__)) || defined(EMPTY)
   u->ut_exit.e_termination = 0;
   u->ut_exit.e_exit = 0;
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]