Fix large file support.
* scripts/xsparse.c (read_map): Use fseeko. * src/incremen.c (write_directory_file): Likewise.
This commit is contained in:
committed by
Sergey Poznyakoff
parent
3925776b41
commit
a0fd0d95e2
@@ -22,6 +22,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@@ -279,7 +280,7 @@ read_map (FILE *ifp)
|
|||||||
sparse_map[i].numbytes = string_to_size (nbuf, NULL);
|
sparse_map[i].numbytes = string_to_size (nbuf, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
fseek (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE,
|
fseeko (ifp, ((ftell (ifp) + BLOCKSIZE - 1) / BLOCKSIZE) * BLOCKSIZE,
|
||||||
SEEK_SET);
|
SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1410,7 +1410,7 @@ write_directory_file (void)
|
|||||||
if (! fp)
|
if (! fp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fseek (fp, 0L, SEEK_SET) != 0)
|
if (fseeko (fp, 0L, SEEK_SET) != 0)
|
||||||
seek_error (listed_incremental_option);
|
seek_error (listed_incremental_option);
|
||||||
if (sys_truncate (fileno (fp)) != 0)
|
if (sys_truncate (fileno (fp)) != 0)
|
||||||
truncate_error (listed_incremental_option);
|
truncate_error (listed_incremental_option);
|
||||||
|
|||||||
Reference in New Issue
Block a user