File positions are off_t nowdays, not long, so:

long -> off_t
  fseek -> fseeko

  NOTE: that fseek not works for >long offsets files per POSIX:

  [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
  cannot be represented correctly in an object of type long.
This commit is contained in:
Andrey A. Chernov 2001-09-01 23:01:29 +00:00
parent 7a27e6571b
commit bb8d56ce53

View File

@ -607,7 +607,7 @@ sendrequest(cmd, local, remote, printnames)
rc = -1; rc = -1;
switch (curtype) { switch (curtype) {
case TYPE_A: case TYPE_A:
rc = fseek(fin, (long) restart_point, SEEK_SET); rc = fseeko(fin, restart_point, SEEK_SET);
break; break;
case TYPE_I: case TYPE_I:
case TYPE_L: case TYPE_L:
@ -1019,18 +1019,18 @@ recvrequest(cmd, local, remote, lmode, printnames, ignorespecial)
case TYPE_A: case TYPE_A:
if (is_retr && restart_point) { if (is_retr && restart_point) {
int ch; int ch;
long i, n; off_t i, n;
if (fseek(fout, 0L, SEEK_SET) < 0) if (fseeko(fout, (off_t)0, SEEK_SET) < 0)
goto done; goto done;
n = (long)restart_point; n = restart_point;
for (i = 0; i++ < n;) { for (i = 0; i++ < n;) {
if ((ch = getc(fout)) == EOF) if ((ch = getc(fout)) == EOF)
goto done; goto done;
if (ch == '\n') if (ch == '\n')
i++; i++;
} }
if (fseek(fout, 0L, SEEK_CUR) < 0) { if (fseeko(fout, (off_t)0, SEEK_CUR) < 0) {
done: done:
warn("local: %s", local); warn("local: %s", local);
progress = oprogress; progress = oprogress;