summaryrefslogtreecommitdiffstats
path: root/news/s-news
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-08-04 10:07:22 +0000
committerkrion <krion@FreeBSD.org>2004-08-04 10:07:22 +0000
commit341c46d86f3d54680dca4f36d1ad170197f23b0c (patch)
treefa08aedc75c3684071861f22e49c6c7a96374ab8 /news/s-news
parent8637106dec30f43f7aed2e4b04265413df14bcb8 (diff)
downloadFreeBSD-ports-341c46d86f3d54680dca4f36d1ad170197f23b0c.zip
FreeBSD-ports-341c46d86f3d54680dca4f36d1ad170197f23b0c.tar.gz
Fix build warnings.
PR: ports/69983 Submitted by: maintainer
Diffstat (limited to 'news/s-news')
-rw-r--r--news/s-news/files/patch-inews.c20
-rw-r--r--news/s-news/files/patch-nntpd.c27
-rw-r--r--news/s-news/files/patch-qnews.c23
-rw-r--r--news/s-news/files/patch-rnews.c15
4 files changed, 59 insertions, 26 deletions
diff --git a/news/s-news/files/patch-inews.c b/news/s-news/files/patch-inews.c
new file mode 100644
index 0000000..8dbe739
--- /dev/null
+++ b/news/s-news/files/patch-inews.c
@@ -0,0 +1,20 @@
+--- inews.c.orig Wed Aug 4 03:21:19 2004
++++ inews.c Wed Aug 4 03:28:27 2004
+@@ -30,6 +30,8 @@
+ #endif
+ #ifdef HAVE_MALLOC_H
+ #include <malloc.h>
++#else
++#include <stdlib.h>
+ #endif
+ #ifdef STDC_HEADERS
+ #include <string.h>
+@@ -463,7 +465,7 @@
+
+ static char *message_id(void)
+ {
+- sprintf(buff,"<%lx.%x@%s>",time(0),getpid(),fqdn);
++ sprintf(buff,"<%lx.%x@%s>",(unsigned long)time(0),getpid(),fqdn);
+ return (buff);
+ }
+
diff --git a/news/s-news/files/patch-nntpd.c b/news/s-news/files/patch-nntpd.c
index fad8f1c..c9d7b13 100644
--- a/news/s-news/files/patch-nntpd.c
+++ b/news/s-news/files/patch-nntpd.c
@@ -1,5 +1,5 @@
---- nntpd.c Sat May 18 20:21:56 2002
-+++ nntpd.c Wed Aug 21 22:09:46 2002
+--- nntpd.c.orig Sat May 18 22:21:56 2002
++++ nntpd.c Wed Aug 4 03:40:06 2004
@@ -2,6 +2,7 @@
* S-News version 0.1.9 - A Simple News Server
* Copyright (C) 1998 Christopher John Purnell
@@ -8,7 +8,16 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-@@ -106,6 +107,7 @@
+@@ -22,6 +23,8 @@
+ #include "config.h"
+ #endif
+
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <sys/utsname.h>
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+@@ -106,6 +109,7 @@
static void do_listgroup(char *);
static void do_xover(char *);
static void do_xhdr(char *);
@@ -16,7 +25,7 @@
static void do_xpath(char *);
static void do_ihave(char *);
static void do_post(char *);
-@@ -239,6 +241,10 @@
+@@ -239,6 +243,10 @@
{
do_xhdr(arg);
}
@@ -27,7 +36,7 @@
else if (!strcasecmp(line,"xover"))
{
do_xover(arg);
-@@ -811,10 +817,11 @@
+@@ -811,10 +819,11 @@
printf(".\r\n");
}
@@ -41,7 +50,7 @@
char *fmt,*cp;
unsigned char c;
int i;
-@@ -835,7 +842,7 @@
+@@ -835,7 +844,7 @@
i = -1; fmt = "%u \r\n";
for (u=0; u<7; ++u)
{
@@ -50,7 +59,7 @@
{
fmt = ((i=u) < 5) ? "%u %s\r\n" : "%u %u\r\n";
}
-@@ -1118,6 +1125,7 @@
+@@ -1118,6 +1127,7 @@
printf("ARTICLE HEAD BODY STAT\r\n");
printf("GROUP LIST NEXT LAST\r\n");
printf("LISTGROUP XHDR XOVER XPATH\r\n");
@@ -58,7 +67,7 @@
}
if (canpost)
{
-@@ -1127,7 +1135,7 @@
+@@ -1127,7 +1137,7 @@
{
printf("IHAVE ");
}
@@ -67,7 +76,7 @@
}
static int match_pat(char *pat,char *str)
-@@ -1533,3 +1541,177 @@
+@@ -1533,3 +1543,177 @@
return str;
}
diff --git a/news/s-news/files/patch-qnews.c b/news/s-news/files/patch-qnews.c
index 415cbed..c28838e 100644
--- a/news/s-news/files/patch-qnews.c
+++ b/news/s-news/files/patch-qnews.c
@@ -1,5 +1,5 @@
---- qnews.c 2002-05-18 20:21:42.000000000 +0100
-+++ qnews.c 2002-10-12 19:23:55.000000000 +0100
+--- qnews.c.orig Sat May 18 22:21:42 2002
++++ qnews.c Wed Aug 4 03:24:43 2004
@@ -2,6 +2,8 @@
* S-News version 0.1.9 - A Simple News Server
* Copyright (C) 1998 Christopher John Purnell
@@ -9,7 +9,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-@@ -22,7 +24,13 @@
+@@ -22,7 +24,18 @@
#include "config.h"
#endif
@@ -20,10 +20,15 @@
+#endif
+#include <fcntl.h>
+
++#ifdef HAVE_MALLOC_H
++#include <malloc.h>
++#else
++#include <stdlib.h>
++#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-@@ -79,15 +87,37 @@
+@@ -79,15 +92,37 @@
if (match_group(ptr->value,line,end))
{
FILE *fp;
@@ -44,7 +49,7 @@
- return (1);
+ perror(file);
+ return (1);
-+ }
+ }
+ if (flock(fd,LOCK_EX) == -1)
+ {
+ perror(file);
@@ -54,7 +59,7 @@
+ {
+ perror(file);
+ return (1);
- }
++ }
+ #else
+ if (!(fp = fopen(file,"a")))
+ {
@@ -65,7 +70,7 @@
if (fputs(line,fp) < 0 ||
fputc('\n',fp) < 0)
-@@ -103,6 +133,9 @@
+@@ -103,6 +138,9 @@
return (1);
}
@@ -75,7 +80,7 @@
break;
}
}
-@@ -204,7 +237,7 @@
+@@ -204,7 +242,7 @@
return (0);
break;
case '[':
@@ -84,7 +89,7 @@
{
unsigned char rev,mat=0,l=0,h,u=*str;
-@@ -229,6 +262,8 @@
+@@ -229,6 +267,8 @@
if (mat==rev)
return (0);
}
diff --git a/news/s-news/files/patch-rnews.c b/news/s-news/files/patch-rnews.c
index 5682144..d9a58d3 100644
--- a/news/s-news/files/patch-rnews.c
+++ b/news/s-news/files/patch-rnews.c
@@ -1,5 +1,5 @@
---- rnews.c 2002-05-18 20:21:26.000000000 +0100
-+++ rnews.c 2002-09-08 12:50:41.000000000 +0100
+--- rnews.c.orig Sat May 18 22:21:26 2002
++++ rnews.c Wed Aug 4 03:43:51 2004
@@ -2,6 +2,8 @@
* S-News version 0.1.9 - A Simple News Server
* Copyright (C) 1998 Christopher John Purnell
@@ -119,7 +119,7 @@
if (!queue) return (0);
execl(QNEWSPATH,QNEWSARG0,article,0);
-@@ -301,11 +344,79 @@
+@@ -301,11 +344,78 @@
{
approved=1;
}
@@ -191,15 +191,14 @@
+ if (vsender[0])
+ {
-+ int ires=isolate_addr(vsender);
+ DEBLOG((stderr,"vsender address = %s (result %d)\n",
-+ vsender,ires));
++ vsender,isolate_addr(vsender)));
+ }
+
return (*msgid?ret:0);
}
-@@ -597,7 +708,10 @@
+@@ -597,7 +707,10 @@
int ret;
if (!(dbf = open_history(CONFDIR"/history",GDBM_READER)))
@@ -210,7 +209,7 @@
key.dsize = strlen(key.dptr = id) + 1;
-@@ -605,6 +719,7 @@
+@@ -605,6 +718,7 @@
gdbm_close(dbf);
@@ -218,7 +217,7 @@
return (ret);
}
-@@ -642,3 +757,232 @@
+@@ -642,3 +756,232 @@
}
return (dbf);
}
OpenPOWER on IntegriCloud