Date: Wed, 19 Mar 2014 14:09:29 +0000 (UTC) From: Dirk Meyer <dinoex@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348620 - in head/news/cnews: . files Message-ID: <201403191409.s2JE9TDN066713@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dinoex Date: Wed Mar 19 14:09:29 2014 New Revision: 348620 URL: http://svnweb.freebsd.org/changeset/ports/348620 QAT: https://qat.redports.org/buildarchive/r348620/ Log: - revert r346880 Approved by: bapt - update LICENSE - fix build with new clang Added: head/news/cnews/files/patch-canonhdr.c (contents, props changed) head/news/cnews/files/patch-fileart.c (contents, props changed) head/news/cnews/files/patch-header.c (contents, props changed) head/news/cnews/files/patch-mkov.c (contents, props changed) head/news/cnews/files/patch-newsrc.c (contents, props changed) head/news/cnews/files/patch-trbatch.h - copied, changed from r343280, head/news/cnews/files/patch-trbatch Deleted: head/news/cnews/files/patch-trbatch Modified: head/news/cnews/Makefile head/news/cnews/files/patch-batcher.c head/news/cnews/files/patch-readnews.c head/news/cnews/files/patch-trbatch.c Modified: head/news/cnews/Makefile ============================================================================== --- head/news/cnews/Makefile Wed Mar 19 13:28:59 2014 (r348619) +++ head/news/cnews/Makefile Wed Mar 19 14:09:29 2014 (r348620) @@ -33,11 +33,13 @@ PATCHFILES= c-news-patch-fileart.c c-new MAINTAINER= dinoex@FreeBSD.org COMMENT= An news server -LICENSE= BSD4CLAUSE +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYRIGHT MAKE_JOBS_UNSAFE= yes -CFLAGS+= -Wno-return-type +USE_GCC= any + DIST_SUBDIR= ${DISTNAME} NO_WRKSUBDIR= yes MAKEFILE= makefile Modified: head/news/cnews/files/patch-batcher.c ============================================================================== --- head/news/cnews/files/patch-batcher.c Wed Mar 19 13:28:59 2014 (r348619) +++ head/news/cnews/files/patch-batcher.c Wed Mar 19 14:09:29 2014 (r348620) @@ -1,5 +1,5 @@ --- batch/batcher.c.orig 1994-11-28 02:14:35.000000000 +0100 -+++ batch/batcher.c 2011-05-12 14:53:06.000000000 +0200 ++++ batch/batcher.c 2014-02-07 16:48:39.000000000 +0100 @@ -12,6 +12,7 @@ */ @@ -8,3 +8,18 @@ #include <string.h> #include <signal.h> #include <sys/types.h> +@@ -116,7 +117,7 @@ + */ + if (debug) + warning("can't find `%s'", article); +- return; ++ return 0; + } + + if (fstat(artfile, &sbuf) < 0) +@@ -143,4 +144,5 @@ + } + + (void) close(artfile); ++ return 0; + } Added: head/news/cnews/files/patch-canonhdr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/cnews/files/patch-canonhdr.c Wed Mar 19 14:09:29 2014 (r348620) @@ -0,0 +1,19 @@ +--- util/canonhdr.c.orig 1995-04-28 02:51:38.000000000 +0200 ++++ util/canonhdr.c 2014-02-07 16:47:48.000000000 +0100 +@@ -92,7 +92,7 @@ + static char expiresnm[] = "Expires: "; + + if (!washdr) +- return; ++ return 0; + while ((hdr = gethdr(in, &nolimit, &ishdr)) != NULL && ishdr) { + register char *cp; + static char canonmsgid[] = "Message-Id:"; +@@ -141,6 +141,7 @@ + (void) fputs(datenm, stdout); + (void) fputs(canondate("now", "now"), stdout); + } ++ return 0; + } + + int Added: head/news/cnews/files/patch-fileart.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/cnews/files/patch-fileart.c Wed Mar 19 14:09:29 2014 (r348620) @@ -0,0 +1,17 @@ +--- relay/fileart.c.orig 1995-04-28 02:51:36.000000000 +0200 ++++ relay/fileart.c 2014-02-07 17:03:01.000000000 +0100 +@@ -791,7 +805,7 @@ + canthappen(art, 'i', + "mkcopies called with ST_REFUSED set (can't happen)", ""); + if (links == NULL) /* fileart failed? */ +- return; ++ return 0; + + /* fill in any empty links */ + for (lp = link1; lp < linklim; lp++) { +@@ -807,4 +821,5 @@ + nnfree(&lp->l_num); + } + free((char *)links); ++ return 0; + } Added: head/news/cnews/files/patch-header.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/cnews/files/patch-header.c Wed Mar 19 14:09:29 2014 (r348620) @@ -0,0 +1,19 @@ +--- readnews/header.c.orig 1994-08-25 22:15:09.000000000 +0200 ++++ readnews/header.c 2014-02-07 16:54:07.000000000 +0100 +@@ -142,7 +142,7 @@ + memset((char *) hp, 0, sizeof(header)); + while (hfgets(buf, sizeof(buf), f)) { + if (buf[0] == '\n') +- return; ++ return 0; + if (isupper(buf[0]) && (colon = strchr(buf, ':')) && + (space = strchr(buf, ' ')) && (colon + 1 == space)) { + *colon = '\0'; +@@ -220,6 +220,7 @@ + } + } + } ++ return 0; + } + + Added: head/news/cnews/files/patch-mkov.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/cnews/files/patch-mkov.c Wed Mar 19 14:09:29 2014 (r348620) @@ -0,0 +1,19 @@ +--- nov/mkov.c.orig 1994-10-18 04:49:48.000000000 +0100 ++++ nov/mkov.c 2014-02-07 16:52:25.000000000 +0100 +@@ -176,7 +176,7 @@ + error("fstat of %s failed", inname); + if ((statb.st_mode&S_IFMT) == S_IFDIR || + (oldtime > 0 && statb.st_mtime > oldtime)) +- return; /* ignore directories and new files */ ++ return 0; /* ignore directories and new files */ + artnumstr = base; + (void) sprintf(bytes, "%ld", (long)statb.st_size); + } +@@ -212,6 +212,7 @@ + + freehdrs(&hdrs); + } while (!articles && hdr != NULL); ++ return 0; + } + + char * /* NULL at EOF, or malloced, don't free */ Added: head/news/cnews/files/patch-newsrc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/cnews/files/patch-newsrc.c Wed Mar 19 14:09:29 2014 (r348620) @@ -0,0 +1,70 @@ +--- readnews/newsrc.c.orig 1995-04-28 03:12:19.000000000 +0200 ++++ readnews/newsrc.c 2014-02-07 17:01:23.000000000 +0100 +@@ -30,7 +30,7 @@ + error("No $HOME in environment."); + rcname = newstr3(rcname, "/", nrcname); + if ((f = fopen(rcname, "r")) == NULL) +- return; ++ return 0; + + rclineno = 0; + while (getline(f, word, rest)) +@@ -39,6 +39,7 @@ + else + dorcline(word, rest); + (void) fclose(f); ++ return 0; + } + + /* +@@ -101,7 +102,7 @@ + while (isspace(*cp)) + cp++; + if (!*cp) +- return; ++ return 0; + + argc = 2; + argv = (char **) myalloc(2 * sizeof(char *)); +@@ -120,6 +121,7 @@ + if (options(argc, argv, false) < 0) + error("Bad options: %s line %d: %s", rcname, rclineno, s); + free((char *) argv); ++ return 0; + } + + /* +@@ -210,7 +212,7 @@ + donesome = true; + switch (act = (*func)(ap, np, false, false)) { + case stop: +- return; ++ return 0; + case next: + continue; + case nextgroup: +@@ -226,6 +228,7 @@ + if (act != searchgroup && dolast && donesome) + act = (*func)(NIL(active), NIL(newsrc), true, false); + } while (act == searchgroup); ++ return 0; + } + + /* +@@ -281,7 +284,7 @@ + extern int usize; + + if (!rc && (!rcgrps || !*rcgrps)) +- return; ++ return 0; + + signal(SIGINT, SIG_IGN); + signal(SIGQUIT, SIG_IGN); +@@ -301,6 +304,7 @@ + for (np = rc; np; np = np->n_next) + writengline(f, np); + (void) fclose(f); ++ return 0; + } + + static int Modified: head/news/cnews/files/patch-readnews.c ============================================================================== --- head/news/cnews/files/patch-readnews.c Wed Mar 19 13:28:59 2014 (r348619) +++ head/news/cnews/files/patch-readnews.c Wed Mar 19 14:09:29 2014 (r348620) @@ -1,5 +1,5 @@ --- readnews/readnews.c.orig 1995-04-28 03:12:21.000000000 +0200 -+++ readnews/readnews.c 2011-05-12 16:07:47.000000000 +0200 ++++ readnews/readnews.c 2014-02-07 16:57:21.000000000 +0100 @@ -33,7 +33,7 @@ active *alist; /* internal active list */ @@ -9,7 +9,55 @@ bool interrupt; /* if interrupt hit */ char *newsdir; /* %news */ bool su; /* if super user (not used) */ -@@ -950,7 +950,7 @@ +@@ -783,11 +783,12 @@ + helppath = ctlfile("readnews.help"); + if ((f = fopen(helppath, "r")) == NIL(FILE)) { + (void) printf("Can't open %s\n", helppath); +- return; ++ return 0; + } + while ((c = getc(f)) != EOF) + (void) putc(c, stdout); + (void) fclose(f); ++ return 0; + } + + /* +@@ -806,7 +807,7 @@ + #ifdef UNSWMAIL + argv[argc++] = "-s"; + if ((argv[argc++] = getsubject(hp)) == NIL(char)) +- return; ++ return 0; + argv[argc++] = "-i"; + argv[argc++] = fname; + #endif +@@ -821,6 +822,7 @@ + run(mailpath, argv, false); + + free(argv[argc - 2]); ++ return 0; + } + + +@@ -838,7 +840,7 @@ + char *s = getsubject(hp); + + if (s == NULL) +- return; ++ return 0; + (void) strcpy(tmpf, "/tmp/rfXXXXXX"); + (void) mktemp(tmpf); + fo = fopen(tmpf, "w"); +@@ -859,6 +861,7 @@ + free(s); + + (void) unlink(tmpf); ++ return 0; + } + + /* +@@ -950,20 +953,20 @@ register char *cp; register FILE *sf; register char *aname; @@ -18,3 +66,41 @@ extern char *getenv(); if (!*s) { + if ((aname = getenv("HOME")) == NIL(char)) { + (void) printf("No $HOME in environment.\n"); +- return; ++ return 0; + } + s = aname = newstr3(aname, "/", ARTICLES); + } else + aname = NIL(char); + if ((sf = fopen(s, "a")) == NIL(FILE)) { + (void) fprintf(stderr, "readnews: can't open %s\n", s); +- return; ++ return 0; + } + if (aname) + free(aname); +@@ -983,6 +986,7 @@ + (void) putc('\n', sf); + (void) fclose(sf); + fseek(f, pos, 0); ++ return 0; + } + + /* +@@ -1083,7 +1087,7 @@ + fname = ctlfile("readnews.ctl"); + f = fopen(fname, "r"); + if (f == NULL) +- return; ++ return 0; + + while (fgets(line, sizeof(line), f) != NULL) { + line[strlen(line)-1] = '\0'; /* dispose of newline */ +@@ -1103,4 +1107,5 @@ + } + + (void) fclose(f); ++ return 0; + } Modified: head/news/cnews/files/patch-trbatch.c ============================================================================== --- head/news/cnews/files/patch-trbatch.c Wed Mar 19 13:28:59 2014 (r348619) +++ head/news/cnews/files/patch-trbatch.c Wed Mar 19 14:09:29 2014 (r348620) @@ -1,10 +1,88 @@ --- explode/trbatch.c.orig 1994-11-30 23:09:10.000000000 +0100 -+++ explode/trbatch.c 2011-05-12 15:45:54.000000000 +0200 -@@ -2,6 +2,7 @@ - * transmit batch file management (exploder version) ++++ explode/trbatch.c 2014-02-07 18:02:12.000000000 +0100 +@@ -23,6 +23,9 @@ + + static HASHTABLE *nmbftbl; /* name -> batchfile mapping */ + ++static struct batchfile *bfisopen(char *name), *bfincache(char *name); ++static statust bfrealclose(), bfrclose(); ++ + /* + * open "name" for appending. + * +@@ -69,7 +72,7 @@ + nmbftbl = hashcreate(HASHFILSZ, (unsigned (*)())NULL); + bf = (struct batchfile *)hashfetch(nmbftbl, name); + if (bf != NULL) +- return; /* error: name present */ ++ return 0; /* error: name present */ + /* allocate, append & initialise a new entry */ + bf = (struct batchfile *)nemalloc(sizeof *bf); + (void) memset((char *)bf, 0, sizeof *bf); +@@ -81,12 +84,13 @@ + bf->bf_lines = FLUSHEVERY; + if (!hashstore(nmbftbl, bf->bf_name, (HASHDATUM)bf)) + error("can't store under hash key `%s'", name); /* canthappen */ ++ return 0; + } + + /* + * returns a batchfile, never NULL, corresponding to name. */ - #include <stdio.h> -+#include <string.h> - #include <errno.h> - #include "fixerrno.h" - #include <sys/types.h> +-struct batchfile * ++static struct batchfile * + bfincache(name) + char *name; + { +@@ -152,12 +156,13 @@ + register struct batchfile *bf; + + if (chp->closedone) +- return; ++ return 0; + bf = (struct batchfile *)data; + if (bf->bf_str == NULL) +- return; ++ return 0; + chp->status = bfclose(bf); + chp->closedone = YES; ++ return 0; + } + + STATIC statust +@@ -194,6 +199,7 @@ + #endif + if (!hashdelete(nmbftbl, key)) + error("can't delete hash key `%s'", key); /* canthappen */ ++ return 0; + } + + STATIC statust +--- relay/trbatch.c.orig 1993-01-15 05:27:11.000000000 +0100 ++++ relay/trbatch.c 2014-02-07 18:02:37.000000000 +0100 +@@ -14,6 +14,8 @@ + #include "msgs.h" + #include "trbatch.h" + ++static struct batchfile *bfincache(char *name, int ord); ++ + /* tunable parameters */ + #ifndef MASTERDIR + #define MASTERDIR artfile("out.master") +@@ -89,7 +91,7 @@ + nmordtbl = hashcreate(HASHFILSZ, (unsigned (*)())NULL); + hf = (struct hashfilename *)hashfetch(nmordtbl, name); + if (hf != NULL) +- return; /* error: name present */ ++ return 0; /* error: name present */ + /* allocate, append & initialise a new entry */ + hf = (struct hashfilename *)nemalloc(sizeof *hf); + hf->hf_mbf = mbford; +@@ -97,6 +99,7 @@ + errunlock("can't store under hash key `%s'", name); + ordtombfs[ord] = mbford; + otomvalid[ord] = YES; ++ return 0; + } + + Copied and modified: head/news/cnews/files/patch-trbatch.h (from r343280, head/news/cnews/files/patch-trbatch) ============================================================================== --- head/news/cnews/files/patch-trbatch Fri Feb 7 16:46:04 2014 (r343280, copy source) +++ head/news/cnews/files/patch-trbatch.h Wed Mar 19 14:09:29 2014 (r348620) @@ -17,35 +17,3 @@ extern struct batchfile batchfile[]; /* try to keep open always */ #define lastbf &batchfile[NOPENBFS-1] ---- explode/trbatch.c.orig Wed Nov 30 23:09:10 1994 -+++ explode/trbatch.c Sun Oct 8 11:22:03 2006 -@@ -23,6 +23,9 @@ - - static HASHTABLE *nmbftbl; /* name -> batchfile mapping */ - -+static struct batchfile *bfisopen(char *name), *bfincache(char *name); -+static statust bfrealclose(), bfrclose(); -+ - /* - * open "name" for appending. - * -@@ -86,7 +89,7 @@ - /* - * returns a batchfile, never NULL, corresponding to name. - */ --struct batchfile * -+static struct batchfile * - bfincache(name) - char *name; - { ---- relay/trbatch.c.orig Fri Jan 15 05:27:11 1993 -+++ relay/trbatch.c Sun Oct 8 11:24:34 2006 -@@ -14,6 +14,8 @@ - #include "msgs.h" - #include "trbatch.h" - -+static struct batchfile *bfincache(char *name, int ord); -+ - /* tunable parameters */ - #ifndef MASTERDIR - #define MASTERDIR artfile("out.master")
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403191409.s2JE9TDN066713>