aboutsummaryrefslogtreecommitdiff
path: root/news/nntp
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2016-11-15 20:58:32 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2016-11-15 20:58:32 +0000
commit6b700918ca7e21cc46fe6bdba75393c67cf72a72 (patch)
treefc5dfe2f908e09b305ead7d8251b5121dc269c04 /news/nntp
parent643e12da2d6ba7aa1c6d8a679cdcad5cf568805e (diff)
downloadports-6b700918ca7e21cc46fe6bdba75393c67cf72a72.tar.gz
ports-6b700918ca7e21cc46fe6bdba75393c67cf72a72.zip
- fix include and prototype problems with ansi patches
- fix nntpxmit for 64bit
Notes
Notes: svn path=/head/; revision=426183
Diffstat (limited to 'news/nntp')
-rw-r--r--news/nntp/Makefile7
-rw-r--r--news/nntp/distinfo5
-rw-r--r--news/nntp/files/patch-acttimes.c15
-rw-r--r--news/nntp/files/patch-conf.h163
-rw-r--r--news/nntp/files/patch-server-active.c12
-rw-r--r--news/nntp/files/patch-server-batch.c25
-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.c36
-rw-r--r--news/nntp/files/patch-server-msgidd.c22
-rw-r--r--news/nntp/files/patch-server-netaux.c24
-rw-r--r--news/nntp/files/patch-server-scandir.c12
-rw-r--r--news/nntp/files/patch-server-spawn.c14
-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-nntpxfer.c25
-rw-r--r--news/nntp/files/patch-xmit-get_tcp_conn.c12
-rw-r--r--news/nntp/files/patch-xmit-nntpxmit.c287
-rw-r--r--news/nntp/files/patch-xmit-nntpxmit.h10
-rw-r--r--news/nntp/files/patch-xmit-remote.c101
-rw-r--r--news/nntp/files/patch-xmit-shlock.c45
-rw-r--r--news/nntp/files/patch-xmit-xmitauth.c45
23 files changed, 5 insertions, 1050 deletions
diff --git a/news/nntp/Makefile b/news/nntp/Makefile
index 5434bdf1a894..72ad4cc3ec6b 100644
--- a/news/nntp/Makefile
+++ b/news/nntp/Makefile
@@ -3,13 +3,13 @@
PORTNAME= nntp
PORTVERSION= 1.5.12.2
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= news
MASTER_SITES= ftp://ftp.dinoex.org/pub/c-news/
DISTNAME= ${PORTNAME}.${PORTVERSION}
PATCH_SITES= ftp://ftp.dinoex.org/pub/c-news/
-PATCHFILES= nntp-patch-y2k
+PATCHFILES= nntp-patch-ansi
MAINTAINER= dinoex@FreeBSD.org
COMMENT= NNTP with NOV support
@@ -50,9 +50,6 @@ post-extract:
${CP} ${WRKSRC}/conf.h.dist ${WRKSRC}/conf.h
pre-configure:
- # fix for compiler with broken namespace
- ${REINPLACE_CMD} -e 's|\([(! ]\)log\([)+ ]\)|\1dolog\2|g' \
- ${WRKSRC}/server/msgidd.c
${REINPLACE_CMD} ${ALONE} \
-e "s=/usr/local/news/lib/bin/config=${NEWSBIN}/config=" \
-e "s=/usr/local/news/cnewsbin=${NEWSBIN}=" \
diff --git a/news/nntp/distinfo b/news/nntp/distinfo
index 38e318087abe..60867f3e5a65 100644
--- a/news/nntp/distinfo
+++ b/news/nntp/distinfo
@@ -1,4 +1,5 @@
+TIMESTAMP = 1479241494
SHA256 (nntp.1.5.12.2.tar.gz) = c4b4b6e7aa6abfe06300c1667fc55049b01d9f3a2c6f8714845a1dfd4c33fe46
SIZE (nntp.1.5.12.2.tar.gz) = 153634
-SHA256 (nntp-patch-y2k) = bc2d66717670fdffc029334d17af17da9b6e89d89dde1ff1b77c8cb585270f0b
-SIZE (nntp-patch-y2k) = 6629
+SHA256 (nntp-patch-ansi) = 7f977465945aa9a051ab91c2e8648968e9f94f16b782e55ccc26b530d523c572
+SIZE (nntp-patch-ansi) = 73091
diff --git a/news/nntp/files/patch-acttimes.c b/news/nntp/files/patch-acttimes.c
deleted file mode 100644
index aab11d334542..000000000000
--- a/news/nntp/files/patch-acttimes.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- support/acttimes.c Tue Jan 9 08:28:02 1996
-+++ support/acttimes.c Mon Jun 4 09:40:37 2007
-@@ -64,12 +64,6 @@
-
- /* ---------- End of configuration defines ---------- */
-
--#ifdef TERMIO
--#include <termio.h>
--#else
--#include <sgtty.h>
--#endif
--
- #define TIMER_FIRST 1
- #define TIMER_DEFAULT (10 * 60)
-
diff --git a/news/nntp/files/patch-conf.h b/news/nntp/files/patch-conf.h
deleted file mode 100644
index fa5b03194db8..000000000000
--- a/news/nntp/files/patch-conf.h
+++ /dev/null
@@ -1,163 +0,0 @@
---- conf.h.orig Mon Nov 4 04:55:08 2002
-+++ conf.h Mon Nov 4 04:55:43 2002
-@@ -8,10 +8,12 @@
- */
-
-
--#undef ALONE /* True if we're running without inetd */
-+#define ALONE /* True if we're running without inetd */
-
- #ifdef ALONE
--#undef FASTFORK /* True if we don't want to read active file on start*/
-+#define FASTFORK /* True if we don't want to read active file on start*/
-+#define NEWS_GID 8
-+#define NEWS_UID 8
- #endif
-
- #define LOAD 5 /* Loadav above which server refuses connections */
-@@ -40,23 +42,23 @@
- #undef TLI /* Define this if you want to use TLI instead of */
- /* sockets */
-
--#define NDBM /* Use new-style (4.3) ndbm(3x) libraries */
-+#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 */
-
--#undef DBZ /* True if we want to use dbz libraries */
-+#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!*/
-
--#undef CNEWS /* define this if you are running C News */
--#undef CNEWS_CLEARTEXT /* define this if you have a modern C News that handles
-+#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 */
--#undef BATCHED_INPUT /* define if you want to support C News style
-+#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 */
-@@ -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 */
-+#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 */
- /* than this many inodes on the SPOOLDIR filesystem */
--#undef SETPROCTITLE /* if you want status visable via ps */
-+#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 */
-
-@@ -110,7 +113,7 @@
- * if you are running BNEWS. At least, not yet. :-)
- */
-
--/* #define UMASK 022 */
-+#define UMASK 022
-
- /*
- * If you have the syslog library routine, define SYSLOG to
-@@ -177,13 +180,13 @@
- #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: */
--#define OVER_FMT_FILE "/usr/lib/news/overview.fmt"
-+#define OVER_FMT_FILE "/usr/local/news/lib/overview.fmt"
-
- /* Leave this undefined to indicate that overview files go in the spool
- * directory. However, if you want a separate hierarchy of overview
- * files, define it here.
- */
--/*#define OVERVIEW_DIR "/usr/spool/overviews" /* base directory */
-+#define OVERVIEW_DIR "/var/news/over.view" /* base directory */
-
- #define XROVER /* xrover -- Return reference overview data */
-
-@@ -191,10 +194,10 @@
- * spool directory. However, if you want a separate hierarchy of rover
- * files, define it here.
- */
--/*#define ROVER_DIR "/usr/spool/overviews" /* base directory */
-+/*define ROVER_DIR "/var/news/r.over" /* base directory */
-
- #undef XINDEX /* Optional support for tin's index files */
--#define XINDEX_DIR "/usr/spool/news/.index"
-+#define XINDEX_DIR "/var/news/.index"
-
- /* XTHREAD defines: if XTHREAD is defined, THREAD_DIR controls where the
- * thread files will be read from.
-@@ -244,27 +247,27 @@
- /*
- * This file is where access information is stored
- */
--#define ACCESS_FILE "/usr/lib/news/nntp_access"
-+#define ACCESS_FILE "/usr/local/news/lib/nntp_access"
-
- /*
- * The file where the newgroup creation times are kept. 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"
-+#define ACTIVE_TIMES_FILE "/usr/local/news/lib/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? */
-+#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
-@@ -277,15 +280,15 @@
- #else
- #define TOOBIG 300000L /* batch > TOOBIG bytes, kick rnews */
- #define TOOMANY 1024 /* batch > TOOMANY articles, kick rnews */
--#define NEWSRUN "/usr/lib/newsbin/input/newsrun"
-+#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 "/usr/spool/news/in.coming"
-+#define INDIR "/var/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"
-+#define BATCH_FILE "/var/news/in.coming/nntp.XXXXXX"
-
- /************************************************************************/
- /* We don't recommend that you make changes in anything after this line */
diff --git a/news/nntp/files/patch-server-active.c b/news/nntp/files/patch-server-active.c
deleted file mode 100644
index 5cd6c344c365..000000000000
--- a/news/nntp/files/patch-server-active.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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
deleted file mode 100644
index 6d7a72d8eb03..000000000000
--- a/news/nntp/files/patch-server-batch.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- server/batch.c.orig Fri Dec 9 03:52:44 1994
-+++ server/batch.c Mon Sep 6 12:25:18 2004
-@@ -20,18 +20,22 @@
- */
- #include "common.h"
- #include <signal.h>
-+#ifndef __FreeBSD__
- #ifdef sparc
- #ifndef SVR4
- #include <vfork.h>
- #endif
- #endif
-+#endif
- #ifdef BATCHED_INPUT
- #define YES 1
- #define NO 0
-
- /* 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
deleted file mode 100644
index 457a129d19da..000000000000
--- a/news/nntp/files/patch-server-common.h
+++ /dev/null
@@ -1,30 +0,0 @@
---- 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
deleted file mode 100644
index 0c881fa3328a..000000000000
--- a/news/nntp/files/patch-server-group.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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
deleted file mode 100644
index 380f44cfbeb8..000000000000
--- a/news/nntp/files/patch-server-main.c
+++ /dev/null
@@ -1,82 +0,0 @@
---- 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-server-misc.c b/news/nntp/files/patch-server-misc.c
deleted file mode 100644
index 68210ecbd9e5..000000000000
--- a/news/nntp/files/patch-server-misc.c
+++ /dev/null
@@ -1,36 +0,0 @@
---- server/misc.c.orig Tue Jan 9 08:28:04 1996
-+++ server/misc.c Fri Jan 25 06:16:44 2002
-@@ -965,6 +965,27 @@
- ** none.
- */
-
-+
-+#if defined(BSD_44)
-+#include <stdlib.h>
-+
-+int
-+getla( void )
-+{
-+ double avenrun[3];
-+ int rc;
-+
-+ rc = getloadavg( avenrun, 1 );
-+ if ( rc == -1 )
-+ return 1;
-+# ifdef FSCALE
-+ return ((int) (avenrun[0] + FSCALE/2) >> FSHIFT);
-+# else
-+ return ((int) (avenrun[0] + 0.5));
-+# endif
-+}
-+
-+#else
- #if defined(USG) && !defined(SVR4)
- int
- getla()
-@@ -1058,4 +1079,5 @@
- # endif
- }
- #endif
-+#endif /* BSD_44 */
- #endif /* LOAD */
diff --git a/news/nntp/files/patch-server-msgidd.c b/news/nntp/files/patch-server-msgidd.c
deleted file mode 100644
index 19f380bf7b43..000000000000
--- a/news/nntp/files/patch-server-msgidd.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- server/msgidd.c.orig Fri Dec 9 03:53:01 1994
-+++ server/msgidd.c Thu Dec 14 10:48:45 2006
-@@ -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;
-@@ -171,7 +173,7 @@
- alarm(ALARM_TIME);
- }
-
--SIGRET onpipe();
-+static SIGRET onpipe();
-
- main(argc, argv)
- int argc;
diff --git a/news/nntp/files/patch-server-netaux.c b/news/nntp/files/patch-server-netaux.c
deleted file mode 100644
index 197b23c6ae87..000000000000
--- a/news/nntp/files/patch-server-netaux.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- server/netaux.c.orig Tue Nov 1 07:08:56 1994
-+++ server/netaux.c Sun Aug 27 21:52:42 2006
-@@ -20,6 +20,9 @@
- #else
- #include <sys/time.h>
- #endif
-+#ifdef BSD_44
-+#include <sys/resource.h>
-+#endif
-
- /*
- * read_again -- (maybe) read in the active file again,
-@@ -262,7 +265,11 @@
- reaper()
- {
- #ifndef USG
-+#ifdef BSD_44
-+ int status;
-+#else
- union wait status;
-+#endif
-
- while (wait3(&status, WNOHANG, (struct rusage *)0) > 0)
- ;
diff --git a/news/nntp/files/patch-server-scandir.c b/news/nntp/files/patch-server-scandir.c
deleted file mode 100644
index b23f679a43e9..000000000000
--- a/news/nntp/files/patch-server-scandir.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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-spawn.c b/news/nntp/files/patch-server-spawn.c
deleted file mode 100644
index ca655dd4083f..000000000000
--- a/news/nntp/files/patch-server-spawn.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- server/spawn.c.orig Fri Dec 9 03:53:14 1994
-+++ server/spawn.c Sun Aug 22 23:36:19 2004
-@@ -5,9 +5,11 @@
- #include "common.h"
-
- #include <signal.h>
-+#ifndef __FreeBSD__
- #ifdef sparc
- #ifndef SVR4
- #include <vfork.h>
-+#endif
- #endif
- #endif
- #ifdef XFER_TIMEOUT
diff --git a/news/nntp/files/patch-server-xauth.c b/news/nntp/files/patch-server-xauth.c
deleted file mode 100644
index fbd81b7e010d..000000000000
--- a/news/nntp/files/patch-server-xauth.c
+++ /dev/null
@@ -1,39 +0,0 @@
---- 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
deleted file mode 100644
index 543dc0236c30..000000000000
--- a/news/nntp/files/patch-server-xover.c
+++ /dev/null
@@ -1,32 +0,0 @@
---- 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-nntpxfer.c b/news/nntp/files/patch-xfer-nntpxfer.c
deleted file mode 100644
index 4eba4a795893..000000000000
--- a/news/nntp/files/patch-xfer-nntpxfer.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- xfer/nntpxfer.c.orig Fri Dec 6 07:51:46 2002
-+++ xfer/nntpxfer.c Fri Dec 6 07:58:39 2002
-@@ -107,7 +107,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;
-@@ -649,8 +653,10 @@
- errmsg(code)
- int code;
- {
-+#ifndef __FreeBSD__
- extern int sys_nerr;
- extern char *sys_errlist[];
-+#endif
- static char ebuf[6+5+1];
-
- if (code > sys_nerr || code < 0) {
diff --git a/news/nntp/files/patch-xmit-get_tcp_conn.c b/news/nntp/files/patch-xmit-get_tcp_conn.c
deleted file mode 100644
index ea4b956e858b..000000000000
--- a/news/nntp/files/patch-xmit-get_tcp_conn.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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
deleted file mode 100644
index 2b8db3dd41c1..000000000000
--- a/news/nntp/files/patch-xmit-nntpxmit.c
+++ /dev/null
@@ -1,287 +0,0 @@
---- xmit/nntpxmit.c.orig 1994-12-03 23:37:58.000000000 +0100
-+++ xmit/nntpxmit.c 2014-02-07 22:23:30.000000000 +0100
-@@ -66,6 +66,7 @@
- #include "../conf.h"
- #include <stdio.h>
- #include <errno.h>
-+#include <unistd.h>
- #include <ctype.h>
- #include <sys/types.h>
- #include <sys/time.h>
-@@ -75,7 +76,10 @@
- #include <sys/times.h>
- extern time_t time();
- #endif
-+#ifndef __FreeBSD__
- #include <sys/file.h>
-+#include <string.h>
-+#endif
- #include <fcntl.h>
- #include <signal.h>
- #ifdef USG
-@@ -105,7 +109,9 @@
- SIGRET catchsig();
- void restsig();
- void logstats();
--void log();
-+void nntpdlog();
-+void cleanup();
-+void rewrite();
- int interrupted();
-
- /*
-@@ -148,6 +154,7 @@
-
- double Tbegin, Tend; /* transfer timestamps */
-
-+#ifndef __FreeBSD__
- extern int errno;
- extern int strncmp();
- extern char *rindex();
-@@ -155,6 +162,7 @@
- extern char *mktemp();
- extern char *strcpy();
- extern char *strcat();
-+#endif
-
- main(ac, av)
- int ac;
-@@ -298,10 +306,10 @@
- "%s stats %lu offered %lu accepted %lu rejected %lu failed",
- Host, Stats.offered, Stats.accepted, Stats.rejected,
- Stats.failed);
-- log(L_INFO, buf);
-+ nntpdlog(L_INFO, buf);
- sprintf(buf, "%s xmit user %.3f system %.3f elapsed %.3f",
- Host, (user - ouser), (sys - osys), (Tend - Tbegin));
-- log(L_INFO, buf);
-+ nntpdlog(L_INFO, buf);
- /* reset reference point */
- Tbegin = Tend;
- ouser = user;
-@@ -336,7 +344,7 @@
- char buf[BUFSIZ];
-
- sprintf(buf, E_fopen, file, mode, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- return(FALSE);
- }
-
-@@ -437,7 +445,7 @@
- if (fp == NULL && errno != ENOENT) {
- /* Worse than "No such file or directory"? */
- sprintf(buf, E_fopen, file, "r", errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- goodbye(DONT_WAIT);
- exit(EX_OSERR);
- }
-@@ -445,13 +453,13 @@
- /* 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) {
- sprintf(buf, "%s xfer: sendfile: %s",
- host, errmsg(errno));
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- Stats.failed++;
- if (fp) { (void) fclose(fp); fp = NULL; }
- return(FALSE);
-@@ -466,12 +474,12 @@
- if (code < 0) {
- if (errno > 0) {
- sprintf(buf, e_xfer, host, errmsg(errno));
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- } else {
- char errbuf[BUFSIZ];
-
- sprintf(errbuf, e_xfer, host, buf);
-- log(L_NOTICE, errbuf);
-+ nntpdlog(L_NOTICE, errbuf);
- }
- if (fp) { (void) fclose(fp); fp = NULL; }
- return(FALSE);
-@@ -495,14 +503,14 @@
- if (code < 0) {
- if (errno > 0) {
- sprintf(buf, e_xfer, host, errmsg(errno));
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- } else {
- sprintf(buf, e_xfer, host, "ihave");
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- }
- } else {
- sprintf(buf, "%s improper response to IHAVE: %d while offering %s", host, code, Article);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- if (fp) { (void) fclose(fp); fp = NULL; }
- }
- return(FALSE);
-@@ -515,8 +523,10 @@
- errmsg(code)
- int code;
- {
-+#ifndef __FreeBSD__
- extern int sys_nerr;
- extern char *sys_errlist[];
-+#endif
- static char ebuf[6+5+1];
-
- if (code > sys_nerr || code < 0) {
-@@ -769,13 +779,13 @@
- ** communications with the remote either.
- */
- sprintf(buf, "%s: message-id missing!", Article);
-- log(L_DEBUG, buf);
-+ nntpdlog(L_DEBUG, buf);
- return(ERR_GOTIT);
- }
-
- if (!msgid_ok(id)) {
- sprintf(buf, "%s: message-id syntax error: %s", Article, id);
-- log(L_DEBUG, buf);
-+ nntpdlog(L_DEBUG, buf);
- return(ERR_GOTIT);
- }
-
-@@ -836,7 +846,7 @@
- /*
- ** OK, clean up any mess and requeue failed articles
- */
--cleanup()
-+void cleanup()
- {
- dprintf(stderr, "%s: cleanup()\n", Pname);
- if (Qfp == (FILE *)NULL || Qfile == (char *)NULL)
-@@ -856,7 +866,7 @@
- char buf[BUFSIZ];
-
- sprintf(buf, E_unlk, Qfile, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- }
- FCLOSE(Qfp);
-@@ -908,7 +918,7 @@
- ** account is supposed to own netnews), the resultant file will be the
- ** wrong ownership, permissions, etc.
- */
--rewrite()
-+void rewrite()
- {
- register ll_t *lp;
- register FILE *tmpfp;
-@@ -925,7 +935,7 @@
-
- if ((tmpfp = fopen(tempfile, mode)) == (FILE *)NULL) {
- sprintf(buf, E_fopen, tempfile, mode, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- FCLOSE(Qfp);
- return;
- }
-@@ -962,12 +972,12 @@
- */
- if (ferror(tmpfp)) {
- sprintf(buf, "rewrite(): copy to %s failed", tempfile);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- (void) fclose(tmpfp);
- FCLOSE(Qfp);
- if (unlink(tempfile) < 0) {
- sprintf(buf, E_unlk, tempfile, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- requeue((char *)NULL,(char *)NULL); /* reset */
- return;
-@@ -978,12 +988,12 @@
- rewind(Qfp);
- if (ftruncate(fileno(Qfp), (off_t)0) < 0) {
- sprintf(buf, "ftruncate(%s, 0): %s", Qfile, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- FCLOSE(Qfp);
- (void) fclose(tmpfp);
- if (unlink(tempfile) < 0) {
- sprintf(buf, E_unlk, tempfile, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- requeue((char *)NULL,(char *)NULL); /* reset */
- return;
-@@ -992,11 +1002,11 @@
- FCLOSE(Qfp); /* we just nuked our lock here (lockfd) */
- if ((Qfp = fopen(Qfile, mode)) == (FILE *)NULL) {
- sprintf(buf, E_fopen, Qfile, mode, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- (void) fclose(tmpfp);
- if (unlink(tempfile) < 0) {
- sprintf(buf, E_unlk, tempfile, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- requeue((char *)NULL,(char *)NULL); /* reset */
- return;
-@@ -1012,13 +1022,13 @@
- (void) fflush(Qfp);
- if (ferror(Qfp)) {
- sprintf(buf, "rewrite(): copy to %s failed", Qfile);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- (void) fclose(tmpfp);
- FCLOSE(Qfp);
- if (unlink(tempfile) < 0) {
- sprintf(buf, E_unlk, tempfile, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- requeue((char *)NULL,(char *)NULL); /* reset */
- dprintf(stderr, "%s: rewrite(%s): done\n", Pname, Qfile);
-@@ -1040,7 +1050,7 @@
- catchsig(SIG_IGN); /* for System V - hope we're quick enough */
- #endif /* RELSIG */
- sprintf(buf, "%s signal %d", Host, sig);
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- requeue(Article,(char *)NULL);
- cleanup();
- if (Report_Stats)
-@@ -1092,7 +1102,7 @@
- ** log stuff
- */
- void
--log(importance, error)
-+nntpdlog(importance, error)
- int importance;
- char *error;
- {
-@@ -1131,7 +1141,7 @@
- if (lockf(fd, (non_blocking ? F_TLOCK : F_LOCK), 0) < 0) {
- if (errno != EACCES) {
- sprintf(buf, "lockf(%s): %s\n", file, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- return(FALSE);
- }
-@@ -1141,7 +1151,7 @@
- if (flock(fd, LOCK_EX|(non_blocking ? LOCK_NB : 0)) < 0) {
- if (errno != EWOULDBLOCK) {
- sprintf(buf, "flock(%s): %s\n", file, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- }
- return(FALSE);
- }
diff --git a/news/nntp/files/patch-xmit-nntpxmit.h b/news/nntp/files/patch-xmit-nntpxmit.h
deleted file mode 100644
index 3da3316e7ebb..000000000000
--- a/news/nntp/files/patch-xmit-nntpxmit.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644
index 9b7dcb4ada35..000000000000
--- a/news/nntp/files/patch-xmit-remote.c
+++ /dev/null
@@ -1,101 +0,0 @@
---- xmit/remote.c.orig Tue Jan 9 08:28:03 1996
-+++ xmit/remote.c Fri Jul 25 19:17:30 2003
-@@ -71,11 +71,17 @@
- 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();
--extern void log();
-+extern void nntpdlog();
-
- /*
- ** send cmd to remote, terminated with a CRLF.
-@@ -207,7 +213,7 @@
- }
- break;
- #else
-- log(L_WARNING, "no DECNET support compiled in");
-+ nntpdlog(L_WARNING, "no DECNET support compiled in");
- return(FAIL);
- #endif
- case T_FD:
-@@ -220,29 +226,29 @@
- switch(socket0) {
- case NOHOST:
- sprintf(buf, "%s host unknown", host);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- return(FAIL);
- case NOSERVICE:
- sprintf(buf, "%s service unknown: %s", host, service);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- return(FAIL);
- case FAIL:
- sprintf(buf, "%s hello: %s", host, errmsg(errno));
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- return(FAIL);
- }
- }
-
- if ((socket1 = dup(socket0)) < 0) {
- sprintf(buf, "dup(%d): %s", socket0, errmsg(errno));
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- (void) close(socket0);
- return(FAIL);
- }
-
- if ((rmt_rd = fdopen(socket0, rmode)) == (FILE *)NULL) {
- sprintf(buf, e_fdopen, socket0, rmode);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- (void) close(socket0);
- (void) close(socket1);
- return(FAIL);
-@@ -250,7 +256,7 @@
-
- if ((rmt_wr = fdopen(socket1, wmode)) == (FILE *)NULL) {
- sprintf(buf, e_fdopen, socket1, wmode);
-- log(L_WARNING, buf);
-+ nntpdlog(L_WARNING, buf);
- (void) fclose(rmt_rd);
- rmt_rd = (FILE *)NULL;
- (void) close(socket1);
-@@ -270,7 +276,7 @@
- char err[BUFSIZ];
-
- sprintf(err, "%s greeted us with %s", host, buf);
-- log(L_NOTICE, err);
-+ nntpdlog(L_NOTICE, err);
- }
- goodbye(DONT_WAIT);
- return(FAIL);
-@@ -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;
-@@ -440,7 +446,7 @@
- mbufr = mmap (0, sbuf.st_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0);
- if(mbufr == (char *) -1){
- sprintf(buf, "sendfile: mmap failed: %s", errmsg(errno));
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- return(FALSE);
- }
-
diff --git a/news/nntp/files/patch-xmit-shlock.c b/news/nntp/files/patch-xmit-shlock.c
deleted file mode 100644
index a4ac70e171e6..000000000000
--- a/news/nntp/files/patch-xmit-shlock.c
+++ /dev/null
@@ -1,45 +0,0 @@
---- xmit/shlock.c.orig Tue Nov 1 06:54:32 1994
-+++ xmit/shlock.c Tue Dec 3 05:04:26 2002
-@@ -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
-+#include <stdio.h>
-+#ifdef __FreeBSD__
-+#include <string.h>
-+#endif
-
- #define LOCK_SET 0
- #define LOCK_FAIL 1
-@@ -61,10 +64,12 @@
-
- #define dprintf if (Debug) printf
-
-+#ifndef __FreeBSD__
- extern int errno;
- extern char *rindex();
- extern char *strcpy();
- extern char *strcat();
-+#endif
-
- main(ac, av)
- int ac;
-@@ -118,8 +123,10 @@
- errmsg(n)
- register int n;
- {
-+#ifndef __FreeBSD__
- extern int sys_nerr;
- extern char *sys_errlist[];
-+#endif
-
- return((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");
- }
diff --git a/news/nntp/files/patch-xmit-xmitauth.c b/news/nntp/files/patch-xmit-xmitauth.c
deleted file mode 100644
index c47442d40b38..000000000000
--- a/news/nntp/files/patch-xmit-xmitauth.c
+++ /dev/null
@@ -1,45 +0,0 @@
---- xmit/xmitauth.c.orig Sat Dec 3 22:54:06 1994
-+++ xmit/xmitauth.c Fri Jul 25 19:15:39 2003
-@@ -11,6 +11,7 @@
-
- extern char Debug;
- extern int converse();
-+extern void nntpdlog();
-
- FILE *sys;
-
-@@ -37,7 +38,7 @@
- /* malformed entry? */
- if (i != 3)
- {
-- log(L_NOTICE,"malformed entry in nntp.sys");
-+ nntpdlog(L_NOTICE,"malformed entry in nntp.sys");
- continue;
- }
-
-@@ -48,14 +49,14 @@
- if (feof(sys))
- {
- sprintf(buf,"host %s authinfo not in nntp.sys", host);
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- exit(1);
- }
-
- sprintf(buf,"authinfo user %s", user);
- if (converse(buf, sizeof(buf)) != NEED_AUTHDATA)
- {
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- exit(1);
- }
-
-@@ -66,7 +67,7 @@
- sprintf(buf,"authinfo pass %s", pass);
- if (converse(buf, sizeof(buf)) != OK_AUTH)
- {
-- log(L_NOTICE, buf);
-+ nntpdlog(L_NOTICE, buf);
- exit(1);
- }
-