From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1301 invoked from network); 15 Mar 2004 16:56:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Mar 2004 16:56:15 -0000 Received: (qmail 9218 invoked by alias); 15 Mar 2004 16:56:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19624 Received: (qmail 9131 invoked from network); 15 Mar 2004 16:56:06 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Mar 2004 16:56:06 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [193.109.254.211] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Mar 2004 16:56:6 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-10.tower-36.messagelabs.com!1079369765!4657312 X-StarScan-Version: 5.2.5; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 4588 invoked from network); 15 Mar 2004 16:56:05 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-10.tower-36.messagelabs.com with SMTP; 15 Mar 2004 16:56:05 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i2FGu5Ck006972 for ; Mon, 15 Mar 2004 16:56:05 GMT Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 99EC379721C1 for ; Mon, 15 Mar 2004 17:55:20 +0100 (CET) X-VirusChecked: Checked X-StarScan-Version: 5.1.13; banners=.,-,- From: Oliver Kiddle To: Zsh workers Subject: zpty on HP/UX Date: Mon, 15 Mar 2004 17:55:20 +0100 Message-ID: <3716.1079369720@trentino.logica.co.uk> 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;