screen-3.9.8 ported to cygwin

rich-paul@rich-paul.net rich-paul@rich-paul.net
Tue May 15 07:42:00 GMT 2001


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.  <G>

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. <G>

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 <sys/types.h>
  #include <sys/stat.h>	/* 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 <sys/types.h>
  #include <sys/stat.h>	/* 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 <sys/types.h>
  #include <sys/stat.h>
--- 22,28 ----
   */
  
  #include "rcs.h"
! RCS_ID("$Id: pty.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU")
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 37,43 ****
  #endif
  
  /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
! #ifdef HAVE_SVR4_PTYS
  # include <sys/stropts.h>
  #endif
  
--- 37,43 ----
  #endif
  
  /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
! #if defined(HAVE_SVR4_PTYS) && !defined(__CYGWIN__)
  # include <sys/stropts.h>
  #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 <sys/types.h>
--- 31,37 ----
   */
  
  #include "rcs.h"
! RCS_ID("$Id: screen.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU")
  
  
  #include <sys/types.h>
***************
*** 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-------


-- 
----------------------------------------------------------------
If this message was not digitally signed, do you really know who
it came from?  Encrypt everything, let the NSA sort it out.

Unsolicited email advertisements will be proofread and returned
for a fee of $500 per message.  Sending such email to this
address implies acceptance
of these terms.
-------------- next part --------------
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="----D96B83DB712B07A1E04C6697F6F77779"

This is an S/MIME signed message

------D96B83DB712B07A1E04C6697F6F77779
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


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.  <G>

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. <G>

Are there porting guidelines that describe when/where/how to use
AC_EXEEXT? =20


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 ****
   */
 =20
  #include "rcs.h"
! RCS_ID("$Id: misc.c,v 1.1.1.1 2001/05/15 13:26:54 linguist Exp $ FAU")
 =20
  #include <sys/types.h>
  #include <sys/stat.h>	/* mkdir() declaration */
--- 22,28 ----
   */
 =20
  #include "rcs.h"
! RCS_ID("$Id: misc.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU")
 =20
  #include <sys/types.h>
  #include <sys/stat.h>	/* mkdir() declaration */
***************
*** 638,644 ****
     */
  # endif /* NEEDSETENV */
  #else /* USESETENV */
! # if defined(linux) || defined(__convex__) || (BSD >=3D 199103)
    setenv(var, value, 0);
  # else
    setenv(var, value);
--- 638,645 ----
     */
  # endif /* NEEDSETENV */
  #else /* USESETENV */
! # if defined(linux) || defined(__convex__) || (BSD >=3D 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 ****
   */
 =20
  #include "rcs.h"
! RCS_ID("$Id: pty.c,v 1.1.1.1 2001/05/15 13:26:54 linguist Exp $ FAU")
 =20
  #include <sys/types.h>
  #include <sys/stat.h>
--- 22,28 ----
   */
 =20
  #include "rcs.h"
! RCS_ID("$Id: pty.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU")
 =20
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 37,43 ****
  #endif
 =20
  /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
! #ifdef HAVE_SVR4_PTYS
  # include <sys/stropts.h>
  #endif
 =20
--- 37,43 ----
  #endif
 =20
  /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
! #if defined(HAVE_SVR4_PTYS) && !defined(__CYGWIN__)
  # include <sys/stropts.h>
  #endif
 =20
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 ****
   */
 =20
  #include "rcs.h"
! RCS_ID("$Id: screen.c,v 1.1.1.1 2001/05/15 13:26:54 linguist Exp $ FAU")
 =20
 =20
  #include <sys/types.h>
--- 31,37 ----
   */
 =20
  #include "rcs.h"
! RCS_ID("$Id: screen.c,v 1.2 2001/05/15 14:14:37 linguist Exp $ FAU")
 =20
 =20
  #include <sys/types.h>
***************
*** 919,926 ****
--- 919,929 ----
  	      n =3D (eff_uid =3D=3D 0 && (real_uid || (st.st_mode & 0775) !=3D 0=
775)) ? 0755 :
  	          (eff_gid =3D=3D st.st_gid && eff_gid !=3D real_gid) ? 0775 :
  		  0777;
+ // NT is hopelessly broken in the area of file permissions.
+ #ifndef __CYGWIN__
  	      if ((st.st_mode & 0777) !=3D 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 !=3D real_uid)
  	Panic(0, "You are not the owner of %s.", SockPath);
      }
+ #ifndef __CYGWIN__
    if ((st.st_mode & 0777) !=3D 0700)
      Panic(0, "Directory %s must have mode 700.", SockPath);
+ #endif
    SockName =3D SockPath + strlen(SockPath) + 1;
    *SockName =3D 0;
    (void) umask(oumask);

------cut here-------


--=20
----------------------------------------------------------------
If this message was not digitally signed, do you really know who
it came from?  Encrypt everything, let the NSA sort it out.

Unsolicited email advertisements will be proofread and returned
for a fee of $500 per message.  Sending such email to this
address implies acceptance
of these terms.

------D96B83DB712B07A1E04C6697F6F77779
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"

MIIEuQYJKoZIhvcN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