summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/pwritev.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-04-14 21:18:57 +0000
committerJakub Jelinek <jakub@redhat.com>2009-04-14 21:18:57 +0000
commitded8b949ca91eae8bfcc9d3337913dda620416b3 (patch)
treeb5d9f4c36dcce925adb8b4b64ffbfb5d4e1debfe /sysdeps/unix/sysv/linux/pwritev.c
parent5cb5c2a33524f2332f107c4e78737086f57b0e0b (diff)
Updated to fedora-glibc-20090414T2104cvs/fedora-glibc-2_9_90-16
Diffstat (limited to 'sysdeps/unix/sysv/linux/pwritev.c')
-rw-r--r--sysdeps/unix/sysv/linux/pwritev.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c
index df430ffe46..5c30eae51f 100644
--- a/sysdeps/unix/sysv/linux/pwritev.c
+++ b/sysdeps/unix/sysv/linux/pwritev.c
@@ -29,6 +29,7 @@
#include <sys/syscall.h>
#include <kernel-features.h>
+
#ifndef PWRITEV
# define PWRITEV pwritev
# define PWRITEV_REPLACEMENT __atomic_pwritev_replacement
@@ -36,8 +37,10 @@
# define OFF_T off_t
#endif
+#ifndef __ASSUME_PWRITEV
static ssize_t PWRITEV_REPLACEMENT (int, __const struct iovec *,
int, OFF_T) internal_function;
+#endif
ssize_t
@@ -51,14 +54,16 @@ PWRITEV (fd, vector, count, offset)
ssize_t result;
if (SINGLE_THREAD_P)
- result = INLINE_SYSCALL (pwritev, 5, fd, vector, count, offset >> 32,
- offset & 0xffffffff);
+ result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
else
{
int oldtype = LIBC_CANCEL_ASYNC ();
- result = INLINE_SYSCALL (pwritev, 5, fd, vector, count, offset >> 32,
- offset & 0xffffffff);
+ result = INLINE_SYSCALL (pwritev, 5, fd, vector, count,
+ (off_t) ((off64_t) offset >> 32),
+ (off_t) (offset & 0xffffffff));
LIBC_CANCEL_RESET (oldtype);
}