Fix preadv, pwritev and fallocate for -D_FILE_OFFSET_BITS=64.

As reported in http://bugzilla.redhat.com/533063 , preadv/pwritev prototypes
are wrong on 32-bit arches with -D_FILE_OFFSET_BITS=64 and as I've just
found, fallocate is wrong too.
The problem is that only off_t is remapped to the 64-bit type transparently,
__off_t is not.
This commit is contained in:
Jakub Jelinek 2009-11-06 09:26:31 -08:00 committed by Ulrich Drepper
parent 13f6812ffb
commit 34df851b33
9 changed files with 30 additions and 16 deletions

View File

@ -1,3 +1,17 @@
2009-11-04 Jakub Jelinek <jakub@redhat.com>
* misc/sys/uio.h (preadv, pwritev): Fix type of last argument
when -D_FILE_OFFSET_BITS=64.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (fallocate): Fix types
of last two arguments when -D_FILE_OFFSET_BITS=64.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h (fallocate): Likewise.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (fallocate): Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (fallocate): Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (fallocate): Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (fallocate): Likewise.
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h (fallocate): Likewise.
2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
[BZ #4457]

View File

@ -80,10 +80,10 @@ extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count,
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (preadv, (int __fd, __const struct iovec *__iovec,
int __count, __off_t __offset),
int __count, __off64_t __offset),
preadv64) __wur;
extern ssize_t __REDIRECT (pwritev, (int __fd, __const struct iovec *__iovec,
int __count, __off_t __offset),
int __count, __off64_t __offset),
pwritev64) __wur;
# else
# define preadv preadv64

View File

@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64

View File

@ -253,8 +253,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64

View File

@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64

View File

@ -279,8 +279,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64

View File

@ -259,8 +259,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64

View File

@ -278,8 +278,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64

View File

@ -273,8 +273,8 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
__off_t __len),
extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
__off64_t __len),
fallocate64);
# else
# define fallocate fallocate64