This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: sysdeps/unix/sysv/linux/lseek.c on ILP32 question
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Steve Ellcey <sellcey at caviumnetworks dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 21 Feb 2017 19:58:25 +0100
- Subject: Re: sysdeps/unix/sysv/linux/lseek.c on ILP32 question
- Authentication-results: sourceware.org; auth=none
- References: <1487701367.2866.118.camel@caviumnetworks.com>
On Feb 21 2017, Steve Ellcey <sellcey@caviumnetworks.com> wrote:
> I am looking at sysdeps/unix/sysv/linux/lseek.c and the code for when
> __NR__llseek is defined. It has:
>
> int rc = INLINE_SYSCALL_CALL (_llseek, fd,
> (long) (((uint64_t) (offset)) >> 32),
> (long) offset, &res, whence);
>
> And I am not sure the conversion from offset to the two llseek
> arguments is correct for both LP64 and ILP32 modes when offset is
> negative.
This isn't used for LP64, which won't have _llseek.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."