ports/69983: [MAINTAINER] news/s-news: fix all warnings
Andrey Slusar
vasallia at ukr.net
Wed Aug 4 06:00:43 UTC 2004
>Number: 69983
>Category: ports
>Synopsis: [MAINTAINER] news/s-news: fix all warnings
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 04 06:00:42 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Andrey Slusar
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
Santinel
>Environment:
System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Jul 29 19:48:26 EEST 2004 root at santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386
>Description:
Fix all build warnings with -Wall
>How-To-Repeat:
>Fix:
--- s-news.diff begins here ---
diff -ruN /usr/ports/news/s-news/files/patch-inews.c s-news/files/patch-inews.c
--- /usr/ports/news/s-news/files/patch-inews.c Thu Jan 1 03:00:00 1970
+++ s-news/files/patch-inews.c Wed Aug 4 03:29:02 2004
@@ -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 -ruN /usr/ports/news/s-news/files/patch-nntpd.c s-news/files/patch-nntpd.c
--- /usr/ports/news/s-news/files/patch-nntpd.c Sun Jul 25 14:45:43 2004
+++ s-news/files/patch-nntpd.c Wed Aug 4 03:40:17 2004
@@ -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 -ruN /usr/ports/news/s-news/files/patch-qnews.c s-news/files/patch-qnews.c
--- /usr/ports/news/s-news/files/patch-qnews.c Sun Jul 25 14:45:43 2004
+++ s-news/files/patch-qnews.c Wed Aug 4 03:24:55 2004
@@ -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 -ruN /usr/ports/news/s-news/files/patch-rnews.c s-news/files/patch-rnews.c
--- /usr/ports/news/s-news/files/patch-rnews.c Sun Jul 25 14:45:43 2004
+++ s-news/files/patch-rnews.c Wed Aug 4 03:44:01 2004
@@ -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);
}
--- s-news.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list