Resolve two naming conflicts with getline(3) on NetBSD-current

Note time_t breakage, requiring more work
This commit is contained in:
Hauke Fath 2011-06-09 19:49:50 +00:00 committed by Thomas Klausner
parent af09db6144
commit 05061d17c1
4 changed files with 64 additions and 1 deletions

View file

@ -6,3 +6,5 @@
- in NetBSD 3, postinstall removes the compatibility symlink /bin/rmail;
have C News check for the new location /usr/libexec/rmail
- add DESTDIR support
- C News breaks on NetBSD-current, since
sizeof(time_t) == 8 != sizeof(long)

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2011/06/09 16:22:57 hfath Exp $
$NetBSD: distinfo,v 1.7 2011/06/09 19:49:50 hfath Exp $
SHA1 (c-news/c-news.tar.Z) = fee33ba349ab42a547b48fc6f8427c374817dd8d
RMD160 (c-news/c-news.tar.Z) = 5f222302bea9c145d438fd1edd7366cd69ce5c30
@ -79,6 +79,8 @@ SHA1 (patch-libc_stdfdopen.c) = 43eab21585776ad233b87aec033f15f1dec54cf7
SHA1 (patch-libcnews_hostname.c) = 3cceb06faf6979fa4e7bea66a636dea89ac06e32
SHA1 (patch-libcnews_rerror.c) = 002fb7f8b4c3fbdf04e8f55af2f2294f215b73bb
SHA1 (patch-maint_histinfo.c) = fc3145aa2c53063f1f5ddee98637ea30f344d9ef
SHA1 (patch-readnews_active.c) = 61d1a6d825173022f6ed6f1d59094872193518c8
SHA1 (patch-readnews_newsrc.c) = c03512912372cc470c2bfdfdf77dc51a11cfafbb
SHA1 (patch-relay_control.c) = 915f3cf92c1e057e08246db1da2898a6a4240037
SHA1 (patch-util_newslock.c) = cdc5490a53ba65e7e540a20539021be5a0485c8e
SHA1 (patch-util_now.c) = b5008d1afd5a3f389ee30b659a71760ff980f89a

View file

@ -0,0 +1,25 @@
$NetBSD: patch-readnews_active.c,v 1.1 2011/06/09 19:49:50 hfath Exp $
Resolve conflict between stdio.h::getline() and our local one
by renaming.
--- readnews/active.c.orig 1990-11-19 22:20:05.000000000 +0000
+++ readnews/active.c
@@ -12,7 +12,7 @@ static int lineno;
static active *alist;
static
-getline(f, g, d, d2)
+cnews_getline(f, g, d, d2)
register FILE *f;
char *g, *d, *d2;
{
@@ -61,7 +61,7 @@ readactive()
alist = last = NULL;
f = fopenf(ctlfile("active"), "r");
lineno = 0;
- while (getline(f, gbuf, dbuf, dbuf2)) {
+ while (cnews_getline(f, gbuf, dbuf, dbuf2)) {
ap = NEW(active);
ap->a_name = newstr(gbuf);
ap->a_seq = atol(dbuf);

View file

@ -0,0 +1,34 @@
$NetBSD: patch-readnews_newsrc.c,v 1.1 2011/06/09 19:49:50 hfath Exp $
Resolve conflict between stdio.h::getline() and our local one
by renaming.
--- readnews/newsrc.c.orig 1995-04-28 01:12:19.000000000 +0000
+++ readnews/newsrc.c
@@ -14,7 +14,7 @@ static int rclineno; /* current lineno
static bool sortrc; /* if we should sort on output */
static newsrc *findnewsrc();
-static int getline();
+static int cnews_getline();
static int dooptions();
static int dorcline();
static int writengline();
@@ -33,7 +33,7 @@ readnewsrc()
return;
rclineno = 0;
- while (getline(f, word, rest))
+ while (cnews_getline(f, word, rest))
if (CMP(word, option) == 0)
dooptions(rest);
else
@@ -47,7 +47,7 @@ readnewsrc()
* This is a poor design, as w & r are unchecked for overrun.
*/
static int
-getline(f, w, r)
+cnews_getline(f, w, r)
register FILE *f;
char *w, *r;
{