jbs@hropus.UUCP (J.B.Skiendziel) (08/20/86)
When I try to compile (make) the new larn code I keep on getting this error: cc -c -O -DEXTRA -DSYSV -DVER=12 -DSUBVER=0 -DWIZID=300 -DVT100 -DHIDEBYLINK -DNOVARARGS -DLARNHOME=\"/r3/rbr/NL/\" tok.c "tok.c", line 62: FIONREAD undefined "tok.c", line 101: FIONREAD undefined *** Error code 1 Stop. Does any one have any suggestions on how to compile it?? I'm trying to compile it on a VAX 8600 System 5 release 2 Email address : ihnp4!houxm!hropus!jbs
heiby@cuae2.UUCP (Ron Heiby) (08/21/86)
Here are the changes I made to my SVR2.1 system to tok.c to get things to appear to work. I've included just a few lines near the two ioctls that use FIONREAD. I've played very little, so don't know if my changes have fixed all cases. Also, the problem with the initializers in signal.c is because the definition of signame[] includes signame[NSIG], which is 20 on SVR2 machines, but there are more than 20 initializers. The approach I took was to change the definition to "static char *signame[] = ..." to allow the compiler to figure out how much space to allocate. ------ from tok.c ------ #ifndef SYSV do /* if keyboard input buffer is too big, flush some of it */ { ioctl(0,FIONREAD,&ic); if (ic>flushno) read(0,&cc,1); } while (ic>flushno); #endif if (read(0,&cc,1) != 1) return(lastok = -1); if (cc == 'Y'-64) /* control Y -- shell escape */ { .................. /* * flushall() Function to flush all type-ahead in the input buffer */ flushall() { char cc; int ic; for (;;) /* if keyboard input buffer is too big, flush some of it */ { #ifdef SYSV ioctl(0,TCFLSH,0); return; #else ioctl(0,FIONREAD,&ic); if (ic<=0) return; while (ic>0) { read(0,&cc,1); --ic; } /* gobble up the byte */ #endif } } -- Ron Heiby {NAC|ihnp4}!cuae2!heiby Moderator: mod.newprod & mod.os.unix AT&T-IS, /app/eng, Lisle, IL (312) 810-6109 "'Cause there's lots of things in this world that need to BE turned around."
shipley@violet.berkeley.edu (Peter) (08/22/86)
In article <636@hropus.UUCP> jbs@hropus.UUCP (J.B.Skiendziel) writes: > >When I try to compile (make) the new larn code I keep on getting this error: > > > cc -c -O -DEXTRA -DSYSV -DVER=12 -DSUBVER=0 -DWIZID=300 -DVT100 -DHIDEBYLINK -DNOVARARGS -DLARNHOME=\"/r3/rbr/NL/\" tok.c >"tok.c", line 62: FIONREAD undefined >"tok.c", line 101: FIONREAD undefined >*** Error code 1 > >Stop. > > >Does any one have any suggestions on how to compile it?? >I'm trying to compile it on a VAX 8600 System 5 release 2 > >Email address : > ihnp4!houxm!hropus!jbs this has been brought up before. comment FIONREAD out I use to be shipley@pavepaws.Berkeley.EDU but pavepaws kicked the bucket... R.I.P (Sigh) +---------------------------------------+ | Pete Shipley: | | | |email: shipley@violet.berkeley.edu | | ucbvax!violet!shipley | | | |Flames: cc-26@cory.berkeley.edu | | ucbvax!cory!cc-26 | | | |Spelling | |corections: /dev/null | +---------------------------------------+