Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!widener!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!silvert From: silvert@cs.dal.ca (Bill Silvert) Newsgroups: comp.sys.sgi Subject: Re: ioctl Message-ID: <1991May22.143844.6858@cs.dal.ca> Date: 22 May 91 14:38:44 GMT References: <1991May21.224750.535@murdoch.acc.Virginia.EDU> Sender: silvert@cs.dal.ca.UUCP (Bill Silvert) Reply-To: silvert%biome@cs.dal.ca Distribution: na Organization: Habitat Ecology Div., Bedford Inst. of Oceanography Lines: 22 In article <1991May21.224750.535@murdoch.acc.Virginia.EDU> acl3k@agate.cs.Virginia.EDU (Allan Christian Long) writes: > > if (ioctl(trackerPtr->fileDescriptor, FIONREAD, &charsToRead) < 0) > >The first parameter is a file descriptor and the third is a pointer to >a long. FIONREAD is a parameter from the termio.h file. I have RTFM'ed >until I'm blue in the face, but I can't find FIONREAD mentioned anywhere >in any of the manuals. The SunOS manual has a page on "filio" that >describes this parameter, but there is no filio page for IRIX. On my PI with Irix 3.3.1 the value of FIONREAD is defined in sys/ioctl.h, not in sys/termio.h -- termio.h defines oFIONREAD, but you need to look at ioctl.h and figure out the cryptic low-level code there to get the value of FIONREAD. As a general rule, I find that grepping my way through /usr/include and /usr/include/sys is the best way to solve these header problems. -- William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2. Tel. (902)426-1577 UUCP=..!{uunet|watmath}!dalcs!biome!silvert BITNET=silvert%biome%dalcs@dalac InterNet=silvert%biome@cs.dal.ca