*** ../nntp-t5.orig/Makefile	Fri Aug 13 00:27:44 1993
--- ./Makefile	Mon Mar 18 18:52:31 1996
***************
*** 4,14 ****
  # 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	= -ldbz
! #LIBS	= /usr/local/lib/dbz.o
! LIBS	= -ldbm
  
  DISTFILES = Makefile README CHANGES
  
--- 4,14 ----
  # 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= -O2 -I/usr/local/include
  # set LIBS to be -lneededlibrary if needed
  #LIBS	= -ldbz
! LIBS	= /usr/local/lib/libcnews.a -lcrypt -lutil
! #LIBS	= -ldbm
  
  DISTFILES = Makefile README CHANGES
  
***************
*** 24,30 ****
  
  make_server: /nowhere
  	cd server; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
! 	cd support; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
  	cd doc; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
  	cd xmit; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
  	cd xfer; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
--- 24,30 ----
  
  make_server: /nowhere
  	cd server; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
! #	cd support; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
  	cd doc; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
  	cd xmit; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
  	cd xfer; $(MAKE) $(MFLAGS) "LIBS=${LIBS}" "CFLAGS=${CFLAGS}"
***************
*** 41,48 ****
  
  install_server:
  	cd server; make install
! 	cd support; make install
  	cd doc; make install
  
  clean:
  	rm  -f .[a-z]* ; for i in $(DISTDIRS); do cd $$i; $(MAKE) $(MFLAGS) clean; cd ..; done
--- 41,50 ----
  
  install_server:
  	cd server; make install
! #	cd support; make install
  	cd doc; make install
+ 	cd xmit; make install
+ 	cd xfer; make install
  
  clean:
  	rm  -f .[a-z]* ; for i in $(DISTDIRS); do cd $$i; $(MAKE) $(MFLAGS) clean; cd ..; done
*** ../nntp-t5.orig/conf.h	Tue Mar 19 22:55:58 1996
--- ./conf.h	Tue Mar 19 23:48:26 1996
***************
*** 8,32 ****
   */
    
  
! #undef	ALONE		/* True if we're running without inetd */
  
  #ifdef ALONE
! #undef	FASTFORK        /* True if we don't want to read active file on start*/
  #endif
  
! #define LOAD 5	        /* Loadav above which server refuses connections */
  /*
   * If you want to experiment with the dynamic allocation of the article
   * array, define DYNAMIC_ART_ARRAY.
   * This code came to beta too late for through testing, but it is a problem
   * at some sites, so it is an option. Please report problems to "nntp@tmc.edu"
   */
! #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(). */
  
--- 8,37 ----
   */
    
  
! #define	ALONE		/* True if we're running without inetd */
  
  #ifdef ALONE
! #define	FASTFORK        /* True if we don't want to read active file on start*/
! #define NEWS_GID 8
! #define NEWS_UID 8
  #endif
  
! #undef LOAD 5	        /* Loadav above which server refuses connections */
  /*
   * If you want to experiment with the dynamic allocation of the article
   * array, define DYNAMIC_ART_ARRAY.
   * This code came to beta too late for through testing, but it is a problem
   * at some sites, so it is an option. Please report problems to "nntp@tmc.edu"
   */
! #define DYNAMIC_ART_ARRAY
  
  #undef	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 */
! #define BSD_44		/* or this for BSD 4.4 */
! 
! #define BSD_STDIO	/* Use BSD FILE* struct */
  
  #undef CMU_MACH		/* Use CMU's MACH ioctl(FIOCFSPARAM) for dfree(). */
  
***************
*** 35,57 ****
  #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 */
  			/* be -ldbm */
  
! #undef	DBZ		/* True if we want to use dbz libraries */
  			/* 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 */
! #undef CNEWS_CLEARTEXT	/* define this if you have a modern C News that handles
  				input files ending in ".t" as cleartext */
! #undef BATCHED_INPUT	/* define if you want to support C News style 
  				batched input (not supported by B-NEWS)  */
  #undef MSGID		/* define this if you want to run msgidd to keep
  				track of recent msgids via daemon */
--- 40,62 ----
  #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 */
  			/* be -ldbm */
  
! #define	DBZ		/* True if we want to use dbz libraries */
  			/* 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!*/
  
! #define CNEWS		/* define this if you are running C News */
! #define CNEWS_CLEARTEXT	/* define this if you have a modern C News that handles
  				input files ending in ".t" as cleartext */
! #define BATCHED_INPUT	/* define if you want to support C News style 
  				batched input (not supported by B-NEWS)  */
  #undef MSGID		/* define this if you want to run msgidd to keep
  				track of recent msgids via daemon */
***************
*** 66,78 ****
  			/* typedefs for u_long */
  #define VOIDSIG		/* Newfangled signal() returns void, old returns int */
  
! #define	GHNAME		/* Define if you have gethostname() */
  #undef	UUNAME		/* Define to use /etc/uucpname */
  			/* If neither of these are defined, */
  			/* inews will use the contents of */
  			/* /usr/include/whoami.h */
  
! #undef MMAP		/* if your OS supports mmap() */
  
  /*
   * If you DON'T have vfork, make this "#define vfork fork"
--- 71,83 ----
  			/* typedefs for u_long */
  #define VOIDSIG		/* Newfangled signal() returns void, old returns int */
  
! #undef	GHNAME		/* Define if you have gethostname() */
  #undef	UUNAME		/* Define to use /etc/uucpname */
  			/* If neither of these are defined, */
  			/* inews will use the contents of */
  			/* /usr/include/whoami.h */
  
! #define MMAP		/* if your OS supports mmap() */
  
  /*
   * If you DON'T have vfork, make this "#define vfork fork"
***************
*** 89,95 ****
  #undef MINFILES  MINFREE/4
  			/* NNTP will not allow an XFER if there is less */
  			/* than this many inodes on the SPOOLDIR filesystem */
! #undef SETPROCTITLE	/* if you want status visable via ps */
  
  #undef	IHAVE_DEBUG	/* Copious debugging output from ihave */
  
--- 94,101 ----
  #undef MINFILES  MINFREE/4
  			/* NNTP will not allow an XFER if there is less */
  			/* than this many inodes on the SPOOLDIR filesystem */
! #define SETPROCTITLE	/* if you want status visable via ps */
! #define HAVE_PROCTITLE	/* if the OS has setproctitle() */
  
  #undef	IHAVE_DEBUG	/* Copious debugging output from ihave */
  
***************
*** 112,118 ****
   * if you are running BNEWS. At least, not yet. :-)
   */
  
! /* #define UMASK 022 */
  
  /*
   * If you have the syslog library routine, define SYSLOG to
--- 118,124 ----
   * if you are running BNEWS. At least, not yet. :-)
   */
  
! #define UMASK 022
  
  /*
   * If you have the syslog library routine, define SYSLOG to
***************
*** 182,188 ****
   * e.g.  #define	DOMAIN		"berkeley.edu"
   */
  
! #define	DOMAIN	"uucp"
  #undef HIDDENNET
  
  /*
--- 188,194 ----
   * e.g.  #define	DOMAIN		"berkeley.edu"
   */
  
! #undef	DOMAIN	"uucp"
  #undef HIDDENNET
  
  /*
***************
*** 210,216 ****
  			/* loaded already, defining this may be a bad idea */
  
  #define XOVER		/* xover -- Return .overview data */
! #undef OVER_XREFS	/* overview files have xref data in them */
  #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */
  
  #undef XINDEX		/* Optional support for tin's index files */
--- 216,222 ----
  			/* loaded already, defining this may be a bad idea */
  
  #define XOVER		/* xover -- Return .overview data */
! #define OVER_XREFS	/* overview files have xref data in them */
  #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */
  
  #undef XINDEX		/* Optional support for tin's index files */
***************
*** 237,243 ****
   * too.
   */
  
! #define	SERVER_FILE	"/usr/local/lib/rn/server"
  
  /*
   * Person (user name) to post news as.
--- 243,249 ----
   * too.
   */
  
! #define	SERVER_FILE	"/usr/local/etc/nntpserver"
  
  /*
   * Person (user name) to post news as.
***************
*** 261,286 ****
  /*
   * This file is where access information is stored
   */
! #define ACCESS_FILE	"/usr/lib/news/nntp_access"
  
  /*
   * But if you don't have C News or INN, you can run acttimes (see the support
   * directory) to maintain an active.times file.
   */
! #define ACTIVE_TIMES_FILE	"/usr/lib/news/active.times"
  
  /*
   * Some commonly used programs and files.
   */
  
! #define	ACTIVE_FILE	"/usr/lib/news/active"
! #define DISTRIBUTIONS_FILE	"/usr/lib/news/distributions"
! #define SUBSCRIPTIONS_FILE	"/usr/lib/news/subscriptions"
! #define NEWSGROUPS_FILE	"/usr/lib/news/newsgroups"
! #define HISTORY_FILE	"/usr/lib/news/history"
! #define	SPOOLDIR	"/usr/spool/news"
! #define INEWS		"/usr/lib/news/inews"
! #define RNEWS		"/usr/bin/rnews"		/* Link to inews? */
  
  /*
   * Support for C News style batching 
--- 267,292 ----
  /*
   * This file is where access information is stored
   */
! #define ACCESS_FILE	"/usr/local/news/lib/nntp_access"
  
  /*
   * But if you don't have C News or INN, you can run acttimes (see the support
   * directory) to maintain an active.times file.
   */
! #define ACTIVE_TIMES_FILE	"/usr/local/news/lib/active.times"
  
  /*
   * Some commonly used programs and files.
   */
  
! #define	ACTIVE_FILE	"/usr/local/news/lib/active"
! #define DISTRIBUTIONS_FILE	"/usr/local/news/lib/distributions"
! #define SUBSCRIPTIONS_FILE	"/usr/local/news/lib/subscriptions"
! #define NEWSGROUPS_FILE	"/usr/local/news/lib/newsgroups"
! #define HISTORY_FILE	"/usr/local/news/lib/history"
! #define	SPOOLDIR	"/var/news"
! #define INEWS		"/usr/local/news/lib/inews"
! #define RNEWS		"/usr/local/bin/rnews"		/* Link to inews? */
  
  /*
   * Support for C News style batching 
***************
*** 293,307 ****
  #else
  #define TOOBIG 300000L		/* batch > TOOBIG bytes, kick rnews */
  #define TOOMANY 1024		/* batch > TOOMANY articles, kick rnews */
! #define NEWSRUN			"/usr/lib/newsbin/input/newsrun"
  #endif
  #define TOOOLD (5*60)		/* batch > TOOOLD seconds old, kick rnews */
  #define COPYSIZE 8192		/* bytes to copy at one time */
  #define MAXDIGITS 25		/* lg(maxlongint) + epsilon */
  #define MAXSTR 1024
! #define INDIR			"/usr/spool/news/in.coming"
  /* You may wish to delete the pathname from the front of BATCH_FILE */
! #define BATCH_FILE		"/usr/spool/news/in.coming/nntp.XXXXXX"
  
  /************************************************************************/
  /* We don't recommend that you make changes in anything after this line */
--- 299,313 ----
  #else
  #define TOOBIG 300000L		/* batch > TOOBIG bytes, kick rnews */
  #define TOOMANY 1024		/* batch > TOOMANY articles, kick rnews */
! #define NEWSRUN			"/usr/local/news/cnewsbin/input/newsrun"
  #endif
  #define TOOOLD (5*60)		/* batch > TOOOLD seconds old, kick rnews */
  #define COPYSIZE 8192		/* bytes to copy at one time */
  #define MAXDIGITS 25		/* lg(maxlongint) + epsilon */
  #define MAXSTR 1024
! #define INDIR			"/var/news/in.coming"
  /* You may wish to delete the pathname from the front of BATCH_FILE */
! #define BATCH_FILE		"/var/news/in.coming/nntp.XXXXXX"
  
  /************************************************************************/
  /* We don't recommend that you make changes in anything after this line */
***************
*** 345,352 ****
  #	ifndef ultrix	/* Ultrix 4.0 or greater */
  #	    ifndef mips	/* MIPS RISC/os */
  #		ifndef __osf__	/* DEC Alpha OSF1 */
! #		    ifndef READ_SUPER
! #			define READ_SUPER
  #		    endif
  #		endif
  #	    endif
--- 351,360 ----
  #	ifndef ultrix	/* Ultrix 4.0 or greater */
  #	    ifndef mips	/* MIPS RISC/os */
  #		ifndef __osf__	/* DEC Alpha OSF1 */
! #		    ifndef __FreeBSD__
! #			ifndef READ_SUPER
! #			    define READ_SUPER
! #			endif
  #		    endif
  #		endif
  #	    endif
*** ../nntp-t5.orig/doc/Makefile	Sat Jan 12 18:28:15 1991
--- ./doc/Makefile	Mon Mar 18 15:15:48 1996
***************
*** 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
*** ../nntp-t5.orig/doc/config.sh	Fri Oct 16 04:24:00 1987
--- ./doc/config.sh	Tue Mar 19 10:22:55 1996
***************
*** 11,21 ****
  # (modify these lines to suit your system)
  #
  # the location of inetd on your system (usually /etc/inetd)
! MINETD=/etc/inetd
  # the location of the inetd configuration file (usually /etc/inetd.conf)
  MINETDCONFIG=/etc/inetd.conf
  # the location of nntpd following installation (usually /etc/nntpd)
! MNNTPD=/etc/nntpd
  # the location of the hosts file (usually /etc/hosts)
  MHOSTFILE=/etc/hosts
  # the location of the services file (usually /etc/services)
--- 11,21 ----
  # (modify these lines to suit your system)
  #
  # the location of inetd on your system (usually /etc/inetd)
! MINETD=/usr/sbin/inetd
  # the location of the inetd configuration file (usually /etc/inetd.conf)
  MINETDCONFIG=/etc/inetd.conf
  # the location of nntpd following installation (usually /etc/nntpd)
! MNNTPD=/usr/local/sbin/nntpd
  # the location of the hosts file (usually /etc/hosts)
  MHOSTFILE=/etc/hosts
  # the location of the services file (usually /etc/services)
***************
*** 23,34 ****
  # the location of the networks file (usually /etc/networks)
  MNETWORKFILE=/etc/networks
  # The location of the news spool directory (usually /usr/spool/news)
! MNEWSSPOOL=/usr/spool/news
  # The location of the news library directory (usually /usr/lib/news)
! MNEWSLIB=/usr/lib/news
  # The location of the file containing the name of the nntp server machine
  # (usually /usr/local/lib/rn/server)
! MSERVERFILE=/usr/local/lib/rn/server
  # The location of rn's local library (usually /usr/local/lib/rn)
  MRNLIB=/usr/local/lib/rn
  #
--- 23,34 ----
  # the location of the networks file (usually /etc/networks)
  MNETWORKFILE=/etc/networks
  # The location of the news spool directory (usually /usr/spool/news)
! MNEWSSPOOL=/var/news
  # The location of the news library directory (usually /usr/lib/news)
! MNEWSLIB=/usr/local/news/lib
  # The location of the file containing the name of the nntp server machine
  # (usually /usr/local/lib/rn/server)
! MSERVERFILE=/usr/local/etc/nntpserver
  # The location of rn's local library (usually /usr/local/lib/rn)
  MRNLIB=/usr/local/lib/rn
  #
*** ../nntp-t5.orig/server/Makefile	Sat Oct  9 18:21:24 1993
--- ./server/Makefile	Tue Mar 19 10:15:31 1996
***************
*** 20,33 ****
  
  # if you've #define'ed DBM in conf.h put -ldbm here or your dbz lib/object
  #LIBS	= -ldbz
! #LIBS	= /usr/local/lib/dbz.o
! LIBS	= -ldbm
  
! CFLAGS	= -O
  
  # Where nntpd is going to live
  
! DESTDIR	= /etc
  
  all:	nntpd msgidd
  
--- 20,33 ----
  
  # if you've #define'ed DBM in conf.h put -ldbm here or your dbz lib/object
  #LIBS	= -ldbz
! LIBS	= /usr/local/lib/libcnews.a
! #LIBS	= -ldbm
  
! CFLAGS	= -O2 -I/usr/local/include
  
  # Where nntpd is going to live
  
! DESTDIR	= /usr/local/sbin
  
  all:	nntpd msgidd
  
*** ../nntp-t5.orig/server/common.h	Mon Aug  2 23:38:56 1993
--- ./server/common.h	Tue Mar 19 17:56:42 1996
***************
*** 155,161 ****
--- 155,165 ----
  void debugup(), debugdown();
  #endif
  #ifdef SETPROCTITLE
+ #ifdef HAVE_PROCTITLE
+ #include <libutil.h>
+ #else
  void setproctitle();
+ #endif
  #endif
  
  extern	char	spooldir[];
*** ../nntp-t5.orig/server/main.c	Sat Oct  9 18:21:26 1993
--- ./server/main.c	Tue Mar 19 18:33:27 1996
***************
*** 28,35 ****
--- 28,37 ----
  #endif
  
  #ifdef SETPROCTITLE
+ #ifndef HAVE_PROCTITLE
  char	**Argv = NULL;		/* pointer to argument vector */
  char	*LastArgv = NULL;	/* end of argv */
+ #endif
  #endif /* SETPROCTITLE */
  
  int
***************
*** 74,79 ****
--- 76,97 ----
  
  #ifndef EXCELAN
  	sockt = get_socket();		/* should be fd 4 or 5 */
+ 	if ( getuid() == 0 ) {  /* Running as root */
+ 
+ 		if (setgid((gid_t) NEWS_GID) == -1) {
+ #ifdef SYSLOG
+ 			syslog(LOG_ERR, "setgid: %m");
+ #endif
+ 			exit(1);
+ 		}
+ 
+ 		if (setuid((uid_t) NEWS_UID) == -1) {
+ #ifdef SYSLOG
+ 			syslog(LOG_ERR, "setuid: %m");
+ #endif
+ 			exit(1);
+ 		}
+ 	}
  #ifdef USG
  	(void) signal(SIGCLD, SIG_IGN);
  #else /* !USG */
***************
*** 94,99 ****
--- 112,118 ----
  #endif /* EXCELAN */
  
  #ifdef SETPROCTITLE
+ #ifndef HAVE_PROCTITLE
  	/*
  	 *  Save start and extent of argv for setproctitle.
  	 */
***************
*** 106,111 ****
--- 125,131 ----
  		envp++;
  	LastArgv = envp[-1] + strlen(envp[-1]);
  #endif /*SDD*/
+ #endif
  #endif /* SETPROCTITLE */
  #if defined(LOAD) && defined(SETPROCTITLE)
  	/* If LOAD and SETPROCTITLE, display load before first accept() */
***************
*** 242,247 ****
--- 262,268 ----
  	}
  #endif /* LOAD */
  #ifdef SETPROCTITLE
+ #ifndef HAVE_PROCTITLE
  	/*
  	 *  Save start and extent of argv for setproctitle.
  	 */
***************
*** 254,259 ****
--- 275,281 ----
  		envp++;
  	LastArgv = envp[-1] + strlen(envp[-1]);
  #endif /*SDD*/
+ #endif
  #endif /* SETPROCTITLE */
  
  #ifdef USG
***************
*** 270,275 ****
--- 292,298 ----
   * stolen from sendmail
   */
  #ifdef SETPROCTITLE
+ #ifndef HAVE_PROCTITLE
  #if defined(sun) || defined(hpux)
  /*VARARGS*/
  void
***************
*** 329,332 ****
--- 352,356 ----
  		*p++ = ' ';
  }
  #endif /* hpux */
+ #endif
  #endif /* SETPROCTITLE */
*** ../nntp-t5.orig/server/misc.c	Fri Aug 13 00:14:15 1993
--- ./server/misc.c	Mon Mar 18 15:15:49 1996
***************
*** 723,730 ****
   * A negative value is returned on error.
   */
  #ifndef READ_SUPER
! #if defined(sun) || defined(hpux) || defined(pyr) || defined(hp300) || defined(NeXT)
  #include <sys/vfs.h>
  #define statfilesys	statfs		/* routine to call when trying to  */
  					/* stat a file system to get the # */
  					/* of free blocks available	   */
--- 723,734 ----
   * A negative value is returned on error.
   */
  #ifndef READ_SUPER
! #if defined(sun) || defined(hpux) || defined(pyr) || defined(hp300) || defined(NeXT) || defined(__FreeBSD__)
! #ifdef __FreeBSD__
! #include <sys/mount.h>
! #else
  #include <sys/vfs.h>
+ #endif
  #define statfilesys	statfs		/* routine to call when trying to  */
  					/* stat a file system to get the # */
  					/* of free blocks available	   */
*** ../nntp-t5.orig/server/msgidd.c	Sat Oct  9 18:21:27 1993
--- ./server/msgidd.c	Mon Mar 18 15:15:49 1996
***************
*** 78,83 ****
--- 78,84 ----
  	return hash;
  }
  
+ #ifdef NO_STRDUP
  static char *
  strdup(x)
  char *x;
***************
*** 88,93 ****
--- 89,95 ----
  		strcpy(y, x);
  	return y;
  }
+ #endif
  
  static void
  savepid ()
*** ../nntp-t5.orig/server/timer.c	Thu Aug 12 23:57:16 1993
--- ./server/timer.c	Tue Mar 19 21:31:16 1996
***************
*** 28,34 ****
--- 28,38 ----
  #endif
  #endif
  /* non-portable */
+ #ifdef BSD_STDIO
+ #define BUFFERED_DATA(f) ((f)->_r > 0)
+ #else
  #define BUFFERED_DATA(f) ((f)->_cnt > 0)
+ #endif
  
  #ifdef WIN_TCP
  #include	<signal.h>
*** ../nntp-t5.orig/support/Makefile	Mon Aug  2 21:59:01 1993
--- ./support/Makefile	Mon Mar 18 15:15:50 1996
***************
*** 12,18 ****
  
  # Where these support programs will live
  
! DESTDIR	= /usr/lib/news
  
  all: acttimes
  
--- 12,18 ----
  
  # Where these support programs will live
  
! DESTDIR	= /usr/local/bin
  
  all: acttimes
  
*** ../nntp-t5.orig/xfer/Makefile	Fri Aug 13 00:22:51 1993
--- ./xfer/Makefile	Mon Mar 18 15:15:50 1996
***************
*** 5,13 ****
  
  SRVROBJ = nntpxfer.o get_tcp_conn.o fakesyslog.o 
  
! LIBS= -ldbm
  
! CFLAGS= -O
  
  nntpxfer: ${SRVROBJ}
  	${CC} ${LDFLAGS} ${SRVROBJ} -o nntpxfer ${LIBS}
--- 5,16 ----
  
  SRVROBJ = nntpxfer.o get_tcp_conn.o fakesyslog.o 
  
! #LIBS= -ldbm
! LIBS= /usr/local/lib/libcnews.a
  
! CFLAGS= -O2 -I/usr/local/include
! 
! DESTDIR= /usr/local/news/cnewsbin
  
  nntpxfer: ${SRVROBJ}
  	${CC} ${LDFLAGS} ${SRVROBJ} -o nntpxfer ${LIBS}
***************
*** 19,24 ****
--- 22,31 ----
  	${CC} ${CFLAGS} ${DEFS} -c ../server/fakesyslog.c
  
  nntpxfer.o: nntpxfer.c ../conf.h ../server/fakesyslog.h
+ 
+ install: nntpxfer
+ 	cp nntpxfer ${DESTDIR}/nntpxfer
+ 	chmod 755 ${DESTDIR}/nntpxfer
  
  clean:
  	-rm -f *.o nntpxfer make*.out
*** ../nntp-t5.orig/xfer/nntpxfer.c	Fri Aug 13 00:23:21 1993
--- ./xfer/nntpxfer.c	Tue Mar 19 22:17:46 1996
***************
*** 43,48 ****
--- 43,51 ----
  #include <sys/time.h>
  #endif
  
+ #ifdef BSD_44
+ #define _ANSI_SOURCE
+ #endif
  #include <stdio.h>
  #include <errno.h>
  #include <ctype.h>
***************
*** 448,454 ****
--- 451,461 ----
  	if (setjmp(SFGstack)) {
  		(void) alarm(0);	/* reset alarm clock */
  		(void) signal(SIGALRM, SIG_DFL);
+ #ifdef BSD_STDIO
+ 		rd_fp->_flags |= __SERR;
+ #else
  		rd_fp->_flag |= _IOERR;	/* set stdio error */
+ #endif
  #ifndef ETIMEDOUT
  		errno = EPIPE;		/* USG doesn't have ETIMEDOUT */
  #else
*** ../nntp-t5.orig/xmit/Makefile	Mon Aug  2 23:57:20 1993
--- ./xmit/Makefile	Mon Mar 18 15:15:51 1996
***************
*** 11,23 ****
  
  SRCS	= ${SRVRSRC}
  
! LIBS	=
  
! CFLAGS	= -O 
  
  # Where nntpxmit is going to live
  
! DESTDIR	= /usr/lib/news
  
  all:	nntpxmit shlock
  
--- 11,23 ----
  
  SRCS	= ${SRVRSRC}
  
! LIBS	= /usr/local/lib/libcnews.a
  
! CFLAGS	= -O2 -I/usr/local/include
  
  # Where nntpxmit is going to live
  
! DESTDIR	= /usr/local/news/cnewsbin
  
  all:	nntpxmit shlock
  
*** ../nntp-t5.orig/xmit/nntpxmit.c	Sat Oct  9 18:21:29 1993
--- ./xmit/nntpxmit.c	Tue Mar 19 21:27:27 1996
***************
*** 65,70 ****
--- 65,73 ----
  
  #include "../conf.h"
  #include "nntpxmit.h"
+ #ifdef BSD_44
+ #define _ANSI_SOURCE
+ #endif
  #include <stdio.h>
  #include <errno.h>
  #include <ctype.h>
*** ../nntp-t5.orig/xmit/nntpxmit.h	Sat Oct  9 18:21:30 1993
--- ./xmit/nntpxmit.h	Tue Mar 19 10:11:06 1996
***************
*** 7,12 ****
--- 7,13 ----
  */
  
  #ifdef MMAP
+ #include <sys/types.h>
  #include <sys/mman.h>
  #include <sys/stat.h>
  #endif
*** ../nntp-t5.orig/xmit/remote.c	Mon Aug  2 23:58:03 1993
--- ./xmit/remote.c	Tue Mar 19 21:28:02 1996
***************
*** 51,56 ****
--- 51,59 ----
  #ifdef dgux
  #define _IOERR  _IO_ERR
  #endif
+ #ifdef apollo
+ #define _IOERR  _SIERR
+ #endif
  #ifdef SYSLOG
  #ifdef FAKESYSLOG
  #include "../server/fakesyslog.h"
***************
*** 329,336 ****
  	if (setjmp(SFGstack)) {
  		(void) alarm(0);		/* reset alarm clock */
  		(void) signal(SIGALRM, SIG_DFL);
! #ifdef apollo
! 		fp->_flag |= _SIERR;
  #else
  		fp->_flag |= _IOERR;		/* set stdio error */
  #endif
--- 332,339 ----
  	if (setjmp(SFGstack)) {
  		(void) alarm(0);		/* reset alarm clock */
  		(void) signal(SIGALRM, SIG_DFL);
! #ifdef BSD_STDIO
! 		fp->_flags |= __SERR;
  #else
  		fp->_flag |= _IOERR;		/* set stdio error */
  #endif
*** ../nntp-t5.orig/xmit/shlock.c	Mon Aug  2 23:58:08 1993
--- ./xmit/shlock.c	Tue Mar 19 22:33:01 1996
***************
*** 28,34 ****
  ** Erik E. Fair <fair@apple.com>, November 12, 1989
  */
  
- #include <stdio.h>
  #include <sys/types.h>
  #include <fcntl.h>			/* Needed on hpux */
  #include <sys/file.h>
--- 28,33 ----
***************
*** 36,41 ****
--- 35,44 ----
  #ifdef NNTPSRC
  #include "../conf.h"
  #endif
+ #ifdef BSD_44
+ #define _ANSI_SOURCE
+ #endif
+ #include <stdio.h>
  
  #define	LOCK_SET	0
  #define	LOCK_FAIL	1
