Ticket #20862: patch-screen.diff

File patch-screen.diff, 3.7 KB (added by raimue (Rainer Müller), 15 years ago)

Patch for Snow Leopard

  • files/patch-process.c

     
     1diff -r -u screen-4.0.3.orig/process.c screen-4.0.3/process.c
     2--- process.c   2008-07-06 23:40:16.000000000 -0700
     3+++ process.c   2008-07-06 23:47:55.000000000 -0700
     4@@ -5466,7 +5466,7 @@
     5       *buf = 0;
     6       return;
     7     }
     8-  act.nr = (int)data;
     9+  act.nr = (int)(intptr_t)data;
     10   act.args = noargs;
     11   act.argl = 0;
     12   DoAction(&act, -1);
     13
  • files/patch-screen.c

    Property changes on: files/patch-process.c
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
    1 --- screen.c.orig       2009-01-21 12:06:11.000000000 +0800
    2 +++ screen.c    2009-01-21 12:08:27.000000000 +0800
     1--- screen.c    2003-09-08 07:26:41.000000000 -0700
     2+++ screen.c    2009-02-13 12:05:05.000000000 -0800
    33@@ -101,6 +101,11 @@
    44 
    5  #include "logfile.h"   /* islogfile, logfflush */
     5 #include "logfile.h"   /* islogfile, logfflush */
    66 
    77+#ifdef __APPLE__
    88+#include <vproc.h>
    9 +#include "vproc_priv.h"
     9+#include <vproc_priv.h>
    1010+#endif
    1111+
    1212 #ifdef DEBUG
    1313 FILE *dfp;
    1414 #endif
    15 @@ -1211,6 +1216,11 @@
     15@@ -929,6 +934,16 @@
     16    Panic(0, "No $SCREENDIR with multi screens, please.");
     17 #endif
     18     }
     19+#ifdef __APPLE__
     20+    else if (!multi && real_uid == eff_uid) {
     21+      static char DarwinSockDir[PATH_MAX];
     22+      if (confstr(_CS_DARWIN_USER_TEMP_DIR, DarwinSockDir, sizeof(DarwinSockDir))) {
     23+       strlcat(DarwinSockDir, ".screen", sizeof(DarwinSockDir));
     24+       SockDir = DarwinSockDir;
     25+      }
     26+    }
     27+#endif /* __APPLE__ */
     28+
     29 #ifdef MULTIUSER
     30   if (multiattach)
     31     {
     32@@ -1211,6 +1226,11 @@
    1633   freopen("/dev/null", "w", stderr);
    1734   debug("-- screen.back debug started\n");
    1835 
    1936+#ifdef __APPLE__
    20 if (_vprocmgr_move_subset_to_user(real_uid, "Background") != NULL)
    21 +      errx(1, "can't migrate to background session");
     37     if (_vprocmgr_detach_from_console(0) != NULL)
     38+               errx(1, "can't detach from console");
    2239+#endif
    2340+
    2441   /*
    2542    * This guarantees that the session owner is listed, even when we
    2643    * start detached. From now on we should not refer to 'LoginName'
     44
  • Portfile

     
    6767    patchfiles-append   patch-Makefile.in patch-config.h.in patch-configure patch-pty.c patch-window.c patch-screen.c
    6868}
    6969
     70platform darwin 10 {
     71    # post-patch {
     72        # reinplace s|^deflogin|#deflogin| ${workpath}/${distname}/etc/etcscreenrc
     73    # }
     74
     75    # These patches are based on http://www.opensource.apple.com/source/screen/screen-16/patches/
     76    # The vproc_priv.h is the private header from launchd, used in Apple's 10.6 screen patches
     77    # We copied the header file from http://launchd.macosforge.org/trac/browser/trunk/launchd/src/vproc_priv.h, r23776
     78    master_sites-append http://www.cis.nctu.edu.tw/~is85005/dports/screen/r23776/:launchd_priv_header
     79    distfiles-append    vproc_priv.h:launchd_priv_header
     80    checksums-append    vproc_priv.h md5 50800817fa688e7e6ae379cd599f15ca
     81    post-extract        { file copy ${distpath}/vproc_priv.h ${workpath}/${distname} }
     82    patchfiles-append   patch-Makefile.in patch-config.h.in patch-configure patch-pty.c patch-window.c patch-screen.c patch-process.c
     83}
     84
    7085post-install {
    7186ui_msg "===============================================================================\n"
    7287ui_msg "Any screens running before upgrading, will not be available, post-install.\n"