Cygwinでscreen-4.0.3

screen-4.0.3に縦分割パッチを充てて、Cygwinにインストールしようとしたら、ごちゃごちゃと他のパッチも充てる羽目になったので、まとめときます。コピペのパッチを充てるときは「patch -l」としておいたほうがよいかも。

1.screen-4.0.3と非公式パッチを取得して、展開・パッチの適用。

http://www.dekaino.net/screen/01install.html

2.縦分割パッチを取得して適用。

http://lists.gnu.org/archive/html/screen-devel/2005-12/msg00003.html

3.そのままコンパイルするとmisc.cでエラーが出るので、さらにパッチ。

http://cygwin.com/ml/cygwin-apps/2005-04/msg00163.html

4.CygwinだとSJIS判定で問題が出るので(分割できなかったり、タイトルを変更できなかったり)、さらにパッチ。

http://blog.gcd.org/archives/50663205.html

5.Cygwinだとconfigureが通らないので、またパッチ。

http://www.cygwin.com/ml/cygwin/2005-06/msg00843.html

6.あと個人的なパッチ
  • ウィンドウの切り替えで、存在しない番号を押しても、いちいちウィンドウ一覧を表示させない
  • カレントウィンドウの番号を間違えて押しても「This IS window…」とか言わせない
--- process.c.org       2003-09-18 21:53:54.000000000 +0900
+++ process.c   2007-04-03 00:49:17.953125000 +0900
@@ -4412,7 +4412,7 @@
     }
   if ((p = wtab[n]) == 0)
     {
-      ShowWindows(n);
+      //ShowWindows(n);
       return;
     }
   if (display == 0)
@@ -4422,7 +4422,7 @@
     }
   if (p == D_fore)
     {
-      Msg(0, "This IS window %d (%s).", n, p->w_title);
+      //Msg(0, "This IS window %d (%s).", n, p->w_title);
       return;
     }
 #ifdef MULTIUSER
  • nontsecでも動くようにする
--- screen.c.org        2007-04-03 00:16:52.453125000 +0900
+++ screen.c    2007-04-03 00:17:54.343750000 +0900
@@ -1012,8 +1012,10 @@
              n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :
                  (eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 :
                  0777;
+/*
              if (((int)st.st_mode & 0777) != n)
                Panic(0, "Directory '%s' must have mode %03o.", SockDir, n);
+ */
            }
          sprintf(SockPath, "%s/S-%s", SockDir, LoginName);
          if (access(SockPath, F_OK))
@@ -1043,8 +1045,10 @@
       if ((int)st.st_uid != real_uid)
        Panic(0, "You are not the owner of %s.", SockPath);
     }
+/*
   if ((st.st_mode & 0777) != 0700)
     Panic(0, "Directory %s must have mode 700.", SockPath);
+ */
   if (SockMatch && index(SockMatch, '/'))
     Panic(0, "Bad session name '%s'", SockMatch);
   SockName = SockPath + strlen(SockPath) + 1;


でも、縦分割を解除する方法は分からず…orz