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.
 
 
 
 
 
 

106 lines
2.4 KiB

Index: src/main/file.c
--- src/main/file.c.orig 2004-11-06 22:07:05 +0100
+++ src/main/file.c 2004-11-07 11:54:34 +0100
@@ -27,20 +27,20 @@
*/
void main_getsize(opts_t opts)
{
- struct stat64 sb;
+ struct stat sb;
int i, fd;
opts->size = 0;
if (opts->argc < 1) {
- if (fstat64(STDIN_FILENO, &sb) == 0)
+ if (fstat(STDIN_FILENO, &sb) == 0)
opts->size = sb.st_size;
return;
}
for (i = 0; i < opts->argc; i++) {
if (strcmp(opts->argv[i], "-") == 0) {
- if (fstat64(STDIN_FILENO, &sb) == 0) {
+ if (fstat(STDIN_FILENO, &sb) == 0) {
opts->size = sb.st_size;
} else {
opts->size = 0;
@@ -48,16 +48,16 @@
}
}
- if (stat64(opts->argv[i], &sb) == 0) {
+ if (stat(opts->argv[i], &sb) == 0) {
if (S_ISBLK(sb.st_mode)) {
/*
* Get the size of block devices by opening
* them and seeking to the end.
*/
- fd = open64(opts->argv[i], O_RDONLY);
+ fd = open(opts->argv[i], O_RDONLY);
if (fd >= 0) {
opts->size +=
- lseek64(fd, 0, SEEK_END);
+ lseek(fd, 0, SEEK_END);
close(fd);
}
} else {
@@ -76,8 +76,8 @@
*/
int main_nextfd(opts_t opts, int filenum, int oldfd)
{
- struct stat64 isb;
- struct stat64 osb;
+ struct stat isb;
+ struct stat osb;
int fd;
if (oldfd > 0) {
@@ -99,7 +99,7 @@
if (strcmp(opts->argv[filenum], "-") == 0) {
fd = STDIN_FILENO;
} else {
- fd = open64(opts->argv[filenum], O_RDONLY);
+ fd = open(opts->argv[filenum], O_RDONLY);
if (fd < 0) {
fprintf(stderr, "%s: %s: %s: %s\n",
opts->program_name,
@@ -109,7 +109,7 @@
}
}
- if (fstat64(fd, &isb)) {
+ if (fstat(fd, &isb)) {
fprintf(stderr, "%s: %s: %s: %s\n",
opts->program_name,
_("failed to stat file"),
@@ -118,7 +118,7 @@
return -1;
}
- if (fstat64(STDOUT_FILENO, &osb)) {
+ if (fstat(STDOUT_FILENO, &osb)) {
fprintf(stderr, "%s: %s: %s\n",
opts->program_name,
_("failed to stat output file"), strerror(errno));
Index: src/main/main.c
--- src/main/main.c.orig 2004-11-06 22:07:05 +0100
+++ src/main/main.c 2004-11-07 11:53:34 +0100
@@ -66,7 +66,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;
@@ -103,7 +103,7 @@
fd = main_nextfd(opts, n, -1);
if (fd < 0)
return 1;
- if (fstat64(fd, &sb) == 0) {
+ if (fstat(fd, &sb) == 0) {
main_transfer_bufsize(sb.st_blksize * 32);
}
}