GNU Screen
Igor Pechtchanski
pechtcha@cs.nyu.edu
Fri Feb 7 16:52:00 GMT 2003
Jurgen,
I've been able to compile screen-3.9.13 before with the attached patch.
I didn't test the resulting binary too much, though. Just compiled the
whole thing again today (with gcc 3.2) by untarring the source tarball,
then
$ patch -p0 < screen-3.9.13-cygwin.patch
$ autoconf
$ configure
$ make
Hope this helps,
Igor
On Fri, 7 Feb 2003 jurgen.defurne@philips.com wrote:
> Hello, Brian and list,
>
> I am running screen 3.9.8. It seems that I was able to compile it under
> a previous version of Cygwin, but alas since 1.3.12 not anymore. I am
> still using this previously compiled binary.
>
> FWIW, I just tried to compile screen and I get the following error in the
> screen sources :
>
> gcc -c -I. -I. -O utmp.c
> utmp.c: In function `pututslot':
> utmp.c:588: void value not ignored as it ought to be
> utmp.c: In function `makedead':
> utmp.c:597: structure has no member named `ut_exit'
> utmp.c:598: structure has no member named `ut_exit'
> make: *** [utmp.o] Fout 1
>
> The version that I use works well, but problems with detaching and
> attaching probably have more to do with the braindead Windows
> consoles than with screen itself. What also did change in this respect,
> is its behaviour.
>
> When you detach, the DOS console does not disappear. When I did
> a reattach in older versions from another DOS box, then the session
> became active again in the previous box instead of in the current box.
>
> Oh, and it does not seem to work in an xterm. Pity...
>
> Regards,
>
> Jurgen
>
>
> Brian McGroarty <brian@mcgroarty.net>
> Sent by:
> cygwin-owner@cygwin.com
> 02/06/2003 05:45 PM
>
>
> To: cygwin@cygwin.com
> cc: (bcc: Jurgen Defurne/BRG/CE/PHILIPS)
> Subject: GNU Screen
> Classification:
>
>
>
> I'm currently unable to build GNU Screen properly.
>
> Looking back through archives, I see that a few users have built it
> with varying degrees of success -- none are able to use nonstandard
> terminal sizes, and some say they cannot successfully reattach to a
> session.
>
> Before I dig into this, is anybody else successfully using screen, or
> is anybody already working at a port?
>
> Brian McGroarty
--
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!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
-------------- next part --------------
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