You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.3 KiB
101 lines
2.3 KiB
Index: src/main/file.c |
|
--- src/main/file.c.orig Wed Jan 14 20:10:51 2004 |
|
+++ src/main/file.c Sat Jan 24 21:51:55 2004 |
|
@@ -27,20 +27,20 @@ |
|
*/ |
|
void main_getsize(opts_t options) |
|
{ |
|
- struct stat64 sb; |
|
+ struct stat sb; |
|
int i, fd; |
|
|
|
options->size = 0; |
|
|
|
if (options->argc < 1) { |
|
- if (fstat64(STDIN_FILENO, &sb) == 0) |
|
+ if (fstat(STDIN_FILENO, &sb) == 0) |
|
options->size = sb.st_size; |
|
return; |
|
} |
|
|
|
for (i = 0; i < options->argc; i++) { |
|
if (strcmp(options->argv[i], "-") == 0) { |
|
- if (fstat64(STDIN_FILENO, &sb) == 0) { |
|
+ if (fstat(STDIN_FILENO, &sb) == 0) { |
|
options->size = sb.st_size; |
|
} else { |
|
options->size = 0; |
|
@@ -48,11 +48,11 @@ |
|
} |
|
} |
|
|
|
- if (stat64(options->argv[i], &sb) == 0) { |
|
+ if (stat(options->argv[i], &sb) == 0) { |
|
if (S_ISBLK(sb.st_mode)) { |
|
- fd = open64(options->argv[i], O_RDONLY); |
|
+ fd = open(options->argv[i], O_RDONLY); |
|
if (fd >= 0) { |
|
- options->size += lseek64(fd, 0, SEEK_END); |
|
+ options->size += lseek(fd, 0, SEEK_END); |
|
close(fd); |
|
} |
|
} else { |
|
@@ -70,8 +70,8 @@ |
|
*/ |
|
int main_nextfd(opts_t options, int filenum, int oldfd) |
|
{ |
|
- struct stat64 isb; |
|
- struct stat64 osb; |
|
+ struct stat isb; |
|
+ struct stat osb; |
|
int fd; |
|
|
|
if (oldfd > 0) { |
|
@@ -91,7 +91,7 @@ |
|
return STDIN_FILENO; |
|
} |
|
|
|
- fd = open64(options->argv[filenum], O_RDONLY); |
|
+ fd = open(options->argv[filenum], O_RDONLY); |
|
if (fd < 0) { |
|
fprintf(stderr, "%s: %s: %s: %s\n", |
|
options->program_name, |
|
@@ -101,7 +101,7 @@ |
|
return -1; |
|
} |
|
|
|
- if (fstat64(fd, &isb)) { |
|
+ if (fstat(fd, &isb)) { |
|
fprintf(stderr, "%s: %s: %s: %s\n", |
|
options->program_name, |
|
_("failed to stat file"), |
|
@@ -111,7 +111,7 @@ |
|
return -1; |
|
} |
|
|
|
- if (fstat64(STDOUT_FILENO, &osb)) { |
|
+ if (fstat(STDOUT_FILENO, &osb)) { |
|
fprintf(stderr, "%s: %s: %s\n", |
|
options->program_name, |
|
_("failed to stat output file"), |
|
Index: src/main/main.c |
|
--- src/main/main.c.orig Wed Jan 14 20:10:42 2004 |
|
+++ src/main/main.c Sat Jan 24 21:52:10 2004 |
|
@@ -65,7 +65,7 @@ |
|
struct timeval start_time, next_update, next_reset, cur_time; |
|
struct timeval init_time; |
|
long double elapsed, tilreset; |
|
- struct stat64 sb; |
|
+ struct stat sb; |
|
int fd, n; |
|
|
|
fd = -1; |
|
@@ -102,7 +102,7 @@ |
|
fd = main_nextfd(options, n, -1); |
|
if (fd < 0) |
|
return 1; |
|
- if (fstat64(fd, &sb) == 0) { |
|
+ if (fstat(fd, &sb) == 0) { |
|
main_transfer_bufsize (sb.st_blksize * 32); |
|
} |
|
}
|
|
|