summaryrefslogtreecommitdiff
path: root/misc/tmux
diff options
context:
space:
mode:
Diffstat (limited to 'misc/tmux')
-rw-r--r--misc/tmux/distinfo3
-rw-r--r--misc/tmux/patches/patch-client.c55
2 files changed, 57 insertions, 1 deletions
diff --git a/misc/tmux/distinfo b/misc/tmux/distinfo
index 6b104310bdd..01a344fbf3f 100644
--- a/misc/tmux/distinfo
+++ b/misc/tmux/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.18 2012/10/21 14:49:01 wen Exp $
+$NetBSD: distinfo,v 1.19 2013/01/08 12:36:07 jperkin Exp $
SHA1 (tmux-1.7.tar.gz) = ee6942a1bc3fc650036f26921d80bc4b73d56df6
RMD160 (tmux-1.7.tar.gz) = ff4f5fec48627378654c902ff0bee49a4ceaa026
Size (tmux-1.7.tar.gz) = 407164 bytes
+SHA1 (patch-client.c) = e37053d721bd26d31783af883a7d1f6870095325
diff --git a/misc/tmux/patches/patch-client.c b/misc/tmux/patches/patch-client.c
new file mode 100644
index 00000000000..0d127013c93
--- /dev/null
+++ b/misc/tmux/patches/patch-client.c
@@ -0,0 +1,55 @@
+$NetBSD: patch-client.c,v 1.1 2013/01/08 12:36:07 jperkin Exp $
+
+Add Solaris compatability.
+
+--- client.c.orig 2012-10-11 16:51:06.000000000 +0000
++++ client.c 2013-01-08 12:21:54.006769094 +0000
+@@ -74,16 +74,32 @@
+ client_get_lock(char *lockfile)
+ {
+ int lockfd;
++#ifdef __sun
++ struct flock lock;
++ lock.l_type= F_WRLCK;
++ lock.l_whence= SEEK_SET;
++ lock.l_start= 0;
++ lock.l_len= 0;
++#endif
+
+ if ((lockfd = open(lockfile, O_WRONLY|O_CREAT, 0600)) == -1)
+ fatal("open failed");
+
++#ifdef __sun
++ if (fcntl(lockfd, F_SETLK, &lock) == -1) {
++ while (fcntl(lockfd, F_SETLKW, &lock) == -1 && errno == EINTR)
++ /* nothing */;
++ close(lockfd);
++ return(-1);
++ }
++#else
+ if (flock(lockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK) {
+ while (flock(lockfd, LOCK_EX) == -1 && errno == EINTR)
+ /* nothing */;
+ close(lockfd);
+ return (-1);
+ }
++#endif
+
+ return (lockfd);
+ }
+@@ -243,7 +259,15 @@
+ strerror(errno));
+ return (1);
+ }
++#ifdef __sun
++ tio.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
++ tio.c_oflag &= ~OPOST;
++ tio.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
++ tio.c_cflag &= ~(CSIZE|PARENB);
++ tio.c_cflag |= CS8;
++#else
+ cfmakeraw(&tio);
++#endif
+ tio.c_iflag = ICRNL|IXANY;
+ tio.c_oflag = OPOST|ONLCR;
+ #ifdef NOKERNINFO