Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 30 May 2001 09:00:00 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Unix "script" utility continued... cygwin newbie need a porting expert's help.. Message-ID: <20010530090000.B23313@cygbert.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <3B145DA4 DOT D511783C AT lakes DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B145DA4.D511783C@lakes.com>; from pdykes@lakes.com on Tue, May 29, 2001 at 09:40:36PM -0500 On Tue, May 29, 2001 at 09:40:36PM -0500, Perry Dykes wrote: > Still working on making a cygwin "script" utility. First, the source, > found the "script.c" utility in the util-linux rpm. Now attempting to > port. Got the compilation down to 2 problems, the warning, I can > address, but the error gcc spits out at line 387 has me stumped. Does > anyone know if the the following TIOCSCTTY attribute is supported or has > an alternative value: > > (void) ioctl(slave, TIOCSCTTY, 0); Open with O_NOCTTY. > Here is the compilation output: > > $ gcc -I../lib script.c -o script.exe > script.c: In function `main': > script.c:125: warning: assignment makes pointer from integer without a > cast > script.c: In function `getslave': > script.c:387: `TIOCSCTTY' undeclared (first use in this function) > script.c:387: (Each undeclared identifier is reported only once > script.c:387: for each function it appears in.) > > The modified source is attached. In the source file, I have been > avoiding the PTY support, not sure cygwin has that. Advise or where to > look for info on this would be great. Cygwin supports streams ptys: master = open ("/dev/ptmx", O_RDWR); grantpt(master); unlockpt(master); slave = open (ptsname(master), O_RDWR | O_NOCTTY); Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple