You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
14bff23293
Rather than trying to figure out `distfiles` using a different port name, make local copies of `18` and `vproc_priv.h`.
67 lines
1.8 KiB
Diff
67 lines
1.8 KiB
Diff
Apple's window.c changes between upstream screen-4.0.3
|
|
and their release of screen, called screen-24.
|
|
You can view the screen-24 source at
|
|
https://opensource.apple.com/tarballs/screen/
|
|
|
|
Upstream screen-4.0.3 is released under the GPLv2,
|
|
so Apple's changes (this patch) is a derivative work and
|
|
also licensed under the GPLv2.
|
|
|
|
This patch was then rebased against the latest upstream
|
|
GNU Screen, which was version 4.6.2 and no longer required
|
|
many of Apple's changes. This was done by David Gilman
|
|
for MacPorts.
|
|
--- window.c 2021-05-08 19:39:20.102441294 -0400
|
|
+++ window.c 2021-05-08 19:40:40.447225064 -0400
|
|
@@ -33,6 +33,9 @@
|
|
#include <sys/stat.h>
|
|
#include <signal.h>
|
|
#include <fcntl.h>
|
|
+#ifdef __APPLE__
|
|
+#include <unistd.h>
|
|
+#endif __APPLE__
|
|
#ifndef sun
|
|
# include <sys/ioctl.h>
|
|
#endif
|
|
@@ -1682,6 +1685,40 @@
|
|
return r;
|
|
}
|
|
|
|
+#ifdef __APPLE__
|
|
+#ifdef RUN_LOGIN
|
|
+/*
|
|
+ * All of the logic to maintain utmpx is now built into /usr/bin/login, so
|
|
+ * all we need to do is call it, and pass the shell command to it.
|
|
+ */
|
|
+extern char *LoginName;
|
|
+
|
|
+static int
|
|
+run_login(const char *path, char *const argv[], char *const envp[])
|
|
+{
|
|
+ const char *shargs[MAXARGS + 1 + 3];
|
|
+ const char **fp, **tp;
|
|
+
|
|
+ if (access(path, X_OK) < 0)
|
|
+ return -1;
|
|
+ shargs[0] = "login";
|
|
+ shargs[1] = (*argv[0] == '-') ? "-pfq" : "-pflq";
|
|
+ shargs[2] = LoginName;
|
|
+ shargs[3] = path;
|
|
+ fp = (const char **)argv + 1;
|
|
+ tp = shargs + 4;
|
|
+ /* argv has already been check for length */
|
|
+ while ((*tp++ = *fp++) != NULL) {}
|
|
+ /* shouldn't return unless there was an error */
|
|
+ return (execve("/usr/bin/login", (char *const*)shargs, envp));
|
|
+}
|
|
+
|
|
+/* replace the following occurrences of execve() with run_login() */
|
|
+#define execve run_login
|
|
+
|
|
+#endif /* RUN_LOGIN */
|
|
+#endif /* __APPLE__ */
|
|
+
|
|
void
|
|
FreePseudowin(w)
|
|
struct win *w;
|