07eded835b
over NNTP without any access to a news spool file system. NOV is accessed using the XOVER command (INN has this and it is available for nntpd too).
63 lines
1.5 KiB
Text
63 lines
1.5 KiB
Text
$NetBSD: patch-au,v 1.2 1999/08/22 22:55:46 kim Exp $
|
|
|
|
--- news.c.orig Fri Jul 3 14:58:51 1998
|
|
+++ news.c Sun Aug 22 18:13:43 1999
|
|
@@ -23,7 +23,7 @@
|
|
{
|
|
register char *bp, *cp, **fptr;
|
|
int siz, all, date_only;
|
|
- off_t pos;
|
|
+ long pos;
|
|
|
|
pos = ftell(f);
|
|
|
|
@@ -238,11 +238,11 @@
|
|
FILE *f;
|
|
struct stat statb;
|
|
#ifndef DONT_COUNT_LINES
|
|
- off_t digest_artlen;
|
|
+ long digest_artlen;
|
|
#endif /* DONT_COUNT_LINES */
|
|
#ifdef NNTP
|
|
int lazy = 0;
|
|
- off_t fpos;
|
|
+ long fpos;
|
|
FILE *nntp_get_article();
|
|
#endif /* NNTP */
|
|
|
|
@@ -275,9 +275,9 @@
|
|
/* necessary because empty files wreak havoc */
|
|
if (fstat(fileno(f), &statb) < 0 ||
|
|
#ifdef NOV
|
|
- (art->lpos = statb.st_size, statb.st_size <= (off_t)0)) {
|
|
+ (art->lpos = (long)statb.st_size, statb.st_size <= (off_t)0)) {
|
|
#else
|
|
- statb.st_size < art->lpos || statb.st_size <= (off_t)0) {
|
|
+ (long)statb.st_size < art->lpos || statb.st_size <= (off_t)0) {
|
|
#endif /* NOV */
|
|
fclose(f);
|
|
return who_am_i == I_AM_MASTER ? (FILE *)1 : NULL;
|
|
@@ -363,12 +363,12 @@
|
|
}
|
|
|
|
if (modes & FILL_OFFSETS) {
|
|
- fseek(f, (off_t)0, 2);
|
|
+ fseek(f, (long)0, 2);
|
|
news.ng_lpos = ftell(f);
|
|
}
|
|
#ifdef NNTP
|
|
else if (use_nntp && (art->flag & (A_DIGEST | A_FOLDER)) == 0) {
|
|
- fseek(f, (off_t)0, 2);
|
|
+ fseek(f, (long)0, 2);
|
|
art->lpos = ftell(f);
|
|
}
|
|
#endif
|
|
@@ -391,7 +391,7 @@
|
|
}
|
|
#ifdef NNTP
|
|
else if (use_nntp && (art->flag & (A_DIGEST | A_FOLDER)) == 0) {
|
|
- fseek(f, (off_t)0, 2);
|
|
+ fseek(f, (long)0, 2);
|
|
art->lpos = ftell(f);
|
|
}
|
|
#endif
|