🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
1 messages
1 total messages Started by Richard Steinberger Tue, 18 Sep 1990 16:29
term.c won't compile after patch 10
#918
Author: Richard Steinberger
Date: Tue, 18 Sep 1990 16:29
63 lines
2264 bytes
	I have recently applied patch 10 to my nn sources and notice that
term.c will no longer compile without error.  This is what happens:

-------------------------------------------------
cc -Iconf  -g -c term.c
"term.c", line 828: syntax error
"term.c", line 829: arg undefined
*** Exit 1

Stop.

-------------------------------------------------

This is the relevant code from term.c:

-------------------------------------------------

flush_input()
{
    BATCH_CHECK;

#ifdef HAVE_TERMIO
    ioctl(0, TCFLSH, 0);
    do_flush_input = 1;
#else
#ifdef FREAD
    int arg = FREAD;                     /* This is line 828 */
    ioctl(0, TIOCFLUSH, &arg);
#else
    ioctl(0, TIOCFLUSH, 0);
#endif

--------------------------------------------

This is the expanded code, attained by use of the -E argument on the cc
command:

------------------------------------------------------
flush_input()
{
    if (terminal_speed == 0) return 0;

# 826 "term.c"


    int arg =   000001          ;
    ioctl(0,    (       0x80000000      |((sizeof( int)&0x1fff          )<<16)|\
('t'<<8)| 16)    , &arg);

-------------------------------------------------------

Since BATCH_CHECK seems to expand to executable code, I am wondering if the
compiler doesn't like the variable arg in line 828 defined after this.

Could Kim or someone else who may have encountered and solved this problem
please reply with a solution.  Thanks for any help or suggestions.


regards,

	ric steinberger
	ric@ace.sri.com
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