Debian Codegraph @

debian/patches/fix_lfs

raw
1 --- a/ifcico/hydra.c
2 +++ b/ifcico/hydra.c
3 @@ -531,8 +531,8 @@ int hydra_batch(int role, file_list *to_
4 char *inbuf, *outbuf;
5 int rxlen, txlen; /* length of receive/transmit buffer */
6 long txwindow, rxwindow; /* window sizes */
7 - long txpos, rxpos; /* file positions */
8 - long stxpos, srxpos;
9 + off_t txpos, rxpos; /* file positions */
10 + off_t stxpos, srxpos;
11 long longnum;
12 int hdxlink = 0;
13 int txretries, rxretries;
14 @@ -865,7 +865,7 @@ int hydra_batch(int role, file_list *to_
15 break;
16 }
17
18 - loginf("Hydra send \"%s\" as \"%s\" (%lu bytes) dated %s",
19 + loginf("Hydra send \"%s\" as \"%s\" (%llu bytes) dated %s",
20 S(to_send->local), S(to_send->remote),
21 (unsigned long) txstat.st_size, date(txstat.st_mtime));
22 (void) time(&txstarttime);
23 @@ -894,7 +894,7 @@ int hydra_batch(int role, file_list *to_
24 {
25 if (to_send)
26 {
27 - txlen = sprintf(txbuf, "%08lx%08lx%08lx%08lx%08lx",
28 + txlen = sprintf(txbuf, "%08lx%08llx%08lx%08lx%08lx",
29 mtime2sl(txstat.st_mtime),
30 txstat.st_size,
31 0UL,
32 @@ -1355,11 +1355,11 @@ int hydra_batch(int role, file_list *to_
33 else if ((rxlen > 41) && (rxbuf[rxlen - 1] == 0))
34 {
35 time_t timestamp;
36 - long filesize;
37 + off_t filesize;
38 char dosname[8 + 1 + 3 + 1], *name;
39
40
41 - sscanf(rxbuf, "%08lx%08lx%*08x%*08x%*08x",
42 + sscanf(rxbuf, "%08lx%08llx%*08x%*08x%*08x",
43 &timestamp, &filesize);
44
45 /* convert timestamp to UNIX time */
46 @@ -1400,7 +1400,7 @@ int hydra_batch(int role, file_list *to_
47 name = dosname;
48 }
49
50 - loginf("Hydra receive: \"%s\" (%ld bytes) dated %s",
51 + loginf("Hydra receive: \"%s\" (%lld bytes) dated %s",
52 name, filesize, date(timestamp));
53
54 rxfp = openfile(name, timestamp, filesize, &rxpos, resync);
55 --- a/ifcico/tcpproto.c
56 +++ b/ifcico/tcpproto.c
57 @@ -31,7 +31,8 @@ static FILE *in;
58 static char txbuf[2048];
59 static char rxbuf[2048];
60 static int rx_type;
61 -static long startime,endtime,rxbytes,sbytes;
62 +static time_t startime,endtime;
63 +static off_t rxbytes,sbytes;
64
65 static int sendfile(char *,char *);
66 static int finsend(void);
67 @@ -244,7 +245,7 @@ int success;
68 sbytes=rxbytes-sbytes;
69 (void)time(&endtime);
70 if ((startime=endtime-startime) == 0L) startime=1L;
71 - loginf("%s %lu bytes in %ld seconds (%ld cps)",
72 + loginf("%s %llu bytes in %ld seconds (%ld cps)",
73 success?"received":"dropped after",
74 sbytes,startime,sbytes/startime);
75 return rc;
76 --- a/ifcico/zmrecv.c
77 +++ b/ifcico/zmrecv.c
78 @@ -24,7 +24,7 @@
79 static FILE *fout=NULL;
80
81 static int Usevhdrs;
82 -static long rxbytes;
83 +static off_t rxbytes;
84 static int Eofseen; /* indicates cpm eof (^Z) has been received */
85 static int errors;
86 static time_t startime,etime;
87 --- a/ifcico/zmsend.c
88 +++ b/ifcico/zmsend.c
89 @@ -47,7 +47,7 @@ static int Lskipnocor=0;
90 static int Lzconv=0;
91 static int Beenhereb4;
92 static char Myattn[]={0};
93 -static long startime,endtime;
94 +static time_t startime,endtime;
95 static long skipsize;
96 #if 1
97 static char *qbf=