[comp.unix.i386] remote rn under 386/ix

dmocsny@minerva.che.uc.edu (Daniel Mocsny) (03/30/90)

Recently I described my successful efforts to build remote rn
under 386/ix 2.0.2. Thanks again to those who advised me. At the
time, I also asked if anyone had experience with running remote
rn under 386/ix. I did not get any response, so I thought I might
mention here that remote rn will work under 386/ix, and the
'mini-inews' from Dartmouth will compile and run. That is the
necessary program that allows remote rn to post news from your
nntp client machine. I am posting now with this software.

However, I had one slight hitch with the mini-inews. The software
contains a file called uname.c that contains a routine for identifying
your host name. This file has several alternative sections of code
depending on some #define's in a header file where you specify how
the software will determine your system name. One option is to
tell the software to use gethostname(). Since this function is
part of the TCP/IP package in 386/ix, I thought that would be
an appropriate method to try. Well, for some reason, I could get
inews to compile using gethostname() but it would never run
correctly. The program would just halt, and them dump core.

So I gave up and tried telling the software to use a file
/usr/include/whoami.h, as the documentation suggested as an
alternative. After I figured out exactly what the program wanted
to see in that file, the inews worked fine. It wanted a line like
this:

#define sysname "systemname"

where systemname is (you guessed it) your system name.

That seems to work, but I am not sure how I blew it with
gethostname(). I stuck the -linet option in the makefile to
pick up the internet protocols library. The TCP/IP manual
doesn't say you need to include any header files for
gethostname(). (Or at least I didn't see it if it did. Nice
manual, BTW, really love that index :-).

So, the question: am I just being really stooopid, or is something
wrong with gethostname() in general, or on my system?

Thanks for all replies, rumors, flames, etc.


--
Dan Mocsny				Snail:
Internet: dmocsny@minerva.che.uc.edu	Dept. of Chemical Engng. M.L. 171
	  dmocsny@uceng.uc.edu		University of Cincinnati
513/751-6824 (home) 513/556-2007 (lab)	Cincinnati, Ohio 45221-0171