forked from omniti-labs/omnios-build
-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
107 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff -wpruN --no-dereference '--exclude=*.orig' a~/tty.c a/tty.c | ||
--- a~/tty.c 1970-01-01 00:00:00 | ||
+++ a/tty.c 1970-01-01 00:00:00 | ||
@@ -802,6 +802,7 @@ static void consredir_readev_fn(Event * | ||
|
||
int TtyGrabConsole(int fd, bool on, char *rc_name) | ||
{ | ||
+#if defined(SRIOCSREDIR) || defined(TIOCCONS) | ||
Display *d; | ||
#ifdef SRIOCSREDIR | ||
int cfd; | ||
@@ -881,6 +882,10 @@ int TtyGrabConsole(int fd, bool on, char | ||
consredir_ev.handler = consredir_readev_fn; | ||
evenq(&consredir_ev); | ||
return 0; | ||
+#else | ||
+ Msg(0, "Grabbing console not supported"); | ||
+ return -1; | ||
+#endif | ||
} | ||
|
||
/* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Pending https://www.illumos.org/issues/5386 | ||
|
||
diff -wpruN --no-dereference '--exclude=*.orig' a~/pty.c a/pty.c | ||
--- a~/pty.c 1970-01-01 00:00:00 | ||
+++ a/pty.c 1970-01-01 00:00:00 | ||
@@ -46,6 +46,56 @@ | ||
|
||
int pty_preopen = 0; | ||
|
||
+#ifdef __illumos__ | ||
+#include <sys/stropts.h> | ||
+static int | ||
+openpty_failure(int c, int s, int e) | ||
+{ | ||
+ if (s >= 0) | ||
+ (void) close(s); | ||
+ if (c >= 0) | ||
+ (void) close(c); | ||
+ errno = e; | ||
+ return (-1); | ||
+} | ||
+ | ||
+static int | ||
+openpty(int *controlp, int *subordp, char *name, const struct termios *termp, | ||
+ const struct winsize *winp) | ||
+{ | ||
+ int c = -1; | ||
+ int s = -1; | ||
+ char *sname; | ||
+ int e; | ||
+ | ||
+ if ((c = posix_openpt(O_RDWR | O_NOCTTY)) < 0) | ||
+ return (-1); | ||
+ if (grantpt(c) < 0 || unlockpt(c) < 0) | ||
+ return (openpty_failure(c, s, errno)); | ||
+ if ((sname = ptsname(c)) == NULL || | ||
+ (s = open(sname, O_RDWR | O_NOCTTY)) < 0) { | ||
+ return (openpty_failure(c, s, errno)); | ||
+ } | ||
+ | ||
+ if (ioctl(s, __I_PUSH_NOCTTY, "ptem") < 0 || | ||
+ ioctl(s, __I_PUSH_NOCTTY, "ldterm") < 0) { | ||
+ return (openpty_failure(c, s, errno)); | ||
+ } | ||
+ | ||
+ if (termp != NULL && tcsetattr(s, TCSAFLUSH, termp) != 0) | ||
+ return (openpty_failure(c, s, errno)); | ||
+ if (winp != NULL && ioctl(s, TIOCSWINSZ, winp) != 0) | ||
+ return (openpty_failure(c, s, errno)); | ||
+ | ||
+ if (name != NULL) | ||
+ strcpy(name, sname); | ||
+ | ||
+ *controlp = c; | ||
+ *subordp = s; | ||
+ return (0); | ||
+} | ||
+#endif | ||
+ | ||
/***************************************************************/ | ||
|
||
int OpenPTY(char **ttyn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Makefile.in.patch | ||
ncurses.patch | ||
unneededlibs.patch | ||
openpty.patch | ||
grabconsole.patch | ||
gcc14.patch |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters