From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@sunsite.dk>
Subject: zpty on HP/UX
Date: Mon, 15 Mar 2004 17:55:20 +0100 [thread overview]
Message-ID: <3716.1079369720@trentino.logica.co.uk> (raw)
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;
next reply other threads:[~2004-03-15 16:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-15 16:55 Oliver Kiddle [this message]
2004-03-15 17:11 ` Peter Stephenson
2004-03-16 15:07 ` PATCH: " Peter Stephenson
2004-03-16 19:47 ` Oliver Kiddle
2004-03-16 23:50 ` mneptok
2004-03-17 10:12 ` Oliver Kiddle
2004-03-17 10:23 ` PATCH: zpty on HP/UX (and Mac OS X 10.3) James Devenish
2004-03-17 11:10 ` mneptok
2004-03-17 11:34 ` Mac OS X 10.3 again [was: PATCH: zpty on HP/UX] James Devenish
2004-03-17 13:19 ` Mac OS X 10.3 again James Devenish
2004-03-17 11:19 ` PATCH: zpty on HP/UX (and Mac OS X 10.3) Oliver Kiddle
2004-03-17 13:02 ` zpty on Mac OS X 10.2 Peter Stephenson
2004-03-17 14:00 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3716.1079369720@trentino.logica.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).