Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!snorkelwacker!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!mahendo!wlbr!WLV.IMSD.CONTEL.COM!sms From: sms@WLV.IMSD.CONTEL.COM (Steven M. Schultz) Newsgroups: comp.unix.wizards Subject: Re: Strange SUN behaviour. Message-ID: <38863@wlbr.IMSD.CONTEL.COM> Date: 23 Oct 89 19:40:13 GMT References: <218@oasis.mrcu> <219@oasis.mrcu> Sender: news@wlbr.IMSD.CONTEL.COM Reply-To: sms@WLV.IMSD.CONTEL.COM.UUCP (Steven M. Schultz) Organization: Contel Federal Systems Lines: 22 In article rowe@cme.nist.gov (Walter Rowe) writes: >Here is another possibility for you: > > ioctl (fd, FIONREAD, &nchar) > int fd; > int nchar; > >The value returned in `nchar' is the number of characters waiting to >be read from file descriptor `fd'. int nchar; should be long nchar; sizeof (int) != sizeof (long) Steven M. Schultz sms@wlv.imsd.contel.com