Subject: Re: Non-blocking read in ephem
To: None <port-mac68k@NetBSD.ORG>
From: Aaron Mansheim <a-manshe@runet.edu>
List: port-mac68k
Date: 10/28/1996 15:39:20
> On Mon, 28 Oct 1996, Aaron Mansheim wrote:
>
> > * USE_TERMIO: use termio.h instead of older generic sgtty.h.
> >
> > that sgtty.h is considered to be superseded by <sys/ioctl.h> and
> > there's termios.h but no termio.h. OK, what do I do now?
>
> Try compiling with termios.h, and possibly add sys/ioctl.h as well.
Unfortunately, that doesn't work out. Leaving out the petty warnings,
here's what appears:
infundibulum @ /home/aaron/ephem > make
cc -O -c io.c
io.c:65: storage size of `orig_tio' isn't known [that's struct termio orig_tio]
io.c: In function `byetty':
io.c:190: `TCSETA' undeclared (first use this function)
[as in: ioctl (0, TCSETA, &orig_tio);]
io.c: In function `setuptty':
io.c:255: storage size of `tio' isn't known
io.c:257: `TCGETA' undeclared (first use this function)
io.c:264: `TCSETA' undeclared (first use this function)
*** Error code 1
Stop.
So I tried adding
#define termio termios
#define TCGETA TIOCGETA
#define TCSETA TIOCSETA
Result: program compiles, but still doesn't work properly.
I should perhaps mention that I'm running this program in an xterm,
not in dt or console IO.
> If this isn't running setuid or seteuid to root, is there any reason you
> couldn't just replace the call with a getc? Just curious.
Just wouldn't be the same, I guess. :) Thought there might be
an easy answer.
Unless someone has a clear idea what's going on, I'm going to drop the
matter. It wasn't that important to me. One of these days I'll learn
something about these IO functions, but I don't need to right now.
--
Aaron Mansheim, MS exp '97, Computational Sciences, Radford University
<mailto:a-manshe@runet.edu> <http://www.runet.edu/~a-manshe/>