Thread View: news.software.nn
1 messages
1 total messages
Started by Jason Molenda
Tue, 18 Sep 1990 14:42
Re: nn 6.4 - Official patch #10
Author: 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 ----
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads