Article View: news.software.readers
Article #4538trn 3.0 vs. POSIX/Suns (Re: Problem compiling trn-3.0 on SGI-Indigo)
From: Greg Earle
Date: Wed, 16 Jun 1993 08:16
Date: Wed, 16 Jun 1993 08:16
66 lines
4169 bytes
4169 bytes
C8ILJD.FK@lerami.lerctr.org> ler@lerami.lerctr.org (Larry Rosenman) writes: >schnoebe@convex.com (Eric Schnoebelen) writes: >>fwp@CC.MsState.Edu writes: >>>The code in Configure that decides whether to use I_TERMIOS or I_SGTTY >>>can be fooled, causing complaints in final.c. >>> >>>Edit config.h and look for the section that defines I_SGTTY. Comment >>>it out and uncomment the previous line (which defines I_TERMIOS) and make. >> >> Personally, I change config.sh, changing i_sgtty to "undef", and >>i_termios to "define". It looks like Configure needs to be modified to >>understand about systems that would prefer to run in POSIX termios >>mode. > >Same here, I changed config.sh for this as well as the sys/dir.h vs. dirent.h >problem, and all the warnings and errors went away. > >>> This problem also affects Suns running Solaris 2.x. >> >> It also affects HP 9000/700's running HPUX 9.0. And CONVEXen, >>running anything after ConvexOS 8.1 would prefer termios if building in >>the extended mode of the Convex C compiler, but Configure's choice of >>sgtty works as well. > >SVR4 (at least on my Amiga) has the same preference (actually, sgtty.h doesn't >cut it for me...) > >I agree that Configure needs to probably be biased towards the POSIX functions >if they are available. I would have agreed with you (this last sentence) if my experience hadn't been exactly the opposite. A few months ago, I was in dire need of a dial-back program for Suns running SunOS 4.1.3. I found an old one posted several years ago by some Finnish folks but it wouldn't work. In trying to fix it, I decided to try porting it to use the "termios" stuff while I was at it. To make a long story short, the net result was that the finished product (elroy.JPL.NASA.GOV:~ftp/pub/dialback.tar, if you're interested) works like a champ, and very fast (when it comes to doing terminal I/O on the modem lines, that is) to boot. So, when it came time to try and get strn 0.8.8 (based on trn 3.0) going, my thinking was the same as the quoted posters - i.e., I knew it (Configure) would automagically choose I_SGTTY. So I edited config.h, commented out the #define of I_SYS_IOCTL and I_SGTTY, enabled I_TERMIOS, and fired up "make". The net result (and this also happened when I tried I_TERMIO, instead) was that the very first read() from stdin (the terminal) in term.c::read_tty() resulted in the read() immediately returning a -1 with EWOULDBLOCK. This causes term.c::getcmd() to go belly-up and cause a self-abort. (I had thought that the "fcntl(devtty,F_SETFL,O_NDELAY);" in term.c::term_set() on /dev/tty might prevent this, but it turned out /dev/tty was on a different fd, and the read() in read_tty() is reading from stdin.) After spending a short time trying to figure out why the read() kept getting EWOULDBLOCK I gave up and went back to having I_SGTTY #define'd, and once I did that, everything was copacetic after that ... (If anyone knows why using termios doesn't work on SunOS 4.1.3, I'm all ears.) -- - Greg Earle Phone: (818) 353-8695 FAX: (818) 353-1877 Internet: earle@isolar.Tujunga.CA.US UUCP: isolar!earle@elroy.JPL.NASA.GOV a.k.a. ...!elroy!isolar!earle
Technical Details
Message-ID:
<1vmktg$jgd@isolar.Tujunga.CA.US>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sys.sun.admin.mbox.zip!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!isolar!isolar!not-for-mailReferences:
<1v2ecp$2id@jester.cc.msstate.edu> <1v2g2h$1kk@lovecraft.convex.com> <C8ILJD.FK@lerami.lerctr.org>Show Full Headers
Complete Article Headers
Message-ID: <1vmktg$jgd@isolar.Tujunga.CA.US> Subject: trn 3.0 vs. POSIX/Suns (Re: Problem compiling trn-3.0 on SGI-Indigo) Date: Wed, 16 Jun 1993 08:16:48 +0000 From: earle@isolar.Tujunga.CA.US (Greg Earle) References: <1v2ecp$2id@jester.cc.msstate.edu> <1v2g2h$1kk@lovecraft.convex.com> <C8ILJD.FK@lerami.lerctr.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sys.sun.admin.mbox.zip!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!isolar!isolar!not-for-mail Newsgroups: news.software.readers,comp.sys.sun.admin Followup-To: news.software.readers Organization: Personal Usenet site, Tujunga, CA USA Lines: 65 Distribution: world NNTP-Posting-Host: isolar.tujunga.ca.us Keywords: sgtty termio termios