*BSD News Article 7299


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!sdd.hp.com!wupost!gumby!destroyer!cs.ubc.ca!unixg.ubc.ca!sitka.triumf.ca!felawka
From: felawka@sitka.triumf.ca (Larry Felawka)
Newsgroups: comp.unix.bsd
Subject: Port of nntp 1.5.11 to 386BSD
Date: 2 Nov 1992 16:19:58 GMT
Organization: TRIUMF, Vancouver BC
Lines: 286
Distribution: world
Message-ID: <1d3kfeINNmqd@iskut.ucs.ubc.ca>
NNTP-Posting-Host: sitka.triumf.ca
Keywords: Port nntp 386BSD

Fellow 386BSD enthusiasts,

I am enclosing patches to nntp 1.5.11 (a package to set up your machine as
an NNTP News server and/or client) for 386BSD.  The patches and sources are
available in directory "/pub/incoming" of node "agate.berkeley.edu" in the
files

	nntp.1.5.11.patch.386BSD
	nntp.1.5.11.tar.Z

The usual caveats, disclaimers and disavowals of responsibilty apply.  Enjoy!


					Larry Felawka

*** common/conf.h.dist.orig	Fri Feb  8 16:31:07 1991
--- common/conf.h.dist	Mon Oct 26 17:23:32 1992
***************
*** 23,32 ****
   */
  #undef DYNAMIC_ART_ARRAY
  
! #undef	BSD_42		/* 4.2 compatability code -- if this is defined, */
  			/* DBM probably wants to be defined as well. */
  
! #define BSD_43		/* Define if you are running on BSD 4.3 */
  
  #undef CMU_MACH		/* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */
  
--- 23,32 ----
   */
  #undef DYNAMIC_ART_ARRAY
  
! #define	BSD_42		/* 4.2 compatability code -- if this is defined, */
  			/* DBM probably wants to be defined as well. */
  
! #undef BSD_43		/* Define if you are running on BSD 4.3 */
  
  #undef CMU_MACH		/* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */
  
***************
*** 35,41 ****
  #undef TLI		/* Define this if you want to use TLI instead of */
  			/* sockets */
  
! #define NDBM		/* Use new-style (4.3) ndbm(3x) libraries */
  
  #undef	DBM		/* True if we want to use the old dbm(3x) libraries */
  			/* IF YOU DEFINE THIS, change CFLAGS in makefile to */
--- 35,41 ----
  #undef TLI		/* Define this if you want to use TLI instead of */
  			/* sockets */
  
! #undef NDBM		/* Use new-style (4.3) ndbm(3x) libraries */
  
  #undef	DBM		/* True if we want to use the old dbm(3x) libraries */
  			/* IF YOU DEFINE THIS, change CFLAGS in makefile to */
***************
*** 45,51 ****
  			/* IF YOU DEFINE THIS, change CFLAGS in makefile to */
  			/* be /usr/lib/dbz.o and install dbz.h */
  
! #undef	USGHIST		/* Use USG style history file (no DBM) */
  			/* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/
  
  #undef CNEWS		/* define this if you are running C-NEWS */
--- 45,51 ----
  			/* IF YOU DEFINE THIS, change CFLAGS in makefile to */
  			/* be /usr/lib/dbz.o and install dbz.h */
  
! #define	USGHIST		/* Use USG style history file (no DBM) */
  			/* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/
  
  #undef CNEWS		/* define this if you are running C-NEWS */
***************
*** 213,219 ****
   * Person (user name) to post news as.
   */
  
! #define	POSTER		"usenet"
  
  /*
   * Define DOMAINMATCH if you want to use domain specifications in the 
--- 213,219 ----
   * Person (user name) to post news as.
   */
  
! #define	POSTER		"root"
  
  /*
   * Define DOMAINMATCH if you want to use domain specifications in the 
***************
*** 292,298 ****
  
  #ifdef BSD_42		/* This is a logical, warranted assumption */
  #   ifndef DBM		/* which will probably get me in trouble. */
! #	define DBM	/* Kill it if you have 4.2 *and* ndbm.  */
  #   endif not DBM
  #   ifndef sun		/* not a sun */
  #       ifndef ultrix   /* not ultrix */
--- 292,300 ----
  
  #ifdef BSD_42		/* This is a logical, warranted assumption */
  #   ifndef DBM		/* which will probably get me in trouble. */
! #       ifndef __386BSD__
! #	    define DBM	/* Kill it if you have 4.2 *and* ndbm.  */
! #       endif not __386BSD__
  #   endif not DBM
  #   ifndef sun		/* not a sun */
  #       ifndef ultrix   /* not ultrix */
*** Makefile.orig	Fri Aug 10 20:09:56 1990
--- Makefile	Fri Oct 23 16:42:05 1992
***************
*** 4,12 ****
  # The program that knows how to deal with makefiles. [Uncomment if needed.]
  # MAKE=make
  # set CFLAGS to be -Ipath/to/special/includes if needed
! CFLAGS= -O 
  # set LIBS to be -lneededlibrary if needed
! LIBS=-ldbm
  
  DISTFILES = Makefile README CHANGES
  
--- 4,12 ----
  # The program that knows how to deal with makefiles. [Uncomment if needed.]
  # MAKE=make
  # set CFLAGS to be -Ipath/to/special/includes if needed
! CFLAGS= -O -traditional
  # set LIBS to be -lneededlibrary if needed
! LIBS=
  
  DISTFILES = Makefile README CHANGES
  
*** inews/Makefile.orig	Sat Aug 18 15:13:30 1990
--- inews/Makefile	Sun Oct 18 14:12:29 1992
***************
*** 1,7 ****
  #
  # Makefile for pseudo-inews
  #
! NEWSUSR=usenet
  SRCS	=	inews.c uname.c postauth.c ../common/clientlib.c ../common/version.c ../server/strcasecmp.c
  OBJS	=	inews.o uname.o postauth.o ../common/clientlib.o ../common/version.o ../server/strcasecmp.o
  HFILES	=	../common/nntp.h ../common/conf.h
--- 1,7 ----
  #
  # Makefile for pseudo-inews
  #
! NEWSUSR=root
  SRCS	=	inews.c uname.c postauth.c ../common/clientlib.c ../common/version.c ../server/strcasecmp.c
  OBJS	=	inews.o uname.o postauth.o ../common/clientlib.o ../common/version.o ../server/strcasecmp.o
  HFILES	=	../common/nntp.h ../common/conf.h
*** doc/Makefile.orig	Sat Jan 12 10:28:15 1991
--- doc/Makefile	Sun Oct 18 14:13:43 1992
***************
*** 7,13 ****
  # change these to suit your system
  ROFF	= ditroff
  PRINTER	= lw301
! MANDIR	= /usr/man
  
  # from here down should be constant
  SHELL	= /bin/sh
--- 7,13 ----
  # change these to suit your system
  ROFF	= ditroff
  PRINTER	= lw301
! MANDIR	= /usr/local/man
  
  # from here down should be constant
  SHELL	= /bin/sh
*** server/serve.c.orig	Thu Jan 10 15:20:08 1991
--- server/serve.c	Fri Oct 23 15:28:05 1992
***************
*** 140,146 ****
--- 140,150 ----
  #ifndef ALONE
  # ifdef SYSLOG
  #  ifdef BSD_42
+ #   ifdef __386BSD__
+ 	openlog("nntpd", LOG_PID, SYSLOG);
+ #   else
  	openlog("nntpd", LOG_PID);
+ #   endif
  #  else
  	openlog("nntpd", LOG_PID, SYSLOG);
  #  endif
*** server/main.c.orig	Sat Jan 12 08:54:24 1991
--- server/main.c	Fri Oct 23 15:26:11 1992
***************
*** 55,61 ****
--- 55,65 ----
  
  #ifdef SYSLOG
  #ifdef BSD_42
+ #ifdef __386BSD__
+ 	openlog("nntpd", LOG_PID, SYSLOG);		/* fd 3 */
+ #else /* !__386BSD__ */
  	openlog("nntpd", LOG_PID);			/* fd 3 */
+ #endif /* __386BSD__ */
  #else /* !BSD_42 */
  	openlog("nntpd", LOG_PID, SYSLOG);		/* fd 3 */
  #endif /* BSD_42 */
***************
*** 221,227 ****
--- 225,235 ----
  			       ERR_GOODBYE, load );
  #ifdef SYSLOG
  #ifdef BSD_42
+ #ifdef __386BSD__
+ 			openlog("nntpd", LOG_PID, SYSLOG);
+ #else /* !__386BSD__ */
  			openlog("nntpd", LOG_PID);
+ #endif /* __386BSD__ */
  #else /* !BSD_42 */
  			openlog("nntpd", LOG_PID, SYSLOG);
  #endif /* BSD_42 */
*** server/misc.c.orig	Tue Dec 11 22:00:11 1990
--- server/misc.c	Fri Oct 23 16:20:56 1992
***************
*** 832,838 ****
--- 832,842 ----
   * patches posted by Tad Guy <tadguy@cs.odu.edu>
   */
  
+ #ifdef __386BSD__
+ #include <ufs/fs.h>
+ #else /* !__386BSD__ */
  #include <sys/fs.h>
+ #endif /* __386BSD__ */
  #include <fstab.h>
  
  /*
*** server/timer.c.orig	Thu Dec 27 20:16:51 1990
--- server/timer.c	Mon Oct 26 16:49:42 1992
***************
*** 28,34 ****
--- 28,38 ----
  #endif
  #endif
  /* non-portable */
+ #ifdef __386BSD__
+ #define BUFFERED_DATA(f) ((f)->_r > 0)
+ #else
  #define BUFFERED_DATA(f) ((f)->_cnt > 0)
+ #endif
  
  static long lastsecs;
  
*** xmit/remote.c.orig	Fri Feb  8 16:32:18 1991
--- xmit/remote.c	Mon Oct 26 17:01:04 1992
***************
*** 332,338 ****
--- 332,342 ----
  #ifdef apollo
  		fp->_flag |= _SIERR;
  #else
+ #ifdef __386BSD__
+ 		fp->_flags |= __SERR;		/* set stdio error */
+ #else
  		fp->_flag |= _IOERR;		/* set stdio error */
+ #endif
  #endif
  #ifndef ETIMEDOUT
  		errno = EPIPE;			/* USG doesn't have ETIMEDOUT*/
*** xfer/nntpxfer.c.orig	Sat Feb  2 11:31:49 1991
--- xfer/nntpxfer.c	Mon Oct 26 17:03:58 1992
***************
*** 448,454 ****
--- 448,458 ----
  	if (setjmp(SFGstack)) {
  		(void) alarm(0);	/* reset alarm clock */
  		(void) signal(SIGALRM, SIG_DFL);
+ #ifdef __386BSD__
+ 		rd_fp->_flags |= __SERR;	/* set stdio error */
+ #else
  		rd_fp->_flag |= _IOERR;	/* set stdio error */
+ #endif
  #ifndef ETIMEDOUT
  		errno = EPIPE;		/* USG doesn't have ETIMEDOUT */
  #else

-- 
-------------------------------------------------------------------------
Larry Felawka				Internet: felawka@sitka.triumf.ca
					Telephone: (604) 222 1047 X483