Article View: news.software.nn
Article #917Re: nn 6.4 - Official patch #10
From: Jason Molenda
Date: Tue, 18 Sep 1990 14:42
Date: Tue, 18 Sep 1990 14:42
64 lines
2358 bytes
2358 bytes
Compiling 6.4.10 will be a problem under some systems. I had the problem
surface on a Sun-3 running SunOS 4.0
flush_input()
{
BATCH_CHECK;
#ifdef HAVE_TERMIO
ioctl(0, TCFLSH, 0);
do_flush_input = 1;
#else
#ifdef FREAD
int arg = FREAD;
ioctl(0, TIOCFLUSH, &arg);
#else
ioctl(0, TIOCFLUSH, 0);
#endif
#endif
}
The problem is that FREAD is defined in /usr/include/sys/file.h, and
BATCH_CHECK expands to an 'if' statement, and having variable
declarations in the middle of code is a no-no. A simple solution is to
move the variable decleration to the top of the function with one extra
#ifdef..#endif clause added.
Otherwise, the installation of the new nn was a snap. Looks great,
Kim! thanks!
Here's a patch; no guarantees that it will work for you or that it
won't cause nn to eat up your whole filesystem; Patch at your Own
Risk. This is, obviously, not an official patch. Keep in mind that I
did this early in the morning before I had my Wheaties. Void where
prohibited by law. :-)
-------
Jason Molenda, Tech Support, Iris & News admin, Minnesota Supercomputer Inst
molenda@msi.umn.edu
*** term.c.old Tue Sep 18 09:12:46 1990
--- term.c Tue Sep 18 09:14:27 1990
***************
*** 818,823 ****
--- 818,826 ----
flush_input()
{
+ #ifdef FREAD
+ int arg = FREAD;
+ #endif
BATCH_CHECK;
#ifdef HAVE_TERMIO
***************
*** 825,831 ****
do_flush_input = 1;
#else
#ifdef FREAD
- int arg = FREAD;
ioctl(0, TIOCFLUSH, &arg);
#else
ioctl(0, TIOCFLUSH, 0);
--- 828,833 ----
Technical Details
Message-ID:
<1990Sep18.144204.13037@msi.umn.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!ucsd!rutgers!ub.d.umn.edu!cs.umn.edu!msi-s0.msi.umn.edu!molendaShow Full Headers
Complete Article Headers
Message-ID: <1990Sep18.144204.13037@msi.umn.edu> Subject: Re: nn 6.4 - Official patch #10 Date: Tue, 18 Sep 1990 14:42:04 +0000 From: molenda@msi.umn.edu (Jason Molenda) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!ucsd!rutgers!ub.d.umn.edu!cs.umn.edu!msi-s0.msi.umn.edu!molenda Newsgroups: news.software.nn Summary: One small problem with patch #10 (with unofficial fix) Organization: Minnesota Supercomputer Institute Lines: 64 Posted: Tue Sep 18 15:42:04 1990