zsh-workers
 help / color / mirror / code / Atom feed
* zpty on HP/UX
@ 2004-03-15 16:55 Oliver Kiddle
  2004-03-15 17:11 ` Peter Stephenson
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Kiddle @ 2004-03-15 16:55 UTC (permalink / raw)
  To: Zsh workers

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;
 


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-03-17 14:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15 16:55 zpty on HP/UX Oliver Kiddle
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

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).