projects
/
project
/
make_ext4fs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make_ext4fs: Remove off64_t in favor of standard off_t
[project/make_ext4fs.git]
/
libsparse
/
output_file.c
diff --git
a/libsparse/output_file.c
b/libsparse/output_file.c
index
a581c45
..
d435b1c
100644
(file)
--- a/
libsparse/output_file.c
+++ b/
libsparse/output_file.c
@@
-35,13
+35,6
@@
#include "sparse_crc32.h"
#include "sparse_format.h"
#include "sparse_crc32.h"
#include "sparse_format.h"
-#if defined(__APPLE__) && defined(__MACH__)
-#define lseek64 lseek
-#define ftruncate64 ftruncate
-#define mmap64 mmap
-#define off64_t off_t
-#endif
-
#define min(a, b) \
({ typeof(a) _a = (a); typeof(b) _b = (b); (_a < _b) ? _a : _b; })
#define min(a, b) \
({ typeof(a) _a = (a); typeof(b) _b = (b); (_a < _b) ? _a : _b; })
@@
-119,12
+112,12
@@
static int file_open(struct output_file *out, int fd)
static int file_skip(struct output_file *out, int64_t cnt)
{
static int file_skip(struct output_file *out, int64_t cnt)
{
- off
64
_t ret;
+ off_t ret;
struct output_file_normal *outn = to_output_file_normal(out);
struct output_file_normal *outn = to_output_file_normal(out);
- ret = lseek
64
(outn->fd, cnt, SEEK_CUR);
+ ret = lseek(outn->fd, cnt, SEEK_CUR);
if (ret < 0) {
if (ret < 0) {
- error_errno("lseek
64
");
+ error_errno("lseek");
return -1;
}
return 0;
return -1;
}
return 0;
@@
-135,7
+128,7
@@
static int file_pad(struct output_file *out, int64_t len)
int ret;
struct output_file_normal *outn = to_output_file_normal(out);
int ret;
struct output_file_normal *outn = to_output_file_normal(out);
- ret = ftruncate
64
(outn->fd, len);
+ ret = ftruncate(outn->fd, len);
if (ret < 0) {
return -errno;
}
if (ret < 0) {
return -errno;
}
@@
-191,7
+184,7
@@
static int gz_file_open(struct output_file *out, int fd)
static int gz_file_skip(struct output_file *out, int64_t cnt)
{
static int gz_file_skip(struct output_file *out, int64_t cnt)
{
- off
64
_t ret;
+ off_t ret;
struct output_file_gz *outgz = to_output_file_gz(out);
ret = gzseek(outgz->gz_fd, cnt, SEEK_CUR);
struct output_file_gz *outgz = to_output_file_gz(out);
ret = gzseek(outgz->gz_fd, cnt, SEEK_CUR);
@@
-204,7
+197,7
@@
static int gz_file_skip(struct output_file *out, int64_t cnt)
static int gz_file_pad(struct output_file *out, int64_t len)
{
static int gz_file_pad(struct output_file *out, int64_t len)
{
- off
64
_t ret;
+ off_t ret;
struct output_file_gz *outgz = to_output_file_gz(out);
ret = gztell(outgz->gz_fd);
struct output_file_gz *outgz = to_output_file_gz(out);
ret = gztell(outgz->gz_fd);
@@
-699,7
+692,7
@@
int write_fd_chunk(struct output_file *out, unsigned int len,
aligned_diff = offset - aligned_offset;
buffer_size = len + aligned_diff;
aligned_diff = offset - aligned_offset;
buffer_size = len + aligned_diff;
- char *data = mmap
64
(NULL, buffer_size, PROT_READ, MAP_SHARED, fd,
+ char *data = mmap(NULL, buffer_size, PROT_READ, MAP_SHARED, fd,
aligned_offset);
if (data == MAP_FAILED) {
return -errno;
aligned_offset);
if (data == MAP_FAILED) {
return -errno;