summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorheinz <heinz@pkgsrc.org>2006-02-19 01:28:53 +0000
committerheinz <heinz@pkgsrc.org>2006-02-19 01:28:53 +0000
commitd75baa6296af60ce3151e02f84383d851f31ca8d (patch)
tree338f6adc3496678301fd09d3c4efd81917dd24ed /devel
parent1d060c84eda97ea8d8a1de82810a8bc703de5994 (diff)
downloadpkgsrc-d75baa6296af60ce3151e02f84383d851f31ca8d.tar.gz
IO::Tty was broken on NetBSD >= 3.0.
patch-ab is only an unintrusive short-term fix, discussion with the authors how to fix it correctly has started. NetBSD >= 3.0 supports grantpt() but it invalidates the slave FD (see grantpt(3) on NetBSD) obtained through openpty() so we discard the (now invalid) descriptor for the slave tty. This causes Tty.xs to open the slave tty again. The issue should be really fixed by using posix_openpt() instead of openpty(). The functions posix_openpt(), grantpt(), unlockpt() and ptsname() belong together and should be used ahead of all the other ways to create the master and slave tty, not just on NetBSD. See also http://www.opengroup.org/onlinepubs/009695399/functions/posix_openpt.html
Diffstat (limited to 'devel')
-rw-r--r--devel/p5-IO-Tty/Makefile4
-rw-r--r--devel/p5-IO-Tty/distinfo3
-rw-r--r--devel/p5-IO-Tty/patches/patch-ab28
3 files changed, 32 insertions, 3 deletions
diff --git a/devel/p5-IO-Tty/Makefile b/devel/p5-IO-Tty/Makefile
index 846fc7c8e69..af7e7024616 100644
--- a/devel/p5-IO-Tty/Makefile
+++ b/devel/p5-IO-Tty/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.17 2005/08/06 06:19:11 jlam Exp $
+# $NetBSD: Makefile,v 1.18 2006/02/19 01:28:53 heinz Exp $
#
DISTNAME= IO-Tty-1.02
PKGNAME= p5-${DISTNAME:C/T/t/}
SVR4_PKGNAME= p5itt
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=IO/}
diff --git a/devel/p5-IO-Tty/distinfo b/devel/p5-IO-Tty/distinfo
index dde391a4072..6a0df68c367 100644
--- a/devel/p5-IO-Tty/distinfo
+++ b/devel/p5-IO-Tty/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.6 2005/02/23 22:24:26 agc Exp $
+$NetBSD: distinfo,v 1.7 2006/02/19 01:28:53 heinz Exp $
SHA1 (IO-Tty-1.02.tar.gz) = 466e634f5863190a25cb9f3c0878cfe2fe68a3a0
RMD160 (IO-Tty-1.02.tar.gz) = ac3ec521bad4f7835a9c15cbeb60fe6f85399f98
Size (IO-Tty-1.02.tar.gz) = 23105 bytes
+SHA1 (patch-ab) = 3465382b06e4facf1b5b5403b69fa7ff1011ff9a
diff --git a/devel/p5-IO-Tty/patches/patch-ab b/devel/p5-IO-Tty/patches/patch-ab
new file mode 100644
index 00000000000..e2d050c4e11
--- /dev/null
+++ b/devel/p5-IO-Tty/patches/patch-ab
@@ -0,0 +1,28 @@
+$NetBSD: patch-ab,v 1.1 2006/02/19 01:28:53 heinz Exp $
+
+--- Tty.xs.orig 2002-03-06 14:47:32.000000000 +0100
++++ Tty.xs
+@@ -300,6 +300,23 @@ open_slave(int *ptyfd, int *ttyfd, char
+ if (PL_dowarn)
+ warn("IO::Tty::pty_allocate(nonfatal): grantpt(): %.100s", strerror(errno));
+ }
++
++#if defined(__NetBSD__)
++ /* NetBSD >= 3.0 supports grantpt() but it invalidates the slave
++ FD (see grantpt(3) on NetBSD) obtained through openpty().
++ The slave device will be opened again below.
++ */
++ *ttyfd = -1;
++
++ /* The issue should be really fixed by using posix_openpt() instead of
++ openpty(). The functions posix_openpt(), grantpt(), unlockpt()
++ and ptsname() belong together and should be used ahead of
++ all the other ways to create the master and slave tty, not just
++ on NetBSD. See also
++ http://www.opengroup.org/onlinepubs/009695399/functions/posix_openpt.html
++ */
++#endif
++
+ #endif /* HAVE_GRANTPT */
+ #if defined(HAVE_UNLOCKPT)
+ #if PTY_DEBUG