summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2002-11-04 05:00:14 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2002-11-04 05:00:14 +0000
commit3ff37e385bb15e608586b24278ba3dde9ea57151 (patch)
tree0b09981cfb671da75e612993d4ac3a3ef4a2551b /news
parent- Fix perl/reinplace problems (diff)
- reorder patches
- use DIRENT - honor CFLAGS - fix missing includes
Notes
Notes: svn path=/head/; revision=69435
Diffstat (limited to 'news')
-rw-r--r--news/nntp/Makefile2
-rw-r--r--news/nntp/files/patch-Makefile31
-rw-r--r--news/nntp/files/patch-af22
-rw-r--r--news/nntp/files/patch-conf.h (renamed from news/nntp/files/patch-ag)237
-rw-r--r--news/nntp/files/patch-doc-config.sh32
-rw-r--r--news/nntp/files/patch-server-active.c12
-rw-r--r--news/nntp/files/patch-server-batch.c12
-rw-r--r--news/nntp/files/patch-server-common.h30
-rw-r--r--news/nntp/files/patch-server-group.c12
-rw-r--r--news/nntp/files/patch-server-main.c82
-rw-r--r--news/nntp/files/patch-server-misc.c (renamed from news/nntp/files/patch-misc.c)0
-rw-r--r--news/nntp/files/patch-server-msgidd.c13
-rw-r--r--news/nntp/files/patch-server-netaux.c (renamed from news/nntp/files/patch-netaux.c)0
-rw-r--r--news/nntp/files/patch-server-scandir.c12
-rw-r--r--news/nntp/files/patch-server-xauth.c39
-rw-r--r--news/nntp/files/patch-server-xover.c32
-rw-r--r--news/nntp/files/patch-xfer-Makefile12
-rw-r--r--news/nntp/files/patch-xfer-nntpxfer.c24
-rw-r--r--news/nntp/files/patch-xmit-get_tcp_conn.c12
-rw-r--r--news/nntp/files/patch-xmit-nntpxmit.c24
-rw-r--r--news/nntp/files/patch-xmit-nntpxmit.h10
-rw-r--r--news/nntp/files/patch-xmit-remote.c25
-rw-r--r--news/nntp/files/patch-xmit-shlock.c21
23 files changed, 443 insertions, 253 deletions
diff --git a/news/nntp/Makefile b/news/nntp/Makefile
index e214d7e540d3..878f89610fc5 100644
--- a/news/nntp/Makefile
+++ b/news/nntp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= nntp
PORTVERSION= 1.5.12.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= news
MASTER_SITES= ftp://ftp.academ.com/pub/nntp/server/
DISTNAME= ${PORTNAME}.${PORTVERSION}
diff --git a/news/nntp/files/patch-Makefile b/news/nntp/files/patch-Makefile
new file mode 100644
index 000000000000..c6bd394338ff
--- /dev/null
+++ b/news/nntp/files/patch-Makefile
@@ -0,0 +1,31 @@
+--- Makefile.orig Tue Jan 9 08:30:24 1996
++++ Makefile Sun Jan 9 09:35:59 2000
+@@ -4,7 +4,7 @@
+ # 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
++CFLAGS+= -I/usr/local/include
+ #Uncomment the following for Solaris (and similiar SVR4 systems)
+ #NETLIBS = -lsocket -lnsl
+ #Uncomment the following if the previous one does not work
+@@ -13,6 +13,7 @@
+ #DBLIBS = -ldbz
+ #DBLIBS = /usr/local/lib/dbz.o #/usr/local/lib/dbzdbm.o
+ #DBLIBS = -ldbm
++DBLIBS = /usr/local/lib/libcnews.a -lcrypt -lutil
+ # add the resolver library if needed
+ #RESLIB = -lresolv
+ # add the kmem library if needed
+@@ -21,9 +21,9 @@
+ #Uncomment the following for Solaris (and similiar SVR4 systems)
+ #KVMLIB = -lelf
+ # Where nntpd is going to live
+-ETCDIR = /etc
++ETCDIR = /usr/local/sbin
+ # Where nntpxmit and nntpxfer is going to live
+-BINDIR = /usr/local/bin
++BINDIR = /usr/local/news/cnewsbin
+ # Where manual pages live
+ MANDIR = /usr/local/man
+ #
diff --git a/news/nntp/files/patch-af b/news/nntp/files/patch-af
deleted file mode 100644
index 9f3931371879..000000000000
--- a/news/nntp/files/patch-af
+++ /dev/null
@@ -1,22 +0,0 @@
---- xmit/nntpxmit.c.orig Sun Jan 9 10:36:02 2000
-+++ xmit/nntpxmit.c Sun Jan 9 10:37:50 2000
-@@ -448,7 +448,7 @@
- /* Hmph. The file didn't exist. */
- error = sendcmd(".");
- } else {
-- error = !sendfile(fp);
-+ error = !my_sendfile(fp);
- /* Leave this open in case we need to requeue it. */
- }
- if (error) {
---- xmit/remote.c.orig Tue Jan 9 08:28:03 1996
-+++ xmit/remote.c Sun Jan 9 10:37:03 2000
-@@ -403,7 +403,7 @@
- ** with appropriate RFC822 filtering (e.g. CRLF line termination,
- ** and dot escaping). Return FALSE if something went wrong.
- */
--sendfile(fp)
-+my_sendfile(fp)
- FILE *fp;
- {
- register int c;
diff --git a/news/nntp/files/patch-ag b/news/nntp/files/patch-conf.h
index e725316ad233..fa5b03194db8 100644
--- a/news/nntp/files/patch-ag
+++ b/news/nntp/files/patch-conf.h
@@ -1,62 +1,5 @@
---- xfer/Makefile.orig Thu Nov 17 19:15:22 1994
-+++ xfer/Makefile Sun Jan 9 10:21:54 2000
-@@ -28,7 +28,8 @@
- nntpxfer.o: nntpxfer.c ../conf.h ../server/fakesyslog.h
-
- install: nntpxfer
-- cp nntpxfer ${BINDIR}
-+ cp nntpxfer ${BINDIR}/nntpxfer
-+ chmod 755 ${BINDIR}/nntpxfer
-
- clean:
- -rm -f *.o nntpxfer make*.out *.BAK *.CKP *~
---- Makefile.orig Tue Jan 9 08:30:24 1996
-+++ Makefile Sun Jan 9 09:35:59 2000
-@@ -4,7 +4,7 @@
- # 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
-+CFLAGS= -O -I/usr/local/include
- #Uncomment the following for Solaris (and similiar SVR4 systems)
- #NETLIBS = -lsocket -lnsl
- #Uncomment the following if the previous one does not work
-@@ -13,6 +13,7 @@
- #DBLIBS = -ldbz
- #DBLIBS = /usr/local/lib/dbz.o #/usr/local/lib/dbzdbm.o
- #DBLIBS = -ldbm
-+DBLIBS = /usr/local/lib/libcnews.a -lcrypt -lutil
- # add the resolver library if needed
- #RESLIB = -lresolv
- # add the kmem library if needed
-@@ -21,9 +21,9 @@
- #Uncomment the following for Solaris (and similiar SVR4 systems)
- #KVMLIB = -lelf
- # Where nntpd is going to live
--ETCDIR = /etc
-+ETCDIR = /usr/local/sbin
- # Where nntpxmit and nntpxfer is going to live
--BINDIR = /usr/local/bin
-+BINDIR = /usr/local/news/cnewsbin
- # Where manual pages live
- MANDIR = /usr/local/man
- #
---- server/common.h.orig Thu Nov 17 19:15:18 1994
-+++ server/common.h Sun Jan 9 09:30:03 2000
-@@ -161,7 +161,11 @@
- void debugup(), debugdown();
- #endif
- #ifdef SETPROCTITLE
-+#ifdef HAVE_PROCTITLE
-+#include <libutil.h>
-+#else
- void setproctitle();
-+#endif
- #endif
-
- extern char spooldir[];
---- conf.h.orig Sun Jan 9 09:30:02 2000
-+++ conf.h Sun Jan 9 10:02:19 2000
+--- conf.h.orig Mon Nov 4 04:55:08 2002
++++ conf.h Mon Nov 4 04:55:43 2002
@@ -8,10 +8,12 @@
*/
@@ -101,15 +44,18 @@
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 */
-@@ -70,7 +72,7 @@
+@@ -70,9 +72,9 @@
/* typedefs for u_long */
#define VOIDSIG /* Newfangled signal() returns void, old returns int */
-#undef MMAP /* if your OS supports mmap() */
+#define MMAP /* if your OS supports mmap() */
- #undef DIRENT /* If you have <dirent.h> define this */
+-#undef DIRENT /* If you have <dirent.h> define this */
++#define DIRENT /* If you have <dirent.h> define this */
+ /*
+ * If you DON'T have vfork, make this "#define vfork fork"
@@ -89,7 +91,8 @@
/*#define MINFILES MINFREE/4*/
/* NNTP will not allow an XFER if there is less */
@@ -215,172 +161,3 @@
/************************************************************************/
/* We don't recommend that you make changes in anything after this line */
---- doc/config.sh.orig Tue Nov 1 06:36:57 1994
-+++ doc/config.sh Sun Jan 9 09:30:03 2000
-@@ -11,11 +11,11 @@
- # (modify these lines to suit your system)
- #
- # the location of inetd on your system (usually /etc/inetd)
--MINETD=/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=/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,12 +23,12 @@
- # 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
-+MNEWSSPOOL=/var/news
- # The location of the news library directory (usually /usr/lib/news)
--MNEWSLIB=/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/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
- #
---- server/main.c.orig Thu Nov 17 19:15:19 1994
-+++ server/main.c Sun Jan 9 09:30:03 2000
-@@ -35,8 +35,10 @@
- #endif
-
- #ifdef SETPROCTITLE
-+#ifndef HAVE_PROCTITLE
- char **Argv = NULL; /* pointer to argument vector */
- char *LastArgv = NULL; /* end of argv */
-+#endif
- #endif /* SETPROCTITLE */
-
- int
-@@ -81,6 +83,22 @@
-
- #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 */
-@@ -101,6 +119,7 @@
- #endif /* EXCELAN */
-
- #ifdef SETPROCTITLE
-+#ifndef HAVE_PROCTITLE
- /*
- * Save start and extent of argv for setproctitle.
- */
-@@ -113,6 +132,7 @@
- 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() */
-@@ -243,6 +263,7 @@
- }
- #endif /* LOAD */
- #ifdef SETPROCTITLE
-+#ifndef HAVE_PROCTITLE
- /*
- * Save start and extent of argv for setproctitle.
- */
-@@ -255,6 +276,7 @@
- envp++;
- LastArgv = envp[-1] + strlen(envp[-1]);
- #endif /*SDD*/
-+#endif
- #endif /* SETPROCTITLE */
-
- #ifdef USG
-@@ -271,6 +293,7 @@
- * stolen from sendmail
- */
- #ifdef SETPROCTITLE
-+#ifndef HAVE_PROCTITLE
- #if defined(sun) || defined(hpux)
- /*VARARGS*/
- void
-@@ -330,4 +353,5 @@
- *p++ = ' ';
- }
- #endif /* hpux */
-+#endif
- #endif /* SETPROCTITLE */
---- xfer/nntpxfer.c.orig Tue Jan 9 08:28:03 1996
-+++ xfer/nntpxfer.c Sun Jan 9 09:30:03 2000
-@@ -60,6 +60,9 @@
- #include <sys/time.h>
- #endif
-
-+#ifdef BSD_44
-+#define _ANSI_SOURCE
-+#endif
- #include <stdio.h>
- #include <errno.h>
- #include <ctype.h>
---- xmit/nntpxmit.c.orig Sat Dec 3 23:37:58 1994
-+++ xmit/nntpxmit.c Sun Jan 9 10:13:10 2000
-@@ -64,6 +64,9 @@
- */
-
- #include "../conf.h"
-+#ifdef BSD_44
-+#define _ANSI_SOURCE
-+#endif
- #include <stdio.h>
- #include <errno.h>
- #include <ctype.h>
---- xmit/nntpxmit.h.orig Thu Nov 3 04:51:34 1994
-+++ xmit/nntpxmit.h Sun Jan 9 09:30:04 2000
-@@ -7,6 +7,7 @@
- */
-
- #ifdef MMAP
-+#include <sys/types.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #endif
---- xmit/shlock.c.orig Tue Nov 1 06:54:32 1994
-+++ xmit/shlock.c Sun Jan 9 09:30:04 2000
-@@ -28,7 +28,6 @@
- ** 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>
-@@ -36,6 +35,10 @@
- #ifdef NNTPSRC
- #include "../conf.h"
- #endif
-+#ifdef BSD_44
-+#define _ANSI_SOURCE
-+#endif
-+#include <stdio.h>
-
- #define LOCK_SET 0
- #define LOCK_FAIL 1
diff --git a/news/nntp/files/patch-doc-config.sh b/news/nntp/files/patch-doc-config.sh
new file mode 100644
index 000000000000..fbd31f3ce223
--- /dev/null
+++ b/news/nntp/files/patch-doc-config.sh
@@ -0,0 +1,32 @@
+--- doc/config.sh.orig Tue Nov 1 06:36:57 1994
++++ doc/config.sh Sun Jan 9 09:30:03 2000
+@@ -11,11 +11,11 @@
+ # (modify these lines to suit your system)
+ #
+ # the location of inetd on your system (usually /etc/inetd)
+-MINETD=/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=/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,12 +23,12 @@
+ # 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
++MNEWSSPOOL=/var/news
+ # The location of the news library directory (usually /usr/lib/news)
+-MNEWSLIB=/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/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
+ #
diff --git a/news/nntp/files/patch-server-active.c b/news/nntp/files/patch-server-active.c
new file mode 100644
index 000000000000..5cd6c344c365
--- /dev/null
+++ b/news/nntp/files/patch-server-active.c
@@ -0,0 +1,12 @@
+--- server/active.c.orig Tue Nov 1 06:40:09 1994
++++ server/active.c Mon Nov 4 05:38:42 2002
+@@ -34,7 +34,9 @@
+ register int i;
+ register int act_fd;
+ register char *cp, *end;
++#ifndef __FreeBSD__
+ char *malloc();
++#endif
+ struct stat statbuf;
+
+ /*
diff --git a/news/nntp/files/patch-server-batch.c b/news/nntp/files/patch-server-batch.c
new file mode 100644
index 000000000000..31613c663306
--- /dev/null
+++ b/news/nntp/files/patch-server-batch.c
@@ -0,0 +1,12 @@
+--- server/batch.c.orig Fri Dec 9 03:52:44 1994
++++ server/batch.c Mon Nov 4 05:45:49 2002
+@@ -31,7 +31,9 @@
+
+ /* imports */
+ extern time_t time();
++#ifndef __FreeBSD__
+ extern char *malloc(), *mktemp(), *index(), *rindex();
++#endif
+ /* forwards */
+ static char *strsave();
+ #ifdef XFER_TIMEOUT
diff --git a/news/nntp/files/patch-server-common.h b/news/nntp/files/patch-server-common.h
new file mode 100644
index 000000000000..457a129d19da
--- /dev/null
+++ b/news/nntp/files/patch-server-common.h
@@ -0,0 +1,30 @@
+--- server/common.h.orig Thu Nov 17 19:15:18 1994
++++ server/common.h Mon Nov 4 05:32:45 2002
+@@ -148,10 +148,15 @@
+
+ #define putline(s) fputs((s), stdout); putchar('\r'); putchar('\n');
+
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#include <unistd.h>
++#else
+ extern int errno;
+
+ extern char *gets(), *fgets();
+ extern char *mktemp();
++#endif
+ extern FILE *open_valid_art();
+ extern FILE *openartbyid();
+ extern char *gethistent();
+@@ -161,7 +166,11 @@
+ void debugup(), debugdown();
+ #endif
+ #ifdef SETPROCTITLE
++#ifdef HAVE_PROCTITLE
++#include <libutil.h>
++#else
+ void setproctitle();
++#endif
+ #endif
+
+ extern char spooldir[];
diff --git a/news/nntp/files/patch-server-group.c b/news/nntp/files/patch-server-group.c
new file mode 100644
index 000000000000..0c881fa3328a
--- /dev/null
+++ b/news/nntp/files/patch-server-group.c
@@ -0,0 +1,12 @@
+--- server/group.c.orig Sat Dec 3 22:54:51 1994
++++ server/group.c Mon Nov 4 05:43:39 2002
+@@ -11,7 +11,9 @@
+ extern void close_xfiles();
+ #endif
+
++#ifndef __FreeBSD__
+ extern char *malloc();
++#endif
+
+ /*
+ * GROUP newsgroup
diff --git a/news/nntp/files/patch-server-main.c b/news/nntp/files/patch-server-main.c
new file mode 100644
index 000000000000..380f44cfbeb8
--- /dev/null
+++ b/news/nntp/files/patch-server-main.c
@@ -0,0 +1,82 @@
+--- server/main.c.orig Thu Nov 17 19:15:19 1994
++++ server/main.c Mon Nov 4 05:34:17 2002
+@@ -35,8 +35,10 @@
+ #endif
+
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ char **Argv = NULL; /* pointer to argument vector */
+ char *LastArgv = NULL; /* end of argv */
++#endif
+ #endif /* SETPROCTITLE */
+
+ int
+@@ -81,6 +83,22 @@
+
+ #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 */
+@@ -101,6 +119,7 @@
+ #endif /* EXCELAN */
+
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ /*
+ * Save start and extent of argv for setproctitle.
+ */
+@@ -113,6 +132,7 @@
+ 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() */
+@@ -243,6 +263,7 @@
+ }
+ #endif /* LOAD */
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ /*
+ * Save start and extent of argv for setproctitle.
+ */
+@@ -255,6 +276,7 @@
+ envp++;
+ LastArgv = envp[-1] + strlen(envp[-1]);
+ #endif /*SDD*/
++#endif
+ #endif /* SETPROCTITLE */
+
+ #ifdef USG
+@@ -271,6 +293,7 @@
+ * stolen from sendmail
+ */
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ #if defined(sun) || defined(hpux)
+ /*VARARGS*/
+ void
+@@ -330,4 +353,5 @@
+ *p++ = ' ';
+ }
+ #endif /* hpux */
++#endif
+ #endif /* SETPROCTITLE */
diff --git a/news/nntp/files/patch-misc.c b/news/nntp/files/patch-server-misc.c
index 68210ecbd9e5..68210ecbd9e5 100644
--- a/news/nntp/files/patch-misc.c
+++ b/news/nntp/files/patch-server-misc.c
diff --git a/news/nntp/files/patch-server-msgidd.c b/news/nntp/files/patch-server-msgidd.c
new file mode 100644
index 000000000000..70d6b13066e0
--- /dev/null
+++ b/news/nntp/files/patch-server-msgidd.c
@@ -0,0 +1,13 @@
+--- server/msgidd.c.orig Fri Dec 9 03:53:01 1994
++++ server/msgidd.c Mon Nov 4 05:51:18 2002
+@@ -34,8 +34,10 @@
+ #define dprintf (void)
+ #endif
+
++#ifndef __FreeBSD__
+ char *malloc();
+ extern int errno;
++#endif
+
+ int log = 0, flags = 0;
+ time_t hold_time = MAX_AGE * 60;
diff --git a/news/nntp/files/patch-netaux.c b/news/nntp/files/patch-server-netaux.c
index f606f444ecd7..f606f444ecd7 100644
--- a/news/nntp/files/patch-netaux.c
+++ b/news/nntp/files/patch-server-netaux.c
diff --git a/news/nntp/files/patch-server-scandir.c b/news/nntp/files/patch-server-scandir.c
new file mode 100644
index 000000000000..b23f679a43e9
--- /dev/null
+++ b/news/nntp/files/patch-server-scandir.c
@@ -0,0 +1,12 @@
+--- server/scandir.c.orig Sat Nov 5 07:04:53 1994
++++ server/scandir.c Mon Nov 4 05:44:47 2002
+@@ -21,7 +21,9 @@
+ */
+
+ extern int intcmp();
++#ifndef __FreeBSD__
+ extern char *malloc(), *realloc();
++#endif
+
+ int
+ scan_dir(low_msg, high_msg)
diff --git a/news/nntp/files/patch-server-xauth.c b/news/nntp/files/patch-server-xauth.c
new file mode 100644
index 000000000000..fbd81b7e010d
--- /dev/null
+++ b/news/nntp/files/patch-server-xauth.c
@@ -0,0 +1,39 @@
+--- server/xauth.c.orig Fri Dec 9 03:53:20 1994
++++ server/xauth.c Mon Nov 4 05:48:08 2002
+@@ -30,7 +30,7 @@
+ extern char Host[];
+
+ /* forward declarations */
+-void getpass();
++void my_getpass();
+ void getuser();
+
+
+@@ -59,7 +59,9 @@
+ union wait status;
+ #endif
+ struct stat stb;
++#ifndef __FreeBSD__
+ char *malloc();
++#endif
+
+ av += 2;
+
+@@ -249,7 +251,7 @@
+ fflush(stdout);
+ return;
+ }
+- getpass(argv[2]);
++ my_getpass(argv[2]);
+ return;
+ }
+ #ifdef GENAUTH
+@@ -301,7 +303,7 @@
+
+ /* password */
+ void
+-getpass(p)
++my_getpass(p)
+ char *p;
+ {
+ static char pass[10];
diff --git a/news/nntp/files/patch-server-xover.c b/news/nntp/files/patch-server-xover.c
new file mode 100644
index 000000000000..543dc0236c30
--- /dev/null
+++ b/news/nntp/files/patch-server-xover.c
@@ -0,0 +1,32 @@
+--- server/xover.c.orig Tue Nov 1 07:09:24 1994
++++ server/xover.c Mon Nov 4 05:50:22 2002
+@@ -213,7 +213,9 @@
+ } while (c != EOF && c != '\n' && c != '\t');
+ printf("\r\n");
+ } else {
++#ifndef __FreeBSD__
+ char *malloc(), *realloc();
++#endif
+ register int size = 1024;
+ buf = malloc(size);
+ if (buf) {
+@@ -248,7 +250,9 @@
+ register char *cp, *cp2;
+ register int hdr;
+ char *array[OVER_FIELD_COUNT];
++#ifndef __FreeBSD__
+ char *malloc(), *realloc();
++#endif
+
+ (void) sprintf(line, "%d", artnum);
+ fp = fopen(line, "r");
+@@ -359,7 +363,9 @@
+ register FILE *fp;
+ register char *cp, *cp2;
+ char *references = NULL;
++#ifndef __FreeBSD__
+ char *malloc(), *realloc();
++#endif
+
+ #ifdef XOVER
+ if (over_is_cheap(artnum, artnum)) {
diff --git a/news/nntp/files/patch-xfer-Makefile b/news/nntp/files/patch-xfer-Makefile
new file mode 100644
index 000000000000..fe4087c46f6a
--- /dev/null
+++ b/news/nntp/files/patch-xfer-Makefile
@@ -0,0 +1,12 @@
+--- xfer/Makefile.orig Thu Nov 17 19:15:22 1994
++++ xfer/Makefile Sun Jan 9 10:21:54 2000
+@@ -28,7 +28,8 @@
+ nntpxfer.o: nntpxfer.c ../conf.h ../server/fakesyslog.h
+
+ install: nntpxfer
+- cp nntpxfer ${BINDIR}
++ cp nntpxfer ${BINDIR}/nntpxfer
++ chmod 755 ${BINDIR}/nntpxfer
+
+ clean:
+ -rm -f *.o nntpxfer make*.out *.BAK *.CKP *~
diff --git a/news/nntp/files/patch-xfer-nntpxfer.c b/news/nntp/files/patch-xfer-nntpxfer.c
new file mode 100644
index 000000000000..c29c37bdbe4d
--- /dev/null
+++ b/news/nntp/files/patch-xfer-nntpxfer.c
@@ -0,0 +1,24 @@
+--- xfer/nntpxfer.c.orig Mon Nov 4 05:18:32 2002
++++ xfer/nntpxfer.c Mon Nov 4 05:25:19 2002
+@@ -60,6 +60,9 @@
+ #include <sys/time.h>
+ #endif
+
++#ifdef BSD_44
++#define _ANSI_SOURCE
++#endif
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ctype.h>
+@@ -107,7 +110,11 @@
+ char *rindex();
+ u_long inet_addr();
+
++#ifdef __FreeBSD__
++#include <unistd.h>
++#else
+ extern int errno;
++#endif
+ char *artlist[MAX_ARTICLES];
+ int server; /* stream socket to the nntp server */
+ FILE * rd_fp, * wr_fp;
diff --git a/news/nntp/files/patch-xmit-get_tcp_conn.c b/news/nntp/files/patch-xmit-get_tcp_conn.c
new file mode 100644
index 000000000000..ea4b956e858b
--- /dev/null
+++ b/news/nntp/files/patch-xmit-get_tcp_conn.c
@@ -0,0 +1,12 @@
+--- xmit/get_tcp_conn.c.orig Thu Nov 17 19:15:22 1994
++++ xmit/get_tcp_conn.c Mon Nov 4 05:19:55 2002
+@@ -24,6 +24,9 @@
+ #include <netinet/in.h>
+ #include <ctype.h>
+ #include <stdio.h>
++#include <string.h>
++#include <unistd.h>
++#include <stdlib.h>
+ #include "get_tcp_conn.h"
+ #ifndef NONETDB
+ #include <netdb.h>
diff --git a/news/nntp/files/patch-xmit-nntpxmit.c b/news/nntp/files/patch-xmit-nntpxmit.c
new file mode 100644
index 000000000000..c713d21288eb
--- /dev/null
+++ b/news/nntp/files/patch-xmit-nntpxmit.c
@@ -0,0 +1,24 @@
+--- xmit/nntpxmit.c.orig Sat Dec 3 23:37:58 1994
++++ xmit/nntpxmit.c Mon Nov 4 05:55:31 2002
+@@ -64,8 +64,12 @@
+ */
+
+ #include "../conf.h"
++#ifdef BSD_44
++#define _ANSI_SOURCE
++#endif
+ #include <stdio.h>
+ #include <errno.h>
++#include <unistd.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+@@ -445,7 +449,7 @@
+ /* Hmph. The file didn't exist. */
+ error = sendcmd(".");
+ } else {
+- error = !sendfile(fp);
++ error = !my_sendfile(fp);
+ /* Leave this open in case we need to requeue it. */
+ }
+ if (error) {
diff --git a/news/nntp/files/patch-xmit-nntpxmit.h b/news/nntp/files/patch-xmit-nntpxmit.h
new file mode 100644
index 000000000000..3da3316e7ebb
--- /dev/null
+++ b/news/nntp/files/patch-xmit-nntpxmit.h
@@ -0,0 +1,10 @@
+--- xmit/nntpxmit.h.orig Thu Nov 3 04:51:34 1994
++++ xmit/nntpxmit.h Sun Jan 9 09:30:04 2000
+@@ -7,6 +7,7 @@
+ */
+
+ #ifdef MMAP
++#include <sys/types.h>
+ #include <sys/mman.h>
+ #include <sys/stat.h>
+ #endif
diff --git a/news/nntp/files/patch-xmit-remote.c b/news/nntp/files/patch-xmit-remote.c
new file mode 100644
index 000000000000..a3f72ffd5722
--- /dev/null
+++ b/news/nntp/files/patch-xmit-remote.c
@@ -0,0 +1,25 @@
+--- xmit/remote.c.orig Tue Jan 9 08:28:03 1996
++++ xmit/remote.c Mon Nov 4 05:59:42 2002
+@@ -71,7 +71,13 @@
+ char *sfgets();
+ char *rfgets();
+
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#else
+ extern int errno;
++#endif
+ extern char Debug;
+ extern char *errmsg();
+ extern char *strcpy();
+@@ -403,7 +409,7 @@
+ ** with appropriate RFC822 filtering (e.g. CRLF line termination,
+ ** and dot escaping). Return FALSE if something went wrong.
+ */
+-sendfile(fp)
++my_sendfile(fp)
+ FILE *fp;
+ {
+ register int c;
diff --git a/news/nntp/files/patch-xmit-shlock.c b/news/nntp/files/patch-xmit-shlock.c
new file mode 100644
index 000000000000..ab52bd715699
--- /dev/null
+++ b/news/nntp/files/patch-xmit-shlock.c
@@ -0,0 +1,21 @@
+--- xmit/shlock.c.orig Tue Nov 1 06:54:32 1994
++++ xmit/shlock.c Sun Jan 9 09:30:04 2000
+@@ -28,7 +28,6 @@
+ ** 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>
+@@ -36,6 +35,10 @@
+ #ifdef NNTPSRC
+ #include "../conf.h"
+ #endif
++#ifdef BSD_44
++#define _ANSI_SOURCE
++#endif
++#include <stdio.h>
+
+ #define LOCK_SET 0
+ #define LOCK_FAIL 1