Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Randy Rostie" To: Subject: compiling GNU screen on Cygwin Date: Sat, 2 Jun 2001 20:28:17 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 I found a patch someone made for GNU screen 3.9.8, but I am getting errors when I try to run the patch. Maybe someone can look at the errors and the patch, and tell me what is wrong? I added a seperator between the patch and the errors I received for readability. The program does compile and execute, but it doesn't let me run more than one screen session, so it's useless. The person who made the patch says it does work for him, but I have not been able to get him to send me a copy of the binary itself. I am forwarding the entire email forwarded to me by Juergen Weigert for the source of the patch file: (I edited out the > signs from the forwarded source) From: [blank] Subject: screen-3.9.8 ported to cygwin On May 15, 01 10:42:14 -0400, [blank]: > > I have made a naive attempt at porting screen 3.9.8 to cygwin, > and seem to have met with limited success. The thing (seems to) > work, but when you close your last screen, it kills your console > window. you also may have to mkdir /dev/pts I'm afraid that I > can't remember the name, but screen'll tell you what file when > you first run it. > > Here is the patch: > > A remaining issue is that some of the commands in make install > fail, due to the .exe thing. I tried to play with adding > @EXEEXT@ to Makefile.in (and AC_EXEEXT to configure.in) but found > that I started creating /opt/screen/bin/screen-3.9.8.exe.exe > > At this point I decided to live with the error message. > > Are there porting guidelines that describe when/where/how to use > AC_EXEEXT? > > > This is a Quick'n'Filthy[tm] patch. It may electrocute you. Don't > blame me. > > ------cut here------- Index: screen-3.9.8/misc.c diff -c screen-3.9.8/misc.c:1.1.1.1 screen-3.9.8/misc.c:1.2 *** screen-3.9.8/misc.c:1.1.1.1 Tue May 15 09:26:54 2001 --- screen-3.9.8/misc.c Tue May 15 10:14:37 2001 *************** *** 22,28 **** */ #include "rcs.h" ! RCS_ID("$Id: misc.c,v 1.1.1.1 2001/05/15 13:26:54 linguist Exp $ FAU") #include #include /* mkdir() declaration */ --- 22,28 ---- */ #include "rcs.h" ! RCS_ID("$Id: misc.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU") #include #include /* mkdir() declaration */ *************** *** 638,644 **** */ # endif /* NEEDSETENV */ #else /* USESETENV */ ! # if defined(linux) || defined(__convex__) || (BSD >= 199103) setenv(var, value, 0); # else setenv(var, value); --- 638,645 ---- */ # endif /* NEEDSETENV */ #else /* USESETENV */ ! # if defined(linux) || defined(__convex__) || (BSD >= 199103) \ ! || defined(__CYGWIN__) setenv(var, value, 0); # else setenv(var, value); Index: screen-3.9.8/pty.c diff -c screen-3.9.8/pty.c:1.1.1.1 screen-3.9.8/pty.c:1.2 *** screen-3.9.8/pty.c:1.1.1.1 Tue May 15 09:26:54 2001 --- screen-3.9.8/pty.c Tue May 15 10:14:37 2001 *************** *** 22,28 **** */ #include "rcs.h" ! RCS_ID("$Id: pty.c,v 1.1.1.1 2001/05/15 13:26:54 linguist Exp $ FAU") #include #include --- 22,28 ---- */ #include "rcs.h" ! RCS_ID("$Id: pty.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU") #include #include *************** *** 37,43 **** #endif /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ ! #ifdef HAVE_SVR4_PTYS # include #endif --- 37,43 ---- #endif /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ ! #if defined(HAVE_SVR4_PTYS) && !defined(__CYGWIN__) # include #endif Index: screen-3.9.8/screen.c diff -c screen-3.9.8/screen.c:1.1.1.1 screen-3.9.8/screen.c:1.2 *** screen-3.9.8/screen.c:1.1.1.1 Tue May 15 09:26:54 2001 --- screen-3.9.8/screen.c Tue May 15 10:14:37 2001 *************** *** 31,37 **** */ #include "rcs.h" ! RCS_ID("$Id: screen.c,v 1.1.1.1 2001/05/15 13:26:54 linguist Exp $ FAU") #include --- 31,37 ---- */ #include "rcs.h" ! RCS_ID("$Id: screen.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU") #include *************** *** 919,926 **** --- 919,929 ---- n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 : (eff_gid == st.st_gid && eff_gid != real_gid) ? 0775 : 0777; + // NT is hopelessly broken in the area of file permissions. + #ifndef __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)) *************** *** 950,957 **** --- 953,962 ---- if (st.st_uid != real_uid) Panic(0, "You are not the owner of %s.", SockPath); } + #ifndef __CYGWIN__ if ((st.st_mode & 0777) != 0700) Panic(0, "Directory %s must have mode 700.", SockPath); + #endif SockName = SockPath + strlen(SockPath) + 1; *SockName = 0; (void) umask(oumask);> > ------cut here------- ######################-seperator-########################### forward are the errors I am getting in Cygwin: $ patch -i screen-patch -verbose patch 2.5 Copyright 1988 Larry Wall Copyright 1997 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. written by Larry Wall with lots o' patches by Paul Eggert Administrator AT ALPHA-WIN2K /usr/src/screen-3.9.8 $ patch -i screen-patch --verbose Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- | |Index: screen-3.9.8/misc.c |diff -c screen-3.9.8/misc.c:1.1.1.1 screen-3.9.8/misc.c:1.2 |*** screen-3.9.8/misc.c:1.1.1.1 Tue May 15 09:26:54 2001 |--- screen-3.9.8/misc.c Tue May 15 10:14:37 2001 -------------------------- Patching file `misc.c' using Plan A... Hunk #1 FAILED at 22. Hunk #2 succeeded at 638. 1 out of 2 hunks FAILED -- saving rejects to misc.c.rej Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |Index: screen-3.9.8/pty.c |diff -c screen-3.9.8/pty.c:1.1.1.1 screen-3.9.8/pty.c:1.2 |*** screen-3.9.8/pty.c:1.1.1.1 Tue May 15 09:26:54 2001 |--- screen-3.9.8/pty.c Tue May 15 10:14:37 2001 -------------------------- Patching file `pty.c' using Plan A... Hunk #1 FAILED at 22. Hunk #2 succeeded at 37. 1 out of 2 hunks FAILED -- saving rejects to pty.c.rej Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |Index: screen-3.9.8/screen.c |diff -c screen-3.9.8/screen.c:1.1.1.1 screen-3.9.8/screen.c:1.2 |*** screen-3.9.8/screen.c:1.1.1.1 Tue May 15 09:26:54 2001 |--- screen-3.9.8/screen.c Tue May 15 10:14:37 2001 -------------------------- Patching file `screen.c' using Plan A... Hunk #1 FAILED at 31. Hunk #2 succeeded at 919. Hunk #3 succeeded at 953. 1 out of 3 hunks FAILED -- saving rejects to screen.c.rej For more info on GNU Screen, see http://www.math.fu-berlin.de/~guckes/screen This email was aso posted to the GNU Screen mailing list. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple