GNU screen-3.9.13 available for testing
Igor Pechtchanski
pechtcha@cs.nyu.edu
Mon Sep 9 18:03:00 GMT 2002
This is a port of screen 3.9.13. To install:
- wget the source from
ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-3.9.13.tar.gz
- untar it (this will create a screen-3.9.13 subdirectory)
- apply the attached patch (using 'patch -p0')
- 'configure --prefix=/usr', 'make', and 'make install'
- 'touch /etc/ttys' -- this is needed for screen to run
KNOWN BUGS:
- screen doesn't recognize window sizes other than 80x25. Perhaps someone
with the knowledge of termcap can explain this.
Note, I haven't tested all the features. If something (other than the
above) doesn't work, please report it to cygwin@cygwin.com.
Igor
P.S. Sorry for the awkward phrasing, this is the seventh time I'm
trying to get this past the spam filter.
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95. Something is wrong here. -- SC sig file
-------------- next part --------------
diff -u -p -r orig/screen-3.9.13/configure ./configure
--- orig/screen-3.9.13/configure 2002-08-12 10:34:23.000000000 -0400
+++ ./configure 2002-09-09 16:39:27.000000000 -0400
@@ -3687,7 +3687,7 @@ int
main ()
{
-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) || defined (__CYGWIN__)
seteuid_is_broken(0);
#else
seteuid(0);
@@ -5350,7 +5350,7 @@ if test -z "$load" ; then
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
-#if defined(NeXT) || defined(apollo) || defined(linux)
+#if defined(NeXT) || defined(apollo) || defined(linux) || defined (__CYGWIN__)
yes;
#endif
diff -u -p -r orig/screen-3.9.13/configure.in ./configure.in
--- orig/screen-3.9.13/configure.in 2002-08-12 10:34:14.000000000 -0400
+++ ./configure.in 2002-09-09 16:39:27.000000000 -0400
@@ -270,7 +270,7 @@ dnl Solaris seteuid doesn't change the
dnl multiuser screen sessions
AC_CHECKING(seteuid)
AC_TRY_LINK(,[
-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) || defined (__CYGWIN__)
seteuid_is_broken(0);
#else
seteuid(0);
@@ -865,7 +865,7 @@ fi
if test -z "$load" ; then
AC_EGREP_CPP(yes,
-[#if defined(NeXT) || defined(apollo) || defined(linux)
+[#if defined(NeXT) || defined(apollo) || defined(linux) || defined (__CYGWIN__)
yes;
#endif
], load=1)
diff -u -p -r orig/screen-3.9.13/loadav.c ./loadav.c
--- orig/screen-3.9.13/loadav.c 2002-01-08 10:43:43.000000000 -0500
+++ ./loadav.c 2002-09-09 16:39:27.000000000 -0400
@@ -56,7 +56,7 @@ static int loadok;
/***************************************************************/
-#if defined(linux) && !defined(LOADAV_DONE)
+#if (defined(linux) || defined (__CYGWIN__)) && !defined(LOADAV_DONE)
#define LOADAV_DONE
/*
* This is the easy way. It relies in /proc being mounted.
@@ -110,7 +110,7 @@ GetLoadav()
}
return i;
}
-#endif /* linux */
+#endif /* linux || __CYGWIN__ */
/***************************************************************/
diff -u -p -r orig/screen-3.9.13/misc.c ./misc.c
--- orig/screen-3.9.13/misc.c 2002-08-29 10:47:36.000000000 -0400
+++ ./misc.c 2002-09-09 16:39:27.000000000 -0400
@@ -638,11 +638,11 @@ 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);
-# endif /* linux || convex || BSD >= 199103 */
+# endif /* linux || convex || BSD >= 199103 || __CYGWIN__ */
#endif /* USESETENV */
}
diff -u -p -r orig/screen-3.9.13/os.h ./os.h
--- orig/screen-3.9.13/os.h 2002-01-08 10:42:33.000000000 -0500
+++ ./os.h 2002-09-09 16:39:27.000000000 -0400
@@ -32,9 +32,9 @@
# define hpux
#endif
-#if defined(__bsdi__) || defined(__386BSD__) || defined(_CX_UX) || defined(hpux) || defined(_IBMR2) || defined(linux)
+#if defined(__bsdi__) || defined(__386BSD__) || defined(_CX_UX) || defined(hpux) || defined(_IBMR2) || defined(linux) || defined (__CYGWIN__)
# include <signal.h>
-#endif /* __bsdi__ || __386BSD__ || _CX_UX || hpux || _IBMR2 || linux */
+#endif /* __bsdi__ || __386BSD__ || _CX_UX || hpux || _IBMR2 || linux || __CYGWIN__ */
#ifdef ISC
# ifdef ENAMETOOLONG
@@ -260,7 +260,7 @@ extern int errno;
#endif
#if defined(UTMPOK) || defined(BUGGYGETLOGIN)
-# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
+# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) && !defined (__CYGWIN__)
# include <utmpx.h>
# define UTMPFILE UTMPX_FILE
# define utmp utmpx
@@ -411,7 +411,7 @@ extern int errno;
#endif
/* Geeeee, reverse it? */
-#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(__bsdi__) || defined(POSIX) || defined(NeXT)
+#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(__bsdi__) || defined(POSIX) || defined(NeXT) || defined (__CYGWIN__)
# define SIGHASARG
#endif
diff -u -p -r orig/screen-3.9.13/osdef.sh ./osdef.sh
--- orig/screen-3.9.13/osdef.sh 2001-06-18 13:08:15.000000000 -0400
+++ ./osdef.sh 2002-09-09 16:39:27.000000000 -0400
@@ -24,7 +24,7 @@ cat << EOF > osdef0.c
#ifndef sun
#include <sys/ioctl.h>
#endif
-#ifdef linux
+#if defined(linux) || defined (__CYGWIN__)
#include <string.h>
#include <stdlib.h>
#endif
diff -u -p -r orig/screen-3.9.13/pty.c ./pty.c
--- orig/screen-3.9.13/pty.c 2002-02-11 07:44:18.000000000 -0500
+++ ./pty.c 2002-09-09 16:39:27.000000000 -0400
@@ -37,7 +37,7 @@ RCS_ID("$Id: pty.c,v 1.6 1994/05/31 12:3
#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
@@ -126,7 +126,7 @@ int f;
{
if (f < 0)
return;
-#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
+#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX) && !defined (__CYGWIN__)
if (ioctl(f, I_PUSH, "ptem"))
Panic(errno, "InitPTY: cannot I_PUSH ptem");
if (ioctl(f, I_PUSH, "ldterm"))
@@ -244,13 +244,13 @@ char **ttyn;
register int f;
char *m, *ptsname();
int unlockpt __P((int)), grantpt __P((int));
-#if defined(HAVE_GETPT) && defined(linux)
+#if defined(HAVE_GETPT) && (defined(linux) || defined (__CYGWIN__))
int getpt __P((void));
#endif
sigret_t (*sigcld)__P(SIGPROTOARG);
strcpy(PtyName, "/dev/ptmx");
-#if defined(HAVE_GETPT) && defined(linux)
+#if defined(HAVE_GETPT) && (defined(linux) || defined (__CYGWIN__))
if ((f = getpt()) == -1)
#else
if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
diff -u -p -r orig/screen-3.9.13/screen.c ./screen.c
--- orig/screen-3.9.13/screen.c 2002-08-29 06:14:20.000000000 -0400
+++ ./screen.c 2002-09-09 17:53:28.000000000 -0400
@@ -984,8 +984,10 @@ char **av;
n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :
(eff_gid == st.st_gid && eff_gid != real_gid) ? 0775 :
0777;
+#if !defined(__CYGWIN__)
if ((st.st_mode & 0777) != n)
Panic(0, "Directory '%s' must have mode %03o.", SockDir, n);
+#endif
}
sprintf(SockPath, "%s/S-%s", SockDir, LoginName);
if (access(SockPath, F_OK))
@@ -1015,8 +1017,10 @@ char **av;
if (st.st_uid != real_uid)
Panic(0, "You are not the owner of %s.", SockPath);
}
+#if !defined(__CYGWIN__)
if ((st.st_mode & 0777) != 0700)
Panic(0, "Directory %s must have mode 700.", SockPath);
+#endif
if (SockMatch && index(SockMatch, '/'))
Panic(0, "Bad session name '%s'", SockMatch);
SockName = SockPath + strlen(SockPath) + 1;
diff -u -p -r orig/screen-3.9.13/utmp.c ./utmp.c
--- orig/screen-3.9.13/utmp.c 2002-08-22 15:26:34.000000000 -0400
+++ ./utmp.c 2002-09-09 16:39:27.000000000 -0400
@@ -93,7 +93,7 @@ static void endutent __P((void));
static int initutmp __P((void));
static void setutent __P((void));
#endif
-#if defined(linux) && defined(GETUTENT)
+#if (defined(linux) || defined (__CYGWIN__)) && defined(GETUTENT)
static struct utmp *xpututline __P((struct utmp *utmp));
# define pututline xpututline
#endif
@@ -593,7 +593,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
@@ -611,7 +611,7 @@ int pid;
u->ut_type = USER_PROCESS;
strncpy(u->ut_user, user, sizeof(u->ut_user));
/* Now the tricky part... guess ut_id */
-#if defined(sgi) || defined(linux)
+#if defined(sgi) || defined(linux) || defined (__CYGWIN__)
strncpy(u->ut_id, line + 3, sizeof(u->ut_id));
#else /* sgi */
# ifdef _IBMR2
@@ -862,7 +862,7 @@ getlogin()
}
# endif /* BUGGYGETLOGIN */
-#if defined(linux) && defined(GETUTENT)
+#if (defined(linux) || defined (__CYGWIN__)) && defined(GETUTENT)
# undef pututline
/* aargh, linux' pututline returns void! */
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list