summaryrefslogtreecommitdiff
path: root/news/nn/patches/patch-au
blob: 807cd80f5cc9383a62def75c771fa1cfc20c422f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
$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