[news.software.b] News B.11 on SunOS4.1

swc@sys.uea.ac.uk (S.W. Cox CMP Staff) (06/26/90)

Hi, I'm having problems compiling News-b.11 on our SunOS4.1 system.

At the moment it is running on a 3.5 system but our site is upgrading
and moving mail/news etc to a seperate comms. machine.

I'm trying to install News-b.11 on this comms. Sun 3/160 OS4.1 but
it refuses to compile.......

The only changes make from the original sources on the 3.5 machine
is the localise.sh file (and therefore the defs.h file and Makefile)
but these are only three minor changes - defining GHNAME DOXREFS
and the name for HIDDENNET.

The error the compilation make returns with is: 


cc  -O -DDBM -DRNEWS=\"/usr/bin/rnews\" -DSPOOLDIR=\"/usr/spool/news\"  -DBATCHDIR=\"/usr/spool/batch\" -DLIBDIR=\"/usr/lib/news\"  -DBINDIR=\"/usr/bin\" -DNEWSUSR=\"news\"  -DNEWSGRP=\"news\" -DSCCSID -Dvfork=fork -I../nntp/common  -c ifuncs.c
"/usr/include/unistd.h", line 115: redeclaration of sleep
*** Error code 1
make: Fatal error: Command failed for target `ifuncs.o'



I looked at /usr/include/unistd.h on both systems and found that they were
different:

SunOS3.5

/*	@(#)unistd.h 1.2 86/10/07 SMI; from SysV 1.5 */


SunOS4.1

/*	@(#)unistd.h 1.12 89/10/04 SMI; from S5R3 1.5 */


I assumed the source I had was outdated so recieved a new copy from the
info server at ic.soc.src. However, on trying to compile this code
I had exactly the same problem.


So now I'm stuck......  We want this software working before we move
comms over to this new machine and upgrade the others to OS4.1.


Any ideas?????

PLEASE EMAIL AS WE MAY HAVE MOVED THE COMMS BY NOW.

Steve Cox

	swc@sys.uea.ac.uk 

guy@auspex.auspex.com (Guy Harris) (06/28/90)

>I looked at /usr/include/unistd.h on both systems and found that they were
>different:

Yup, POSIX - which 4.1 supports - requires that <unistd.h> declare
"sleep()", and that it be declared as "unsigned int".

>So now I'm stuck......  We want this software working before we move
>comms over to this new machine and upgrade the others to OS4.1.
>
>
>Any ideas?????

Put a declaration "unsigned sleep();" into "ifuncs.c" just before the
declaration of "lseek();".  If the same problem shows up elsewhere, put
the declaration in there as well....