Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!cse!texas!harrison From: harrison@csl.dl.nec.com (Mark Harrison) Newsgroups: comp.lang.perl Subject: Re: can't get ioctl value Keywords: close but still no cigar Message-ID: <1991May20.162515.24759@csl.dl.nec.com> Date: 20 May 91 16:25:15 GMT References: <1991May15.003413.22693@csl.dl.nec.com> Organization: NEC America, C & C Software Development Lab Lines: 46 Following up to my own article, I am coming closer to figuring out why my ioctl's are not working. It seems that I am not getting a definition of struct something, or of &int. Any suggestions? Did I leave out a step somewhere to the the definitions of struct and &int? These lines are from /usr/local/lib/perl/sys/ttycom.ph: > eval 'sub TIOCGWINSZ { &_IOR("t", 104, struct winsize);}'; > eval 'sub TIOCSCTTY { &_IO("t", 132);}'; > eval 'sub TIOCGPGRP { &_IOR("t", 119, &int);}'; my test program: ---------------- #!/usr/local/bin/perl require "sys/ioctl.ph"; require "sys/ioccom.ph"; require "sys/ttycom.ph"; print "defined(&TIOCSCTTY)=", defined(&TIOCSCTTY), "\n"; $x = &TIOCSCTTY; print "value is :$x:\n\n"; print "defined(&TIOCGWINSZ)=", defined(&TIOCGWINSZ), "\n"; $x = &TIOCGWINSZ; print "value is :$x:\n\n"; print "defined(&TIOCGPGRP)=", defined(&TIOCGPGRP), "\n"; $x = &TIOCGPGRP; print "value is :$x:\n\n"; Output: ------- defined(&TIOCSCTTY)=1 value is :536900740: defined(&TIOCGWINSZ)=1 value is :: defined(&TIOCGPGRP)=1 Undefined subroutine "main'int" called at (eval) line 1. -- Mark Harrison | Note: harrison@ssd.dl.nec.com and harrison@csl.dl.nec.com | necssd!harrison are not operating at (214)518-5050 | present. Please forward mail through the | above address. Sorry for the inconvenience.