This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sysdeps/unix/sysv/linux/lseek.c on ILP32 question


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]