Skip to content

Instantly share code, notes, and snippets.

@iratqq
Created February 15, 2011 07:43
Show Gist options
  • Save iratqq/827241 to your computer and use it in GitHub Desktop.
Save iratqq/827241 to your computer and use it in GitHub Desktop.
diff -aruN pty-4.0.orig/config/ttyopts.h pty-4.0/config/ttyopts.h
--- pty-4.0.orig/config/ttyopts.h Mon Mar 2 11:49:03 1992
+++ pty-4.0/config/ttyopts.h Tue Feb 15 16:17:30 2011
@@ -4,6 +4,7 @@
#define TTY_WINDOWS
#undef TTY_AUXCHARS
#undef TTY_TERMIO
+#define USE_OLD_TTY
/* TTY_WINDOWS must be on line 4. */
diff -aruN pty-4.0.orig/ptycomm.c pty-4.0/ptycomm.c
--- pty-4.0.orig/ptycomm.c Mon Mar 2 11:49:28 1992
+++ pty-4.0/ptycomm.c Tue Feb 15 16:09:23 2011
@@ -120,8 +120,8 @@
msg[0].msg_namelen = 0;
msg[0].msg_iov = i; /* grrrr */
msg[0].msg_iovlen = 0;
- msg[0].msg_accrights = (caddr_t) acc;
- msg[0].msg_accrightslen = sizeof(int);
+ msg[0].msg_control = (caddr_t) acc;
+ msg[0].msg_controllen = sizeof(int);
acc[0] = fd;
@@ -151,15 +151,15 @@
msg[0].msg_namelen = 0;
msg[0].msg_iov = i; /* grrrr */
msg[0].msg_iovlen = 0;
- msg[0].msg_accrights = (caddr_t) acc;
- msg[0].msg_accrightslen = sizeof(int);
+ msg[0].msg_control = (caddr_t) acc;
+ msg[0].msg_controllen = sizeof(int);
do
r = recvmsg(fdcomm,msg,0);
while ((r == -1) && ((errno == EINTR) || (errno == EWOULDBLOCK)));
if (r == -1)
return -1;
- if (msg[0].msg_accrightslen != sizeof(int))
+ if (msg[0].msg_controllen != sizeof(int))
{
errno = ESTUPID; /* it didn't arrive. */
return -1;
diff -aruN pty-4.0.orig/ptymaster.c pty-4.0/ptymaster.c
--- pty-4.0.orig/ptymaster.c Mon Mar 2 11:49:42 1992
+++ pty-4.0/ptymaster.c Tue Feb 15 16:41:12 2011
@@ -68,6 +68,18 @@
static int mfdpreco;
static int flagpreco;
+static disp_mflagreading();
+static disp_flagstopped();
+static disp_flagwatchchld();
+static disp_mfdmty();
+static disp_fdctrlr();
+static disp_fdsigler();
+static disp_fdsig2us();
+static disp_inbufread();
+static disp_inbufwrite();
+static disp_outbufread();
+static disp_outbufwrite();
+
/* This is a kludge to deal with fd passing bugs (particularly under SunOS). */
/* It's also a sanity check. */
void closeallbut()
diff -aruN pty-4.0.orig/ptymisc.c pty-4.0/ptymisc.c
--- pty-4.0.orig/ptymisc.c Mon Mar 2 11:49:20 1992
+++ pty-4.0/ptymisc.c Tue Feb 15 16:42:21 2011
@@ -12,10 +12,9 @@
#define fd_set long
#endif
-extern long time();
long now()
{
- return time((long *) 0);
+ return time(NULL);
}
int gaargh(n) int n;
diff -aruN pty-4.0.orig/timer.c pty-4.0/timer.c
--- pty-4.0.orig/timer.c Mon Mar 2 11:49:37 1992
+++ pty-4.0/timer.c Tue Feb 15 16:38:31 2011
@@ -24,6 +24,8 @@
#define HZ 60 /*XXX*/
#endif
+static int kaboomresched(timer_type);
+
int timer_now(t,result)
timer_type t;
timer_clock *result;
diff -aruN pty-4.0.orig/wall.c pty-4.0/wall.c
--- pty-4.0.orig/wall.c Mon Mar 2 11:49:26 1992
+++ pty-4.0/wall.c Tue Feb 15 16:36:30 2011
@@ -15,7 +15,6 @@
#include "config/utmpfile.h"
extern unsigned short getuid();
extern char *ttyname();
-extern long time();
main()
{
diff -aruN pty-4.0.orig/write.c pty-4.0/write.c
--- pty-4.0.orig/write.c Mon Mar 2 11:49:31 1992
+++ pty-4.0/write.c Tue Feb 15 16:36:42 2011
@@ -15,7 +15,7 @@
#include "fmt.h"
extern unsigned short getuid();
extern char *ttyname();
-extern long time();
+
main(argc,argv)
int argc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment