*** Makefile Fri Aug 13 00:27:44 1993 --- Makefile Thu Sep 29 16:10:32 1994 *************** *** 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 ! #LIBS = -ldbm DISTFILES = Makefile README CHANGES *************** *** 24,33 **** 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}" server: make_server --- 24,33 ---- 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}" server: make_server *************** *** 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,49 ---- install_server: cd server; make install ! # cd support; make install cd doc; make install + cd xmit; make install clean: rm -f .[a-z]* ; for i in $(DISTDIRS); do cd $$i; $(MAKE) $(MFLAGS) clean; cd ..; done *** conf.h Thu Sep 29 15:57:10 1994 --- conf.h Thu Sep 29 15:14:52 1994 *************** *** 14,27 **** #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. */ --- 14,27 ---- #undef FASTFORK /* True if we don't want to read active file on start*/ #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. */ *************** *** 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 */ --- 35,57 ---- #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,72 **** /* 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 */ --- 66,72 ---- /* 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 */ *************** *** 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 */ --- 89,95 ---- #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 */ #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 --- 112,118 ---- * 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 /* --- 182,188 ---- * 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 */ --- 210,216 ---- /* 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. --- 237,243 ---- * too. */ ! #define SERVER_FILE "/usr/local/lib/news/server" /* * 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 --- 261,286 ---- /* * This file is where access information is stored */ ! #define ACCESS_FILE "/usr/local/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/local/lib/news/active.times" /* * Some commonly used programs and files. */ ! #define ACTIVE_FILE "/usr/local/lib/news/active" ! #define DISTRIBUTIONS_FILE "/usr/local/lib/news/distributions" ! #define SUBSCRIPTIONS_FILE "/usr/local/lib/news/subscriptions" ! #define NEWSGROUPS_FILE "/usr/local/lib/news/newsgroups" ! #define HISTORY_FILE "/usr/local/lib/news/history" ! #define SPOOLDIR "/var/news" ! #define INEWS "/usr/local/lib/news/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 */ --- 293,307 ---- #else #define TOOBIG 300000L /* batch > TOOBIG bytes, kick rnews */ #define TOOMANY 1024 /* batch > TOOMANY articles, kick rnews */ ! #define NEWSRUN "/usr/local/libexec/news/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 */ *************** *** 341,346 **** --- 341,347 ---- #endif #ifdef BSD_43 /* And now more assumptions! */ + #ifndef __FreeBSD__ # ifndef sun # ifndef ultrix /* Ultrix 4.0 or greater */ # ifndef mips /* MIPS RISC/os */ *************** *** 352,357 **** --- 353,359 ---- # endif # endif # endif + #endif # ifndef DBZ # ifndef DBM # ifndef NDBM *** doc/Makefile Sat Jan 12 18:28:15 1991 --- doc/Makefile Thu Sep 29 14:29:42 1994 *************** *** 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/Makefile Sat Oct 9 18:21:24 1993 --- server/Makefile Thu Sep 29 16:11:13 1994 *************** *** 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/libexec all: nntpd msgidd *** server/misc.c Fri Aug 13 00:14:15 1993 --- server/misc.c Thu Sep 29 16:07:39 1994 *************** *** 723,730 **** * A negative value is returned on error. */ #ifndef READ_SUPER ! #if defined(sun) || defined(hpux) || defined(pyr) || defined(hp300) || defined(NeXT) #include #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 ! #else #include + #endif #define statfilesys statfs /* routine to call when trying to */ /* stat a file system to get the # */ /* of free blocks available */ *** server/msgidd.c Sat Oct 9 18:21:27 1993 --- server/msgidd.c Thu Sep 29 13:56:55 1994 *************** *** 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 () *** server/timer.c Thu Aug 12 23:57:16 1993 --- server/timer.c Thu Sep 29 16:04:20 1994 *************** *** 28,34 **** --- 28,38 ---- #endif #endif /* non-portable */ + #ifdef __FreeBSD__ + #define BUFFERED_DATA(f) ((f)->_r > 0) + #else #define BUFFERED_DATA(f) ((f)->_cnt > 0) + #endif #ifdef WIN_TCP #include *** support/Makefile Mon Aug 2 21:59:01 1993 --- support/Makefile Thu Sep 29 16:12:02 1994 *************** *** 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 *** xfer/Makefile Fri Aug 13 00:22:51 1993 --- xfer/Makefile Thu Sep 29 16:13:31 1994 *************** *** 5,13 **** SRVROBJ = nntpxfer.o get_tcp_conn.o fakesyslog.o ! LIBS= -ldbm ! CFLAGS= -O nntpxfer: ${SRVROBJ} ${CC} ${LDFLAGS} ${SRVROBJ} -o nntpxfer ${LIBS} --- 5,14 ---- SRVROBJ = nntpxfer.o get_tcp_conn.o fakesyslog.o ! #LIBS= -ldbm ! LIBS= /usr/local/lib/libcnews.a ! CFLAGS= -O2 -I/usr/local/include nntpxfer: ${SRVROBJ} ${CC} ${LDFLAGS} ${SRVROBJ} -o nntpxfer ${LIBS} *** xfer/nntpxfer.c Fri Aug 13 00:23:21 1993 --- xfer/nntpxfer.c Thu Sep 29 16:09:07 1994 *************** *** 448,454 **** --- 448,458 ---- if (setjmp(SFGstack)) { (void) alarm(0); /* reset alarm clock */ (void) signal(SIGALRM, SIG_DFL); + #ifdef __FreeBSD__ + rd_fp->_flags |= __SERR; + #else rd_fp->_flag |= _IOERR; /* set stdio error */ + #endif #ifndef ETIMEDOUT errno = EPIPE; /* USG doesn't have ETIMEDOUT */ #else *** xmit/Makefile Mon Aug 2 23:57:20 1993 --- xmit/Makefile Thu Sep 29 16:14:25 1994 *************** *** 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/libexec/news all: nntpxmit shlock *** xmit/remote.c Mon Aug 2 23:58:03 1993 --- xmit/remote.c Thu Sep 29 14:08:37 1994 *************** *** 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 __FreeBSD__ ! fp->_flags |= __SERR; #else fp->_flag |= _IOERR; /* set stdio error */ #endif *** xmit/nntpxmit.c Sat Oct 9 11:21:29 1993 --- xmit/nntpxmit.c Sat Oct 1 13:03:10 1994 *************** *** 65,70 **** --- 65,73 ---- #include "../conf.h" #include "nntpxmit.h" + #ifdef __FreeBSD__ + #define _ANSI_SOURCE + #endif #include #include #include *** xmit/shlock.c Mon Aug 2 16:58:08 1993 --- xmit/shlock.c Sat Oct 1 13:05:01 1994 *************** *** 28,33 **** --- 28,36 ---- ** Erik E. Fair , November 12, 1989 */ + #ifdef __FreeBSD__ + #define _ANSI_SOURCE + #endif #include #include #include /* Needed on hpux */