This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20349] New: 64-bit value is passed differently in p{readv,writev}{64}
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 11 Jul 2016 19:10:20 +0000
- Subject: [Bug libc/20349] New: 64-bit value is passed differently in p{readv,writev}{64}
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20349
Bug ID: 20349
Summary: 64-bit value is passed differently in
p{readv,writev}{64}
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
sysdeps/unix/sysv/linux/sysdep.h has
/* Provide a common macro to pass 64-bit value on syscalls. */
#if __WORDSIZE == 64 || defined __ASSUME_WORDSIZE64_ILP32
# define SYSCALL_LL(val) (val)
# define SYSCALL_LL64(val) (val)
#else
#define SYSCALL_LL(val) \
__LONG_LONG_PAIR ((val) >> 31, (val))
#define SYSCALL_LL64(val) \
__LONG_LONG_PAIR ((long) ((val) >> 32), (long) ((val) & 0xffffffff))
#endif
/* Provide a macro to pass the off{64}_t argument on p{readv,writev}{64}. */
#define LO_HI_LONG(val) \
(long) (val), \
(long) (((uint64_t) (val)) >> 32)
sysdeps/unix/sysv/linux/pread.c has
ssize_t
__libc_pread (int fd, void *buf, size_t count, off_t offset)
{
return SYSCALL_CANCEL (pread, fd, buf, count,
__ALIGNMENT_ARG SYSCALL_LL (offset));
}
sysdeps/unix/sysv/linux/pread64.c has
ssize_t
__libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
{
return SYSCALL_CANCEL (pread64, fd, buf, count,
__ALIGNMENT_ARG SYSCALL_LL64 (offset));
}
Why shouldn't preadv.c/preadv64.c use SYSCALL_LL and SYSCALL_LL64?
--
You are receiving this mail because:
You are on the CC list for the bug.