From: root@victrola.sea.wa.us (Vince Skahan)
Newsgroups: comp.os.linux
Subject: tin2.0pl2 porting guide for linux
Date: 14 Oct 92 22:57:14 GMT
Article-I.D.: victrola.1992Oct14.225714.2486
Organization: Vince and Suzie's Underpowered PC

A couple weeks ago, I posted a request for people who had
successfully ported newsreaders to linux to send me their
config files so I could put together a 'newspak' of sorts
to maybe handle the USENET side of linux.

I received the following today regarding trn2.0-pl2 and
wanted to post it in case others want to get it running too.

The following is a good config.sh for trn2.0pl2 under gcc2.2.2d
and jump tables 4.1 with mcc-interim linux 0.97p2 that works with
my 0.97p5 kernel.  

I've added detailed notes concerning *everything* I had to do
to get unmodified trn2.0pl2 to compile and run...works great!

					Vince

---------------------- attachment follows -------------------

(Operator writes:)
>From wariat!turnbull!root@usenet.INS.CWRU.Edu Tue Oct 13 16:40:21 1992
Date: Tue, 13 Oct 92 19:07:10
From: Operator <root@turnbull.wariat.org>
Subject: Re: C-News / trn
To: vds7789@aw2.fsl.ca.boeing.com
Message-Id: <9210131907.AA05851@turnbull.wariat.org>
 "Vincent D. Skahan" at Oct 9, 92 1:43 pm
X-Mailer: ELM [version 2.3 PL11]
X-Envelope-To: vds7789@aw2

> In comp.os.linux you write:
> >	I'm running 0.96c on a 386sx, and recently compiled C-News, my
> >own port, and trn. It almost all works perfectly. The only problem is
> >with the mthreads part of trn, which dumps core when trying to generate
> >threads in some cases. It managed in the initial trivial cases, but once
> >it tried comp.os.linux, it dumped core. Has anyone experienced the same
> >and know a fix?
> 
> could you please mail me your config files and patches (if any)? 
> I'm trying to put together a 'newspak' like Ed Carp's mailpak and 
> would like to add 'trn'.
> 
> I guess it's config.sh that I need unless you know of more.
> 
> I already have C-news and 'tin'.
> 

I'll attach my config.sh here. The only other major thing I remember doing
was changing the names of some variables that were causing conflicts with
curses. It looks as if it is not a good thing to do, but I haven't seen any
ill effects yet.

=============================== vds notes ================================
	
VDS notes - I did the following to get trn2.0-pl2 to compile and run under
	linux 0.97p5 kernel, gcc2.2.2d+jump4.1 over mcc-interim 0.97p2 misc utils

	1. link /usr/lib/libc.a -> /usr/lib/gcc-lib/i386-linux/2.2.2d/libc.a
		so that Configure can find the C-library
	2. link /lib/cpp -> /usr/bin/gcc so the Configure passes the cpp tests
		(stupid, but true)
	3. comment out the fseek definition in /usr/lib/stdio.h, but I suspect
		you could do the same in common.h in the trn sources and get
		the same effects, which is probably smarter than messing with /usr/include
	4. there's no SIGEMT in linux, so change the line with it in init.c
		to "if (0) {" so that path doesn't get used
	5. everything will now compile, but it won't link due to multiple definitions
		in term.h/term.c of BC,UP,PC with the definitions apparently in termlib.
		I changed the variable names to JUNKBC,JUNKUP,JUNKPC in term.c and
		term.h with some global search and replaces, then everything compiles
		and works.
	6. I had to do a 'bison -y getdate.y -o getdate.c' by hand in the middle of
		the make since linux has bison, not yacc

	==> everything including the threads stuff appear to work fine :-)


								Vince Skahan
								vince@victrola.sea.wa.us
								10-14-92

======== cut here to make config.sh and delete the trailing .signature (s) =============

: use /bin/sh
# config.sh
# This file was produced by running the Configure script.

n=''
c='\c'
libc='/usr/lib/libc.a'
sharedclib=''
eunicefix=':'
eunice='undef'
cpp='/lib/cpp'
shsharp='true'
startsh=': use /bin/sh'
spitshell='cat'
test='test'
expr='/usr/bin/expr'
sed='/usr/bin/sed'
echo='echo'
cat='/bin/cat'
rm='/bin/rm'
mv='/bin/mv'
cp='/bin/cp'
tail='/usr/bin/tail'
tr='/usr/bin/tr'
mkdir='/bin/mkdir'
sort='/usr/bin/sort'
uniq='/usr/bin/uniq'
inews='/bin/inews'
grep='/usr/bin/grep'
egrep='/usr/bin/egrep'
nidump=''
ypmatch=''
contains='grep'
lib='/usr/lib/news'
libexp='/usr/lib/news'
nametype='bsd'
cc='gcc'
cflags='-O2'
iandd=''
rrninclude=''
termlib='-ltermcap'
jobslib=''
socketlib=''
getcwd='undef'
getwd='define'
setbuffer='define'
setvbuf='undef'
dirtype='dirent'
dirinc='<dirent.h>'
ndirlib=''
libndir='undef'
usendir='undef'
ndirc=''
ndiro=''
posix=''
pager='/bin/more'
mailer='/bin/mail'
internet='define'
rnbin='/usr/local/bin'
filexp='/usr/lib/news/trn/filexp'
distlist=''
Log='$Log'
Id='$Id'
sitename='turnbull.wariat.org'
hostfile=''
domain='.wariat.org'
orgname="Turnbull's Linux Machine"
isadmin='define'
newsadmin='news'
rnlib='/usr/lib/news/trn'
mtlib='/usr/lib/news/trn'
mansrc='/usr/man/man1'
manext='1'
maildir='/usr/spool/mail/%L'
spool='/usr/spool/news'
serverspool=''
active='/usr/lib/news/active'
myactive='/usr/lib/news/active'
activetimes='/usr/lib/news/active.times'
mininact='define'
pref='/bin/tcsh'
defeditor='/usr/bin/vi'
rootid='0'
mboxchar='F'
locpref='none'
orgpref='none'
citypref='cle'
statepref='oh'
cntrypref='usa'
contpref='na'
strchr='define'
memcpy='undef'
rename='define'
ftruncate='define'
usleep='define'
uselect='undef'
strftime='define'
xnxlib=''
chsize='undef'
tzset='define'
threaddef='FALSE'
selectdef='TRUE'
threaddir='.'
syslog=''
novoid='undef'
novfork='define'
sunos4='undef'
portable='undef'
passnam='define'
berknam='define'
usgnam='undef'
whoami='undef'
termio='define'
termios='undef'
fcntl='define'
ioctl='define'
ptem='undef'
normsig='define'
sigblock='undef'
sigret='void'
sighold='undef'
getuidgid='undef'
havetlib='define'
getpwent='define'
gethostname='undef'
douname='undef'
phostname='undef'
hostcmd=''
norelay='define'
rdchk='undef'
isrrn='undef'
xthread='undef'
serverfile=''
ignoreorg='undef'
NNTPSRC=''
CONFIG=true

========== end of config.sh (delete this line and all following ones ========


-- 
     ---------- Vince Skahan --------- root@victrola.sea.wa.us ----------
    Running Linux/C-news/Tin/Elm/Smail - we don't need no steenkin' MS-DOS