Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zpty on HP/UX
- X-seq: zsh-workers 19624
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: zpty on HP/UX
- Date: Mon, 15 Mar 2004 17:55:20 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I've got zpty to work on HP/UX. I looked at pts(7) and tried the example
in there.
Basically it needs the ioctl streams stuff but not the ttcompat bit. See
the patch below to see what needed removing. Note that this isn't a patch
I intend to apply but merely in indication of the changes. We need to
sort out the #if stuff.
We can put the ttcompat ioctl inside a #ifndef __hpux but the __SVR4
part is going to cause us problems. What systems was that added to cover?
Oliver
Index: zpty.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zpty.c,v
retrieving revision 1.30
diff -u -r1.30 zpty.c
--- zpty.c 26 Feb 2004 20:48:09 -0000 1.30
+++ zpty.c 15 Mar 2004 16:39:04 -0000
@@ -165,9 +165,7 @@
{
static char *name;
static int mfd, sfd;
-#if defined(I_FIND) && defined(I_PUSH) && defined(__SVR4)
int ret;
-#endif
if (master) {
if ((mfd = open("/dev/ptmx", O_RDWR|O_NOCTTY)) < 0)
@@ -190,7 +188,6 @@
close(mfd);
return 1;
}
-#if defined(I_FIND) && defined(I_PUSH) && defined(__SVR4)
/*
* Use if STREAMS is available. The test is probably OK,
* but we could use e.g. the sys/stropts.h test.
@@ -207,13 +204,6 @@
close(sfd);
return 1;
}
- if ((ret = ioctl(sfd, I_FIND, "ttcompat")) != 1)
- if (ret == -1 || ioctl(sfd, I_PUSH, "ttcompat") == -1) {
- close(mfd);
- close(sfd);
- return 1;
- }
-#endif
*retfd = sfd;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author