patch 3
Bear Giles
bear at coyotesong.com
Sat Jun 9 19:06:09 UTC 2001
diff -Naur --recursive inn2-2.3.1.orig/include/acconfig.h inn2-2.3.1/include/acconfig.h
--- inn2-2.3.1.orig/include/acconfig.h Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/include/acconfig.h Fri Jun 8 20:26:19 2001
@@ -277,9 +277,6 @@
/* All occurrances of these typedefs anywhere should be replaced by their
ANSI/ISO/standard C definitions given in these typedefs and #defines. */
-#define FUNCTYPE void
-
-typedef FUNCTYPE (*FUNCPTR)();
typedef char const * STRING;
typedef char * const CSTRING;
diff -Naur --recursive inn2-2.3.1.orig/include/clibrary.h inn2-2.3.1/include/clibrary.h
--- inn2-2.3.1.orig/include/clibrary.h Fri Jun 8 20:21:56 2001
+++ inn2-2.3.1/include/clibrary.h Fri Jun 8 20:25:44 2001
@@ -226,10 +226,6 @@
probably now empty, so see if this breaks anyone. */
#define FDSET fd_set
-/* #define instead of typedef for old broken compilers. We just assume void
- exists now. Replace FREEVAL with void where you see it. */
-#define FREEVAL void
-
/* This needs to be moved into libinn.h, since we don't guarantee to provide
getopt() functionality. */
extern int optind;
diff -Naur --recursive inn2-2.3.1.orig/include/config.h.in inn2-2.3.1/include/config.h.in
--- inn2-2.3.1.orig/include/config.h.in Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/include/config.h.in Fri Jun 8 20:25:44 2001
@@ -568,10 +568,6 @@
/* All occurrances of these typedefs anywhere should be replaced by their
ANSI/ISO/standard C definitions given in these typedefs and #defines. */
-#define FUNCTYPE void
-
-typedef FUNCTYPE (*FUNCPTR)();
-
typedef char const * STRING;
typedef char * const CSTRING;
diff -Naur --recursive inn2-2.3.1.orig/innd/cc.c inn2-2.3.1/innd/cc.c
--- inn2-2.3.1.orig/innd/cc.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/innd/cc.c Fri Jun 8 20:25:44 2001
@@ -1772,7 +1772,7 @@
/*
** Read function. Read and process the message.
*/
-static FUNCTYPE
+static void
CCreader(cp)
CHANNEL *cp;
{
@@ -1956,7 +1956,7 @@
/*
** Called when a write-in-progress is done on the channel. Shouldn't happen.
*/
-static FUNCTYPE
+static void
CCwritedone()
{
syslog(L_ERROR, "%s internal CCwritedone", LogName);
diff -Naur --recursive inn2-2.3.1.orig/innd/chan.c inn2-2.3.1/innd/chan.c
--- inn2-2.3.1.orig/innd/chan.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/innd/chan.c Fri Jun 8 20:25:44 2001
@@ -157,7 +157,7 @@
** Create a channel from a descriptor.
*/
CHANNEL *CHANcreate(int fd, CHANNELTYPE Type, CHANNELSTATE State,
- FUNCPTR Reader, FUNCPTR WriteDone)
+ void (*Reader)(), void (*WriteDone())
{
CHANNEL *cp;
BUFFER in;
@@ -487,7 +487,7 @@
** Put a channel to sleep, call a function when it wakes.
** Note that the Argument must be NULL or allocated memory!
*/
-void SCHANadd(CHANNEL *cp, time_t Waketime, POINTER Event, FUNCPTR Waker, POINTER Argument)
+void SCHANadd(CHANNEL *cp, time_t Waketime, POINTER Event, void (*Waker)(), POINTER Argument)
{
if (!FD_ISSET(cp->fd, &SCHANmask)) {
SCHANcount++;
@@ -726,7 +726,7 @@
/*
** Wakeup routine called after a write channel was put to sleep.
*/
-static FUNCTYPE
+static void
CHANwakeup(CHANNEL *cp)
{
syslog(L_NOTICE, "%s wakeup", CHANname(cp));
diff -Naur --recursive inn2-2.3.1.orig/innd/innd.h inn2-2.3.1/innd/innd.h
--- inn2-2.3.1.orig/innd/innd.h Fri Jun 8 20:21:56 2001
+++ inn2-2.3.1/innd/innd.h Fri Jun 8 20:27:20 2001
@@ -184,11 +184,11 @@
time_t LastActive;
time_t NextLog;
INADDR Address;
- FUNCPTR Reader;
- FUNCPTR WriteDone;
+ void (*Reader)();
+ void (*WriteDone)();
time_t Waketime;
time_t Started;
- FUNCPTR Waker;
+ void (*Waker)();
POINTER Argument;
POINTER Event;
BUFFER In;
@@ -512,7 +512,7 @@
extern void BUFFtrimcr(BUFFER *bp);
extern BOOL CHANsleeping(CHANNEL *cp);
-extern CHANNEL *CHANcreate(int fd, CHANNELTYPE Type, CHANNELSTATE STate, FUNCPTR Reader, FUNCPTR WriteDone);
+extern CHANNEL *CHANcreate(int fd, CHANNELTYPE Type, CHANNELSTATE STate, void (*Reader)(), void (*WriteDone)());
extern CHANNEL *CHANiter(int *cp, CHANNELTYPE Type);
extern CHANNEL *CHANfromdescriptor(int fd);
extern char *CHANname(const CHANNEL *cp);
@@ -527,7 +527,7 @@
extern void RCHANadd(CHANNEL *cp);
extern void RCHANremove(CHANNEL *cp);
-extern void SCHANadd(CHANNEL *cp, time_t Waketime, POINTER Event, FUNCPTR Waker, POINTER Argument);
+extern void SCHANadd(CHANNEL *cp, time_t Waketime, POINTER Event, void (*Waker)(), POINTER Argument);
extern void SCHANremove(CHANNEL *cp);
extern void SCHANwakeup(POINTER *Event);
diff -Naur --recursive inn2-2.3.1.orig/innd/lc.c inn2-2.3.1/innd/lc.c
--- inn2-2.3.1.orig/innd/lc.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/innd/lc.c Fri Jun 8 20:25:44 2001
@@ -21,7 +21,7 @@
/*
** Read function. Accept the connection and create an NNTP channel.
*/
-static FUNCTYPE
+static void
LCreader(cp)
CHANNEL *cp;
{
@@ -49,7 +49,7 @@
/*
** Write-done function. Shouldn't happen.
*/
-static FUNCTYPE
+static void
LCwritedone()
{
syslog(L_ERROR, "%s internal LCwritedone", LogName);
diff -Naur --recursive inn2-2.3.1.orig/innd/nc.c inn2-2.3.1/innd/nc.c
--- inn2-2.3.1.orig/innd/nc.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/innd/nc.c Fri Jun 8 20:25:44 2001
@@ -25,25 +25,25 @@
*/
typedef struct _NCDISPATCH {
STRING Name;
- FUNCPTR Function;
+ void (*Function)();
int Size;
} NCDISPATCH;
-static FUNCTYPE NCauthinfo();
-static FUNCTYPE NChead();
-static FUNCTYPE NChelp();
-static FUNCTYPE NCihave();
-static FUNCTYPE NClist();
-static FUNCTYPE NCmode();
-static FUNCTYPE NCquit();
-static FUNCTYPE NCstat();
-static FUNCTYPE NCxpath();
-static FUNCTYPE NC_unimp();
+static void NCauthinfo();
+static void NChead();
+static void NChelp();
+static void NCihave();
+static void NClist();
+static void NCmode();
+static void NCquit();
+static void NCstat();
+static void NCxpath();
+static void NC_unimp();
/* new modules for streaming */
-static FUNCTYPE NCxbatch();
-static FUNCTYPE NCcheck();
-static FUNCTYPE NCtakethis();
-static FUNCTYPE NCwritedone();
+static void NCxbatch();
+static void NCcheck();
+static void NCtakethis();
+static void NCwritedone();
static int NCcount; /* Number of open connections */
static NCDISPATCH NCcommands[] = {
@@ -242,7 +242,7 @@
** Write-done function. Close down or set state for what we expect to
** read next.
*/
-static FUNCTYPE
+static void
NCwritedone(CHANNEL *cp)
{
switch (cp->State) {
@@ -271,7 +271,7 @@
/*
** The "head" command.
*/
-static FUNCTYPE NChead(CHANNEL *cp)
+static void NChead(CHANNEL *cp)
{
char *p;
TOKEN *token;
@@ -307,7 +307,7 @@
/*
** The "stat" command.
*/
-static FUNCTYPE NCstat(CHANNEL *cp)
+static void NCstat(CHANNEL *cp)
{
char *p;
TOKEN *token;
@@ -345,7 +345,7 @@
** The "authinfo" command. Actually, we come in here whenever the
** channel is in CSgetauth state and we just got a command.
*/
-static FUNCTYPE
+static void
NCauthinfo(CHANNEL *cp)
{
static char AUTHINFO[] = "authinfo ";
@@ -398,7 +398,7 @@
/*
** The "help" command.
*/
-static FUNCTYPE
+static void
NChelp(CHANNEL *cp)
{
static char LINE1[] = "For more information, contact \"";
@@ -427,7 +427,7 @@
** The "ihave" command. Check the Message-ID, and see if we want the
** article or not. Set the state appropriately.
*/
-static FUNCTYPE
+static void
NCihave(CHANNEL *cp)
{
char *p;
@@ -524,7 +524,7 @@
** The "xbatch" command. Set the state appropriately.
*/
-static FUNCTYPE
+static void
NCxbatch(CHANNEL *cp)
{
char *p;
@@ -574,7 +574,7 @@
/*
** The "list" command. Send the active file.
*/
-static FUNCTYPE
+static void
NClist(CHANNEL *cp)
{
char *p;
@@ -627,7 +627,7 @@
/*
** The "mode" command. Hand off the channel.
*/
-static FUNCTYPE
+static void
NCmode(CHANNEL *cp)
{
char *p;
@@ -661,7 +661,7 @@
/*
** The "quit" command. Acknowledge, and set the state to closing down.
*/
-static FUNCTYPE NCquit(CHANNEL *cp)
+static void NCquit(CHANNEL *cp)
{
cp->State = CSwritegoodbye;
NCwritereply(cp, NNTP_GOODBYE_ACK);
@@ -671,7 +671,7 @@
/*
** The "xpath" command. Return the paths for an article is.
*/
-static FUNCTYPE
+static void
NCxpath(CHANNEL *cp)
{
/* not available for storageapi */
@@ -682,7 +682,7 @@
/*
** The catch-all for inimplemented commands.
*/
-static FUNCTYPE
+static void
NC_unimp(CHANNEL *cp)
{
char *p;
@@ -730,7 +730,7 @@
** Check whatever data is available on the channel. If we got the
** full amount (i.e., the command or the whole article) process it.
*/
-static FUNCTYPE NCproc(CHANNEL *cp)
+static void NCproc(CHANNEL *cp)
{
char *p;
NCDISPATCH *dp;
@@ -1189,7 +1189,7 @@
** Read whatever data is available on the channel. If we got the
** full amount (i.e., the command or the whole article) process it.
*/
-static FUNCTYPE
+static void
NCreader(CHANNEL *cp)
{
int i;
@@ -1334,7 +1334,7 @@
** The "check" command. Check the Message-ID, and see if we want the
** article or not. Stay in command state.
*/
-static FUNCTYPE
+static void
NCcheck(CHANNEL *cp)
{
char *p;
@@ -1420,7 +1420,7 @@
** The "takethis" command. Article follows.
** Remember <id> for later ack.
*/
-static FUNCTYPE NCtakethis(CHANNEL *cp)
+static void NCtakethis(CHANNEL *cp)
{
char *p;
int msglen;
diff -Naur --recursive inn2-2.3.1.orig/innd/rc.c inn2-2.3.1/innd/rc.c
--- inn2-2.3.1.orig/innd/rc.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/innd/rc.c Fri Jun 8 20:25:44 2001
@@ -266,7 +266,7 @@
/*
** Called when input is ready to read. Shouldn't happen.
*/
-static FUNCTYPE
+static void
RCrejectreader(CHANNEL *cp)
{
syslog(L_ERROR, "%s internal RCrejectreader (%s)", LogName,
@@ -277,7 +277,7 @@
/*
** Write-done function for rejects.
*/
-static FUNCTYPE
+static void
RCrejectwritedone(register CHANNEL *cp)
{
switch (cp->State) {
@@ -344,7 +344,7 @@
** Read function. Accept the connection and either create an NNTP channel
** or spawn an nnrpd to handle it.
*/
-static FUNCTYPE
+static void
RCreader(CHANNEL *cp)
{
int fd;
@@ -540,7 +540,7 @@
/*
** Write-done function. Shouldn't happen.
*/
-static FUNCTYPE
+static void
RCwritedone()
{
syslog(L_ERROR, "%s internal RCwritedone", LogName);
diff -Naur --recursive inn2-2.3.1.orig/innd/site.c inn2-2.3.1/innd/site.c
--- inn2-2.3.1.orig/innd/site.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/innd/site.c Fri Jun 8 20:25:44 2001
@@ -21,7 +21,7 @@
** Called when input is ready to read. Shouldn't happen.
*/
/* ARGSUSED0 */
-static FUNCTYPE SITEreader(CHANNEL *cp)
+static void SITEreader(CHANNEL *cp)
{
syslog(L_ERROR, "%s internal SITEreader", LogName);
}
@@ -31,7 +31,7 @@
** Called when write is done. No-op.
*/
/* ARGSUSED0 */
-static FUNCTYPE SITEwritedone(CHANNEL *cp)
+static void SITEwritedone(CHANNEL *cp)
{
}
@@ -547,7 +547,7 @@
** The channel was sleeping because we had to spool our output to
** a file. Flush and restart.
*/
-static FUNCTYPE SITEspoolwake(CHANNEL *cp)
+static void SITEspoolwake(CHANNEL *cp)
{
SITE *sp;
int *ip;
diff -Naur --recursive inn2-2.3.1.orig/innfeed/malloc.c inn2-2.3.1/innfeed/malloc.c
--- inn2-2.3.1.orig/innfeed/malloc.c Fri Jun 8 20:21:56 2001
+++ inn2-2.3.1/innfeed/malloc.c Fri Jun 8 20:25:44 2001
@@ -237,7 +237,7 @@
}
}
-FREEVAL
+void
free(cp)
POINTER cp;
{
diff -Naur --recursive inn2-2.3.1.orig/lib/malloc.c inn2-2.3.1/lib/malloc.c
--- inn2-2.3.1.orig/lib/malloc.c Fri Jun 8 20:21:56 2001
+++ inn2-2.3.1/lib/malloc.c Fri Jun 8 20:25:44 2001
@@ -233,7 +233,7 @@
}
}
-FREEVAL free(POINTER cp)
+void free(POINTER cp)
{
int size;
union overhead *op;
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/article.c inn2-2.3.1/nnrpd/article.c
--- inn2-2.3.1.orig/nnrpd/article.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/nnrpd/article.c Fri Jun 8 20:25:44 2001
@@ -609,7 +609,7 @@
/*
** Fetch part or all of an article and send it to the client.
*/
-FUNCTYPE CMDfetch(int ac, char *av[])
+void CMDfetch(int ac, char *av[])
{
char buff[SMBUF];
SENDDATA *what;
@@ -712,7 +712,7 @@
/*
** Go to the next or last (really previous) article in the group.
*/
-FUNCTYPE CMDnextlast(int ac, char *av[])
+void CMDnextlast(int ac, char *av[])
{
char *msgid;
int save;
@@ -912,7 +912,7 @@
** XHDR, a common extension. Retrieve specified header from a
** Message-ID or article range.
*/
-FUNCTYPE CMDxhdr(int ac, char *av[])
+void CMDxhdr(int ac, char *av[])
{
int i;
char *p;
@@ -1016,7 +1016,7 @@
/*
** XOVER another extension. Dump parts of the overview database.
*/
-FUNCTYPE CMDxover(int ac, char *av[])
+void CMDxover(int ac, char *av[])
{
BOOL DidReply;
ARTRANGE range;
@@ -1157,7 +1157,7 @@
** XPAT, an uncommon extension. Print only headers that match the pattern.
*/
/* ARGSUSED */
-FUNCTYPE CMDxpat(int ac, char *av[])
+void CMDxpat(int ac, char *av[])
{
char *p;
int i;
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/commands.c inn2-2.3.1/nnrpd/commands.c
--- inn2-2.3.1.orig/nnrpd/commands.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/nnrpd/commands.c Fri Jun 8 20:25:44 2001
@@ -206,7 +206,7 @@
}
/* ARGSUSED */
-FUNCTYPE
+void
CMDauthinfo(ac, av)
int ac;
char *av[];
@@ -374,7 +374,7 @@
** The "DATE" command. Part of NNTPv2.
*/
/* ARGSUSED0 */
-FUNCTYPE
+void
CMDdate(ac, av)
int ac;
char *av[];
@@ -397,7 +397,7 @@
** List active newsgroups, newsgroup descriptions, and distributions.
*/
/* ARGSUSED0 */
-FUNCTYPE
+void
CMDlist(int ac, char *av[])
{
QIOSTATE *qp;
@@ -550,7 +550,7 @@
** Handle the "mode" command.
*/
/* ARGSUSED */
-FUNCTYPE
+void
CMDmode(ac, av)
int ac;
char *av[];
@@ -575,7 +575,7 @@
** Display new newsgroups since a given date and time for specified
** <distributions>.
*/
-FUNCTYPE CMDnewgroups(int ac, char *av[])
+void CMDnewgroups(int ac, char *av[])
{
static char USAGE[] =
"NEWGROUPS [yy]yymmdd hhmmss [\"GMT\"|\"UTC\"] [<distributions>]";
@@ -714,7 +714,7 @@
** Post an article.
*/
/* ARGSUSED */
-FUNCTYPE
+void
CMDpost(int ac, char *av[])
{
static char *article;
@@ -888,7 +888,7 @@
** The "xpath" command. An uncommon extension.
*/
/* ARGSUSED */
-FUNCTYPE
+void
CMDxpath(ac, av)
int ac;
char *av[];
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/group.c inn2-2.3.1/nnrpd/group.c
--- inn2-2.3.1.orig/nnrpd/group.c Thu Jan 11 01:55:23 2001
+++ inn2-2.3.1/nnrpd/group.c Fri Jun 8 20:25:44 2001
@@ -14,7 +14,7 @@
** Change to or list the specified newsgroup. If invalid, stay in the old
** group.
*/
-FUNCTYPE CMDgroup(int ac, char *av[])
+void CMDgroup(int ac, char *av[])
{
static char NOSUCHGROUP[] = NNTP_NOSUCHGROUP;
ARTNUM i;
@@ -134,7 +134,7 @@
/*
** Used by ANU-News clients.
*/
-FUNCTYPE
+void
CMDxgtitle(ac, av)
int ac;
char *av[];
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/misc.c inn2-2.3.1/nnrpd/misc.c
--- inn2-2.3.1.orig/nnrpd/misc.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/nnrpd/misc.c Fri Jun 8 20:25:44 2001
@@ -899,7 +899,7 @@
*/
/* ARGSUSED0 */
-FUNCTYPE
+void
CMDstarttls(ac, av)
int ac;
char *av[];
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/newnews.c inn2-2.3.1/nnrpd/newnews.c
--- inn2-2.3.1.orig/nnrpd/newnews.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/nnrpd/newnews.c Fri Jun 8 20:25:44 2001
@@ -189,7 +189,7 @@
** Return the Message-ID of any articles after the specified date,
** and within the specified distributions.
*/
-FUNCTYPE CMDnewnews(int ac, char *av[]) {
+void CMDnewnews(int ac, char *av[]) {
static char **groups;
char *group;
char *p, *q;
diff -Naur --recursive inn2-2.3.1.orig/nnrpd/nnrpd.c inn2-2.3.1/nnrpd/nnrpd.c
--- inn2-2.3.1.orig/nnrpd/nnrpd.c Fri Jun 8 20:21:57 2001
+++ inn2-2.3.1/nnrpd/nnrpd.c Fri Jun 8 20:25:44 2001
@@ -57,7 +57,7 @@
typedef struct _CMDENT {
STRING Name;
- FUNCPTR Function;
+ void (*Function)();
BOOL Needauth;
int Minac;
int Maxac;
@@ -91,25 +91,25 @@
static char *HostErrorStr;
#endif /* defined(DO_NNRP_GETHOSTBYADDR) */
-extern FUNCTYPE CMDauthinfo();
-extern FUNCTYPE CMDdate();
-extern FUNCTYPE CMDfetch();
-extern FUNCTYPE CMDgroup();
-static FUNCTYPE CMDhelp();
-extern FUNCTYPE CMDlist();
-extern FUNCTYPE CMDmode();
-extern FUNCTYPE CMDnewgroups();
-extern FUNCTYPE CMDnewnews();
-extern FUNCTYPE CMDnextlast();
-extern FUNCTYPE CMDpost();
-extern FUNCTYPE CMDxgtitle();
-extern FUNCTYPE CMDxhdr();
-extern FUNCTYPE CMDxover();
-extern FUNCTYPE CMDxpat();
-extern FUNCTYPE CMDxpath();
-extern FUNCTYPE CMD_unimp();
+extern void CMDauthinfo();
+extern void CMDdate();
+extern void CMDfetch();
+extern void CMDgroup();
+static void CMDhelp();
+extern void CMDlist();
+extern void CMDmode();
+extern void CMDnewgroups();
+extern void CMDnewnews();
+extern void CMDnextlast();
+extern void CMDpost();
+extern void CMDxgtitle();
+extern void CMDxhdr();
+extern void CMDxover();
+extern void CMDxpat();
+extern void CMDxpath();
+extern void CMD_unimp();
#ifdef HAVE_SSL
-extern FUNCTYPE CMDstarttls();
+extern void CMDstarttls();
#endif
int LLOGenable;
@@ -243,7 +243,7 @@
** The "help" command.
*/
/* ARGSUSED0 */
-static FUNCTYPE
+static void
CMDhelp(int ac, char *av[])
{
CMDENT *cp;
@@ -294,7 +294,7 @@
** Unimplemented catch-all.
*/
/* ARGSUSED0 */
-FUNCTYPE
+void
CMD_unimp(ac, av)
int ac;
char *av[];
More information about the inn-patches
mailing list