🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #918

term.c won't compile after patch 10

#918
From: 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
Technical Details
Message-ID: <16357@unix.SRI.COM>
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!cs.utexas.edu!rice!uw-beaver!Teknowledge.COM!unix!ace!ric

Show Full Headers
Complete Article Headers
Message-ID: <16357@unix.SRI.COM>
Subject: term.c won't compile after patch 10
Date: Tue, 18 Sep 1990 16:29:07 +0000
From: ric@ace.sri.com (Richard Steinberger)
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!cs.utexas.edu!rice!uw-beaver!Teknowledge.COM!unix!ace!ric
Newsgroups: news.software.nn
Sender: news@unix.SRI.COM
Reply-To: ric@ace.sri.com (Richard Steinberger)
Organization: SRI International
Lines: 63
Posted: Tue Sep 18 17:29:07 1990